ScriptSpot

Forum topic · General Scripting

Script - search by Material name

By shellfish · 2013-05-26

Description

Im trying to write a maxscript that I can use to control the properties of its material by searching all the object in a scene with a material "name" like name_01, name_02,name03,... est. But what i currently have does not work.I just started playing with maxscript. Please help, Thanks!

Example --

for i in geometry do
if i.material.name == "Material_name_*" do
i.material.diffuse=black

Comments (2)

shellfish · 2013-05-26

Thanks miauu! It works.

for i in geometry where

miauu · 2013-05-26



for i in geometry where matchPattern i.material.name pattern:"Material_name_*"  do
i.material.diffuse=black