the compositor optional for cmake: WITH_COMPOSITOR

This commit is contained in:
Campbell Barton
2012-06-30 14:14:22 +00:00
parent e6d55c97dd
commit 90dc1d1353
6 changed files with 31 additions and 6 deletions

View 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_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_GAMEENGINE "Enable Game Engine" ON) option(WITH_GAMEENGINE "Enable Game Engine" ON)
option(WITH_PLAYER "Build Player" OFF) option(WITH_PLAYER "Build Player" OFF)
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
# GHOST Windowing Library Options # GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF) option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)

View File

@@ -95,7 +95,6 @@ add_subdirectory(blenkernel)
add_subdirectory(blenlib) add_subdirectory(blenlib)
add_subdirectory(bmesh) add_subdirectory(bmesh)
add_subdirectory(render) add_subdirectory(render)
add_subdirectory(compositor)
add_subdirectory(blenfont) add_subdirectory(blenfont)
add_subdirectory(blenloader) add_subdirectory(blenloader)
add_subdirectory(ikplugin) add_subdirectory(ikplugin)
@@ -108,6 +107,10 @@ add_subdirectory(modifiers)
add_subdirectory(makesdna) add_subdirectory(makesdna)
add_subdirectory(makesrna) add_subdirectory(makesrna)
if(WITH_COMPOSITOR)
add_subdirectory(compositor)
endif()
if(WITH_IMAGE_OPENEXR) if(WITH_IMAGE_OPENEXR)
add_subdirectory(imbuf/intern/openexr) add_subdirectory(imbuf/intern/openexr)
endif() endif()

View File

@@ -35,7 +35,6 @@ set(INC
../makesrna ../makesrna
../render/extern/include ../render/extern/include
../../../intern/guardedalloc ../../../intern/guardedalloc
../compositor
) )
set(INC_SYS set(INC_SYS
@@ -243,4 +242,11 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR) add_definitions(-DWITH_OPENEXR)
endif() endif()
if(WITH_COMPOSITOR)
list(APPEND INC
../compositor
)
add_definitions(-DWITH_COMPOSITOR)
endif()
blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}") blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}")

View File

@@ -37,6 +37,8 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
incs += ' ' + env['BF_PTHREADS_INC'] 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_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_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] ) env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )

View File

@@ -59,7 +59,10 @@
#include "NOD_composite.h" #include "NOD_composite.h"
#include "node_composite_util.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) 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 ************* */ /* ***************************** threaded version for execute composite nodes ************* */
/* these are nodes without input, only giving values */ /* these are nodes without input, only giving values */
/* or nodes with only value inputs */ /* 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 */ /* optimized tree execute test for compositing */
static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_preview) 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 */ /* XXX top-level tree uses the ntree->execdata pointer */
ntreeCompositEndExecTree(exec, 1); ntreeCompositEndExecTree(exec, 1);
} }
#endif
void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int rendering, int do_preview) void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int rendering, int do_preview)
{ {
#ifdef WITH_COMPOSITOR
if (G.rt == 200) if (G.rt == 200)
ntreeCompositExecTreeOld(ntree, rd, do_preview); ntreeCompositExecTreeOld(ntree, rd, do_preview);
else else
COM_execute(rd, ntree, rendering); COM_execute(rd, ntree, rendering);
#else
(void)ntree, (void)rd, (void)rendering, (void)do_preview;
#endif
} }
/* *********************************************** */ /* *********************************************** */

View File

@@ -894,11 +894,15 @@ endif()
cycles_kernel cycles_kernel
cycles_util cycles_util
cycles_subd cycles_subd
bf_compositor #added for opencl compositor
bf_opencl #added for opencl compositor
bf_intern_raskter 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) if(WITH_LIBMV)
list(APPEND BLENDER_SORTED_LIBS extern_libmv) list(APPEND BLENDER_SORTED_LIBS extern_libmv)
list(APPEND BLENDER_SORTED_LIBS extern_ceres) list(APPEND BLENDER_SORTED_LIBS extern_ceres)