Пример #1
0
        //MotionItem
        public void AttachMotion(MotionItem motionItem)
        {
            DetachMotion();
            EditingMotionData = motionItem;

            //Register events
            motionItem.PointInserted += MotionItem_PointInserted;
            motionItem.PointRemoved  += MotionItem_PointRemoved;

            //Load data
            for (int i = 0; i < motionItem.pointList.Count; ++i)
            {
                MotionItem_PointInserted(i, motionItem.pointList[i]);
            }

            UpdateUiAll();

            //Update preview
            PreviewContext.Visibility = Visibility.Visible;
            PreviewTab.SetPositionContinuumVisible(true);
            PreviewTab.UpdatePositionContinuum();
        }
Пример #2
0
        public void DetachMotion()
        {
            ResetEnv();
            ClearPointViews();

            //Unregister events
            if (OnEditing)
            {
                EditingMotionData.PointInserted -= MotionItem_PointInserted;
                EditingMotionData.PointRemoved  -= MotionItem_PointRemoved;
            }

            //Update UI
            SetGraphVisible(false);
            HideSmartFollowText();
            HideSmartLineForX();
            HideSmartLineForY();
            PreviewContext.Visibility = Visibility.Collapsed;

            EditingMotionData = null;

            PreviewTab.SetPositionContinuumVisible(false);
        }
Пример #3
0
 private void InitTabs()
 {
     MotionTab.Init(this);
     GraphEditorTab.Init(this);
     PreviewTab.Init(this);
 }