Hi folks o/
I’ve been toying with addon development for a while now, and there are some problems I have encountered that I have not yet been able to solve:
- How can I enable/disable some items of an EnumProperty? In my addon, I’m using an instance of an EnumProperty to populate a menu with a list of options. I want to mimic the functionality of the file/edit menus (because those menus seem to be capable of disabling menu items)
- Is it possible to run a function when the blender window is focused? I want to update the menu items based on changes that take place outside of blender. The menu I want to update reads some state from the system, and then presents values in a menu. When I modify the resources outside of blender, and then click the menu in Blender, the menu items are updated and presented as expected. But I would like to be able to have the menu refresh without having to first click on it - perhaps when the user focuses the Blender window?
- What type of UI elements can the status bar support? I’ve got some code that generates a panel with a drop down menu, but instead of having a panel, I want to embed the drop down menu into the status bar - is this possible?
I would really appreciate code samples if any of this is possible - I find the API docs to be lacking in examples, and I keep finding TODOs in place of documentation