You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the internal "dirty" flag of runtime properties object will be set and node instance will have runtime properties updated according to changes made.
I can see the whole mechanism of detecting changes to runtime properties, being object of DirtyTrackingDict is based on setting the .dirty flag, but only in case of direct assignments or update method call.
If we do the same on objects which are nested in runtime properties, the mechanism does not work and probably it will be hard to make it working in current design.
A potential solution to it could be:
before executing the script, make a deepcopy of runtime properties
execute the script
compare runtime properties with the copy done intially
initial_runtime_properties=copy.deepcopy(ctx.instance.runtime_properties)
run_script(ctx, ...)
ifctx.instance.runtime_properties!=initial_runtime_properties:
ctx.instance.runtime_properties._set_changed() # what sets .dirty=True
The text was updated successfully, but these errors were encountered:
In a python script, when updating an object being stored in runtime properties, for example:
intial script:
then, in execution of another script:
node instance will not be updated, and the changes made will not be saved.
If we did additionally any assignment to runtime properties:
the internal "dirty" flag of runtime properties object will be set and node instance will have runtime properties updated according to changes made.
I can see the whole mechanism of detecting changes to runtime properties, being object of DirtyTrackingDict is based on setting the .dirty flag, but only in case of direct assignments or update method call.
If we do the same on objects which are nested in runtime properties, the mechanism does not work and probably it will be hard to make it working in current design.
A potential solution to it could be:
The text was updated successfully, but these errors were encountered: