public sealed class SetPortValueCommandTyping a number into an unconnected input.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ One command for the whole selection rather than one per node. Setting a port with three nodes selected is one edit and undoing it is one keystroke — the rule SetValuesCommand states for the pipeline's own members, and the reason a composite of three was not the answer: a composite undoes correctly and fills the history with entries nobody can read, and it does not merge, so a drag would leave one entry per frame per node.
Fields and properties (1)
public override string NameWhat this is called in the undo history, as a person would say it.
Methods (5)
public SetPortValueCommand(NodeGraphModel graph, NodeId node, string port, float[] value, EditorDocument? document = null)Describes setting an inline value.
public SetPortValueCommand(NodeGraphModel graph, IReadOnlyList<NodeId> nodes, string port, float[] value, EditorDocument? document = null)Describes setting one input to one value across 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)
- CommandTestsVixen.Editor.NodeGraph.Tests
- CompositorViewVixen.Editor.AssetEditors
- NodeGraphViewVixen.Editor.NodeGraph
- NodePortMemberVixen.Editor.NodeGraph