Hello everybody,
I’m a beginner considering Maxscript (and also new on this forum),
I'm trying to create a script that select objects by a material modifier.materiaID property
I found a few lines from a certain @Swordslayer (great thanks to him \m/ by the way) it works perfectly but to finalise it, I would add an option like
if the value set by user doesn't exist in all materialmodifier in the scene, script will show up a message box like "nothing match" or something :D
This is what I got now
Someone can help me please :)
rollout MtlID "MtlIDtools" width:281 height:158
(
spinner 'spn2' "" pos:[197,126] width:56 height:16 align:#left type:#integer range:[0,100,0]
on spn2 changed val do
(
local objs = #()
local mods = getClassInstances MaterialModifier
for m in mods where m.materialID == a do
(
if (a==val) then
(
join objs (refs.dependentNodes m)
select objs
)
else
(
messagebox "Nothing Match!"
)
)
)
)
createDialog MtlID
or juste a few which check if the materialID is used or not in the scene would be so cool
Thank you all
miauu · 2019-05-13