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

load/save issues

Open KanesAccount opened this issue 7 years ago • 5 comments

Hi,

I've been playing around with your blueprints and attempting to get the save feature to work, it manages to save out the correct json data but when I re-load it seems to overwrite everything to the original settings, not sure if I'm missing a flag somewhere or something?

Thanks in advance :)

KanesAccount avatar Apr 26 '18 20:04 KanesAccount

Can you check if blueprint example is working for you? Also are you using per-node callbacks? It will help if you provide a way to reproduce an issue.

thedmd avatar Apr 29 '18 19:04 thedmd

I've tried a the blueprints example with a fresh clone and still getting the same issue, and as for the node generation I haven't modified that section from the example

I've tried following the debugger to identify where the settings were being changed but theyre not updated until the draw nodes/lines when end() is called at the end of the app frame.

When LoadNode is called from app Initialize the NodeId is unspecified and size is never > 0, data ends up being returned empty and so FindNode fails meaning the memcpy is never triggered.

Sorry I can't be more specific in reproducing it!

Thanks, Kane

KanesAccount avatar Apr 30 '18 14:04 KanesAccount

Can you lead me over what are you doing exactly with example and where expected outcome is well, unexpected. Simply speaking I need a steps to reproduce issue on my side.

thedmd avatar May 23 '18 21:05 thedmd

Sure thing, I was attempting to add some nodes and link them together, save them then close and re-open but every time it would revert back to the original demo layout for the blueprints example

I'm probably missing something on my side, if the demo is intended to do so.

Would you be able to provide me a snippet of code that shows the loading process of previously saved nodes?

Thanks, Kane

On Wed, 23 May 2018 at 22:44, Michał Cichoń [email protected] wrote:

Can you lead me over what are you doing exactly with example and where expected outcome is well, unexpected. Simply speaking I need a steps to reproduce issue on my side.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thedmd/imgui-node-editor/issues/5#issuecomment-391506618, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4js1Po16VVrGWLmrspEK92m-vVtq5kks5t1dhKgaJpZM4TnZg8 .

KanesAccount avatar May 30 '18 11:05 KanesAccount

Oh, I think I understand now. Blueprint demo does not save nodes, it serve as an example of editor usage not really an actual tool. Nodes are created at run-time and are not saved nor loaded. I may add example of this in the future. In the mean time you can pick it up as a starting point and add save s_Nodes, s_Links and s_NextId in a way you see fit - this should do the trick.

thedmd avatar Jun 27 '18 00:06 thedmd