Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-23 07:00:37 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-23 07:00:37 +0400
commit62cede96d34d802d97797a635ff8370a5f7556a1 (patch)
treeec56d7f332164b34c31607ed882218ce892c9319 /source/blender/editors
parent865e80f0f47b8cda1b126c2130114b833c7c5035 (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')
-rw-r--r--source/blender/editors/animation/CMakeLists.txt4
-rw-r--r--source/blender/editors/animation/SConscript3
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c8
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c10
-rw-r--r--source/blender/editors/animation/anim_filter.c12
-rw-r--r--source/blender/editors/include/ED_anim_api.h6
-rw-r--r--source/blender/editors/include/UI_resources.h2
-rw-r--r--source/blender/editors/interface/CMakeLists.txt4
-rw-r--r--source/blender/editors/interface/SConscript3
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/interface/resources.c6
-rw-r--r--source/blender/editors/render/render_shading.c69
-rw-r--r--source/blender/editors/space_nla/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_nla/SConscript3
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c2
-rw-r--r--source/blender/editors/space_nla/nla_channels.c2
16 files changed, 41 insertions, 105 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 */
}
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 625ef27f4f7..1c2ec27a061 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -155,9 +155,7 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_DSMESH,
ANIMTYPE_DSTEX,
ANIMTYPE_DSLAT,
-#ifdef WITH_FREESTYLE
ANIMTYPE_DSLINESTYLE,
-#endif
ANIMTYPE_DSSPK,
ANIMTYPE_SHAPEKEY,
@@ -239,9 +237,7 @@ typedef enum eAnimFilter_Flags {
#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene), ((sce->flag & SCE_DS_COLLAPSED) == 0))
/* 'Sub-Scene' channels (flags stored in Data block) */
#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World), (wo->flag & WO_DS_EXPAND))
-#ifdef WITH_FREESTYLE
-# define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
-#endif
+#define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
/* 'Object' channels */
#define SEL_OBJC(base) (CHECK_TYPE_INLINE(base, Base), ((base->flag & SELECT)))
#define EXPANDED_OBJC(ob) (CHECK_TYPE_INLINE(ob, Object), ((ob->nlaflag & OB_ADS_COLLAPSED) == 0))
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index fb4e9d2aa6e..308ca8c9355 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -208,10 +208,8 @@ enum {
TH_STITCH_PREVIEW_UNSTITCHABLE,
TH_STITCH_PREVIEW_ACTIVE,
-/* #ifdef WITH_FREESTYLE */
TH_FREESTYLE_EDGE_MARK,
TH_FREESTYLE_FACE_MARK,
-/* #endif */
TH_MATCH, /* highlight color for search matches */
TH_SELECT_HIGHLIGHT, /* highlight color for selected outliner item */
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index 267e7c05737..8ba86673f87 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -62,10 +62,6 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-if(WITH_FREESTYLE)
- add_definitions(-DWITH_FREESTYLE)
-endif()
-
if(WITH_HEADLESS)
add_definitions(-DWITH_HEADLESS)
endif()
diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript
index 16e4e6cb9c0..8d277d6cd35 100644
--- a/source/blender/editors/interface/SConscript
+++ b/source/blender/editors/interface/SConscript
@@ -42,9 +42,6 @@ defs = []
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
-if env['WITH_BF_FREESTYLE']:
- defs.append('WITH_FREESTYLE')
-
if env['WITH_BF_PYTHON']:
defs.append('WITH_PYTHON')
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index f376d42e7a8..30d360363c6 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -334,9 +334,7 @@ static const char *template_id_browse_tip(StructRNA *type)
case ID_MA: return N_("Browse Material to be linked");
case ID_TE: return N_("Browse Texture to be linked");
case ID_IM: return N_("Browse Image to be linked");
-#ifdef WITH_FREESTYLE
case ID_LS: return N_("Browse Line Style Data to be linked");
-#endif
case ID_LT: return N_("Browse Lattice Data to be linked");
case ID_LA: return N_("Browse Lamp Data to be linked");
case ID_CA: return N_("Browse Camera Data to be linked");
@@ -372,9 +370,7 @@ static const char *template_id_context(StructRNA *type)
case ID_MA: return BLF_I18NCONTEXT_ID_MATERIAL;
case ID_TE: return BLF_I18NCONTEXT_ID_TEXTURE;
case ID_IM: return BLF_I18NCONTEXT_ID_IMAGE;
-#ifdef WITH_FREESTYLE
case ID_LS: return BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE;
-#endif
case ID_LT: return BLF_I18NCONTEXT_ID_LATTICE;
case ID_LA: return BLF_I18NCONTEXT_ID_LAMP;
case ID_CA: return BLF_I18NCONTEXT_ID_CAMERA;
@@ -532,9 +528,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
BLF_I18NCONTEXT_ID_BRUSH,
BLF_I18NCONTEXT_ID_PARTICLESETTINGS,
BLF_I18NCONTEXT_ID_GPENCIL,
-#ifdef WITH_FREESTYLE
- BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE
-#endif
+ BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE,
);
if (newop) {
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 658d89abea3..288b8b43e82 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -361,12 +361,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp = ts->handle_sel_vect; break;
case TH_HANDLE_SEL_ALIGN:
cp = ts->handle_sel_align; break;
-#ifdef WITH_FREESTYLE
case TH_FREESTYLE_EDGE_MARK:
cp = ts->freestyle_edge_mark; break;
case TH_FREESTYLE_FACE_MARK:
cp = ts->freestyle_face_mark; break;
-#endif
case TH_SYNTAX_B:
cp = ts->syntaxb; break;
@@ -768,10 +766,8 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tv3d.button_text_hi, 255, 255, 255, 255);
rgba_char_args_set(btheme->tv3d.button_title, 0, 0, 0, 255);
rgba_char_args_set(btheme->tv3d.title, 0, 0, 0, 255);
-#ifdef WITH_FREESTYLE
rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
-#endif
btheme->tv3d.facedot_size = 4;
@@ -2030,7 +2026,6 @@ void init_userdef_do_versions(void)
}
}
-#ifdef WITH_FREESTYLE
/* Freestyle color settings */
{
bTheme *btheme;
@@ -2043,7 +2038,6 @@ void init_userdef_do_versions(void)
}
}
}
-#endif
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 174343ff0ad..d1254a7cb78 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -51,10 +51,12 @@
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
+#include "BKE_freestyle.h"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_image.h"
#include "BKE_library.h"
+#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
@@ -70,7 +72,6 @@
#include "GPU_material.h"
#ifdef WITH_FREESTYLE
-# include "BKE_linestyle.h"
# include "FRS_freestyle.h"
#endif
@@ -580,12 +581,13 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
}
#ifdef WITH_FREESTYLE
+
static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FRS_add_module(&srl->freestyleConfig);
+ BKE_freestyle_module_add(&srl->freestyleConfig);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -613,7 +615,7 @@ static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
FreestyleModuleConfig *module = ptr.data;
- FRS_delete_module(&srl->freestyleConfig, module);
+ BKE_freestyle_module_delete(&srl->freestyleConfig, module);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -643,10 +645,10 @@ static int freestyle_module_move_exec(bContext *C, wmOperator *op)
int dir = RNA_enum_get(op->ptr, "direction");
if (dir == 1) {
- FRS_move_module_up(&srl->freestyleConfig, module);
+ BKE_freestyle_module_move_up(&srl->freestyleConfig, module);
}
else {
- FRS_move_module_down(&srl->freestyleConfig, module);
+ BKE_freestyle_module_move_down(&srl->freestyleConfig, module);
}
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -681,7 +683,7 @@ static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FRS_add_lineset(&srl->freestyleConfig);
+ BKE_freestyle_lineset_add(&srl->freestyleConfig);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -707,7 +709,7 @@ static int freestyle_active_lineset_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- return FRS_get_active_lineset(&srl->freestyleConfig) != NULL;
+ return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL;
}
static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
@@ -836,14 +838,14 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
if (!lineset) {
BKE_report(op->reports, RPT_ERROR, "No active lineset to add a new line style to");
return OPERATOR_CANCELLED;
}
lineset->linestyle->id.us--;
- lineset->linestyle = FRS_copy_linestyle(lineset->linestyle);
+ lineset->linestyle = BKE_copy_linestyle(lineset->linestyle);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -869,14 +871,14 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
if (!lineset) {
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
return OPERATOR_CANCELLED;
}
- if (FRS_add_linestyle_color_modifier(lineset->linestyle, type) == NULL) {
+ if (BKE_add_linestyle_color_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type.");
return OPERATOR_CANCELLED;
}
@@ -908,14 +910,14 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
if (!lineset) {
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
return OPERATOR_CANCELLED;
}
- if (FRS_add_linestyle_alpha_modifier(lineset->linestyle, type) == NULL) {
+ if (BKE_add_linestyle_alpha_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type");
return OPERATOR_CANCELLED;
}
@@ -947,14 +949,14 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
if (!lineset) {
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
return OPERATOR_CANCELLED;
}
- if (FRS_add_linestyle_thickness_modifier(lineset->linestyle, type) == NULL) {
+ if (BKE_add_linestyle_thickness_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type");
return OPERATOR_CANCELLED;
}
@@ -986,14 +988,14 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
if (!lineset) {
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
return OPERATOR_CANCELLED;
}
- if (FRS_add_linestyle_geometry_modifier(lineset->linestyle, type) == NULL) {
+ if (BKE_add_linestyle_geometry_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type");
return OPERATOR_CANCELLED;
}
@@ -1038,7 +1040,7 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
LineStyleModifier *modifier = ptr.data;
@@ -1049,16 +1051,16 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
switch (freestyle_get_modifier_type(&ptr)) {
case LS_MODIFIER_TYPE_COLOR:
- FRS_remove_linestyle_color_modifier(lineset->linestyle, modifier);
+ BKE_remove_linestyle_color_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_ALPHA:
- FRS_remove_linestyle_alpha_modifier(lineset->linestyle, modifier);
+ BKE_remove_linestyle_alpha_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_THICKNESS:
- FRS_remove_linestyle_thickness_modifier(lineset->linestyle, modifier);
+ BKE_remove_linestyle_thickness_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_GEOMETRY:
- FRS_remove_linestyle_geometry_modifier(lineset->linestyle, modifier);
+ BKE_remove_linestyle_geometry_modifier(lineset->linestyle, modifier);
break;
default:
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
@@ -1088,7 +1090,7 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
LineStyleModifier *modifier = ptr.data;
@@ -1099,16 +1101,16 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
switch (freestyle_get_modifier_type(&ptr)) {
case LS_MODIFIER_TYPE_COLOR:
- FRS_copy_linestyle_color_modifier(lineset->linestyle, modifier);
+ BKE_copy_linestyle_color_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_ALPHA:
- FRS_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
+ BKE_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_THICKNESS:
- FRS_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
+ BKE_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
break;
case LS_MODIFIER_TYPE_GEOMETRY:
- FRS_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
+ BKE_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
break;
default:
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
@@ -1138,7 +1140,7 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
LineStyleModifier *modifier = ptr.data;
int dir = RNA_enum_get(op->ptr, "direction");
@@ -1150,16 +1152,16 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
switch (freestyle_get_modifier_type(&ptr)) {
case LS_MODIFIER_TYPE_COLOR:
- FRS_move_linestyle_color_modifier(lineset->linestyle, modifier, dir);
+ BKE_move_linestyle_color_modifier(lineset->linestyle, modifier, dir);
break;
case LS_MODIFIER_TYPE_ALPHA:
- FRS_move_linestyle_alpha_modifier(lineset->linestyle, modifier, dir);
+ BKE_move_linestyle_alpha_modifier(lineset->linestyle, modifier, dir);
break;
case LS_MODIFIER_TYPE_THICKNESS:
- FRS_move_linestyle_thickness_modifier(lineset->linestyle, modifier, dir);
+ BKE_move_linestyle_thickness_modifier(lineset->linestyle, modifier, dir);
break;
case LS_MODIFIER_TYPE_GEOMETRY:
- FRS_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir);
+ BKE_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir);
break;
default:
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
@@ -1193,7 +1195,8 @@ void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
/* props */
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
}
-#endif
+
+#endif /* WITH_FREESTYLE */
static int texture_slot_move(bContext *C, wmOperator *op)
{
diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt
index 32fb3850cee..aa3598e8e1f 100644
--- a/source/blender/editors/space_nla/CMakeLists.txt
+++ b/source/blender/editors/space_nla/CMakeLists.txt
@@ -50,8 +50,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-if(WITH_FREESTYLE)
- add_definitions(-DWITH_FREESTYLE)
-endif()
-
blender_add_lib(bf_editor_space_nla "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript
index 2316f37e661..18c6392eee9 100644
--- a/source/blender/editors/space_nla/SConscript
+++ b/source/blender/editors/space_nla/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_space_nla', sources, Split(incs), defs, libtype=['core'], priority=[85] )
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index b2cae8e5496..b26d1662f6c 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -144,9 +144,7 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
-#ifdef WITH_FREESTYLE
case ANIMTYPE_DSLINESTYLE:
-#endif
case ANIMTYPE_DSSPK:
{
/* for these channels, we only do AnimData */
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 6d091e3c7c4..97a1c583e36 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -179,9 +179,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
case ANIMTYPE_DSMESH:
case ANIMTYPE_DSTEX:
case ANIMTYPE_DSLAT:
-#ifdef WITH_FREESTYLE
case ANIMTYPE_DSLINESTYLE:
-#endif
case ANIMTYPE_DSSPK:
{
/* sanity checking... */