-
Notifications
You must be signed in to change notification settings - Fork 322
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
Added Native File Browser for Graph Editor #1256
Added Native File Browser for Graph Editor #1256
Conversation
|
I went through the CLA registration process and got a confirmation. Not sure if there's a lag time between that and the test updating here Edit: I think it's because I submitted the commit from my corporate email. Which I've also added to my account, and signed a secondary CLA for, but it looks to not like that. Submitted a JIRA ticket here: https://jira.linuxfoundation.org/plugins/servlet/desk/portal/4/SUPPORT-16422 In the meantime, I've updated the PR with my personal email to unblock it |
a3db6b7
to
95a0e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to get rid of the built in browser on desktop. I "think" it would still be useful as a runtime option however as believe that all UI drawn using ImGui constructs so maintains consistency with the rest of the UI which can have customizable attributes set, and maybe also is more cross-platform (non-desktop) ?
In a Slack discussion with @dgovil, he suggested the idea of importing the existing cross-platform file browser from NanoGUI into MaterialXGraphEditor, effectively replacing the dependency of the graph editor on ImGuiFileBrowser. This sounds like a good approach to me, and further in the future we might consider moving the imported file browser code from MaterialXGraphEditor into MaterialXRender, making it available for other example applications to use. This future step would require either raising the minimum supported platform for MaterialXRender to C++17, or replacing the |
027d3db
to
85a1221
Compare
This PR copies the file browser handling code from NanoGUI, and adds an adapter to be able to use it with Imgui
7ed6e35
to
45e0fcb
Compare
@jstone-lucasfilm and @kwokcb , I've updated this PR to include the code from the NanoGUI end so in theory it should work on macOS, Windows and Linux. I've only tested this PR on macOS since I don't have a Linux or Windows machine handy. Would someone else be able to test+modify the PR for those platforms? I think I captured all the includes and CMake configurations that might be needed, but I am not sure of course. Thanks! |
Hi @dgovil, Sorry I don't have Linux. Add in @lfl-eholthouser, to see if she has it, and for review. |
Awesome, thanks @kwokcb . I just applied your patch (just a note, I think your diff was inverted but easy enough to flip) |
Sorry about that. Must have got args reversed in |
Hi @dgovil I tried it out and its working for me on Linux! It looks great! I'm getting a Linux error caused by IM_ifgreater_vector3_genglsl that's affecting the rendering so nothing shows up in the render view. I'm pretty sure this is related to a different change so I'm going to keep investigating that, but for some reason even just adding new folder and the changes to the Graph.h are causing it. |
Thanks for confirming it works! That error does sound like it's coming from elsewhere unless some kind of preprocessor define caused a conflict? Though I'd be surprised since the code is largely from nanogui so I'd expect to see the same issue in materialxview Hopefully it's easy enough to track down |
This changelist merges the new FileDialog class into the main source folder for the Graph Editor, creating a slightly simpler structure. Additionally, it removes a dependency of FileDialog.h on UiNode.h, as a step towards moving this code to MaterialXFormat in the future.
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
The only code that I know which may overlap should be the code for handling focus. i.e. @lfl-eholthouser I assume you added in the code to check focus since the older dialogs being drawn using OpenGL. I don't think they would affect anything but that's all I can think of. Would be good to clean up this code afterwards though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this proposal together, @dgovil, and this looks good to me!
612cb94
into
AcademySoftwareFoundation:main
…#1256) This PR adds support for using a platform native file browser to the MaterialXGraphEditor.
This PR adds support for using a platform native file browser on macOS to the MaterialXGraphEditor.
It introduces a new class that matches the Imgui File Dialog API, though limited to just the calls used by the GraphEditor.
Being able to use the native browser allows for quicker navigation to locations the user may have saved, and allows handling of some cases like cloud synced files.