Hi!
i don´t know exactly how to define my if condition to replace my Buttons
with different icons at the same place.
Can You help?
only two Buttons:
def draw(self, context):
toolsettings = context.tool_settings
layout = self.layout
button = use
if button == False:
layout.operator("operator_1", text="Left", icon="TRIA_LEFT").use
else:
layout.operator("operator_2", text="Right", icon="TRIA_RIGHT").use
more than two Buttons:
def draw(self, context):
toolsettings = context.tool_settings
layout = self.layout
button = use
if button == False:
layout.operator("operator_1", text="Up", icon="TRIA_UP").use
eflif:
layout.operator("operator_2", text="Down", icon="TRIA_DOWN").use
eflif:
layout.operator("operator_3", text="Left", icon="TRIA_LEFT").use
else:
layout.operator("operator_4", text="Right", icon="TRIA_RIGHT").use