public sealed class NumericEntryTyping an exact distance, angle or factor partway through a drag.
Remarks
Blender's G X 5 ⏎, and doc 24 calls it the single most-missed feature by anybody coming from Blender. No dialog, no field, no mouse precision: you are already dragging, you type, and the drag becomes exact. Nothing in either reference editor has it.
⚠ It costs almost nothing here because the gizmo recomputes from mouse-down. Every frame of a drag is already the pose at the grab plus a magnitude derived from the pointer; typing substitutes the magnitude before the same arithmetic runs. In an implementation that accumulated per-frame deltas it would not be expressible at all — which is why doc 24 lists the gizmo's design as one of the two most valuable things it inherited.
⚠ An axis letter overrides the handle rather than composing with it. Pressing X during a drag is Blender's "along X and nothing else", and a user who has said it has said something more specific than which arrow they happened to grab. Pressing the same letter again releases the constraint.
⚠ The buffer is text, not a float, until it is read. A user typing 1. is midway through 1.5, and a model that parsed every keystroke into a number would show them 1 and then jump. Text is what a readout draws; Typed is what the gizmo applies, and an unparseable component is zero rather than a refusal.
Fields and properties (7)
public const int ComponentsHow many components a transform can have typed into it.
public bool IsActiveWhether anything has been typed.
public int ComponentWhich component the next keystroke goes into.
public int CountHow many components have been started.
public int AxisWhich world axis the entry is constrained to, or −1 for none.
public string TextWhat a readout should show, including the axis letter and the caret.
public TypedTransform? TypedWhat the gizmo should apply, or if nothing has been typed.
Methods (2)
public bool Key(InputKey key, ModifierKeys modifiers = None)Offers a key to the entry.
public void Clear()Throws everything typed away.
Used by (3)
- PrecisionTestsVixen.Editor.SceneView.Tests
- SceneViewportVixen.Editor.SceneView
- ViewportChromeVixen.Editor.App