Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.c
| Context not available. | |||||
| #include "node_intern.h" /* own include */ | #include "node_intern.h" /* own include */ | ||||
| #include "GPU_immediate.h" | |||||
| #ifdef WITH_COMPOSITOR | #ifdef WITH_COMPOSITOR | ||||
| # include "COM_compositor.h" | # include "COM_compositor.h" | ||||
| #endif | #endif | ||||
| Context not available. | |||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| glEnable(GL_LINE_SMOOTH); | glEnable(GL_LINE_SMOOTH); | ||||
| UI_draw_roundbox_corner_set(UI_CNR_ALL); | |||||
| if (node->flag & NODE_ACTIVE) | if (node->flag & NODE_ACTIVE) | ||||
| UI_ThemeColorShadeAlpha(TH_ACTIVE, 0, -40); | UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD, UI_ThemeColorShadeAlpha(TH_ACTIVE, 0, -40)); | ||||
| else | else | ||||
| UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40); | UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD, UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40)); | ||||
| 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); | |||||
| glDisable(GL_LINE_SMOOTH); | glDisable(GL_LINE_SMOOTH); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| } | } | ||||
| 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_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad, UI_ThemeColorShadeAlpha(TH_ACTIVE, 0, -40)); | ||||
| else | else | ||||
| UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40); | UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad, UI_ThemeColorShadeAlpha(TH_SELECT, 0, -40)); | ||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad); | |||||
| 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(GL_LINE_LOOP, rct->xmin + 1, rct->ymin + 1, rct->xmax -1, rct->ymax - 1, hiddenrad, immMakeAttrib4ub(node->color[0]*255, node->color[1]*255, node->color[2]*255, 255)); | ||||
| 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. | |||||
| uiBlock *block; | uiBlock *block; | ||||
| /* 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_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, UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70)); | ||||
| 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. | |||||