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

Issue 12437043: Patch: customizing the order of socket display in Node Editor nodes

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

Description

The display of node elements in the Node Editor is currently hardcoded. Beginning from the top, first all output sockets are rendered, then the preview rect, then the button rect, and finally all input sockets. The current patch adds an integer "row" property to NodeSocket, that allows custom socket ordering. Starting at the lowest encountered row index, all inputs and then all outputs with that row index are rendered. If row==0 (default row value), the preview rect and the button rect are rendered in between, maintaining current behavior. Row range is currently clamped from -127 to 127, but this is essentially arbitrary (the row is stored as a short). However, extreme values should be disallowed, due to the "for(row=min;row<max;row++)" loop becoming inefficient for extreme ranges. Repetitive code sections have been put into separate functions declared "inline", for efficiency and to indicate that they are for internal use within the file.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -71 lines) Patch
source/blender/editors/space_node/node_draw.c View 5 chunks +127 lines, -71 lines 0 comments Download
source/blender/makesdna/DNA_node_types.h View 1 chunk +2 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_nodetree.c View 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 1
sjoerd_de_vries
10 years, 8 months ago (2013-08-04 16:17:19 UTC) #1

          
Sign in to reply to this message.

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