Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-17 14:19:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-17 14:19:47 +0400
commitf9795b353e65b3f4ba382dd05621479e7e5a9597 (patch)
tree3bde3e0c8225dab222e484a3482969136e352170 /source/blender/editors
parentf4cff34392a8efe7cc7be448ccd9fa2386597772 (diff)
fix for building without the compositor
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_node/node_draw.c11
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