Hi all,
I'm trying to create a simple script, but I'm no scripter, so really hitting a dead end right now.
What I'm trying to do is convert all the materials in a scene to VrayOverrideMtls, but keep the existing material in the basemtl slot. I then need to add a blank black vraymtl to the reflection slot.
I think the general concept should be something like this -
However when doing something like mat.material = VRayOverrideMtl, it discards the existing material, so I need a way to make the existing material move to the basemtl slot.
Does anyone have any ideas? Any help would be really appreciated!
Thanks,
Dean
I'm trying to create a simple script, but I'm no scripter, so really hitting a dead end right now.
What I'm trying to do is convert all the materials in a scene to VrayOverrideMtls, but keep the existing material in the basemtl slot. I then need to add a blank black vraymtl to the reflection slot.
I think the general concept should be something like this -
Code:
[TABLE="align: center, border: 0, cellpadding: 6, cellspacing: 1"] [TR] [TD]for mat in scenematerials do ( mat.material = VRayOverrideMtl basemtl:( mat.material) reflectMtl:(VRayMtl Diffuse = color 0 0 0) )[/TD] [/TR] [/TABLE]
Does anyone have any ideas? Any help would be really appreciated!
Thanks,
Dean
Comment