Max 合并同名材质

Max 中清理材质球,使所有名称一样的材质球合并为一个

names = #()
materials = #()

-- append names 1
-- finditem names 1
-- finditem names 2



for obj in geometry  where (canConvertTo obj Editable_Mesh) do 
(
    index = finditem names obj.material.name 
    if (index == 0) then
    (
        append names obj.material.name
        append materials obj.material       
    )
    else
    (
        obj.material =materials[index]
    )
    print obj.material.name
)

    

你可能感兴趣的:(Max 合并同名材质)