Create node with pure/impure conversion

Is there a way to create a node that you can right click and press “convert to pure” or “convert to impure” like the cast node?

I want to create a series of macro bool’s that will have a pure form, which just returns the normal bool, but the impure has a built in branch, so it outputs two exec’s instead of a value.

I’m assuming this will have to be done in C++ if possible. Is there a way to do this?

I’d also like to know how to achieve this! Were you able to find a solution outside of answerhub?

Just a work around. I ended up creating my bool with built in branch nodes and added (impure) at the end of them so I can search for it when I type them.

I also throw in the value node because

  1. It doesn’t take up space, or make the node extra taller
  2. It looks nicer, and
  3. You never know when you need it.

122906-int+int.png

I know this would be sort’ve weird to implement into Function/Macro libraries, since you’d have to have, in the function library, a reference to a macro in another library, but, seeing as function libraries can already use macros from their libraries it shouldn’t be that hard.

Bump bump bump