View Full Version : SkinOps Function
_stev_ 05-09-2006, 08:12 PM I have a small script that creates a skin modifier and adds one bone. Now I want to weight all verts to that bone, but when I use the skinOps.GetNumberVertices in the script, it always returns 0. If I select that same object and run that command in the listner, it returns the correct number. Anyone know why this is?
Thanks,
Stev
|
|
_stev_
05-09-2006, 08:18 PM
Okay, I threw in a classOf(obj) and it worked. I'm still curious as to why this works though.
Sorry about the premature post.
Okay, I threw in a classOf(obj) and it worked. I'm still curious as to why this works though.
Sorry about the premature post.
classof() forces a reevaluation of the whole modifier stack to be able to returns the class on top of the stack. Thus it is a great and cheap way to make sure the stack is updated without having to perform expensive operations like reselecting the object etc.
CGTalk Moderation
05-09-2006, 10:43 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.