diff options
Diffstat (limited to 'source/blender/freestyle/intern')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp | 20 |
1 files changed, 15 insertions, 5 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; |