ProtoFlux:Undoable Destroy: Difference between revisions

From Resonite Wiki
added link to impulses
Added links. Style.
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name":"*", "Type":"Impulse"},
{"Name":"*", "Type":"Call"},
{"Name":"Target", "Type":"Slot"},
{"Name":"Target", "Type":"Slot"},
{"Name":"Preserve Assets", "Type":"bool"}
{"Name":"Preserve Assets", "Type":"bool"}
Line 15: Line 15:




The node will create an undo step in the context menu of the person who the impulse came from. The destruction of the slot provided in Target ([[Slot|Slot]]) will be undo-able by the user.
The '''Undoable Destroy''' node will create an [[Undo|undo]] step in the [[Context Menu]] of the [[User|user]] who the [[Impulses|impulse]] came from. The destruction of the slot provided in Target ([[Slot|Slot]]) will be undo-able by the user.


when this node is paired with an [[ProtoFlux:Begin Undo Batch|Undo Batch]], it's description if has one, will be ignored, and will be part of the [[ProtoFlux:Begin Undo Batch|Undo Batch]]'s undo step instead.  
when this node is paired with an [[ProtoFlux:Begin Undo Batch|Undo Batch]], it's description if has one, will be ignored, and will be part of the [[ProtoFlux:Begin Undo Batch|Undo Batch]]'s undo step instead.  
Line 39: Line 39:
== Examples ==
== Examples ==


{{Stub}}
<gallery widths=480px heights=480px>
File:ProtoFlux_example_undo_node_settup|This node being used in a set of nodes that undoes a bunch of actions that was done by a previous button
</gallery>


[[Category:ProtoFlux:Undo]]
[[Category:ProtoFlux:Undo]]

Latest revision as of 13:48, 5 March 2025

Undoable Destroy
*
Next
Target
Preserve Assets
Undo


The Undoable Destroy node will create an undo step in the Context Menu of the user who the impulse came from. The destruction of the slot provided in Target (Slot) will be undo-able by the user.

when this node is paired with an Undo Batch, it's description if has one, will be ignored, and will be part of the Undo Batch's undo step instead.

Inputs

Input (Call)

Create the undo step and set the Slot to be stored in the Undo Manager with references cut for later re-instantiating upon undoing the Slot's destruction. (Basically make the destruction of the slot provided undoable)

Target (Slot)

The Slot to undo destruction for this undo step.

PreserveAssets (Boolean)

Whether to keep the assets store able in an Asset Provider associated with this slot or discard them. Discarding them may lead to missing textures or assets.

Outputs

Output (Continuation)

Continues to More undo steps, continues to code that eventually ends, or an End Undo Batch that continues to eventually ended code.

Examples