Reply To: "Default value for parameter", serialization, and 2.7 / 2.8 differences

FlowCanvas Forums Support "Default value for parameter", serialization, and 2.7 / 2.8 differences Reply To: "Default value for parameter", serialization, and 2.7 / 2.8 differences

#1785
Gavalakis
Keymaster

Hello again and thanks for the follow up.

Yes, OnCreate is indeed only called when the node is created and only once when it does. Not every time the node deserialize, so that is a safe place to set the default serialized values.
A UI option for reseting the node to default values could follow in the next version. The only problem in that, is that the “OnCreate” no longer makes a lot of sense, but rather a “Reset” method would make more sense (akin to Unity’s Reset method callback). I could of course call “OnCreate” when we click the Reset option in the UI, but it’s not very consistent, thus I would prefer adding a “Reset” callback as well for this case.

Let me know what you think.
Thank you 🙂

Join us on Discord: https://discord.gg/97q2Rjh