



Redshift
### RedshiftPhysicalLight ignor specular and shadow ####
import maya.cmds as mc
allLights = mc.ls(type="RedshiftPhysicalLight")
scaleLimit = 90;
#allLights = mc.ls(sl=1)
for l in allLights:
scaleXYZ = mc.getAttr(l+".scale")
if (scaleXYZ[0][0] < scaleLimit and scaleXYZ[0][1] < scaleLimit):
shapeNd = mc.listRelatives(l, shapes=True)
mc.setAttr(shapeNd+".shadow", 0)
mc.setAttr(shapeNd+".affectsSpecular", 0)
### RS-Physlights tag####
import maya.cmds as mc
sel = cmds.ls(sl=1)
lightTag = "Light05"
for i in sel:
getShape = mc.listRelatives(i, shapes=True, path=True)
nt = mc.nodeType(getShape)
if (nt == "RedshiftPhysicalLight"):
mc.setAttr(str(getShape[0])+".aovLightGroup", lightTag, type="string")
else:
print "Not redshift light : " +str(getShape[0])




### redshiftphylight edit option ####
import maya.cmds as m
all_lights = m.ls(type='RedshiftPhysicalLight')
for i in all_lights:
m.setAttr (i + ".areaSamples", 16)
m.setAttr (i + ".volumeNumSamples", 16)
m.setAttr (i + ".exposure", 2)
all_lights = m.ls(type='RedshiftMaterial')
for i in all_lights:
m.setAttr (i + ".refl_samples", 16)
m.setAttr (i + ".refr_samples", 16)
### redshiftphylight edit option ####
import maya.cmds as m
all_lights = m.ls(type='RedshiftPhysicalLight')
for i in all_lights:
m.setAttr (i + ".areaBidirectional", 1)
This is the same as the python attachment.
############################################################################
nameSpace = 'tycho_vaultmech_01_rig:'
lightNameSpace = 'tycho_vaultmech_01_lightrig:'
cmds.parentConstraint(nameSpace+'lightrig_locator', lightNameSpace+'lightrig_grp', mo=0)
cmds.parentConstraint(nameSpace+'center_c_ctl', lightNameSpace+'white_lgt02_grp', mo=0)
cmds.parentConstraint(nameSpace+'bottom_c_ctl', lightNameSpace+'btm_lgt03_gr', mo=0)
cmds.parentConstraint(nameSpace+'head_top_ctl', lightNameSpace+'top_lgt03_gr', mo=0)
sel3 = cmds.ls(lightNameSpace+'white_lgt04_??_gr', et='transform')
sel4 = cmds.ls(nameSpace+'loc_light_*', et='transform')
for i in range(len(sel3)):
cmds.parentConstraint(sel4[i], sel3[i], mo=0)
####vray lock node delete.
import pymel.core as pymel
pymel.delete(pymel.ls(selection=True)[0])
pymel.lockNode(pymel.ls(selection=True)[0], lock=False )