Friday, November 26, 2010

More unexpected progress

While my better half was preparing the traditional thanksgiving meal, I made myself useful by indulging in another programming spurt and creating the graphic user interface part needed for 'node based compositing'. I am really impressed with the flexibility of the Qt programming library, and the wealth of examples out there. I started out with an open-source mindmapping program, lobotomized most of it's code, leaving only the code in place that provided a basis for what I want. Then I expanded the code to include Node based interfaces, with Pin based I/O, and added the accompanying graphics widgets for it. After a day or so of fiddling around, here is the result:

The following features are fully functional:

  • Wrapping Node based interfaces in graphical widgets,
  • Wrapping pin based I/O components in graphical widgets,
  • Selecting, moving and deleting widgets,
  • Zooming and panning the widget canvas,
  • Connecting I/O pins based on their value types

The following features still need work:

  • At the moment you can only add nodes, and not remove them.
  • It is possible to make cyclic connections. This should be prohibited.
  • Auto-arrangement of a node and all the nodes it connects to through all its output pins.
  • Decide on whether I will keep the undo/redo feature, or just remove it. Even though this node editor supports it, it will be a lot of work to support it throughout the entire editor. I think. Or better said: I need to think a bit more about that ;-)

Although I had to spend a lot of time refactoring the existing code after I had lobotomized the mindmapping example code, I am still impressed with how quick you can get something like this up and running. In the past I had written a graphic interface like this in Java (to practice my programming skills I spent about 80 hours implementing a digital logic drawing board and processor), I guess that helped a lot with understanding what the existing code did and did not do. But again... unexpected progress!

... to be continued.

No comments:

Post a Comment