try this :
import maya.cmds as mc
import maya.mel as mel
for s in mc.ls( sl=1 , type='VRayMtl' ):
mel.eval('string $s = "%s";' % s)
mel.eval( "vray addAttributesFromGroup $s vray_material_id 1" )
cheers,
Raphael
2013/10/14 shapeofmotion <[email protected]>
> Hi!
>
> Does anyone know how to add a vray material id attribute to a material
> with python or pymel?
>
> best regards
> # J
>
> --
> 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/1f90a9ce-6c56-4e23-a266-d51ca48dc841%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
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/CAONGLLGqPrBXbp3xxMOHJ%3DnXt4R6KJk5F_wrjeaKp%3DskJD6ztw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.