Hide objects and lights outside of a box
Does anyone know how to write a script that will hide objects and v-ray lights that are completely not inside or touching a box? The script just needs to be a function. It would be best if it didn’t have an interface.
They reason why I need this, is I am rendering animations with v-ray, deadline, and RPManager and if I can hide the objects and lights I don’t need, per camera shot, it will substantially reduce my render times. Deadline has an option which will delete hidden objects, and in doing so, it reduces the size of the submitted files and reduces render time. I have been using layers and selection sets but they do not work well enough for what I need. Thank you for any help you can provide!