Activate checkboxes with materials inside, only

Hello guys,

i would really appreciate your help on this topic: i don't need any UI, just if possible 1 click button that should be small fix after material conversion from VrayBlend to fR-Layer material.
I use finalRender R3.5 engine and after materials conversion from VrayBlend to fR-Layer material, this is usual situation and you can see it in attachment. There are 9 layers but only few of them are filled with materials - 2 in this case, and the rest of them are empty. Since VrayBlendMtl does not have these checkboxes, I need small and fast script to check all fR-Layer materials in entire scene (Max 2012 and 2015) and activate only checkboxes for slots that have materials inside (layer 1 and layer 2 in this case), while checkboxes with "none" label on their slots should remain unchecked (layers 3-9). It would be perfect if this could work for fR-Layer materials in MultiSubs, also.
Just for your reference because i believe most of you don't have finalRender R3.5 installed, both checkboxes and material type slots are array type as you can see on attachment.

Maxscript listener for this attachment and layer 1 checkbox (that is turned off) shows:
meditMaterials[1].enableList[1] = off
Maxscript listener for this attachment and layer 3 material list slot (that is emtpy) shows:
meditMaterials[1].materialList[3] = undefined
Property name for fR-Layer material is:
fR_Layer

Thank you very much for your help.

AttachmentSize
fr-layer_rollout.png20.73 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
igamaximus's picture

Thank you so much mate

I will try with your code tomorrow morning and let you know about the result.
Thanks again, i really appreciate your help.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.