Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.c
| Context not available. | |||||
| /* 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]; | |||||
| char showname[128]; /* 128 used below */ | char showname[128]; /* 128 used below */ | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| Context not available. | |||||
| glEnable(GL_LINE_SMOOTH); | glEnable(GL_LINE_SMOOTH); | ||||
| if (node->flag & NODE_ACTIVE) | if (node->flag & NODE_ACTIVE) | ||||
| UI_ThemeColorShadeAlpha(TH_ACTIVE, 0, -40); | UI_GetThemeColorShadeAlpha4fv(TH_ACTIVE, 0, -40, color); | ||||
| else | else | ||||
| UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40); | UI_GetThemeColorShadeAlpha4fv(TH_SELECT, 0, -40, color); | ||||
| UI_draw_roundbox_corner_set(UI_CNR_ALL); | UI_draw_roundbox_corner_set(UI_CNR_ALL); | ||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD); | UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD, color); | ||||
| glDisable(GL_LINE_SMOOTH); | glDisable(GL_LINE_SMOOTH); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| } | } | ||||
| Context not available. | |||||
| float hiddenrad = BLI_rctf_size_y(rct) / 2.0f; | float hiddenrad = BLI_rctf_size_y(rct) / 2.0f; | ||||
| float socket_size = NODE_SOCKSIZE; | float socket_size = NODE_SOCKSIZE; | ||||
| int color_id = node_get_colorid(node); | int color_id = node_get_colorid(node); | ||||
| float color[4]; | |||||
| char showname[128]; /* 128 is used below */ | char showname[128]; /* 128 is used below */ | ||||
| /* shadow */ | /* shadow */ | ||||
| Context not available. | |||||
| glEnable(GL_LINE_SMOOTH); | glEnable(GL_LINE_SMOOTH); | ||||
| if (node->flag & NODE_ACTIVE) | if (node->flag & NODE_ACTIVE) | ||||
| UI_ThemeColorShadeAlpha(TH_ACTIVE, 0, -40); | UI_GetThemeColorShadeAlpha4fv(TH_ACTIVE, 0, -40, color); | ||||
| else | else | ||||
| UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40); | UI_GetThemeColorShadeAlpha4fv(TH_SELECT, 0,-40, color); | ||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad); | |||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad, color); | |||||
| glDisable(GL_LINE_SMOOTH); | glDisable(GL_LINE_SMOOTH); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| } | } | ||||
| Context not available. | |||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| glEnable(GL_LINE_SMOOTH); | glEnable(GL_LINE_SMOOTH); | ||||
| glColor3fv(node->color); | UI_draw_roundbox_gl_mode_3fvAlpha(GL_LINE_LOOP, rct->xmin + 1, rct->ymin + 1, rct->xmax -1, rct->ymax - 1, hiddenrad, node->color, 1.0f); | ||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin + 1, rct->ymin + 1, rct->xmax -1, rct->ymax - 1, hiddenrad); | |||||
| glDisable(GL_LINE_SMOOTH); | glDisable(GL_LINE_SMOOTH); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| Context not available. | |||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| rctf rect = v2d->cur; | rctf rect = v2d->cur; | ||||
| uiBlock *block; | uiBlock *block; | ||||
| float color[4]; | |||||
| /* shade node groups to separate them visually */ | /* shade node groups to separate them visually */ | ||||
| UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70); | |||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| UI_GetThemeColorShadeAlpha4fv(TH_NODE_GROUP, 0, -70, color); | |||||
| UI_draw_roundbox_corner_set(UI_CNR_NONE); | UI_draw_roundbox_corner_set(UI_CNR_NONE); | ||||
| UI_draw_roundbox_gl_mode(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 0); | UI_draw_roundbox_gl_mode(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 0, color); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| /* set the block bounds to clip mouse events from underlying nodes */ | /* set the block bounds to clip mouse events from underlying nodes */ | ||||
| Context not available. | |||||