the compositor optional for cmake: WITH_COMPOSITOR
authorCampbell Barton <ideasman42@gmail.com>
Sat, 30 Jun 2012 14:14:22 +0000 (14:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 30 Jun 2012 14:14:22 +0000 (14:14 +0000)
CMakeLists.txt
source/blender/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/nodes/SConscript
source/blender/nodes/composite/node_composite_tree.c
source/creator/CMakeLists.txt

index dd843e11c8eaa3bcbae5a83203e8068775c3798d..0f8fe7c8019fb9191526110b7eb78faad9e1b8d3 100644 (file)
@@ -130,6 +130,7 @@ option(WITH_FFTW3         "Enable FFTW3 support (Used for smoke and audio effect
 option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
+option(WITH_COMPOSITOR    "Enable the tile based nodal compositor" ON)
 
 # GHOST Windowing Library Options
 option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
index a0d840b5de6362f6978ee3cbe2a4fb69bb811a55..3241acd7df6604fff6d4b3f025612ba3c554dd26 100644 (file)
@@ -95,7 +95,6 @@ add_subdirectory(blenkernel)
 add_subdirectory(blenlib)
 add_subdirectory(bmesh)
 add_subdirectory(render)
-add_subdirectory(compositor)
 add_subdirectory(blenfont)
 add_subdirectory(blenloader)
 add_subdirectory(ikplugin)
@@ -108,6 +107,10 @@ add_subdirectory(modifiers)
 add_subdirectory(makesdna)
 add_subdirectory(makesrna)
 
+if(WITH_COMPOSITOR)
+       add_subdirectory(compositor)
+endif()
+
 if(WITH_IMAGE_OPENEXR)
        add_subdirectory(imbuf/intern/openexr)
 endif()
index 2415c7842a766e7ee8ef6c33a0a07caa16aa4fbe..ce5ce1d87c175f7a5cd8d3f317405a3bfa89076d 100644 (file)
@@ -35,7 +35,6 @@ set(INC
        ../makesrna
        ../render/extern/include
        ../../../intern/guardedalloc
-       ../compositor
 )
 
 set(INC_SYS
@@ -243,4 +242,11 @@ if(WITH_IMAGE_OPENEXR)
        add_definitions(-DWITH_OPENEXR)
 endif()
 
+if(WITH_COMPOSITOR)
+       list(APPEND INC
+               ../compositor
+       )
+       add_definitions(-DWITH_COMPOSITOR)
+endif()
+
 blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}")
index 86178b31688b689e4aabf1a780fd44ec14f1f633..d9fabc10a6355ea23a6298c8970d36b8abf1dab5 100644 (file)
@@ -37,6 +37,8 @@ if env['OURPLATFORM'] == 'linux':
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
+defs.append("WITH_COMPOSITOR")
+
 env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] )
 env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
 env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
index b716f19a697a2ea98f6ed54498fe025afdb4a34a..b886ee80d551cfe8374474f5af3df239c7bcd71e 100644 (file)
 
 #include "NOD_composite.h"
 #include "node_composite_util.h"
-#include "COM_compositor.h"
+
+#ifdef WITH_COMPOSITOR
+#  include "COM_compositor.h"
+#endif
 
 static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
 {
@@ -351,6 +354,8 @@ void ntreeCompositEndExecTree(bNodeTreeExec *exec, int use_tree_data)
        }
 }
 
+#ifdef WITH_COMPOSITOR
+
 /* ***************************** threaded version for execute composite nodes ************* */
 /* these are nodes without input, only giving values */
 /* or nodes with only value inputs */
@@ -585,7 +590,6 @@ static  void ntree_composite_texnode(bNodeTree *ntree, int init)
 
 }
 
-/* optimized tree execute test for compositing */
 /* optimized tree execute test for compositing */
 static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_preview)
 {
@@ -677,13 +681,18 @@ static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_pr
        /* XXX top-level tree uses the ntree->execdata pointer */
        ntreeCompositEndExecTree(exec, 1);
 }
+#endif
 
 void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int rendering, int do_preview)
 {
+#ifdef WITH_COMPOSITOR
        if (G.rt == 200)
                ntreeCompositExecTreeOld(ntree, rd, do_preview);
        else
                COM_execute(rd, ntree, rendering);
+#else
+       (void)ntree, (void)rd, (void)rendering, (void)do_preview;
+#endif
 }
 
 /* *********************************************** */
index 033b1352e5151caf5a633686cf9b131d2871e8e5..d9ac43d7622e0e4445f9e4ede462d933c79c378f 100644 (file)
@@ -894,11 +894,15 @@ endif()
                cycles_kernel
                cycles_util
                cycles_subd
-               bf_compositor #added for opencl compositor
-               bf_opencl #added for opencl compositor
                bf_intern_raskter
        )
 
+       if(WITH_COMPOSITOR)
+               #added for opencl compositor
+               list(APPEND BLENDER_SORTED_LIBS bf_compositor)
+               list(APPEND BLENDER_SORTED_LIBS bf_opencl)
+       endif()
+
        if(WITH_LIBMV)
                list(APPEND BLENDER_SORTED_LIBS extern_libmv)
                list(APPEND BLENDER_SORTED_LIBS extern_ceres)