PDA

View Full Version : Assign an object name to another object


ossosso
10-10-2009, 01:33 PM
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:

1. max hide inv
2. max group ungroup
3. macros.run "VRay" "vrayMeshExport"
4. max select all
5. max group group
6. max unhide all

1. I isolate selected group
2. ungroup it
3. run vrayExport mesh tool and click OK
4. select all new vrayproxy objects
5. group them
6. 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" :

0. Create a variable with the name of the selected "group object"
1. 2. 3. 4. 5. 6. (run the script)
7. 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!

CGTalk Moderation
10-10-2009, 01:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.