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 /source/blender/freestyle | |
parent | 62cede96d34d802d97797a635ff8370a5f7556a1 (diff) |
Removed a Freestyle-specific function call from bf_windowmanager.
Suggested by Sergey Sharybin through a code review of the branch.
Diffstat (limited to 'source/blender/freestyle')
-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; |