Foldable Groups in Python GeDialog
-
I feel like I have maybe asked this before, but I couldn't find an answer for python for this.
Is it possible to create foldable groups in a GeDialog? Kind of like what you see in Attribute Settings. I basically just want to be able to make foldable sections in my GeDialog and was struggling to see how to achieve that as the flags didn't seem to be working.
-
For some context, I wrote this plugin many many moons ago, and would like to modernize it a bit, and be able to collapse some of the groups so the whole plugin is not overwhelming https://vimeo.com/manage/videos/83452164
-
-
Interesting. Thank you for that.
So then, that makes me want to ask, in the case of the foldable Transform and Freeze Transform groups in the coordinates tab of an object, would that mean those are like a bitmap button inside of a group is the parent of another group that is just being hidden?
-
Hi @BretBays,
Sorry for the delayed answer.
Depending on how you picture the final look of your gui and how complex the behavior you'd like to have there, the means can be different.
There's no easy way to achieve the same look as with "Freeze Transform" inside GeDialog. The suggested way would be to implement the logic manually and hide/show content by the button or a bitmap button. Such approach is demonstrated in the following examples:
- gedialog_menu_hide_content_r15.py that's pointed out by @Dunhou shows how to hide/show content
- customgui_quicktab_r19.py shows how to organize switch between your data using tab buttons
If you really want to have the exact same look as foldable groups in the Description context, you could probably try drawing your layout with the DescriptionCustomGui that is capable of that (c++ example). However, I personally don't think this approach is worth the effort.
Cheers,
Ilia