Get level from a scriptnode module?
-
Is there a way to get level off a specific scriptnode module? I’m thinking about something like .getCurrentLevel but measured on a node level, if that makes sense?
-
@tomekslesicki following, it would be nice to have this
-
@Matt_SF use a peak node and connect it to a global_cable node, then register a script callback to it in your interface script.
-
@Christoph-Hart sounds great! How can I register the script, though?
-
@Christoph-Hart oh nice! thanks
@tomekslesicki I'll try it tonight -
// Create an instance of the global routing manager const var gm = Engine.getGlobalRoutingManager(); // Get the cable that you want to listen to const var cable = gm.getCable("MyCable"); inline function onCableChange(value) { Console.print(value); } // Attach a callback to changes // false => asynchronous execution on UI thread cable.registerCallback(onCableChange, false);
Be aware that this breaks compileability of the node so you can't use this with a HardcodedFX module.
-
@Christoph-Hart epic, thank you!