Vixen
dd8b0a81
csharp
public sealed class NodeInspector

The selected nodes' inline values, as rows beside the canvas.

Read the guide page for this →

Remarks

The panel is NodeInspector.vxml; this file is the accessibility modifier, on the same arrangement FactRow, GpuTimelineView, MemoryView and StatisticsView use. The emitter's partial carries no modifier, so a type another assembly holds needs a declaration that says public — and both of this one's callers, ShaderGraphView and VfxGraphView, are in Vixen.Editor.AssetEditors.

A host around the ordinary inspector, not an inspector of its own. Every row is drawn by InspectorView from NodePortEditProvider, so a port gets the drawer its type deserves, a reset button, a tooltip, the search box, copy and paste, and a multi-node selection — none of which this panel implements, and all of which it used to lack because it built its own controls.

⚠ The reason it could not before is worth keeping in view. A node's numbers live on the graph — in Values, keyed by port name — because that is what survives a save and an undo, so they are not members of any type and no registry can describe them. An IEditProvider is exactly the seam for that, and until there was one the only way to edit a port was a panel that knew what a port was.

⚠ Only unconnected inputs get a row. A port fed by an edge takes its value from that edge, and an editor showing a number beside it would be showing a value the compiler ignores — which is how somebody comes to spend an afternoon changing a field that does nothing. A connected port keeps its place in the panel and says where the value comes from.

⚠ Writes go through SetPortValueCommand, which is what NodePortMember hands the pipeline — so typing a number here and dragging the same number on the canvas produce the same undo entry and merge with each other.

Fields and properties (6)

  • protected override string TagName
  • public NodeGraphView? View

    The view whose selection is shown.

  • public EditorDocument? EditedDocument

    The document edits are recorded against, or for none.

  • public string EmptyMessage

    What the panel says when nothing is selected.

  • public InspectorView? Panel

    The inspector drawing the rows, or when it is not showing.

  • public int RowCount

    How many rows are showing.

Methods (4)

  • protected override void OnCreated()
  • protected override void OnRemoved()
  • public void Refresh()

    Re-reads the values of the rows that are already there.

  • public void Rebuild()

    Rebuilds the rows for whatever is selected.

Used by (5)

  • NodeInspectorDumpTestsVixen.Editor.NodeGraph.Tests
  • NodePortProviderTestsVixen.Editor.NodeGraph.Tests
  • PortValueTestsVixen.Editor.NodeGraph.Tests
  • ShaderGraphViewVixen.Editor.AssetEditors
  • VfxGraphViewVixen.Editor.AssetEditors