Vixen
dd8b0a81
csharp
public sealed class SetPortTextCommand

Setting the inline text on one of a node's settings.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

SetPortValueCommand's twin, for the things made of names rather than of lanes — see SettingAttribute for why those exist. Everything about it is the same argument: whether there was a text is recorded as well as what it was, and a merge keeps the earlier one's, so typing a resource name is one undo entry rather than one a keystroke.

Fields and properties (1)

  • public override string Name

    What this is called in the undo history, as a person would say it.

Methods (5)

  • public SetPortTextCommand(NodeGraphModel graph, NodeId node, string port, string value, EditorDocument? document = null)

    Describes setting an inline text on one node.

  • public SetPortTextCommand(NodeGraphModel graph, IReadOnlyList<NodeId> nodes, string port, string value, EditorDocument? document = null)

    Describes setting the same inline text on several nodes.

  • protected override void Apply()

    Makes the change. Called once on execute and again on every redo.

  • protected override void Revert()

    Puts back exactly what Apply changed.

  • public override bool TryMergeWith(IEditorCommand previous, out IEditorCommand? merged)

Used by (4)

  • CompositorViewVixen.Editor.AssetEditors
  • NodeSettingMemberVixen.Editor.NodeGraph
  • ShaderGraphTestsVixen.Editor.AssetEditors.Tests
  • ShaderGraphViewVixen.Editor.AssetEditors