diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-11-30 00:24:55 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-11-30 00:24:55 +0300 |
commit | 2f52fa782077e8b18d86062ad9dea6a19114d8bc (patch) | |
tree | 220d1c73a2f5ce49dfaf073e2fa83c3730898461 /source/blender/freestyle | |
parent | 7f2829d30e9e39820afb3c756e78b9d72bb5c992 (diff) |
Fix for properly unlinking target object pointers when objects are deleted
from scenes.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r-- | source/blender/freestyle/FRS_freestyle.h | 3 | ||||
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h index 8252e932215..ae8adb86c1c 100644 --- a/source/blender/freestyle/FRS_freestyle.h +++ b/source/blender/freestyle/FRS_freestyle.h @@ -39,6 +39,7 @@ extern "C" { #include "DNA_scene_types.h" #include "BKE_context.h" + #include "BKE_object.h" extern Scene *freestyle_scene; extern float freestyle_viewpoint[3]; @@ -71,6 +72,8 @@ extern "C" { short FRS_get_active_lineset_index(FreestyleConfig *config); void FRS_set_active_lineset_index(FreestyleConfig *config, short index); + void FRS_unlink_target_object(FreestyleConfig *config, struct Object *ob); + #ifdef __cplusplus } #endif diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 5fb472865e6..7cb7349f61d 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -519,6 +519,15 @@ extern "C" { } } + void FRS_unlink_target_object(FreestyleConfig *config, Object *ob) + { + FreestyleLineSet *lineset; + + for(lineset=(FreestyleLineSet *)config->linesets.first; lineset; lineset=lineset->next) { + FRS_unlink_linestyle_target_object(lineset->linestyle, ob); + } + } + #ifdef __cplusplus } #endif |