Script for detecting unassigned Effect IDs
At the moment we are working on a big full CG project where we unfortunately need a shitload of Multimattes (vray). And as Artists not always consider putting IDs for everthing the renderings often miss some IDs or multiple Objects share the same ID or whatever.
We are using GBuffer, Effect ID Channels and the Vray effect IDs. So, huge mess so far.
So I started writing a script that lets you pick all objects that share the same GBuffer and that share the effect ID. Also with the possibility to select all objects which have no GBuffer and no effect ID at all.
Worked pretty well so far in testing scenes but then came the big "fuck, I didn't consider that" moment. We're using a lot Multi/Sub Objects and theres the problem.
for gbuffer and effect id I was using lines like this:
for o in objects where o.gbufferchannel == IDNR do selectmore o
for o in objects where o.material.effect_id == IDNR and o.material.override_effect_id == on do selectmore o
but when the Multisub comes in, i have the problem, that multiple objects have the multisub, connected by Material ID, so theres no way to acces the shader by
so the result is an error, that the effect ID is undefined for the selected shader (the multisub). What a surprise :D
I'm sorry I'm not to good at scripting and I'm really destroying my head with this.
So is there a way to check if the shaders of a multisub have effect ID's and select the objects that are using those shaders? Or some workaround? Perhaps highlighting the shaders without Effect IDs in the SME? I hope this was not too confusing.
Thank you a lot,
and have a great day!