sverchok
sverchok copied to clipboard
Preset instantiation have incorrect layout and frame label size
When saving a node setup (with frames) as a preset and then instantiating them the layout is messed up. Some nodes do not get created in the proper location. Also the frame label sizes is not preserved. (kept at default value: 20).
Here’s the node tree saved to presets:

And here’s the instantiated version from the saved preset:

It looks like the nodes not included in the subframes are the ones with the wrong locations.
Any ideas what can be done about this? I want to use presets but this bug kinda stands in the way.
As far as I understand, you'll have the same problem if you just export such a tree to json and then import it. Correct?
@portnov actually nope.. it works fine when exporting/importing json. Though it has a bit of a weird behavior. When importing first it has the frames messed up, but then when I move the mouse eventually they fix themselves. Spooky. Instantiating from presets does not have the same auto correction behavior though.
https://user-images.githubusercontent.com/2083719/115651146-a17f5d80-a2f8-11eb-8a58-2a29c80a5daf.mov
if you guys don’t observe this behavior on your systems.. I wonder if it has anything to do with the mac dpi factor correction.. rebuilding the tree from json on import would also have to calculate the location of the nodes / frames taking the dpi factor into account maybe?
I have the same behaviour in my computer. It also occurs during converting selected nodes, with frame 'nodes', into a node group. Probably we should call redraw function (if it's possible) of the tree editor after creating frames via Python.