Exemple #1
0
        private bool EditGameObjectInternal(GameObject gameObject, IAnimationWindowControl controlInterface)
        {
            bool result;

            if (EditorUtility.IsPersistent(gameObject))
            {
                result = false;
            }
            else if ((gameObject.hideFlags & HideFlags.NotEditable) != HideFlags.None)
            {
                result = false;
            }
            else
            {
                GameObjectSelectionItem gameObjectSelectionItem = GameObjectSelectionItem.Create(gameObject);
                if (this.ShouldUpdateGameObjectSelection(gameObjectSelectionItem))
                {
                    this.m_AnimEditor.selection = gameObjectSelectionItem;
                    this.m_AnimEditor.overrideControlInterface = controlInterface;
                    this.m_LastSelectedObjectID = ((!(gameObject != null)) ? 0 : gameObject.GetInstanceID());
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            return(result);
        }
        private bool EditGameObjectInternal(GameObject gameObject, IAnimationWindowControl controlInterface)
        {
            bool result;

            if (EditorUtility.IsPersistent(gameObject))
            {
                result = false;
            }
            else if ((gameObject.hideFlags & HideFlags.NotEditable) != HideFlags.None)
            {
                result = false;
            }
            else
            {
                GameObjectSelectionItem gameObjectSelectionItem = GameObjectSelectionItem.Create(gameObject);
                if (this.ShouldUpdateGameObjectSelection(gameObjectSelectionItem))
                {
                    this.m_AnimEditor.selectedItem             = gameObjectSelectionItem;
                    this.m_AnimEditor.overrideControlInterface = controlInterface;
                    result = true;
                }
                else
                {
                    UnityEngine.Object.DestroyImmediate(gameObjectSelectionItem);
                    result = false;
                }
            }
            return(result);
        }
Exemple #3
0
        private bool EditGameObjectInternal(GameObject gameObject, IAnimationWindowControl controlInterface)
        {
            if (EditorUtility.IsPersistent(gameObject))
            {
                return(false);
            }

            if ((gameObject.hideFlags & HideFlags.NotEditable) != 0)
            {
                return(false);
            }

            var newSelection = GameObjectSelectionItem.Create(gameObject);

            if (ShouldUpdateGameObjectSelection(newSelection))
            {
                m_AnimEditor.selection = newSelection;
                m_AnimEditor.overrideControlInterface = controlInterface;

                m_LastSelectedObjectID = gameObject != null?gameObject.GetInstanceID() : 0;
            }
            else
            {
                return(false);
            }

            return(true);
        }
        private bool EditAnimationClipInternal(AnimationClip animationClip, UnityEngine.Object sourceObject, IAnimationWindowControl controlInterface)
        {
            AnimationClipSelectionItem animationClipSelectionItem = AnimationClipSelectionItem.Create(animationClip, sourceObject);
            bool result;

            if (this.ShouldUpdateSelection(animationClipSelectionItem))
            {
                this.m_AnimEditor.selectedItem             = animationClipSelectionItem;
                this.m_AnimEditor.overrideControlInterface = controlInterface;
                result = true;
            }
            else
            {
                UnityEngine.Object.DestroyImmediate(animationClipSelectionItem);
                result = false;
            }
            return(result);
        }
        public bool EditSequencerClip(AnimationClip animationClip, UnityEngine.Object sourceObject, IAnimationWindowControl controlInterface)
        {
            bool result;

            if (this.EditAnimationClipInternal(animationClip, sourceObject, controlInterface))
            {
                this.state.linkedWithSequencer = true;
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Exemple #6
0
        private bool EditAnimationClipInternal(AnimationClip animationClip, UnityEngine.Object sourceObject, IAnimationWindowControl controlInterface)
        {
            AnimationClipSelectionItem animationClipSelectionItem = AnimationClipSelectionItem.Create(animationClip, sourceObject);
            bool result;

            if (this.ShouldUpdateSelection(animationClipSelectionItem))
            {
                this.m_AnimEditor.selection = animationClipSelectionItem;
                this.m_AnimEditor.overrideControlInterface = controlInterface;
                this.m_LastSelectedObjectID = ((!(animationClip != null)) ? 0 : animationClip.GetInstanceID());
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Exemple #7
0
        private bool EditAnimationClipInternal(AnimationClip animationClip, Object sourceObject, IAnimationWindowControl controlInterface)
        {
            var newSelection = AnimationClipSelectionItem.Create(animationClip, sourceObject);

            if (ShouldUpdateSelection(newSelection))
            {
                m_AnimEditor.selection = newSelection;
                m_AnimEditor.overrideControlInterface = controlInterface;

                m_LastSelectedObjectID = animationClip != null?animationClip.GetInstanceID() : 0;
            }
            else
            {
                return(false);
            }

            return(true);
        }
Exemple #8
0
        public bool EditSequencerClip(AnimationClip animationClip, Object sourceObject, IAnimationWindowControl controlInterface)
        {
            if (EditAnimationClipInternal(animationClip, sourceObject, controlInterface))
            {
                state.linkedWithSequencer = true;
                return(true);
            }

            return(false);
        }