Profile Picture

Free Python Script - Turn All Lights On or Off

Posted By Data Juggler 5 Years Ago
You don't have permission to rate!
Author
Message
Data Juggler
Data Juggler
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 1.8K, Visits: 5.6K
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.










Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png





Reading This Topic