script: make everything visible script: make everything invisible except selected
//===========================================================
//hide everything except what is selected
nodes=Scene.getNodeList();
for(i=0;i<nodes.length;i++) if( !nodes[i].isSelected() ) nodes[i].setVisible(false);
//===========================================================
//make everything (else) visible (again )
nodes=Scene.getNodeList();
for(i=0;i<nodes.length;i++) nodes[i].setVisible(true);
Comments
and there's always and still The PoWARful mcjHideAllBut script found here :
https://sites.google.com/site/mcasualsdazscripts4/mcjhideallbut
I always find it useful to have an invert visibility script, so based on the above @mCasual code, the following should work (I haven't tried it):
nodes=Scene.getNodeList();
for(i=0;i<nodes.length;i++)
{
nodes[i].setVisible(!nodes[i].isVisible());
}
I know there's a redundant set of curly braces, but I learnt to do my C++ coding that way, and it's a habit I can't (and don't want to) break. Shame the code box formatting is broken.
Regards,
Richard