Add morpher

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  06 June 2017
Add morpher

Hi All,
I want add morpher to object in modifier
but add the under skin, I do not want add up skin modifier
  06 June 2017
Here's a snippet from MAXScript help, "Node Common Properties, Operators, and Methods"
addModifier <node> <modifier> [before:index]
The optional before: keyword argument can be used to insert the modifier into the node's modifier stack just before the indexed modifier, counting from the top of the stack.

You'll just need to figure out which index is the modifier you want to insert before. You can do that by iterating through the modifier stack using index and checking the class of the modifier (using: classof <something>).
  06 June 2017
Pretty simple, here is an example.
myBox = Box() 
myBox (Skin()) 
fn getSkinIndexFn obj = 
    for i = 1 to obj.modifiers.count where (classof obj.modifiers[i]) == Skin do return i 
    return 0 
addModifier myBox (Morpher()) before:(getSkinIndexFn myBox)
Felipe Nogueira aka: PePeTD
Technical Artist/Character TD
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:19 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.