private void AdjustSelectionShapeSizeForMouseWheelScroll(Event e) { ObjectSelectionPaintModeSettings paintModeSettings = _settings.PaintModeSettings; int sizeAdjustAmount = (int)(-e.delta.y * paintModeSettings.ScrollWheelShapeSizeAdjustmentSpeed); UndoEx.RecordForToolAction(this); paintModeSettings.SelectionShapeWidthInPixels += sizeAdjustAmount; paintModeSettings.SelectionShapeHeightInPixels += sizeAdjustAmount; SceneView.RepaintAll(); }
private void OnBeforeRender() { ObjectSelectionSettings selectionSettings = ObjectSelectionSettings.Get(); if (selectionSettings.SelectionMode == ObjectSelectionMode.Paint) { ObjectSelectionPaintModeSettings paintModeSettings = selectionSettings.PaintModeSettings; SetWidthHeight(paintModeSettings.SelectionShapeWidthInPixels, paintModeSettings.SelectionShapeHeightInPixels); GetShape().EnclosingRectCenter = Event.current.InvMousePos(SceneViewCamera.Camera); SceneView.RepaintAll(); } }
public ObjectSelectionPaintModeSettingsView(ObjectSelectionPaintModeSettings settings) { _settings = settings; }