-
Notifications
You must be signed in to change notification settings - Fork 31
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
Visual Node Editor #125
Comments
Hi @vvzen, That's nice to hear, send my regards to the team at Framestore, I miss 'em!!! As far as the node editor goes, you're absolutely right, this would be the next level! In terms of visualization, @anton4 has done some great work on it, the discussion is here: #39 I personally have tinkered with a nice PySide2 library: https://github.com/jchanvfx/NodeGraphQt. That lib is really well done and actively being developed. I managed to create a very basic proof of concept with it but haven't uploaded it anywhere yet. When I have some time (next week) I'll dig upwhat I have and upload it so you can give it a go yourself. In short: If you want to contribute to (or start) such a project, you have my full support. First step would be deciding the technology (web or python) I guess. |
Hi @PaulSchweizer ! https://github.com/ml2grow/graph-flow-vis seems like a very nice project, is based on D3 which is a great data viz library for the web, even if the API it's quite convoluted compared to something like PaperJS or even ThreeJS. I've used to work with d3 in the past and also other canvas/svg web libraries so I would be happy to give a hand in this direction! On the other hand, PySide2 seems a more robust and solid approach, but I would personally pick Qt Quick 2 and QML for this kind of tasks. It's designed with a clear separation between the logic and the presentation, and also makes it easy to create reusable UI components. Also, I think the QML scene graph optimizes a lot of draw calls (only redraws what has changed, instead of always redrawing everything) compared to the standard PySide2 widgets, which could prove useful to retain a nice FPS even on complex graphs. So I guess it's really a matter of which direction you feel is worth following. Thank you! Valerio |
Hi @vvzen, Here's my proof of concept with PySide2: https://github.com/PaulSchweizer/flowpipe_editor , give it a try. I think the web app is the preferred solution for most users, but it takes take more time to implement (at least for me). I personally am in favor of the web app solution, also because I can learn some new stuff along the way. |
Hi @PaulSchweizer ! I was trying to test the flowpipe_editor, but for now it's throwing me this error:
I've been able to track it back to what you're doing in the ..I was starting to patch it when I realised that probably you could do it faster than me. :D PS: I'm currently testing from |
Ah, sorry, forgot to put the QApplication in there, should work now. As for the js libs, I wonder if there might already be a library for graph networks that we could use? |
Still happening, I tried the same thing before having a deeper look at what was causing it. If it was so easy I would have done it myself 😛 There's one js library specifically made to handle graphs, but I feel it's too specific for what could be the aim of the node editor: https://github.com/ericdrowell/ElGrapho . EDIT: after more searches, maybe Fabric.js and Konvajs are also worth a look, given their focus on user interaction |
Hi @PaulSchweizer ! Valerio |
Thanks for getting it started @vvzen! fabric.js seems like a good choice, let's run with it unless we come across something even better. For the beginning, I'd say we should simply focus on displaying an arbitrary graph of nodes without much styling or finesse and no interactivity other than what already comes with fabric.js, like zooming and scrolling. That should be challenging enough for a start while still achievable and should provide the necessary groundwork for the next steps, what d'you think? |
Cool! In order to make a dev plan for the next weekends (thanks to the corona 🦠 I'll probably have more weekends at home) I've outlined some steps as a general recap, I would like to know your opinion on them: General workflow
Nodes
Maybe we could use the python module UI/UX
My next step would have been to implement a mechanism to plug the nodes Cheers! PS: also for now I wouldn't focus on supporting subgraphs. It could be done in the future once the main functionality is there |
General workflow: Nodes: UI: And yes, let"s ignore subgraphs and compound plugs and any other complex concepts for now. And also, let's move further detailed discussion to your repo and only add important updates to his ticket, I'd say. We can set up tickets and a road map in there as well then. I'm looking forward to this! |
Just as an update - I had to shift priorities a little bit since luckily I got some more work to do in the weekends. But I've reached a initial state which I'll try to document soon (this weekend?) and add some gifs/videos to show what currently works and what doesn't - then we can maybe also set milestones? |
Hi @PaulSchweizer !
This is an awesome project which we're still using heavily at Framestore IA, so thanks for that. :)
Today I was letting my imagination run wild and I started to think.. what if you could have a visual node graph editor that would let create your custom graph, using your predefined nodes?
Then you could plug things in a intuitive visual way, and once you're happy with your graph, you could then "bake" it to a declarative format (json, yaml, GraphML.. etc).
The reason for that is that I feel that sometimes implementing the graph in python doesn't really feel natural, and it may be hard to decide what should be the exact scope of a node (it's easy to get too much stuff going on or get too granular and only implement a function in a node) - the result is that sometimes people have different way of seeing whaat a node should be, and you end up with graph that doesn't just connect nodes but also hosts a major part of your business logic.. But if you had the chance to plug your things visually, then, imho, writing the api all of each nodes would be much easier, and a graph would only be the deterministic result of a bunch of nodes plugged together. No logic required.
Also, this could become an incredibily powerful tool for tecnical people to provide a powerful abstraction for creating complex automations!
(Or maybe it's just that I've used Quartz Composer too much before I started programming :D )
So I was just wondering if you ever thought about implementing something like that, or it's too much outside the scope of the library.
Thanks,
Valerio
PS: as a reference, this is kinda what I'm referring to: https://github.com/paceholder/nodeeditor
The text was updated successfully, but these errors were encountered: