0

I'm having a difficulty trying to add a button to my add-on Tools menu for picking a material. Currently I'm doing it by bpy.props.StringProperty() so the user has to write the correct material.

Is it possible and how would I make a material picker box like this one? (from Render Layers menu, material override)

enter image description here

I don't even know what is the name of this so excuse me if this is a duplicate question.

P.S. I would also like to have an object picker, but I'm assuming that once I figure out how to make the material, the object is just next door.

Thank you in advance!

V453000
  • 31
  • 2
  • For most of the UI right click "view source" will reveal python UI code. – batFINGER May 24 '18 at 12:50
  • That I did, but I only found col.prop(rl, "material_override", text="") ... is that it? I guess the actual definition of the button is in some other class somewhere? – V453000 May 24 '18 at 12:52
  • That looks like the thing I was searching for, thank you! I don't really understand how to use it yet but that's a different issue that I need to learn. Thank you very much. – V453000 May 24 '18 at 13:57

0 Answers0