-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Editor click and drag object selection not writing all ids to the provided IDLIntArray #13
Comments
Hey. Thanks for providing a way to test it. I'll take a look when I have some free time. |
Debugging in visual studio it seems there is a problem with resize. Need to investigate more. |
Looking at the resize implementation in Setting that aside, I removed all
Since While it was clunky to sort out, I didn't run into this issue with spaiR/imgui-java bindings, but there's also some type juggling cleverness being done there which is different than the IDL stuff here, such that users are able to pass primitive arrays to the equivalent functions:
Let me know if there's something else that it'd be helpful for me to check. Thanks! |
Hey, thanks for the help. I think it's working now. When you mentioned there was some sort of padding, I started looking at the NodeId type and realized it's a long, not an int. I updated all library methods to long. It appears there's a bug on the TeaVM side. I selected three nodes, but only two were highlighted in the left panel. Since TeaVM's JsBody doesn't support long, jParser converts all native methods from long to int. This might be related to the issue or its something else. |
This is great, thanks! I'm updating my fork today to continue working on this and ran into a snag. b3c501c updates These are updated in I could cast in all these cases but I want to clarify what the expected usage is before I go down that path, and also double check that I didn't miss something in rebuilding the natives / jni pieces. In case its helpful, these are the build steps I'm using once I updated my fork and rebased the Thanks again for your help! |
I've been working on a game editor recently based on the
imgui-node-editor
blueprint example in the original library. Since the c++ blueprint code doesn't drop easily into another project as a usable starting point, I've been reworking it (usingspaiR/imgui-java
for the java bindings until about a week ago). Since it's in a reasonably workable (if incomplete) state now, I forked this repo and started porting over my java implementation in case you might want to use it.I've run into a couple snags though, one of which is proving tough to sort out... Here's a link to the relevant snippet and comment from my fork
The gist is that node selection works one node at a time, but when trying to select multiple nodes via a click and drag rectangle the
IDLIntArray
holding the selected ids doesn't seem to be populating correctly on the native side, or rather the id values are correct on the native side (when set inimgui_node_editor_api.cpp
in theBuildIdList(...)
function) but only the first id is appearing on the java side after a call toNodeEditor.GetSelectedNodes(nodeIds, size)
and all others are 0 even though the array size is correct. Ultimately that seems to be causing a native crash later on in a seemingly unrelated spot.I've tried a handful of different ways to setup and use those arrays in case it was just a usage mistake on my part but nothing seems to have made a difference. The version linked above is about as close to the original blueprint example as possible.
Happy to provide more info, test additional things in java or native code, or walk through my blueprint code, just let me know what's helpful! Thanks!
The text was updated successfully, but these errors were encountered: