Script request
All  1-13  14-20

Previous
Next
 From:  chippwalters
8230.14 
Good hint, Michael. Thanks for sharing!
  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:  nameless
8230.15 In reply to 8230.14 
Hello everyone and apologies for necroing this thread. :|

I am trying to find a way to export my selection as multiple separate .objs and run across this script. What would be the best way to do that? I should probably look for a batch rename script and then run this one- unless there is a simpler way.
  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:  Frenchy Pilou (PILOU)
8230.16 In reply to 8230.15 
Maybe read this entiere little thread http://moi3d.com/forum/index.php?webtag=MOI&msg=8582.1
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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
8230.17 In reply to 8230.15 
Hi nameless, you can try this for assigning a generic name "object_1", "object_2", etc.. to all current unnamed objects:

script: /* assign names to unnamed objects */ var objs = moi.geometryDatabase.getObjects(); var counter = 0; var current_names = []; for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ){ current_names[obj.name] = true; } } for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ) { continue; } ++counter; var name = 'object_' + counter; while ( current_names[name] === true ) { ++counter; name = 'object_' + counter; } obj.name = name; }

- 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:  nameless
8230.18 
Thanks Pilou and Michael,

These both work!

I was wondering- Is there a way or a "bridging" script that can run 2 commands one after the other with a single shortcut? That would help script illiterates like me to be able to cook two commands together. I understand that this could potentially create unexpected problems with dialogues and stuff but it was worth a try :))

Thank you for that naming script Michael! I badly needed it, as I rarely name things, I work messy as hell :|
  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
8230.19 In reply to 8230.18 
Hi nameless,

re:
> I was wondering- Is there a way or a "bridging" script that can run 2 commands one
> after the other with a single shortcut?

Not currently but that is something that I want to add.

- 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:  nameless
8230.20 In reply to 8230.19 
Hi Michael,

Awesome! Happy it's on your radar :D
  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-13  14-20