Created by: Durman
Addressed problem description
Fixes #4133 (closed) Closes #4148 (closed)
Solution is to register all old and dummy nodes for now if there is at least one node with unregistered class in a loaded file.
Also after reloading Sverchok (F8) all old and dummy nodes will be registered. It even impossible to check whether there are nodes with unregistered classes because during reloading event it may happened that even normal node classes was not registered yet. Delegate finishing Sverchok initialization to update system (as it is before this PR) I consider as wrong solution. Update system should either update node trees or finish Sverchok initialization after reload event (according its name, the first would be more expected I think).
There is no upgrade nodes
module any more but there is If you want to update a node content do this in the process method. It does not look like appropriate place but this will let to keep our update system simpler and this will work for both loading a new file and importing a JSON.load_file_update
optional method for nodes. I did not finish with its implementation yet (I secretly wish not implement it at all). Probably it should be called not only when file is loded but also when trees are imported via JSON format.
Trees will be properly updated after reload event even if first tree update was not properly throttled. Found a lot of strange things in refactored modules.
Preflight checklist
-
Try catch for post load handler? - [ ] Think about theload_file_update
method -
Code changes complete. -
Code documentation complete. -
Manual testing done. -
Ready for merge.