jagenjo / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
6.64k stars 708 forks source link

Stop execution from node #300

Open neil-119 opened 2 years ago

neil-119 commented 2 years ago

Is there a way to tell the graph engine NOT to execute any connected nodes based on conditions determined in onExecute()? Meaning the rest of the graph still executes, just not the connected nodes.

atlasan commented 2 years ago

You can propably use the 'mode' property, and set it to 'never'.

Something like node.changeMode(LiteGraph.NEVER);