Collapse Group
FasterScene
Posts: 8
I have developed a script that will loop through a large number of objects and apply a material.
That part works fine.
The problem is that after the script has executed, the scene shows all my groups that I created objects in expanded and selected.
I made a loop that deselects.
Now I am looking for code that will allow my parent object to collapse in the Scene tab.
The following calls don't seem to work:
MyObject.select(); // Iselect the object first
MyObject.setCollapsed(); // In documentation but does throws an error
MyObject.closeSelected(); // Does not seem to do anything
Also is there a nice easy way of unselecting all objects in a scene programatically and collapsing the open structures to root nodes?
Post edited by FasterScene on
Comments
Then, select only your root object(s) to collapse and call
or, to collapse everything
Oh yeh Omniflux!
That's much neater!!
Thank you
Just bear in mind that these are not official, documented methods so they may be changed or removed without notice.