void SetTransformSpace(GizmoSpace transformSpace) { _objectMoveGizmo.SetTransformSpace(transformSpace); _objectRotateionGizmo.SetTransformSpace(transformSpace); _objectScaleGizmo.SetTransformSpace(transformSpace); _objectUniversalGizmo.SetTransformSpace(transformSpace); }
public void SetExtrudeSpace(GizmoSpace extrudeSpace) { if (extrudeSpace == _extrudeSpace || Gizmo.IsDragged) { return; } _extrudeSpace = extrudeSpace; FitBoxToTargets(); }
/// <summary> /// Called from the 'Update' function in response to user input in order /// to change the transform space for all gizmos. The parameter represents /// the desired transform space and is of type 'GizmoSpace'. This is an enum /// with 2 mamebers: Global and Local. /// </summary> private void SetTransformSpace(GizmoSpace transformSpace) { // In order to change the transform space for a gizmo, we need to call the // gizmo's 'SetTransformSpace' function. We do this for all gizmos and pass // the specified transform space as parameter. _objectMoveGizmo.SetTransformSpace(transformSpace); _objectRotationGizmo.SetTransformSpace(transformSpace); _objectScaleGizmo.SetTransformSpace(transformSpace); _objectUniversalGizmo.SetTransformSpace(transformSpace); }
public void SetTransformSpace(GizmoSpace transformSpace) { if (_gizmo.IsDragged || _isTransformSpacePermanent) { return; } _transformSpace = transformSpace; RefreshRotation(); }
public void Update_SystemCall() { bool isManpiSessionActive = RTObjectSelection.Get.IsManipSessionActive; if (!isManpiSessionActive && RTObjectSelection.Get.NumSelectedObjects != 0) { int gizmoId = ObjectSelectionGizmoId.None; if (Hotkeys.ActivateMoveGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.MoveGizmo; } else if (Hotkeys.ActivateRotationGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.RotationGizmo; } else if (Hotkeys.ActivateScaleGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.ScaleGizmo; } else if (Hotkeys.ActivateBoxScaleGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.BoxScaleGizmo; } else if (Hotkeys.ActivateUniversalGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.UniversalGizmo; } else if (Hotkeys.ActivateExtrudeGizmo.IsActiveInFrame()) { gizmoId = ObjectSelectionGizmoId.ExtrudeGizmo; } if (gizmoId != ObjectSelectionGizmoId.None) { SetWorkGizmo(gizmoId); } } if (!isManpiSessionActive && Hotkeys.ToggleTransformSpace.IsActiveInFrame()) { GizmoSpace newSpace = _transformSpace == GizmoSpace.Global ? GizmoSpace.Local : GizmoSpace.Global; SetTransformSpace(newSpace); } }
public void SetTransformSpace(GizmoSpace transformSpace) { if (_transformSpace == transformSpace) { return; } _transformSpace = transformSpace; foreach (var gizmo in _allGizmos) { if (gizmo.IsTransformGizmo) { gizmo.TransformGizmo.SetTransformSpace(transformSpace); } else if (gizmo.IsExtrudeGizmo) { gizmo.ExtrudeGizmo.SetExtrudeSpace(transformSpace); } } }