Notifications
Clear all
[Closed] Material Color Correct
Jul 10, 2010 9:58 am
Hey guys I working on a script that will apply a colour correct mod to all the materials in the scene. This so far will grab all the vray material in the scene and do what I want but any Multisub of blend materials it does not. Ill keep looking into it but if someone has some advice on how to grab even the materials in the multisubs and blends and what not, it will be more than welcome
Cheers
for m in sceneMaterials do
try
(
whatwas = m.texmap_diffuse
whatwascolour =m.diffuse
m.texmap_diffuse = Colorcorrect ()
m.texmap_diffuse.src_tex = whatwas
m.texmap_diffuse.src_color = whatwascolour
m.texmap_diffuse.gamma = 2.2
)catch()
2 Replies
Jul 10, 2010 9:58 am
(
-- get all VRay materials in the scene:
mats = getclassinstances VRayMtl
for mat in mats where not iskindof (tx = mat.texmap_diffuse) Colorcorrect do
mat.texmap_diffuse = Colorcorrect src_tex:tx src_color:mat.diffuse gamma:2.2
)