Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.cc
| Show First 20 Lines • Show All 4,307 Lines • ▼ Show 20 Lines | if (node_link_bezier_handles(v2d, snode, link, vec)) { | ||||
| } | } | ||||
| /* Draw single link. */ | /* Draw single link. */ | ||||
| float colors[3][4] = {{0.0f}}; | float colors[3][4] = {{0.0f}}; | ||||
| if (th_col3 != -1) { | if (th_col3 != -1) { | ||||
| UI_GetThemeColor4fv(th_col3, colors[0]); | UI_GetThemeColor4fv(th_col3, colors[0]); | ||||
| } | } | ||||
| if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && | if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && | ||||
| snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS && | snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS) { | ||||
| ((link->fromsock == nullptr || link->fromsock->typeinfo->type >= 0) && | |||||
| (link->tosock == nullptr || link->tosock->typeinfo->type >= 0))) { | |||||
| PointerRNA from_node_ptr, to_node_ptr; | PointerRNA from_node_ptr, to_node_ptr; | ||||
| RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->fromnode, &from_node_ptr); | RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->fromnode, &from_node_ptr); | ||||
| RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->tonode, &to_node_ptr); | RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->tonode, &to_node_ptr); | ||||
| if (link->fromsock) { | if (link->fromsock) { | ||||
| node_socket_color_get(C, snode->edittree, &from_node_ptr, link->fromsock, colors[1]); | node_socket_color_get(C, snode->edittree, &from_node_ptr, link->fromsock, colors[1]); | ||||
| } | } | ||||
| else { | else { | ||||
| node_socket_color_get(C, snode->edittree, &to_node_ptr, link->tosock, colors[1]); | node_socket_color_get(C, snode->edittree, &to_node_ptr, link->tosock, colors[1]); | ||||
| ▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines | |||||