Thank you,
But I would like to set the id after creation.
like so:
import maya.cmds as cmds
import maya.mel as mel
# add vray material ID
mel.eval("vray addAttributesFromGroup VRayMtl1 vray_material_id 1")
cmds.setAttr('VRayMtl1.vrayMaterialId', 2)
# Error: RuntimeError: file <maya console>
# line 1: setAttr: No object matches name: VRayMtl1.vrayMaterialId
It seems like that the command to add the vray material attribute is not
done before maya tries to set the attr id, and it cant find the attr.
I thought that the commands were executed in turn, can I add callback or
can I somehow make sure that the attr is allowed to be created before we
move on ?
Thanks,
Johan
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/e7d481d8-6e66-4115-9325-509947ac2469%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.