Posted on Leave a comment

Maxscript Bits & Tricks – Lights Adjustments & Cleanup

Welcome to a new edition of Maxscript Bits & Tricks, our ongoing tutorial series featuring short and powerful Maxscript snippets to boost your 3ds Max productivity.

This time, we’ll focus on light management, one of the key aspects in optimizing and adjusting a scene — especially in large or complex projects.

In just a few lines of Maxscript, you’ll learn how to:

  • Turn off all lights in the scene except the selected ones
  • Increase the intensity of selected VRay lights by 50%
  • Delete lights that are turned off and not contributing to the scene

These quick actions can help speed up lookdev, clean up unnecessary elements, and keep your renders clean and efficient.

Let’s dive right in!

Code snippets

1. Turn off all lights except the selected ones

This quick snippet will turn off every light in the scene except the ones you’ve selected.
Very handy when you want to isolate and test the effect of specific lights.

InstanceMgr.MakeObjectsUnique selection #group; for o in lights where not o.isSelected do o.on = false

2. Increase intensity of selected VRay lights by 50%

Use this script to quickly boost the intensity (multiplier) of all selected VRayLight objects by 50%.
It works even if they are instanced or unique.

arr = #(); for o in selection where (classOf o)==VRayLight do (if (appendIfUnique arr o.baseObject) then o.multiplier *= 1.5)

3. Delete lights that are turned off

Clean up your scene by removing all lights that are off and not contributing to your render.
This helps declutter the scene and improve render prep times.

delete (for o in lights where o.on == false collect o)

Pro Tip: Lights cleanup and adjustment are essential steps in scene optimization — especially in ArchViz, interior renders, and product visualization projects where lighting plays a key role.

More productivity tools and scripting for 3ds Max

If you found these tips helpful, be sure to check out our professional plugins and tools for 3ds Max.

We also offer custom scripting services to automate repetitive tasks and boost your workflow!

Share
Leave a Reply

Your email address will not be published. Required fields are marked *