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(); } }
private void OnCanObjectSelectionClickAndMultiSelectDeselect(YesNoAnswer answer) { if (RTSceneGrid.Get.Hotkeys.SnapToCursorPickPoint.IsActive()) { answer.No(); } else { answer.Yes(); } }
private void OnCanCameraProcessInput(YesNoAnswer answer) { if (RTGizmosEngine.Get.DraggedGizmo != null) { answer.No(); } else { answer.Yes(); } }
private void OnCanCameraUseScrollWheel(YesNoAnswer answer) { if (RTScene.Get.IsAnyUIElementHovered()) { answer.No(); } else { answer.Yes(); } }
/// <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(); } }
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(); }