Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 3,438 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| #endif | #endif | ||||
| /* note; this is used for fake links in groups too */ | /* note; this is used for fake links in groups too */ | ||||
| void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) | void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) | ||||
| { | { | ||||
| bool do_shaded = false; | bool do_shaded = false; | ||||
| bool do_triple = false; | bool do_triple = false; | ||||
| int th_col1 = TH_HEADER, th_col2 = TH_HEADER, th_col3 = TH_WIRE; | int th_col1 = TH_SYNTAX_R, th_col2 = TH_SYNTAX_R, th_col3 = TH_WIRE; | ||||
lukastoenne: Would suggest to add a new `TH_NODE_WIRE` or so to the enum in UI_resources.h, instead of… | |||||
| if (link->fromsock == NULL && link->tosock == NULL) | if (link->fromsock == NULL && link->tosock == NULL) | ||||
| return; | return; | ||||
| /* new connection */ | /* new connection */ | ||||
| if (!link->fromsock || !link->tosock) { | if (!link->fromsock || !link->tosock) { | ||||
| th_col1 = TH_ACTIVE; | th_col1 = TH_ACTIVE; | ||||
| do_triple = true; | do_triple = true; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||
Would suggest to add a new TH_NODE_WIRE or so to the enum in UI_resources.h, instead of reusing the TH_SYNTAX_R value which doesn't make any sense in a node context. You can still map it to the same DNA field from ThemeSpace in UI_ThemeGetColorPtr, we have a number of places where this is done.