diff options
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 15 | ||||
-rw-r--r-- | source/creator/creator.c | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index bb5f34167bc..8fe7d5e6faf 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -80,6 +80,11 @@ if(WITH_BINRELOC) blender_include_dirs(${BINRELOC_INCLUDE_DIRS}) endif() +if(WITH_FREESTYLE) + add_definitions(-DWITH_FREESTYLE) + blender_include_dirs(../blender/freestyle) +endif() + # Setup the exe sources and buildinfo set(SRC creator.c @@ -279,15 +284,24 @@ if(WITH_PYTHON) set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*") # dummy, wont do anything endif() + # do not install freestyle dir if disabled + if(NOT WITH_FREESTYLE) + set(FREESTYLE_EXCLUDE_CONDITIONAL "freestyle/*") + else() + set(FREESTYLE_EXCLUDE_CONDITIONAL "_freestyle/*") # dummy, wont do anything + endif() + install( DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts DESTINATION ${TARGETDIR_VER} PATTERN ".svn" EXCLUDE PATTERN "__pycache__" EXCLUDE PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE + PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE ) unset(ADDON_EXCLUDE_CONDITIONAL) + unset(FREESTYLE_EXCLUDE_CONDITIONAL) endif() # localization @@ -852,6 +866,7 @@ endif() bf_python_ext bf_python_mathutils bf_python_bmesh + bf_freestyle bf_ikplugin bf_modifiers bf_bmesh diff --git a/source/creator/creator.c b/source/creator/creator.c index 3260f0c3976..c664ae4540a 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -117,6 +117,10 @@ #include "BLI_scanfill.h" /* for BLI_setErrorCallBack, TODO, move elsewhere */ +#ifdef WITH_FREESTYLE +# include "FRS_freestyle.h" +#endif + #ifdef WITH_BUILDINFO_HEADER # define BUILD_DATE #endif @@ -1307,6 +1311,11 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) #ifdef WITH_FFMPEG BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_generic, (void *)G_DEBUG_FFMPEG); #endif + +#ifdef WITH_FREESTYLE + BLI_argsAdd(ba, 1, NULL, "--debug-freestyle", "\n\tEnable debug/profiling messages from Freestyle rendering", debug_mode_generic, (void *)G_DEBUG_FREESTYLE); +#endif + BLI_argsAdd(ba, 1, NULL, "--debug-python", "\n\tEnable debug messages for python", debug_mode_generic, (void *)G_DEBUG_PYTHON); BLI_argsAdd(ba, 1, NULL, "--debug-events", "\n\tEnable debug messages for the event system", debug_mode_generic, (void *)G_DEBUG_EVENTS); BLI_argsAdd(ba, 1, NULL, "--debug-handlers", "\n\tEnable debug messages for event handling", debug_mode_generic, (void *)G_DEBUG_HANDLERS); @@ -1549,6 +1558,12 @@ int main(int argc, const char **argv) CTX_py_init_set(C, 1); WM_keymap_init(C); +#ifdef WITH_FREESTYLE + /* initialize Freestyle */ + FRS_initialize(); + FRS_set_context(C); +#endif + /* OK we are ready for it */ #ifndef WITH_PYTHON_MODULE BLI_argsParse(ba, 4, load_file, C); |