dlr-gtlab / intelligraph-module

A Node-based Workflow Engine for GTlab
1 stars 0 forks source link

User defined colors per node changeable at runtime #207

Open jensschmeink opened 2 weeks ago

jensschmeink commented 2 weeks ago

It would be nice and helpfull to be able to give nodes a custom color. With this feature you could sort your bigger graphs easier.

mariusalexander commented 2 weeks ago

@jensschmeink Actually, you can: Overlaod NodeUI::painter and return a custom subclass of NodePainter. In this subclass you override customBackgroundColor. The color can also be customized depending on the type (=class) of node. See the default implementation of customeBackgroundColor, it alters the color for Graph nodes.

jensschmeink commented 2 weeks ago

@mariusalexander actually I dont want to implement a color for a node but want to select it in the gui.

mariusalexander commented 2 weeks ago

Ah I see. Then, I think we should discuss this in the team as I am unsure whether this is the best approach. As an alternative: In Blender one can use "Frames" to visually group nodes, maybe this suits more your need?

image

jensschmeink commented 2 weeks ago

The idea of frames is nice as well. currently my "blocks" are often not in the shape of a rectangle. It often looks more like a clustering

mariusalexander commented 2 weeks ago

WIP

I want to accumulate a few ideas:

  1. original

graphs-default

  1. User defined colors/tints to differentiate nodes to ones liking (here to separate two flows)

grafik

+ very flexible organization of nodes - may cause visual clutter? - how do we handle nodes that specify their own colors (none does that yet currently, but one could style all math related nodes say redish and all geometry related nodes greenish). Should these colors be overriden or just tinted?

  1. Rectangle frames like blender (each frame could be colored individually, have a title etc)

graphs-with-frames