DescriptionCurrently, the display of NodeLinks in the Node Editor is mostly hardcoded. A Bezier curve is drawn, starting and ending horizontally. The curve is always solid and its color is determined by the global theme, and cannot be customized for individual NodeLinks.
This patch adds four floats to the NodeLink, describing the initial and final curve tangent. They can be accessed from RNA/Python using the methods "get_initial_tangent", "set_initial_tangent", "get_final_tangent" and "set_final_tangent". For a tangent that is all zeroes, the current horizontal tangent is used.
This patch also adds two flags, "dashed" and "use_socket_color". "dashed" draws the NodeLink curve in a dashed style. "use_socket_color" invokes the "draw_color" method of the 'from' NodeSocket to get the color of the curve.
On a technical note, the Bezier function signatures have been adapted to accept a const bContext, and "const" has been added to the draw_color function signature.
Patch Set 1 #
MessagesTotal messages: 1
|