6

Just wonder whether subprograms can be totally muted in ways other than just deleting it. I ask bacause:

For example, I tried to setup a loop in another nodetree, Then disable auto execution for that nodetree. However, it can still be invoked in other nodetrees, because subprograms seem to be kinda "global" data.

In some cases I want to mute the subprogram to improve overall performance by disabling the execution. Is that helpful? Can I do that? Or other better solutions? Thanks!

Leon Cheung
  • 27,718
  • 11
  • 89
  • 161
  • 2
    I think there is no good solution to this yet.. I'm thinking about an additional boolean input in the Invoke Subprogram node that tells the node wether to execute the subprogram or not. Will see. – Jacques Lucke Nov 02 '16 at 14:33
  • Oh I bet that can be helpful especially for complex setups, you know, I mean those with hundreds of nodes, though not sure whether it can make enough sense for a performance leap. – Leon Cheung Nov 02 '16 at 15:42
  • I thought it might have been possible with the "loop break", but I just tried it out and it does not cause the loop to stop. Which makes me wonder: what is the "loop break" node for and how it is used? but i"ll open another question for that :) – Kristof Meirlaen Nov 02 '16 at 23:09
  • @KristofMeirlaen There was a discussion on loop break between Jacques and me. FYI – Leon Cheung Nov 03 '16 at 00:53

1 Answers1

2

EDIT: New Version

Same Principle, but how about ditching additional Subprogram and using Get List Element instead:

Old Version

I put actual Subprogram(red) inside another one (blue) as a Parameter to get ability to dynamically change number of iterations. Condition is controling execution of blue Subprogram

New: enter image description here

Old: enter image description here

Serge L
  • 3,915
  • 1
  • 17
  • 33