public void RenderHandles() { if (!_selectionSnapSession.IsActive && !_selectionGrabSession.IsActive) { ObjectSelectionTransformGizmoSystem.RenderHandles(_selectedObjects.HashSet); } }
private void RenderGizmoTransformPivotPointSelectionPopup() { ObjectSelectionTransformGizmoSystem selectionGizmoTransformSystem = ObjectSelection.Get().ObjectSelectionTransformGizmoSystem; TransformGizmoPivotPoint newPivotPoint = (TransformGizmoPivotPoint)EditorGUILayout.EnumPopup(GetContentForGizmoTransformPivotPointSelectionPopup(), selectionGizmoTransformSystem.GizmoTransformPivotPoint, GUILayout.Width(_selectionGizmoSpecificPopupWidth)); if (newPivotPoint != selectionGizmoTransformSystem.GizmoTransformPivotPoint) { UndoEx.RecordForToolAction(selectionGizmoTransformSystem); selectionGizmoTransformSystem.GizmoTransformPivotPoint = newPivotPoint; } }
private void RenderGizmoTransformSpaceSelectionPopup() { ObjectSelectionTransformGizmoSystem selectionGizmoTransformSystem = ObjectSelection.Get().ObjectSelectionTransformGizmoSystem; TransformSpace newTransformSpace = (TransformSpace)EditorGUILayout.EnumPopup(GetContentForGizmoTransformSpaceSelectionPopup(), selectionGizmoTransformSystem.GizmoTransformSpace, GUILayout.Width(_selectionGizmoSpecificPopupWidth)); if (newTransformSpace != selectionGizmoTransformSystem.GizmoTransformSpace) { UndoEx.RecordForToolAction(selectionGizmoTransformSystem); selectionGizmoTransformSystem.GizmoTransformSpace = newTransformSpace; } }
public void HandleMouseMoveEvent(Event e) { if (Mirror.IsInteractionSessionActive) { e.DisableInSceneView(); Mirror.HandleMouseMoveEvent(e); return; } SelectionShape.HandleMouseMoveEvent(e); _selectionSnapSession.UpdateForMouseMovement(); if (_selectionGrabSession.IsActive) { _selectionGrabSession.Update(); ObjectSelectionTransformGizmoSystem.OnObjectSelectionUpdated(); } }
public void HandleMouseDragEvent(Event e) { if (_selectionSnapSession.IsActive) { _selectionSnapSession.UpdateForMouseMovement(); } else if (_selectionGrabSession.IsActive) { _selectionGrabSession.Update(); ObjectSelectionTransformGizmoSystem.OnObjectSelectionUpdated(); } else { SelectionShape.HandleMouseDragEvent(e); var mouseDragSelectionUpdateOperation = ObjectSelectionUpdateOperationFactory.Create(ObjectSelectionUpdateOperationType.MouseDrag); mouseDragSelectionUpdateOperation.Perform(); } SceneView.RepaintAll(); }