I'm trying to set parameters on multiple VRayLightMesh objects programatically, but I can't seem to get the code right (I am a bit of a maya newbie)
VRMLgts = cmds.ls(type = "VRayLightMesh")
for VRMLgt in VRMLgts:
try :
print VRMLgt.subdivs
except :
print "not working"
try :
lgt = cmds.listRelatives(VRMLgt, p=1)[0]
print lgt.subdivs
except :
print "not working either"
Any ideas where I'm going wrong? I have multiple objects with vrayLightMesh nodes ,but I can't seem to access them in the way I would expect in python.
Thanks for any suggestions.
p.
VRMLgts = cmds.ls(type = "VRayLightMesh")
for VRMLgt in VRMLgts:
try :
print VRMLgt.subdivs
except :
print "not working"
try :
lgt = cmds.listRelatives(VRMLgt, p=1)[0]
print lgt.subdivs
except :
print "not working either"
Any ideas where I'm going wrong? I have multiple objects with vrayLightMesh nodes ,but I can't seem to access them in the way I would expect in python.
Thanks for any suggestions.
p.
Comment