@Frood
Your script is fantastic and it so happens that it is exactly what I was trying to achieve. Thank you so much for sharing, I really, really appreciate it :)
In your case, you are loading packed RGB masks - not mono masks - into the layered .EXR and then running the script on a single layer, i.e. the script does not loop through all layers, only the selected layer?
@GeorgeK
The Random Wire Color Tools script is really great for its intended use case, i.e. assigning wire colors to objects in the scene. How are you using it in conjunction with masking in your workflow? For example, are you using packed RGB masks or mono masks? In the case of the former, obviously you can use CMasking_WireColor, but this produces a single RGB mask that would have to be color selected in PS, which may require additional clean-up to generate a clean mask.
There is another script on the
forums (2015) that will generate mono masks based on ALL scene materials, which when used in conjunction with @Frood's script, basically implements the workflow I had imagined. However, unless you keep a VERY tidy scene you are going to generate a bunch of masks you don't need (i.e. materials that are on hidden objects, HDRIs, rayswitch, etc.).
I'm looking through the script (.ms) now to see if there is a way to condition the mask generation loop on only selected objects or based on wire color instead of material.