Friday, August 27, 2010

Got a lot of standard Materials you'd like to change?

for a in objects do
(
    if ( classof a.material == standard ) then --check to see if the material in the object is Standard material then
    (
        m.material.opacity = 0 --set its opacity to 0
    )
  
        if ( classof m.material == Multimaterial ) then --and if it's a multisub material then
    (
        for a = 1 to m.material.numsubs do --count through the submaterials and
        (
            if ( classof m.material.materialList[a] == standard) then --check to see if a Standard material is in the submaterials
            (
                m.material.materialList[a].opacity = 0 --then set its opacity to 0
            )
        )
    )
)


This will change the opacity on selected materials to 0 even if buried inside a multimaterial.

No comments:

Post a Comment