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/editors/animation | |
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/editors/animation')
5 files changed, 3 insertions, 34 deletions
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index 58e38e55fa3..9e1e44e411d 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -58,8 +58,4 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() -if(WITH_FREESTYLE) - add_definitions(-DWITH_FREESTYLE) -endif() - blender_add_lib(bf_editor_animation "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript index a4ccf1f6c3c..2a6b381ba66 100644 --- a/source/blender/editors/animation/SConscript +++ b/source/blender/editors/animation/SConscript @@ -37,7 +37,4 @@ defs = [] if env['WITH_BF_INTERNATIONAL']: defs.append('WITH_INTERNATIONAL') -if env['WITH_BF_FREESTYLE']: - defs.append('WITH_FREESTYLE') - env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), defs, libtype=['core'], priority=[125] ) diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index d6188720cdf..c7b28587e47 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -49,9 +49,7 @@ #include "DNA_key_types.h" #include "DNA_lamp_types.h" #include "DNA_lattice_types.h" -#ifdef WITH_FREESTYLE -# include "DNA_linestyle_types.h" -#endif +#include "DNA_linestyle_types.h" #include "DNA_mesh_types.h" #include "DNA_material_types.h" #include "DNA_meta_types.h" @@ -2040,7 +2038,6 @@ static bAnimChannelType ACF_DSNTREE = acf_dsntree_setting_ptr /* pointer for setting */ }; -#ifdef WITH_FREESTYLE /* LineStyle Expander ------------------------------------------- */ /* TODO: just get this from RNA? */ @@ -2117,7 +2114,6 @@ static bAnimChannelType ACF_DSLINESTYLE= acf_dslinestyle_setting_flag, /* flag for setting */ acf_dslinestyle_setting_ptr /* pointer for setting */ }; -#endif /* Mesh Expander ------------------------------------------- */ @@ -2831,9 +2827,7 @@ static void ANIM_init_channel_typeinfo_data(void) animchannelTypeInfo[type++] = &ACF_DSTEX; /* Texture Channel */ animchannelTypeInfo[type++] = &ACF_DSLAT; /* Lattice Channel */ animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */ -#ifdef WITH_FREESTYLE animchannelTypeInfo[type++] = &ACF_DSLINESTYLE; /* LineStyle Channel */ -#endif animchannelTypeInfo[type++] = &ACF_SHAPEKEY; /* ShapeKey */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index dd18d07732d..481430f37e4 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -124,9 +124,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f case ANIMTYPE_DSMESH: case ANIMTYPE_DSTEX: case ANIMTYPE_DSLAT: -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: -#endif case ANIMTYPE_DSSPK: { /* need to verify that this data is valid for now */ @@ -172,9 +170,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int f case ANIMTYPE_DSARM: case ANIMTYPE_DSMESH: case ANIMTYPE_DSLAT: -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: -#endif case ANIMTYPE_DSSPK: { /* need to verify that this data is valid for now */ @@ -255,9 +251,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s case ANIMTYPE_DSNTREE: case ANIMTYPE_DSTEX: case ANIMTYPE_DSLAT: -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: -#endif case ANIMTYPE_DSSPK: { if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED)) @@ -352,9 +346,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s case ANIMTYPE_DSNTREE: case ANIMTYPE_DSTEX: case ANIMTYPE_DSLAT: -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: -#endif case ANIMTYPE_DSSPK: { /* need to verify that this data is valid for now */ @@ -2431,9 +2423,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in case ANIMTYPE_DSNTREE: case ANIMTYPE_DSTEX: case ANIMTYPE_DSLAT: -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: -#endif case ANIMTYPE_DSSPK: { /* sanity checking... */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 7648d998216..61e03806391 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -55,9 +55,7 @@ #include "DNA_camera_types.h" #include "DNA_lamp_types.h" #include "DNA_lattice_types.h" -#ifdef WITH_FREESTYLE -# include "DNA_linestyle_types.h" -#endif +#include "DNA_linestyle_types.h" #include "DNA_key_types.h" #include "DNA_mask_types.h" #include "DNA_material_types.h" @@ -737,7 +735,6 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->adt = BKE_animdata_from_id(data); } break; -#ifdef WITH_FREESTYLE case ANIMTYPE_DSLINESTYLE: { FreestyleLineStyle *linestyle = (FreestyleLineStyle *)data; @@ -750,8 +747,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->adt = BKE_animdata_from_id(data); } - break; -#endif + break; case ANIMTYPE_DSPART: { ParticleSettings *part = (ParticleSettings *)ale->data; @@ -1550,7 +1546,6 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, return items; } -#ifdef WITH_FREESTYLE static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode) { SceneRenderLayer *srl; @@ -1598,7 +1593,6 @@ static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_dat /* return the number of items added to the list */ return items; } -#endif /* NOTE: owner_id is either material, lamp, or world block, which is the direct owner of the texture stack in question */ static size_t animdata_filter_ds_textures(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode) @@ -2234,12 +2228,10 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_d tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)sce, ntree, filter_mode); } -#ifdef WITH_FREESTYLE /* line styles */ if ((ads->filterflag & ADS_FILTER_NOLINESTYLE) == 0) { tmp_items += animdata_filter_ds_linestyle(ac, &tmp_data, ads, sce, filter_mode); } -#endif /* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */ } |