PDA

View Full Version : testing instanced modifiers?


3rd Dimentia
03-18-2008, 05:31 AM
Yes I know I post questions here waaay too often, but I DO spend a lot of time in the help file and asking people before I post here.

Is there a way to test if a modifier is an instance? Or even better, a way to test a modifier against another modifier to see if they are instances of each other?

I've managed to find InstanceMgr.GetInstances. But that just seems to work on objects and only returns a number which represents how many instances of the object there are in the scene.


Cheers,

Cg.

Bobo
03-18-2008, 05:51 AM
If you instanced a modifier, checking for equal should return true.

For example,


s1 = sphere() --create two spheres
s2 = sphere pos:[100,0,0]
theMod = bend() --create a bend modifier instance
addModifier s1 theMod --instance the same modifier to both
addModifier s2 theMod --by applying to both spheres

s1.bend == s2.bend --see if the bend modifier is an instance
-->true

--now make the bends unique:
InstanceMgr.MakeModifiersUnique #(s1,s2) #(theMod) #individual
s1.bend == s2.bend --and the equality test returns false
-->false

3rd Dimentia
03-18-2008, 06:04 AM
And I was looking for something way more complicated than that... Feeling a little foolish right now. hehe.

Thanks Bobo.

CGTalk Moderation
03-18-2008, 06:04 AM
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.