0

Hello i want to create an AddOn in Blender. I'm working with visual studio code. I'm kinda new to this so my problem is that i want to have a label called "color" in my addon. In that label i want to give or change the color of my object. I don't know how to start or know the keywords/methods i need to use to change the color of an object. Can somebody help me? For the start it would be enough for me if i just could choose between the colors red, blue and yellow

I'm sorry if this seems like as if i just want to have the code but i have like zero programming skills and i searched for days for tutorials that could help me but i coudn't find one or i didn't understand them. So i would really appreciate it, if someone could help me with my problem.

def draw(self, context):
    layout = self.layout

    Color_Stones = layout.box()
    Color_Stones.label(text="Color")
Esra C.
  • 1
  • 1
  • 1
    AFAIK, coloring a label is not exposed to the API. – brockmann Jun 06 '20 at 22:19
  • sorry i meant that a want to color my object in my addon. I only have written this: Color_Stones = layout.box() Color_Stones.label(text="Color") now i want to color my object into blue, red or yellow but i don't have a clue how to do that – Esra C. Jun 06 '20 at 22:36
  • Please take your time and edit the question. Consider that the colour is determined by a shader. I'd suggest try to achieve it manually at first to get all tiny bits you might need. Please read: https://blender.stackexchange.com/help/how-to-ask ...keywords, methods and such you can find here: How to create a custom UI? – brockmann Jun 06 '20 at 22:44
  • thank you but i still dont know how to give my objects colors – Esra C. Jun 06 '20 at 23:20
  • 1
    No problem. Again: depends on the shader. How does your shader look like? It's always the same shader? – brockmann Jun 07 '20 at 14:26

0 Answers0