Change dgui geom [SOLVED]

I’d like to change a geom for a DirectGUI element, but not as in change it to another geom but to manipulate it (hide/show its subparts, setColorScale(), etc). Can this be done or should I reconstruct my geom, make the change and replace the old one with the new one?

I was trying to change the node I pass to the constructor, but it looks like the dgui just makes a copy of that node. Gui[‘geom’] returs the geom but I can’t get it to change its color in any normal way.

Is there a trick to it or the geom is as good as lost once it’s part of a widget?

You can use object.stateNodePath[0] to get the visible geometry of an existing DirectGui object. If it’s a button, use object.stateNodePath[DGG.BUTTON_READY_STATE] (or BUTTON_DEPRESSED_STATE, BUTTON_ROLLOVER_STATE, BUTTON_INACTIVE_STATE).


Thanks (again!), I hope this was the last piece of my gui puzzle.