i'm working on this little tool and could really use some guidance. I worked out the RPM related kinks with Grant at RPM but this is still not fully functioning.
It will create a Property CapSet for all lights in the scene. Then it creates a single pass for each light and attempts to turn all but that light off...
It works to turn VRaySun off, but does not turn it back on again...
Also, it is not working with daylight systems. i.e.
It still needs a lot of work beyond these issues. I have yet to take into account the number of existing CapSets.
It will create a Property CapSet for all lights in the scene. Then it creates a single pass for each light and attempts to turn all but that light off...
It works to turn VRaySun off, but does not turn it back on again...
Also, it is not working with daylight systems. i.e.
Code:
$[2].enabled = true
Code:
if not rmpasses.open do RPMdata.RMopenFloater() global allLights = #() for a in lights where classof a != Targetobject do --and classof a != objectset ( append allLights a ) capSet = RPMCaptureProps.createCaptureObjectSet() -- create a new capture set. Would like to add the Name at this point lightCapture = RPMCaptureProps.getMyPropDefinitions lightinputarray:#("On") --Define the properties RPMCaptureProps.assignCaptureProperties #(1) lightCapture --Assign the properties to the capture set. Would like to use the appropriate index here if there were existing CaptureSets RPMCaptureProps.addObjectsToSet 1 allLights suppressProgress:false -- Add all the lights to the CapSet --Build a pass for each light for i = 1 to allLights.count do ( lightname = allLights[i].name RPMdata.AddPassSetup setname:lightname noEdit:true --turn off all lights for k = 1 to allLights.count do ( if (hasproperty allLights[k] "enabled") then allLights[k].enabled = false else if (hasproperty allLights[k][2] "enabled") then allLights[k][2].enabled = false else allLights[k].on = false ) --turn on the corrisponding Light if (hasproperty allLights[i] "enabled") then allLights[i].enabled = true else if (hasproperty allLights[i][2] "enabled") then allLights[i][2].enabled = true else allLights[i].on = true RPMCaptureProps.OPcapture_object allLights ) rmpasses.close() RPMdata.RMopenFloater()
Comment