Home Technical Talk

[maxcript] - is Modifier instance or unique?

polycounter lvl 14
Offline / Send Message
Titus polycounter lvl 14
So maybe it's a stupid question but - how to know is Modifier instance or unique in modifiers stack? Please help.

Replies

  • Swordslayer
    Options
    Offline / Send Message
    Swordslayer interpolator
    Depends on how you want to use it, for example to test if the current modifier is only used on one object in scene, you could test if

    (refs.dependentNodes (modPanel.getCurrentObject())).count == 1

  • Titus
    Options
    Offline / Send Message
    Titus polycounter lvl 14
    Thank you Swordslayar! it helps. And maybe you could help me with this tricky part. It's not clear for me in maxscript. Image under explains a bit.
    So i have instanced objects. But want to make referenced modifier - to be like instance. and remove reference from current object.



    So i was trying this: 
    (
    MyMod = copy $.modifiers[1]
    deleteModifier $ 1
    AddModifier $ Mymod 
    )
    But it doesn't work. it paste it back to the top. Please help.
    PS: how to post code snippets like you did before.
  • Titus
    Options
    Offline / Send Message
    Titus polycounter lvl 14
    Solved. it should be loop.  for obj in selection do addModifier obj MyMod. 
Sign In or Register to comment.