Page 1 of 1

Parenting changes?

Posted: Mon Jul 06, 2015 2:16 am
by mkelley
Sorry, again, for these questions about things that USED to work and now no longer work (in this case, at all) but I can't get a bone to reparent anymore.

This used to work just fine:

bone.fParent = parentID

assuming I have a child bone as "bone" and the ID of the parent I want to assign (gotten from a simple skel:CountBones() until the bone:Name() matches the name I'm looking for). Now it doesn't seem to do a thing, having no assignment at all for those bones I am trying to parent (the same script works fine in AS 9).

I assume that's because something major changed in the way bone parents work but, again (sigh) I can find no documentation anywhere that explains this. Can anyone point me in the right direction?

Re: Parenting changes?

Posted: Mon Jul 06, 2015 3:07 am
by synthsin75
I tried looking at the Lua pkg files for this, but half of them are not even formatted for readability. No line breaks at all.

Re: Parenting changes?

Posted: Mon Jul 06, 2015 3:23 am
by dkwroot
It looks like you need to use both:

bone.fParent = parentID
bone.fAnimParent:SetValue(parentFrame, parentID)

This is probably because we can animate parenting now.

Re: Parenting changes?

Posted: Mon Jul 06, 2015 12:37 pm
by mkelley
Yep, that was it. Thanks!

(I spent hours trying to figure out what was going on -- forgot all about animating parents).