diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 9c48ce4034d..2d926a50f98 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -59,4 +59,8 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +if(WITH_COMPOSITOR) + add_definitions(-DWITH_COMPOSITOR) +endif() + blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 708d7e0b5e6..8c9f057efc1 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -721,11 +721,14 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN if (node->flag & NODE_MUTED) UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f); +#ifdef WITH_COMPOSITOR if (ntree->type == NTREE_COMPOSIT && (snode->flag & SNODE_SHOW_HIGHLIGHT)) { if (COM_isHighlightedbNode(node)) { UI_ThemeColorBlend(color_id, TH_ACTIVE, 0.5f); } } +#endif + uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT); uiRoundBox(rct->xmin, rct->ymax - NODE_DY, rct->xmax, rct->ymax, BASIS_RAD); @@ -885,11 +888,15 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b if (node->flag & NODE_MUTED) UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f); +#ifdef WITH_COMPOSITOR if (ntree->type == NTREE_COMPOSIT && (snode->flag & SNODE_SHOW_HIGHLIGHT)) { if (COM_isHighlightedbNode(node)) { UI_ThemeColorBlend(color_id, TH_ACTIVE, 0.5f); } } +#else + (void)ntree; +#endif uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad); @@ -1138,9 +1145,13 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) } node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f); + +#ifdef WITH_COMPOSITOR if (snode->nodetree->type == NTREE_COMPOSIT) { COM_startReadHighlights(); } +#endif + node_draw_nodetree(C, ar, snode, snode->nodetree); #if 0 |