예제 #1
0
 public bool HasKeyedFrames(float frame)
 {
     return(XPOS.HasAnimation() && XPOS.GetKeyFrame(frame).IsKeyed ||
            YPOS.HasAnimation() && YPOS.GetKeyFrame(frame).IsKeyed ||
            ZPOS.HasAnimation() && ZPOS.GetKeyFrame(frame).IsKeyed ||
            XROT.HasAnimation() && XROT.GetKeyFrame(frame).IsKeyed ||
            YROT.HasAnimation() && YROT.GetKeyFrame(frame).IsKeyed ||
            ZROT.HasAnimation() && ZROT.GetKeyFrame(frame).IsKeyed ||
            WROT.HasAnimation() && WROT.GetKeyFrame(frame).IsKeyed ||
            XSCA.HasAnimation() && XSCA.GetKeyFrame(frame).IsKeyed ||
            YSCA.HasAnimation() && YSCA.GetKeyFrame(frame).IsKeyed ||
            ZSCA.HasAnimation() && ZSCA.GetKeyFrame(frame).IsKeyed);
 }
예제 #2
0
            public void SetKeyFromBone(float frame, Bone bone)
            {
                Vector3 rot = ANIM.quattoeul(bone.rot);

                if (rot.X != bone.rotation[0] || rot.Y != bone.rotation[1] || rot.Z != bone.rotation[2])
                {
                    XROT.GetKeyFrame(frame).Value = bone.rot.X;
                    YROT.GetKeyFrame(frame).Value = bone.rot.Y;
                    ZROT.GetKeyFrame(frame).Value = bone.rot.Z;
                    WROT.GetKeyFrame(frame).Value = bone.rot.W;
                }
                if (bone.pos.X != bone.position[0] || bone.pos.Y != bone.position[1] || bone.pos.Z != bone.position[2])
                {
                    XPOS.GetKeyFrame(frame).Value = bone.pos.X;
                    YPOS.GetKeyFrame(frame).Value = bone.pos.Y;
                    ZPOS.GetKeyFrame(frame).Value = bone.pos.Z;
                }
                if (bone.sca.X != bone.scale[0] || bone.sca.Y != bone.scale[1] || bone.sca.Z != bone.scale[2])
                {
                    XSCA.GetKeyFrame(frame).Value = bone.sca.X;
                    YSCA.GetKeyFrame(frame).Value = bone.sca.Y;
                    ZSCA.GetKeyFrame(frame).Value = bone.sca.Z;
                }
            }
예제 #3
0
            public void SetKeyFromBone(float frame, Bone bone)
            {
                Vector3 rot = ANIM.quattoeul(bone.rot);

                if (rot.X != bone.rotation[0] || rot.Y != bone.rotation[1] || rot.Z != bone.rotation[2])
                {
                    xrot.GetKeyFrame(frame).Value = bone.rot.X;
                    yrot.GetKeyFrame(frame).Value = bone.rot.Y;
                    zrot.GetKeyFrame(frame).Value = bone.rot.Z;
                    wrot.GetKeyFrame(frame).Value = bone.rot.W;
                }
                if (bone.pos.X != bone.position[0] || bone.pos.Y != bone.position[1] || bone.pos.Z != bone.position[2])
                {
                    xpos.GetKeyFrame(frame).Value = bone.pos.X;
                    ypos.GetKeyFrame(frame).Value = bone.pos.Y;
                    zpos.GetKeyFrame(frame).Value = bone.pos.Z;
                }
                if (bone.sca.X != bone.scale[0] || bone.sca.Y != bone.scale[1] || bone.sca.Z != bone.scale[2])
                {
                    xsca.GetKeyFrame(frame).Value = bone.sca.X;
                    ysca.GetKeyFrame(frame).Value = bone.sca.Y;
                    zsca.GetKeyFrame(frame).Value = bone.sca.Z;
                }
            }