PDA

View Full Version : Subject: copying instances of Edit poly from on obj to another


marktsang
01-20-2005, 12:55 PM
hi all,
i am trying to instance edit poly modifiers from a set of target objects to another set of objects. the objects in each set are all different but each set is the same except for the edit poly. so basically i am trying to instance unique editpoly modifiers from one object to another with Max script. the problem is that it copies as an instance but this instance has no effect on the object its copied to. if i turn off the modifier it turns off in both objects - showing that it is indeed linked to the other one but the geometry isnt changed at all???? what am i doing wrong
here is the code i am using

blah = selection as array;
for i in blah do
(
temp = getnodebyname ((i.name)+"_CH1")
addmodifier temp (i.modifiers[1])
)

can anyone help me?

mark

stuh505
01-20-2005, 03:02 PM
just by hearing your problem and looking at your code, the problem looks to be this:

the modifiers you are selecting are instances

max does not automatically create a duplicate of the modifier when you attempt to re-assign the modifier to a new node

therefore, you need to make a copy of the modifier and assign this new instance to the new node

look about for a way to make a copy of a modifier. im not sure

marktsang
01-20-2005, 08:55 PM
hi stuh505,
thanks for answering - of course i already tried to copy the modifer also giving me the same results - my code works for all other modifiers - copying all parameters ect and keeping them as an instance - it just doesn't work with edit poly ?

i want it to work the same way as it does if i do it mannually in the stack with copy and paste.

mark

CGTalk Moderation
01-20-2006, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.