Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10184)

Issue 12660043: Patch: custom display of NodeLinks in the Node Editor

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by sjoerd_de_vries
Modified:
10 years, 8 months ago
Reviewers:
lukas.toenne1, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

Currently, 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -37 lines) Patch
source/blender/blenkernel/BKE_node.h View 1 chunk +2 lines, -2 lines 0 comments Download
source/blender/editors/space_node/drawnode.c View 16 chunks +105 lines, -19 lines 0 comments Download
source/blender/editors/space_node/node_draw.c View 6 chunks +6 lines, -6 lines 0 comments Download
source/blender/editors/space_node/node_intern.h View 1 chunk +2 lines, -2 lines 0 comments Download
source/blender/makesdna/DNA_node_types.h View 1 chunk +6 lines, -3 lines 0 comments Download
source/blender/makesrna/intern/rna_nodetree.c View 7 chunks +66 lines, -5 lines 0 comments Download

Messages

Total messages: 1
sjoerd_de_vries
10 years, 8 months ago (2013-08-08 11:41:26 UTC) #1

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b