[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48444] trunk/blender: the compositor optional for cmake: WITH_COMPOSITOR

Campbell Barton ideasman42 at gmail.com
Sat Jun 30 16:14:38 CEST 2012


Revision: 48444
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48444
Author:   campbellbarton
Date:     2012-06-30 14:14:22 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
the compositor optional for cmake: WITH_COMPOSITOR

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/source/blender/CMakeLists.txt
    trunk/blender/source/blender/nodes/CMakeLists.txt
    trunk/blender/source/blender/nodes/SConscript
    trunk/blender/source/blender/nodes/composite/node_composite_tree.c
    trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/CMakeLists.txt	2012-06-30 14:14:22 UTC (rev 48444)
@@ -130,6 +130,7 @@
 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)

Modified: trunk/blender/source/blender/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/CMakeLists.txt	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/source/blender/CMakeLists.txt	2012-06-30 14:14:22 UTC (rev 48444)
@@ -95,7 +95,6 @@
 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(makesdna)
 add_subdirectory(makesrna)
 
+if(WITH_COMPOSITOR)
+	add_subdirectory(compositor)
+endif()
+
 if(WITH_IMAGE_OPENEXR)
 	add_subdirectory(imbuf/intern/openexr)
 endif()

Modified: trunk/blender/source/blender/nodes/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/nodes/CMakeLists.txt	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/source/blender/nodes/CMakeLists.txt	2012-06-30 14:14:22 UTC (rev 48444)
@@ -35,7 +35,6 @@
 	../makesrna
 	../render/extern/include
 	../../../intern/guardedalloc
-	../compositor
 )
 
 set(INC_SYS
@@ -243,4 +242,11 @@
 	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}")

Modified: trunk/blender/source/blender/nodes/SConscript
===================================================================
--- trunk/blender/source/blender/nodes/SConscript	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/source/blender/nodes/SConscript	2012-06-30 14:14:22 UTC (rev 48444)
@@ -37,6 +37,8 @@
 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] )

Modified: trunk/blender/source/blender/nodes/composite/node_composite_tree.c
===================================================================
--- trunk/blender/source/blender/nodes/composite/node_composite_tree.c	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/source/blender/nodes/composite/node_composite_tree.c	2012-06-30 14:14:22 UTC (rev 48444)
@@ -59,8 +59,11 @@
 
 #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)
 {
 	Scene *sce;
@@ -351,6 +354,8 @@
 	}
 }
 
+#ifdef WITH_COMPOSITOR
+
 /* ***************************** threaded version for execute composite nodes ************* */
 /* these are nodes without input, only giving values */
 /* or nodes with only value inputs */
@@ -586,7 +591,6 @@
 }
 
 /* optimized tree execute test for compositing */
-/* optimized tree execute test for compositing */
 static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_preview)
 {
 	bNodeExec *nodeexec;
@@ -677,13 +681,18 @@
 	/* 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
 }
 
 /* *********************************************** */

Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt	2012-06-30 13:19:48 UTC (rev 48443)
+++ trunk/blender/source/creator/CMakeLists.txt	2012-06-30 14:14:22 UTC (rev 48444)
@@ -894,11 +894,15 @@
 		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)




More information about the Bf-blender-cvs mailing list