I have a basic panel and an enum property and I want to change some of the things shown on the panel depending on what is selected in the enum. I tried what was logical and this is what I did:
if self.icons == 'Brightness':
row.prop(scene.ignit_panel, "brightness_icon")
elif self.icons == 'Backlit Keys':
row.prop(scene.ignit_panel, "backlit_keys_icon")
elif self.icons == 'Volume':
row.prop(scene.ignit_panel, "volume_icon")
However it isn't working, it's no longer displaying those things, and everything below it is no longer displaying either. Can this actually be done or am I just showing my noobiness again?
*Update*
I tried playing with the buttons and started getting errors:
Traceback (most recent call last):
File "/Users/MacBook/Documents/Blender/Blends/MacBook/MacBook.blend/macbook_controller.py", line 302, in draw
AttributeError: 'IGLayoutDemoPanel' object has no attribute 'icons'
location: <unknown location>:-1
Thanks, Matthew
scene.ignit_panel
==>scene.ignite_panel
?) or some other bug. $\endgroup$