Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.cc
| Show First 20 Lines • Show All 752 Lines • ▼ Show 20 Lines | static void node_socket_outline_color_get(const bool selected, | ||||
| } | } | ||||
| else if (socket_type == SOCK_CUSTOM) { | else if (socket_type == SOCK_CUSTOM) { | ||||
| /* Until there is a better place for per socket color, | /* Until there is a better place for per socket color, | ||||
| * the outline color for virtual sockets is set here. */ | * the outline color for virtual sockets is set here. */ | ||||
| copy_v4_v4(r_outline_color, virtual_node_socket_outline_color); | copy_v4_v4(r_outline_color, virtual_node_socket_outline_color); | ||||
| } | } | ||||
| else { | else { | ||||
| UI_GetThemeColor4fv(TH_WIRE, r_outline_color); | UI_GetThemeColor4fv(TH_WIRE, r_outline_color); | ||||
| r_outline_color[3] = 1.0f; | |||||
| } | } | ||||
| } | } | ||||
| void node_socket_color_get(const bContext &C, | void node_socket_color_get(const bContext &C, | ||||
| const bNodeTree &ntree, | const bNodeTree &ntree, | ||||
| PointerRNA &node_ptr, | PointerRNA &node_ptr, | ||||
| const bNodeSocket &sock, | const bNodeSocket &sock, | ||||
| float r_color[4]) | float r_color[4]) | ||||
| ▲ Show 20 Lines • Show All 1,489 Lines • ▼ Show 20 Lines | static void node_draw_basis(const bContext &C, | ||||
| } | } | ||||
| /* Header underline. */ | /* Header underline. */ | ||||
| { | { | ||||
| float color_underline[4]; | float color_underline[4]; | ||||
| if (node.flag & NODE_MUTED) { | if (node.flag & NODE_MUTED) { | ||||
| UI_GetThemeColor4fv(TH_WIRE, color_underline); | UI_GetThemeColor4fv(TH_WIRE, color_underline); | ||||
| color_underline[3] = 1.0f; | |||||
| } | } | ||||
| else { | else { | ||||
| UI_GetThemeColorBlend4f(TH_BACK, color_id, 0.2f, color_underline); | UI_GetThemeColorBlend4f(TH_BACK, color_id, 0.2f, color_underline); | ||||
| } | } | ||||
| const rctf rect = { | const rctf rect = { | ||||
| rct.xmin, | rct.xmin, | ||||
| rct.xmax, | rct.xmax, | ||||
| ▲ Show 20 Lines • Show All 863 Lines • ▼ Show 20 Lines | if (ntree) { | ||||
| draw_nodetree(C, region, *ntree, path->parent_key); | draw_nodetree(C, region, *ntree, path->parent_key); | ||||
| } | } | ||||
| /* Temporary links. */ | /* Temporary links. */ | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| GPU_line_smooth(true); | GPU_line_smooth(true); | ||||
| if (snode.runtime->linkdrag) { | if (snode.runtime->linkdrag) { | ||||
| for (const bNodeLink *link : snode.runtime->linkdrag->links) { | for (const bNodeLink *link : snode.runtime->linkdrag->links) { | ||||
| node_draw_link(C, v2d, snode, *link, true); | node_draw_link_dragged(C, v2d, snode, *link); | ||||
| } | } | ||||
| } | } | ||||
| GPU_line_smooth(false); | GPU_line_smooth(false); | ||||
| GPU_blend(GPU_BLEND_NONE); | GPU_blend(GPU_BLEND_NONE); | ||||
| if (snode.overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && snode.flag & SNODE_SHOW_GPENCIL) { | if (snode.overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && snode.flag & SNODE_SHOW_GPENCIL) { | ||||
| /* Draw grease-pencil annotations. */ | /* Draw grease-pencil annotations. */ | ||||
| ED_annotation_draw_view2d(&C, true); | ED_annotation_draw_view2d(&C, true); | ||||
| Show All 30 Lines | |||||