Esempio n. 1
0
        public void SetBoneParent(BoneCache newParent, BoneCache bone)
        {
            TransformCache parent = newParent;

            if (newParent == null)
            {
                parent = bone.skeleton;
            }

            skinningCache.RestoreBindPose();
            bone.SetParent(parent, true);
            bone.SetDefaultPose();
        }
Esempio n. 2
0
        public void SetBoneParent(BoneCache newParent, BoneCache bone, int insertAtIndex)
        {
            TransformCache parent = newParent;

            if (newParent == null)
                parent = bone.skeleton;

            skinningCache.RestoreBindPose();
            bone.SetParent(parent, true);

            if (insertAtIndex == -1)
                insertAtIndex = parent.ChildCount;

            bone.siblingIndex = insertAtIndex;
            bone.SetDefaultPose();
        }