imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

Question: Any form to save the state of the BP

Open PabloPicose opened this issue 7 years ago • 3 comments
trafficstars

Hi, first of all, nice job, Second, is there any form to save the states of the blueprint editor? I don't know if there is, I know that is a json file to load the basic config, but, any form to override it, for example, only one bp? I tried to add some more bp, but after close, it doesn´t load the last changes. (PD: soz for my english )

PabloPicose avatar Jul 13 '18 03:07 PabloPicose

Node editor save its state using callback. It can do it per node or for all nodes at once. You can set callback function in ed::Config structure, please see example here.

Blueprint editor however does not save list of nodes created by user. One reason for that it does not represent data. It is build with an assumption that you already have your own nodes and you want to hook up an editor for them.

I will consider adding saving state of an example, since you're not first one who asked about that.

thedmd avatar Sep 01 '18 16:09 thedmd

Thanks for this nice work. The position of the existing nodes is not saved in the blueprint editor, when exiting and restarting it start from the same position. It looks like there is a json file though. How can we save the position of the nodes?

erwincoumans avatar Jan 07 '21 18:01 erwincoumans

Example always construct blueprint nodes from code and explicitly set their positions. If you comment calls to ed::SetNodePosition state of nodes should be read back from json file.

If you want to save editor node state with your objects you can use SaveNodeSettings and LoadNodeSettings.

thedmd avatar Jan 13 '21 22:01 thedmd