Is there a script to hide all named objects?

Next
 From:  chippwalters
7205.1 
My workflow sometimes creates unnamed objects and now that my object list is getting long, it's hard to 'find' the unamed objects if some other objects have been displayed. I just want to assign a hotkey to automatically hide all 'named' objects. Any help is much appreciated!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7205.2 In reply to 7205.1 
Hi Chipp, try putting this on a shortcut key:

script: /* Hide all named objects */ var objs = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name != '' ) obj.hidden = true; }

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  chippwalters
7205.3 In reply to 7205.2 
Thanks so much Michael! HUGE help :-) I'm working on this med drone and the objects list are getting so large!
A preview...

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7205.4 In reply to 7205.3 
Hi Chipp, you're welcome - wow that drone is turning out great!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7205.5 In reply to 7205.1 
Hi Chipp - also another way to do what you were looking for just occurred to me.

You can select named objects by typing in their names in the X/Y/Z input control, and you can wildcards in the name like for example typing in *wheel would select anything anything with a name that ends with "wheel", and if you just put in plain * there that will match all named objects.

So another way is to type the tab key (which puts focus in the X/Y/Z input control), then type * and push Enter, now all named objects are selected and you can hide them using Edit > Hide.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  chippwalters
7205.6 In reply to 7205.5 
Wow. Didn't know you could do that. Thanks for sharing. I prefer the script, but will use this as a way to select ALL common parts-- sorta like a cheap man's hierarchy tool where you can name each set of parts with a prefix and then select the correct groups.

I was wanting to create a mannequin for positioning in MoI but didn't have a good way to control easily many groups at once. This technique should do the trick!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All