we have a MaxScript tool that runs a process when the render finishes by adding a #postRender callback to the scene. The problem is that when using distributed render the callback is executed by all the machines that help on the render task. Is there a way to identify from MaxScript if the machine executing the code is the host or one of the slaves so we can run the process only once?
We are mainly using VRay 3.6 on Max 2017 at the moment.
Thanks Morne, unfortunately we use different hosts. Maybe if I find a way to store the sysInfo.computername of the machine that starts the job this would do the trick? Will test that.
If you are using V-Ray spawner to start Max - it sets an environment variable “VRAYSPAWNER” with value “TRUE”. Then in MAXScript you can use systemTools.getEnvVariable "VRAYSPAWNER"
to check for that variable - if present then this Max is running DR jobs.