Beispiel #1
0
 public void LoadPoseFile(string pose_file)
 {
     if (!string.IsNullOrEmpty(pose_file))
     {
         Console.WriteLine("Load File: " + pose_file);
         Tmo = TMOAnim.LoadPNGFile(Path.Combine(PoseRoot, pose_file));
         Tmo.LoadTransformationMatrixFromFrame(0);
     }
     Tmo.TruncateFrame(0); // forced pose
 }
Beispiel #2
0
        public TMOAnimItem Dup()
        {
            TMOAnimItem item = new TMOAnimItem();

            item.Length = Length;
            item.Accel  = Accel;
            if (Tmo != null)
            {
                item.Tmo = Tmo.Dup();
                item.Tmo.LoadTransformationMatrixFromFrame(0);
            }

            return(item);
        }
Beispiel #3
0
        private void RecalculateSides()
        {
            if (_operand1 is TmoObject tmoObject1)
            {
                tmoObject1.RecalculateSides();
            }

            if (_operand2 is TmoObject tmoObject2)
            {
                tmoObject2.RecalculateSides();
            }

            var tuple = Tmo.Exe(_operand1, _operand2, _tmo);

            _leftSide  = tuple.Item1;
            _rightSide = tuple.Item2;
        }
Beispiel #4
0
        public void CopyFaceFile(string face_file)
        {
            if (Tmo.frames == null)
            {
                return;
            }

            List <string> except_snames = new List <string>();

            except_snames.Add("Kami_Oya");

            if (!string.IsNullOrEmpty(face_file))
            {
                Console.WriteLine("Load File: " + face_file);
                TMOFile face_tmo = TMOAnim.LoadPNGFile(Path.Combine(FaceRoot, face_file));
                if (face_tmo.frames != null)
                {
                    Tmo.SaveTransformationMatrixToFrame(0);
                    Tmo.CopyChildrenNodeFrom(face_tmo, "face_oya", except_snames);
                    Tmo.LoadTransformationMatrixFromFrame(0);
                }
            }
        }