|
By Data Juggler - 5 Years Ago
|
I wrote a Python Script that lets you find all lights in a scene, and you can set them to active or inactive.
Light Controller https://github.com/DataJuggler/PythonScripts/blob/main/LightController.py
Here is a short video that shows its usage and goes over the code:
This is the same thing as going to the Scene and selecting all your lights and activating or deactivating them, but IClone crashed on me when the number of lights was near 600 in my scene.
The one disappointing thing is I can't animate this. If I turn all the lights off on Frame 600, the lights are off on frame 1.
Still neat though. You can also set light colors and other things that could be useful for certain scenes.
If me posting here bothers anyone, I will stick to just the Python forum, but that forum doesn't get very many visitors.
|
|
By charly Rama - 5 Years Ago
|
|
Thank you for this.thank you for all who spend times to search and share it. Thank you guys for your generosity. God bless you
|
|
By wires - 5 Years Ago
|
Interesting feature for lights, but one question regarding your particular scene, Why are you using so many lights?
It is possible to accomplish what you have done using GI Emissive Plane_Round prop supplied with iClone.
In the scene below I have 4 items on stands and each one has an Emissive Plane placed above it and set as a Dummy, the scene lights are switched off:

Global Illumination is also off:

With GI active, lights still off, all of the props are illuminated:

Using the GI settings in the prop modify panel it is also possible to control each individual "light source" above the display items:

The nice thing about this setup is, IMHO, the ability to turn all the display lights on or off with one mouse click in the visuals tab, but still offering control over each and every display "Light" if required.
Please don't get me wrong, I'm not knocking your script as I can imagine that there are indeed scenes requiring a selection of different light sources that could be controlled simultaneously, and if you can figure out how to get keyframes set for them all at once it would be a real winner. :):cool::smooooth:
|
|
By Data Juggler - 5 Years Ago
|
I have tried using the Emissive lights before ad never got that much light out of them. I am sure I don't know how to use them the way you did.
I have 9 shoes stores, and each shoe store has 12 shoes, each shoe has 5 lights is why.
At this point I am done with my scene, so no reason to change it now, but I will keep that in mind for next time.
When I wrote this I was hoping I could animate the active status of a light, but I haven't been able to find a way to do that yet, except for Color.
|
|