예제 #1
0
        private void OnCanUndoRedo(UndoRedoOpType undoRedoOpType, YesNoAnswer answer)
        {
            if (RTGizmosEngine.Get.DraggedGizmo == null && !RTObjectSelection.Get.IsMultiSelectShapeVisible)
            {
                answer.Yes();
            }
            else
            {
                answer.No();
            }

            if (!RTObjectSelection.Get.IsManipSessionActive)
            {
                answer.Yes();
            }
            else
            {
                answer.No();
            }
        }
예제 #2
0
 private void OnCanObjectSelectionClickAndMultiSelectDeselect(YesNoAnswer answer)
 {
     if (RTSceneGrid.Get.Hotkeys.SnapToCursorPickPoint.IsActive())
     {
         answer.No();
     }
     else
     {
         answer.Yes();
     }
 }
예제 #3
0
 private void OnCanCameraProcessInput(YesNoAnswer answer)
 {
     if (RTGizmosEngine.Get.DraggedGizmo != null)
     {
         answer.No();
     }
     else
     {
         answer.Yes();
     }
 }
예제 #4
0
 private void OnCanCameraUseScrollWheel(YesNoAnswer answer)
 {
     if (RTScene.Get.IsAnyUIElementHovered())
     {
         answer.No();
     }
     else
     {
         answer.Yes();
     }
 }
예제 #5
0
 /// <summary>
 /// Event handler for the 'CanClickSelectDeselect' and 'CanMultiSelectDeselect'
 /// events thrown by the object selection module. It allows us to stop objects
 /// from being selected as long as we are snapping.
 /// </summary>
 private void OnCanChangeObjectSelection(YesNoAnswer answer)
 {
     if (_isSnapSessionActive)
     {
         answer.No();
     }
     else
     {
         answer.Yes();
     }
 }
예제 #6
0
 private void OnCanDoGizmoHoverUpdate(YesNoAnswer answer)
 {
     if (RTObjectSelection.Get != null &&
         RTObjectSelection.Get.IsMultiSelectShapeVisible)
     {
         answer.No();
     }
     else
     {
         answer.Yes();
     }
 }
        private void OnCanHoverHandle(int handleId, Gizmo gizmo, GizmoHandleHoverData hoverData, YesNoAnswer answer)
        {
            if (handleId == HandleId && gizmo == Gizmo)
            {
                if (LookAndFeel.PlaneType == GizmoPlane3DType.Circle && Settings.IsCircleHoverCullEnabled)
                {
                    Vector3 hoverNormal = (hoverData.HoverPoint - Position).normalized;
                    if (Gizmo.FocusCamera.IsPointFacingCamera(hoverData.HoverPoint, hoverNormal))
                    {
                        answer.Yes();
                    }
                    else
                    {
                        answer.No();
                    }
                    return;
                }
            }

            answer.Yes();
        }