Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.c
| Show All 22 Lines | |||||
| rctf *rct = &node->totr; | rctf *rct = &node->totr; | ||||
| float iconofs; | float iconofs; | ||||
| /* float socket_size = NODE_SOCKSIZE*U.dpi/72; */ /* UNUSED */ | /* float socket_size = NODE_SOCKSIZE*U.dpi/72; */ /* UNUSED */ | ||||
| float iconbutw = 0.8f * UI_UNIT_X; | float iconbutw = 0.8f * UI_UNIT_X; | ||||
| int color_id = node_get_colorid(node); | int color_id = node_get_colorid(node); | ||||
| float color[4]; | float color[4]; | ||||
| char showname[128]; /* 128 used below */ | char showname[128]; /* 128 used below */ | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| bTheme *btheme = UI_GetTheme(); | |||||
| /* skip if out of view */ | /* skip if out of view */ | ||||
| if (BLI_rctf_isect(&node->totr, &v2d->cur, NULL) == false) { | if (BLI_rctf_isect(&node->totr, &v2d->cur, NULL) == false) { | ||||
| UI_block_end(C, node->block); | UI_block_end(C, node->block); | ||||
| node->block = NULL; | node->block = NULL; | ||||
| return; | return; | ||||
| } | } | ||||
| /* shadow */ | /* shadow */ | ||||
| node_draw_shadow(snode, node, BASIS_RAD, 1.0f); | node_draw_shadow(snode, node, BASIS_RAD, btheme->space_node.node_shadow_fac); | ||||
| if (node->flag & NODE_MUTED) { | if (node->flag & NODE_MUTED) { | ||||
| /* Muted nodes are semi-transparent and colorless. */ | /* Muted nodes are semi-transparent and colorless. */ | ||||
| UI_GetThemeColor3fv(TH_NODE, color); | UI_GetThemeColor3fv(TH_NODE, color); | ||||
| color[3] = 0.25f; | color[3] = 0.25f; | ||||
| } | } | ||||
| else { | else { | ||||
| /* Opaque headers for regular nodes. */ | /* Opaque headers for regular nodes. */ | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| rctf *rct = &node->totr; | rctf *rct = &node->totr; | ||||
| float dx, centy = BLI_rctf_cent_y(rct); | float dx, centy = BLI_rctf_cent_y(rct); | ||||
| float hiddenrad = BLI_rctf_size_y(rct) / 2.0f; | float hiddenrad = BLI_rctf_size_y(rct) / 2.0f; | ||||
| int color_id = node_get_colorid(node); | int color_id = node_get_colorid(node); | ||||
| float color[4]; | float color[4]; | ||||
| char showname[128]; /* 128 is used below */ | char showname[128]; /* 128 is used below */ | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| float scale; | float scale; | ||||
| bTheme *btheme = UI_GetTheme(); | |||||
| UI_view2d_scale_get(v2d, &scale, NULL); | UI_view2d_scale_get(v2d, &scale, NULL); | ||||
| /* shadow */ | /* shadow */ | ||||
| node_draw_shadow(snode, node, hiddenrad, 1.0f); | node_draw_shadow(snode, node, hiddenrad, btheme->space_node.node_shadow_fac); | ||||
| /* body */ | /* body */ | ||||
| if (node->flag & NODE_MUTED) { | if (node->flag & NODE_MUTED) { | ||||
| /* Muted nodes are semi-transparent and colorless. */ | /* Muted nodes are semi-transparent and colorless. */ | ||||
| UI_GetThemeColor4fv(TH_NODE, color); | UI_GetThemeColor4fv(TH_NODE, color); | ||||
| color[3] = 0.25f; | color[3] = 0.25f; | ||||
| } | } | ||||
| else { | else { | ||||
| Show All 22 Lines | |||||