Beispiel #1
0
        public bool IsActionTriggering(BindPoseAction action)
        {
            if (!IsActionActive(action))
            {
                return(false);
            }

            if (action == BindPoseAction.MoveBone)
            {
                return(guiWrapper.IsMouseDown(0));
            }

            if (action == BindPoseAction.RotateBone)
            {
                return(guiWrapper.IsMouseDown(0));
            }

            if (action == BindPoseAction.MoveBone)
            {
                return(guiWrapper.IsMouseDown(0));
            }

            if (action == BindPoseAction.SelectBone)
            {
                return(guiWrapper.IsMouseDown(0));
            }

            return(false);
        }
Beispiel #2
0
        public bool IsActionActive(BindPoseAction action)
        {
            if (guiWrapper.isAltDown || !guiWrapper.IsControlHot(0))
            {
                return(false);
            }

            if (action == BindPoseAction.None)
            {
                return(guiWrapper.IsControlNearest(defaultControlID));
            }

            if (action == BindPoseAction.RotateBone)
            {
                return(guiWrapper.IsControlNearest(m_HoveredBoneBodyControlID));
            }

            if (action == BindPoseAction.MoveBone)
            {
                return(guiWrapper.IsControlNearest(m_HoveredBoneNodeControlID));
            }

            if (action == BindPoseAction.SelectBone)
            {
                return((guiWrapper.IsControlNearest(m_HoveredBoneBodyControlID) || guiWrapper.IsControlNearest(m_HoveredBoneNodeControlID)) && !selection.IsSelected(hoveredBone));
            }

            return(false);
        }
Beispiel #3
0
        public bool IsActionHot(BindPoseAction action)
        {
            if (action == BindPoseAction.None)
            {
                return(guiWrapper.IsControlHot(0));
            }

            if (action == BindPoseAction.RotateBone)
            {
                return(guiWrapper.IsControlHot(m_RotateBoneControlID));
            }

            if (action == BindPoseAction.MoveBone)
            {
                return(guiWrapper.IsControlHot(m_MoveBoneControlID));
            }

            return(false);
        }
Beispiel #4
0
        public bool IsActionFinishing(BindPoseAction action)
        {
            if (guiWrapper.IsEventOutsideWindow())
            {
                return(true);
            }

            if (!IsActionHot(action))
            {
                return(false);
            }

            if (action == BindPoseAction.RotateBone)
            {
                return(guiWrapper.IsMouseUp(0));
            }

            if (action == BindPoseAction.MoveBone)
            {
                return(guiWrapper.IsMouseUp(0));
            }

            return(false);
        }