0

So I have a rig in Blender, and the rig has a python UI. I have a plan on improving the python UI. In the rig, there's a material with an image texture node that is connected to a Principled BSDF. There, I got an idea to add a way to easily change the image texture from the rig UI. Here's an example:

enter image description here

Unfortunately, I don't really know how to do so. I've seen some posts with almost the same question. But since I'm not really good at python, I can't really understand it well. A question that popped out is how I could implement it into my script and apply the texture to the node. I hope anyone would help explain it to me so I could understand it.

Another thing I want to add is a ColorRamp. In the rig, there's another material with a ColorRamp. And I also want to add it to the python UI. Here's a mockup on what I was planning to do:

enter image description here

  • 1
    All materials are node based so you'd have to create a custom panel, get the material, find each node and display their properties (texture path and color ramp in this case) on that panel (to basically reuse them). However, in order to do that you need to understand python and bpy because there are a few concepts involved. Recommend start here: https://blender.stackexchange.com/questions/57306/how-to-create-a-custom-ui, then e.g.: https://blender.stackexchange.com/questions/207676/node-editor-python-expose-listed-node-groups-dynamically-in-node-shelf-panel/207684#207684 – brockmann Jul 21 '21 at 07:48
  • Can you make an example? Because it's still hard for me to wrap my head around it. – Endertainer007 Jul 21 '21 at 23:51

0 Answers0