Copy an existing Modifier

Copy an existing Modifier

Anonymous
Not applicable
855 Views
4 Replies
Message 1 of 5

Copy an existing Modifier

Anonymous
Not applicable
I've been searching around for this answer but can't seem to find one.

This comes from the maxscript DOCS:
"Is there a function for copying a modifier and then pasting an instance of it onto the same object?"

So the example in the maxscript help Doc which follows does explain how to "add a NEW modifier" to a bunch of objects as instances.

However, it doesn't explain the answer to the Original Question. "Copying a modifier then pasting as an instance".

The example goes on about adding a NEW modifier to others as instance. Not really "Copying a Modifier" and applying that "Copied" modifier as an instance to other objects.

So if I have an object that already has a "BEND" modifier applied and all the settings and so on are setup and ready. Why can't I just "Copy" and "Paste Instanced" to another selection.

I can do this function manually in 3dsmax by "Right-Clicking" on the current modifier in the stack and select "Copy" then on another object in the modifier stack "Right-Click" "Paste Instanced".

I'd like to know how to do that via maxscript.
Can this even be done?
I hope this makes sense.

Thanks
0 Likes
856 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
did you try that:
addModifier $ObjReceiver $ObjSource.Bend
0 Likes
Message 3 of 5

Anonymous
Not applicable
Yes I have tried something similar to that code.
However it just doesn't seem to take variables for the objects. Source & Target.


MyTarget = $box01
MyMod = $BoxBend02
addModifier $MyTarget $MyMod.modifiers



thanks
0 Likes
Message 4 of 5

PiXeL_MoNKeY
Collaborator
Collaborator
You should use something like:
MyTarget = $Box01
MyMod = $BoxBend02.modifiers
addmodifier MyTarget MyMod
No dollar sign as that indicates an actual object in 3ds Max and not a variable containing an object.

-Eric
0 Likes
Message 5 of 5

Anonymous
Not applicable
Ah I see.

Thanks for the help.
0 Likes