Hi,

I ended up using the snippet from my previous post. And it seems to work 
great. Thanks for all input. Here is the snippet for completion of the 
thread.
(Out of curiosity, is it possible to mark your own post as complete ?)

mat = 'VRayMtl1'
id = 4
mel.eval('vray addAttributesFromGroup {0} vray_material_id 1;'.format(mat))
mel.eval('vrayAddAttr {0} vrayMaterialId;'.format(mat))
cmds.setAttr (('{0}.vrayMaterialId'.format(mat)), id)

Best Regards,
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5c65cecc-2885-479d-a16b-8f2cdf3b4e4e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to