Reign.Video.Abstraction.InstanceObjectArmature.linkObjects C# (CSharp) Méthode

linkObjects() protected méthode

protected linkObjects ( string dataPath, FCurve curve, int i ) : void
dataPath string
curve FCurve
i int
Résultat void
        protected override void linkObjects(string dataPath, FCurve curve, int i)
        {
            bool pass = false;
            for (int bi = 0; bi != Armature.Bones.Length; ++bi)
            {
                if (dataPath == Armature.Bones[bi].Name)
                {
                    boneIndices[i] = bi;

                    if (curve.Index == 0) bindActionDatas[i] = bindBoneRotationX;
                    else if (curve.Index == 1) bindActionDatas[i] = bindBoneRotationY;
                    else if (curve.Index == 2) bindActionDatas[i] = bindBoneRotationZ;
                    else if (curve.Index == 3) bindActionDatas[i] = bindBoneRotationW;

                    pass = true;
                    break;
                }
            }
            if (!pass) Debug.ThrowError("InstanceObjectArmature", "Failed to find Armature Bone: " + dataPath);

            // link bones
            foreach (var bone in Bones)
            {
                bone.linkObjects(Bones);
            }

            // link bone childeren
            foreach (var bone in Bones)
            {
                bone.linkChilderen(Bones);
            }
        }