[Closed] Assign an object name to another object
hi everyone!
helped by the listener I’ve written a litte script:
into my scene there are more or less 100 group object; each group object has inside 3 or 2 mesh object that identify a Tree model.
Each group is yet correctly positioned and named for example:
-walnut_01
-mesh_01_foliage
-mesh-01_trunk
-pear_tree_01
-mesh_01_trunk
-mesh_01_branch
… and so on
Now I’d like to create a proxy object for each tree model so the scene could be better managed.
I’ve written this little script:
-
max hide inv
-
max group ungroup
-
macros.run “VRay” “vrayMeshExport”
-
max select all
-
max group group
-
max unhide all
-
I isolate selected group
-
ungroup it
-
run vrayExport mesh tool and click OK
-
select all new vrayproxy objects
-
group them
-
unhide all other tree models
It works correctly, but I’d like to update it: I don’t want to lose tree model names, so till now before run the script I copy on the clipboard the “group object” name and then I paste it when I group the new proxy objects.
Can some one help me to update the script in the way that once selected the original “group object” :
- Create a variable with the name of the selected “group object”
-
-
-
-
-
- (run the script)
-
-
-
-
- rename the new “group proxy object” like the one before using the variable I’ve saved
I hope I was clear enough, sorry for the length of the post.
Thank you very much for any kind of help!