diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-23 07:00:37 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-23 07:00:37 +0400 |
commit | 62cede96d34d802d97797a635ff8370a5f7556a1 (patch) | |
tree | ec56d7f332164b34c31607ed882218ce892c9319 /source/blender/blenkernel/intern/object.c | |
parent | 865e80f0f47b8cda1b126c2130114b833c7c5035 (diff) |
A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle. Suggested
by Sergey Sharybin through a code review of the branch.
* Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific
DNA file specification and RNA for it built in Blender. This will allow Freestyle
setting survive even when a non-Freestyle build is used for loading and saving
files. It is noted that operations are still conditionally built through #ifdef
WITH_FREESTYLE blocks.
* To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have
been added. All API functions in FRS_freestyle_config.h as well as some of those
in FRS_freestyle.h were moved to the new files. Now the relocated API functions
have BKE_ prefix instead of FRS_.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0c6e0f72523..20a5daf7116 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -90,6 +90,7 @@ #include "BKE_lamp.h" #include "BKE_lattice.h" #include "BKE_library.h" +#include "BKE_linestyle.h" #include "BKE_mesh.h" #include "BKE_tessmesh.h" #include "BKE_mball.h" @@ -119,10 +120,6 @@ #include "GPU_material.h" -#ifdef WITH_FREESTYLE -# include "FRS_freestyle.h" -#endif - /* Local function protos */ float originmat[3][3]; /* after BKE_object_where_is_calc(), can be used in other functions (bad!) */ @@ -427,6 +424,8 @@ void BKE_object_unlink(Object *ob) World *wrld; bScreen *sc; Scene *sce; + SceneRenderLayer *srl; + FreestyleLineSet *lineset; Curve *cu; Tex *tex; Group *group; @@ -680,15 +679,12 @@ void BKE_object_unlink(Object *ob) SEQ_END } -#ifdef WITH_FREESTYLE - { - SceneRenderLayer *srl; - - for (srl= sce->r.layers.first; srl; srl= srl->next) { - FRS_unlink_target_object(&srl->freestyleConfig, ob); + for (srl= sce->r.layers.first; srl; srl= srl->next) { + for (lineset = (FreestyleLineSet *)&srl->freestyleConfig.linesets.first; + lineset; lineset = lineset->next) { + BKE_unlink_linestyle_target_object(lineset->linestyle, ob); } } -#endif } sce = sce->id.next; |