Announcement

Collapse
No announcement yet.

Know of a script for controlling lights?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Know of a script for controlling lights?

    I have a scene with three zones, each with their own lighting systems which are a mixture of vray lights and max lights. I only want to have the lights switched on in the area I am rendering. Its a pain to keep manually turning lights off in the areas I am not rendering, and lights on in the areas that I am.

    Anyone know of a script where I can just select a whole bunch of lights and tell them all to turn on or off at the same time?
    Kind Regards,
    Richard Birket
    ----------------------------------->
    http://www.blinkimage.com

    ----------------------------------->

  • #2
    You can't put them on layers or use scene states? Surely it couldnt be hard to even script an on/off script and use layers or selection sets to have the groups. It would be a nice addition to have "groups" in the vray light lister now that you bring this up...
    James Burrell www.objektiv-j.com
    Visit my Patreon patreon.com/JamesBurrell

    Comment


    • #3
      I wrote something like that once...
      Code:
      try (destroyDialog LightSwitch) catch ()
      
      rollout lightSwitch "LightSwitch"
      (
      	button lightsOn "Lights On" pos:[5,10]
      	button lightsOff "Lights Off" pos:[90,10]
      
      	on lightsOn pressed do
      	(
      		if $ != undefined then
      		(
      			for l in $ where superClassOf l == light do
      			(
      				if isProperty l #on then l.on = true
      				if isProperty l #enabled then l.enabled = true
      			)
      		)
      	)
      	
      	on lightsOff pressed do
      	(
      		if $ != undefined then
      		(
      			for l in $ where superClassOf l == light do
      			(
      				if isProperty l #on then l.on = false
      				if isProperty l #enabled then l.enabled = false
      			)
      		)
      	)
      )
      createDialog lightSwitch
      Dan Brew

      Comment


      • #4
        I've done this with layers and 'render hidden lights' turned off.

        Comment

        Working...
        X