Greetings all!
I’ve decided to try and construct an interface builder for Panda3D. In essence, it would be a GUI tool for creating (loading and saving) language-independent interface description files. I could use the tool to visually create my user interfaces, saving the precious development time that goes into my current “script interface, load it, look at it, decide I hate the look, move everything around, hand-copy the new positions back into the script, quit, load, etc.” process.
To that end, I’m trying to figure out how to “freeze” a DirectGUI component, along the lines of the way that one can “freeze” a subsection of the NodePath by calling nodePath.writeBamFile. The strategy I’m exploring now is to use the DirectGuiBase.configure() method to retrieve all the options on a widget (and a a recursive analysis to get the options on the subcomponents), then distill them into a dictionary of the non-default options—factoring in the special-case options that cannot be changed after initial definition (pos and scale, for instance). The dictionary would be suitable for back-feeding into the constructor to re-create the object.
Does anyone know of a better way to do this than the approach I’m taking? Is there an API call to freeze a DirectGUI object that I’ve missed, or can someone think of a similar but superior method to my approach?
Thank you for your advice!
Take care,
Mark