ScriptSpot

Forum topic · General Scripting

Select all objects that have same(instanced) modifier.

By pagapaja · 2007-03-13

Description

Hey Guys!

I want to make the script that can manage TurboSmooth modifiers in the scene.

How can I select all objects that have instanced modifier?

I finded at MAXScript manual - Interface:InstanceMgr, Modifier Common Properties, Node Common Properties and etc... - but I think this is not the answer.

Comments (4)

mobeen · 2007-03-14

Try refhierarchy.isRefTargetInstanced theModifierToCheck

Sample usage:

For example suppose you have some objects in your scene having the first modifier instanced, this will collect all the objects sharing that instanced modifier.

allInstanced = (for o in objects where (refhierarchy.isRefTargetInstanced o.modifiers[1] ) collect o)

 Hope this helps,

Regards

Mobeen

pagapaja · 2007-03-15

Wow, that's COOL!

Thanks your reply and help, mobeen.

But I find the way to select only objects have Instanced modifier but select all same modifiers...

I think that Instanced modifiers are completely same,

so only 1:1 compare (a.modifier == b.modifier) will correct check way.

Thanks for your help again.^^

pagapaja.

Thanks, Goldens. That's the

pagapaja · 2007-04-02

Thanks, Goldens.

That's the Script exactly what I want.^^