Skip to content

Visualize the separate concepts of tooling pivot and graphical data origin #2225

Open
0 of 1 issue completed
@0HyperCube

Description

@0HyperCube

There will be two different dot gizmos, which the Select tool's control bar shall display a dropdown to choose from. A checkbox beside these controls enables or disables the whole feature, and when disabled it uses the center of the current selection's bounding box. The reference point input widget that's presently in the control bar will become specific to the pivot mode— but when the feature's checkbox is unticked to use the bounding box center, we will show none of the 9 selector boxes as active while still letting the user click one to enable pivot mode. This would be grayed out entirely in origin mode. These same controls described above will be added to the Path tool's control bar, as well.

Currently, the pivot is used by the tooling. But that will adapt to the chosen mode once this issue is implemented, so the chosen mode's center of rotation/scaling is used by the following forms of tooling:

  • G/R/S
  • Resizing the corners of the transform cage when Alt is pressed. (Should transform cage rotation also use the bounding box center by default unless Alt is pressed?)

Albeit with some differences like our choice of labeling, this feature is sort of analogous to Blender's "Transform Pivot Point" menu:

Image

  • Bounding Box Center: should behave the same in Graphite as Blender; our equivalent occurs when the mode is disabled so this won't be part of the dropdown menu; this acts equivalently to the centered yellow pivot as it works today in master
  • 3D Cursor: equivalent to our pivot but it behaves differently than in Blender; this shouldn't be touched from the behavior already in master
  • Individual Origins: should behave the same in Graphite as Blender; this is one of the origin's modes; each selected layer transforms about its own origin position
  • Median Point: should behave the same in Graphite as Blender; this is one of the origin's modes; each selected layer transforms about the average position of their shared origins
  • Active Element: should behave the same in Graphite as Blender; this is one of the origin's modes; transforms all the selected layers about the origin of the most recently selected layer (stretch goal, possible future follow-up work)

Pivot

Image

This is the yellow (final color TBD) crosshair symbol. It's the temporary/transient pivot. Equivalent to Blender's 3D cursor, but isn't global to the document nor is it as persistent as the 3D cursor. It's used only for tooling, not part of the node graph data or document format. This is our current implementation, but it will need to be tweaked.

  • Currently, we store the pivot permanently on each layer, but this can lead to confusion if the user comes back later and finds it in an unexpected location (especially since scaling can affect it in weird ways). This also makes the code more difficult because we have to save tooling-level data into the serialized document. Remove the per-layer, persistent storage.
  • Make it so each layer that the user clicks will have the pivot set to its corresponding corner/midpoint/center of the reference point input widget (located in the tool's control bar). Switching from one layer to the next keeps that chosen position of the reference point input widget.
  • The user can drag the pivot crosshair gizmo anywhere in the canvas, disconnecting it from the chosen position in the reference point input widget. When disconnected, clicking away from the current layer (by deselecting it, or by selecting another layer instead; however not by partially extending/subtracting the existing selection) resets it, going back to the last selected position of the 9-box widget.
  • But the user can "pin" the dragged location:

    Then, no matter what selection changes occur, that remains the location of the pivot until unpinned or until clicking any of the 9 boxes in the reference point input widget again which unpins it. Perhaps double-clicking the crosshair gizmo can pin/unpin.

Origin

Image

This is the blue (final color TBD) dowel pin symbol. It's the origin ((0, 0) point) of the vector data's internal coordinate space. This is used when transforming in the Transform node's properties panel parameters, or when using the Copy to Points node. Its drag will be stored in the "Origin: Offset" parameter of the Transform node (but for now, we don't have that yet, so the origin is visualized but not draggable for now).

(This menu's scale and rotation parameters should also offer a way to edit those values factoring in the current pivot choice which would make it update its location together with the typed value for rotation or scale such that it treats the change as occurring with that temporary pivot.)

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Short-Term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions