Пример #1
0
        public void LoadSubFile(FVIS anim)
        {
            activeFvis = anim;

            if (anim.VisibilityAnimU != null)
            {
                stPropertyGrid1.LoadProperty(anim.VisibilityAnimU, OnPropertyChanged);
                userDataEditor1.LoadUserData(anim.VisibilityAnimU.UserData);
            }
            else
            {
                stPropertyGrid1.LoadProperty(anim.VisibilityAnim, OnPropertyChanged);
                userDataEditor1.LoadUserData(anim.VisibilityAnim.UserData);
            }

            BoneVisualAnimEditor editor = (BoneVisualAnimEditor)GetActiveControl(typeof(BoneVisualAnimEditor));

            if (editor == null)
            {
                stPanel2.Controls.Clear();

                editor      = new BoneVisualAnimEditor();
                editor.Dock = DockStyle.Fill;
                stPanel2.Controls.Add(editor);
            }

            editor.LoadVisualAnim(anim);
            editor.Refresh();
        }
Пример #2
0
        public void OnPropertyChanged()
        {
            if (activeModel != null)
            {
                if (activeModel.Model != null)
                {
                    activeModel.Text = activeModel.Model.Name;
                }
                else
                {
                    activeModel.Text = activeModel.ModelU.Name;
                }
            }

            if (activeFska != null)
            {
                if (activeFska.SkeletalAnim != null)
                {
                    activeFska.Text       = activeFska.SkeletalAnim.Name;
                    activeFska.FrameCount = activeFska.SkeletalAnim.FrameCount;
                }
                else
                {
                    activeFska.Text       = activeFska.SkeletalAnimU.Name;
                    activeFska.FrameCount = activeFska.SkeletalAnimU.FrameCount;
                }
            }

            if (activeFvis != null)
            {
                BoneVisualAnimEditor editor = (BoneVisualAnimEditor)GetActiveControl(typeof(BoneVisualAnimEditor));
                if (editor != null)
                {
                    editor.UpdateDataGrid();
                }
            }
        }