-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node not updated after loading from saved project #114
Comments
The value of an output usually depends on the most recent node update. A node is updated when input data changes. However, when loading a project the input data is already set (input values are preserved when saving, output values are not) and thus the node is updated again. You can get the desired behavior by updating explicitly def place_event(self):
self.update() The reason for this is that updating the node can have undesired effects for stateful nodes, this way you just have more control. A note to myself on this: when the graph is reconstructed, the nodes are added first and then the connections. Adding the connections, however, does indeed cause updates unless |
Thanks for explaining. I would have thought, that after loading the project the project will be in the same state as when saving. If there are reasons for not recalculating the whole project, at least the user should get the option to do so. One option would be to be ask the user: ‘Recalculate project?’ → Yes|No. This could be done via a dialog box in the GUI. |
Adding def place_event(self):
self.update() To my nodes on both sides of a connection still resulted in the output of the 2nd Node being None after loading from a save. Am I misunderstanding? If every node has this code, shouldn't there be no None values at the outputs of any Node? |
I have the following node, which makes a dictionary from two input values:
a
andb
(let's say I use0
and1
), the output is{'a': 0, 'b': 1}
.MakeDict
node have the values0
and1
filled in, but the output isNone
! I would expect the output to be{'a': 0, 'b': 1}
.The text was updated successfully, but these errors were encountered: