Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Context not available. | |||||
| { | { | ||||
| rctf *rct = &node->totr; | rctf *rct = &node->totr; | ||||
| int color_id = node_get_colorid(node); | int color_id = node_get_colorid(node); | ||||
| unsigned char color[4]; | float color[4]; | ||||
| float alpha; | float alpha; | ||||
| /* skip if out of view */ | /* skip if out of view */ | ||||
| Context not available. | |||||
| return; | return; | ||||
| } | } | ||||
| UI_GetThemeColor4ubv(TH_NODE_FRAME, color); | UI_GetThemeColor4fv(TH_NODE_FRAME, color); | ||||
| alpha = (float)(color[3]) / 255.0f; | alpha = color[3]; | ||||
| /* shadow */ | /* shadow */ | ||||
| node_draw_shadow(snode, node, BASIS_RAD, alpha); | node_draw_shadow(snode, node, BASIS_RAD, alpha); | ||||
| Context not available. | |||||
| if (node->flag & SELECT) { | if (node->flag & SELECT) { | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| 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, | UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD, color); | ||||
| rct->xmin, rct->ymin, | |||||
| rct->xmax, rct->ymax, BASIS_RAD); | |||||
| glDisable(GL_LINE_SMOOTH); | glDisable(GL_LINE_SMOOTH); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| } | } | ||||
| Context not available. | |||||