Reputation: 481
I tried to automate the process to add a Vray Attribute (Object ID) to an Object in Maya.
I captured the commands in the Script Editor:
vray addAttributesFromGroup |Object vray_objectID 1;
vrayAddAttr |Object vraySeparator_vray_objectID;
vrayAddAttr |Object vrayObjectID;
I am very confused, and don't know which command to use, and how to translate that into Python command.
Thanks for any suggestions.
Upvotes: 0
Views: 2286
Reputation: 5885
You can simply use normal command to do this I think. for example
import maya.cmds as cmds
nodesToAdd = cmds.ls(sl=1, dag=True, shapes=True, long=True)
for node in nodesToAdd:
cmds.vray("addAttributesFromGroup", node, "vray_objectID", 1)
Upvotes: 2