Search Replace Object Name
All  1  2-3

Previous
Next
 From:  Michael Gibson
6646.2 In reply to 6646.1 
Hi Scott, try this one:

script: /* Search and replace text in object names */ var search_text = 'CAMERA_PROJECT_FINAL_'; var replace_text = ''; var objects = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.name != '' ) { obj.name = obj.name.replace( search_text, replace_text ); } }

Set up a shortcut key and paste the above in for the command part, then when you trigger it, it will go through all objects (not just the selection) and replace the specified text inside of object names.

- 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:  scott (SSHWARTS)
6646.3 In reply to 6646.2 
Perfect! Works like a charm. Thanks 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-3