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
Thank you for this library! I'm finding it very helpful. I just am running into one small issue and I'm wondering if you could help point me in the right direction.
The problem
In my application, I serialize the layout of node graphs in a file (similar to NodeEditor.json, but I am creating my own files as I have to manage multiple graphs and allow users to save/open their own layout files). I enable the user to load a node graph stored externally, and when it loads, my application searches for the layout file, loads it, and positions the nodes in the viewport based on the file. It then attempts to center the graph in the window with NavigateToContent() but that is not working.
Why?
When I call SetNodePosition() to position the nodes, it sets node->m_IsLive to false. Then later, when I call NavigateToContent(), it calls GetContentBounds() which calls GetBounds(). In GetBounds(), it ignores all objects that have m_IsLive set to false. This means it is ignoring all of my newly loaded and positioned nodes, causing the editor to try to center around incorrect bounds.
How can I get around this so that my application can load a graph and a layout file, then automatically center it in the window?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
Thank you for this library! I'm finding it very helpful. I just am running into one small issue and I'm wondering if you could help point me in the right direction.
The problem
In my application, I serialize the layout of node graphs in a file (similar to NodeEditor.json, but I am creating my own files as I have to manage multiple graphs and allow users to save/open their own layout files). I enable the user to load a node graph stored externally, and when it loads, my application searches for the layout file, loads it, and positions the nodes in the viewport based on the file. It then attempts to center the graph in the window with
NavigateToContent()
but that is not working.Why?
When I call
SetNodePosition()
to position the nodes, it setsnode->m_IsLive
to false. Then later, when I callNavigateToContent()
, it callsGetContentBounds()
which callsGetBounds()
. InGetBounds()
, it ignores all objects that havem_IsLive
set to false. This means it is ignoring all of my newly loaded and positioned nodes, causing the editor to try to center around incorrect bounds.How can I get around this so that my application can load a graph and a layout file, then automatically center it in the window?
Thanks!
The text was updated successfully, but these errors were encountered: