diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 01:38:35 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 01:38:35 +0400 |
commit | 866d80bdf23298f814ff4d4e2f688920f5296c42 (patch) | |
tree | a24027d07f99f99ac3e86a9579479b3d7ff0ce2b | |
parent | 62cede96d34d802d97797a635ff8370a5f7556a1 (diff) |
Removed a Freestyle-specific function call from bf_windowmanager.
Suggested by Sergey Sharybin through a code review of the branch.
4 files changed, 15 insertions, 23 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 16f6633f54c..50547c00dd4 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -58,6 +58,7 @@ extern "C" { #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_callbacks.h" #include "BPY_extern.h" @@ -90,6 +91,18 @@ Scene *freestyle_scene; static string default_module_path; +static void load_post_callback(struct Main *main, struct ID *id, void *arg) +{ + lineset_copied = false; +} + +static bCallbackFuncStore load_post_callback_funcstore = { + NULL, NULL, /* next, prev */ + load_post_callback, /* func */ + NULL, /* arg */ + 0 /* alloc */ +}; + //======================================================= // Initialization //======================================================= @@ -110,6 +123,8 @@ void FRS_initialize() default_module_path = pathconfig->getProjectDir() + Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py"; + BLI_callback_add(&load_post_callback_funcstore, BLI_CB_EVT_LOAD_POST); + freestyle_is_initialized = 1; } @@ -121,11 +136,6 @@ void FRS_set_context(bContext *C) controller->setContext(C); } -void FRS_read_file(bContext *C) -{ - lineset_copied = false; -} - void FRS_exit() { delete pathconfig; diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index 8ec61a62d49..65a8945f82b 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -87,13 +87,6 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() -if(WITH_FREESTYLE) - list(APPEND INC - ../freestyle - ) - add_definitions(-DWITH_FREESTYLE) -endif() - if(WITH_OPENCOLLADA) add_definitions(-DWITH_COLLADA) endif() diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 5904a417190..6db0e142ac4 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -69,10 +69,6 @@ if env['BF_BUILDINFO']: if env['WITH_BF_INTERNATIONAL']: defs.append('WITH_INTERNATIONAL') -if env['WITH_BF_FREESTYLE']: - incs += ' ../freestyle' - defs.append('WITH_FREESTYLE') - if env['WITH_BF_COMPOSITOR']: defs.append("WITH_COMPOSITOR") diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index c682165eb69..66f6dc7de92 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -115,10 +115,6 @@ #include "BPY_extern.h" #endif -#ifdef WITH_FREESTYLE -# include "FRS_freestyle.h" -#endif - #include "WM_api.h" #include "WM_types.h" #include "wm.h" @@ -438,9 +434,6 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports) BPY_app_handlers_reset(FALSE); BPY_modules_load_user(C); #endif -#ifdef WITH_FREESTYLE - FRS_read_file(C); -#endif /* important to do before NULL'ing the context */ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST); |