zeme
02-05-2008, 12:48 PM
Hi again. :)
I wanted to write a script that would change all slots from default Standard to Vraymtl instantly. So this is what i wrote:
macroScript SetVraymtlAll
category:"Martins's Utilities"
(
global a
global foo
global tm
global m
global z
foo = vraymtl diffusemap: none()
a=foo
z=0
for m in meditMaterials do
(
z=z+1
setMeditMaterial z a
)
)
Excuse me for using some random variable names, will have to change everything, when done. :)
Ok, so the problem is that it assigns the new material as instances, so when i add a checker for example as a diffuse map, every slot has a Vraymtl with a checker in diffuse slot. One thing that bugs me is that in material editor there is no sign of it - Make unique button is still inactive.
Any idea why? Some advice? Thanks in advance. :)
I wanted to write a script that would change all slots from default Standard to Vraymtl instantly. So this is what i wrote:
macroScript SetVraymtlAll
category:"Martins's Utilities"
(
global a
global foo
global tm
global m
global z
foo = vraymtl diffusemap: none()
a=foo
z=0
for m in meditMaterials do
(
z=z+1
setMeditMaterial z a
)
)
Excuse me for using some random variable names, will have to change everything, when done. :)
Ok, so the problem is that it assigns the new material as instances, so when i add a checker for example as a diffuse map, every slot has a Vraymtl with a checker in diffuse slot. One thing that bugs me is that in material editor there is no sign of it - Make unique button is still inactive.
Any idea why? Some advice? Thanks in advance. :)
