Request for a script to rename sequentially selected objects

Next
 From:  Moi3dFan
11554.1 
Is there any possibility to create a script that will number objects depending on the sequence of clicking on them?

That is, you select everything in the right order, and the script assigns a number to them, I think this is very useful
  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
11554.2 In reply to 11554.1 
Hi Moi3dFan,

re:
> Is there any possibility to create a script that will number objects depending on the sequence of clicking on them?

Try this:

script: /* Set name by selection order */ var objs = moi.geometryDatabase.getSelectedObjects(); objs.sortBySelectionOrder(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); obj.name = i+1; }

- Michael

EDITED: 27 Sep 2024 by MICHAEL GIBSON

  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:  Moi3dFan
11554.3 In reply to 11554.2 
You're the best! Thanks!
  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:  Frenchy Pilou (PILOU)
11554.4 
---
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
 

Reply to All Reply to All