From 62cede96d34d802d97797a635ff8370a5f7556a1 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 23 Mar 2013 03:00:37 +0000 Subject: 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_. --- source/blender/makesrna/RNA_access.h | 4 ---- source/blender/makesrna/RNA_enum_types.h | 2 -- source/blender/makesrna/intern/CMakeLists.txt | 11 ++------- source/blender/makesrna/intern/SConscript | 2 +- source/blender/makesrna/intern/makesrna.c | 2 -- source/blender/makesrna/intern/rna_ID.c | 6 ----- source/blender/makesrna/intern/rna_action.c | 2 -- source/blender/makesrna/intern/rna_color.c | 24 +++++++------------- source/blender/makesrna/intern/rna_internal.h | 4 ---- source/blender/makesrna/intern/rna_main.c | 4 ---- source/blender/makesrna/intern/rna_main_api.c | 14 +++--------- source/blender/makesrna/intern/rna_mesh.c | 4 ---- source/blender/makesrna/intern/rna_scene.c | 32 +++++---------------------- source/blender/makesrna/intern/rna_userdef.c | 4 ---- 14 files changed, 19 insertions(+), 96 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index f8c49d683c3..22259d71a2f 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -243,12 +243,10 @@ extern StructRNA RNA_FluidFluidSettings; extern StructRNA RNA_FluidSettings; extern StructRNA RNA_FluidSimulationModifier; extern StructRNA RNA_FollowPathConstraint; -#ifdef WITH_FREESTYLE extern StructRNA RNA_FreestyleLineStyle; extern StructRNA RNA_FreestyleLineSet; extern StructRNA RNA_FreestyleModuleSettings; extern StructRNA RNA_FreestyleSettings; -#endif extern StructRNA RNA_Function; extern StructRNA RNA_GPencilFrame; extern StructRNA RNA_GPencilLayer; @@ -305,7 +303,6 @@ extern StructRNA RNA_LimitDistanceConstraint; extern StructRNA RNA_LimitLocationConstraint; extern StructRNA RNA_LimitRotationConstraint; extern StructRNA RNA_LimitScaleConstraint; -#ifdef WITH_FREESTYLE extern StructRNA RNA_LineStyleAlphaModifier; extern StructRNA RNA_LineStyleAlphaModifier_AlongStroke; extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromCamera; @@ -337,7 +334,6 @@ extern StructRNA RNA_LineStyleThicknessModifier_Calligraphy; extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromCamera; extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromObject; extern StructRNA RNA_LineStyleThicknessModifier_Material; -#endif extern StructRNA RNA_LockedTrackConstraint; extern StructRNA RNA_Macro; extern StructRNA RNA_MagicTexture; diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 09d08db59d7..e6ee1b7c382 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -163,12 +163,10 @@ extern EnumPropertyItem clip_editor_mode_items[]; extern EnumPropertyItem icon_items[]; extern EnumPropertyItem uilist_layout_type_items[]; -#ifdef WITH_FREESTYLE extern EnumPropertyItem linestyle_color_modifier_type_items[]; extern EnumPropertyItem linestyle_alpha_modifier_type_items[]; extern EnumPropertyItem linestyle_thickness_modifier_type_items[]; extern EnumPropertyItem linestyle_geometry_modifier_type_items[]; -#endif struct bContext; struct PointerRNA; diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 0375868915b..609592cc1cd 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -54,6 +54,7 @@ set(DEFSRC rna_key.c rna_lamp.c rna_lattice.c + rna_linestyle.c rna_main.c rna_mask.c rna_material.c @@ -93,12 +94,6 @@ set(DEFSRC rna_world.c ) -if(WITH_FREESTYLE) - list(APPEND DEFSRC - rna_linestyle.c - ) -endif() - set(APISRC rna_action_api.c rna_actuator_api.c @@ -277,9 +272,7 @@ blender_include_dirs( ) if(WITH_FREESTYLE) - blender_include_dirs( - ../../freestyle - ) + # TO BE REMOVED when the trunk merger is done add_definitions(-DWITH_FREESTYLE) endif() diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index fc520bdea2f..910cf8385f5 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -139,8 +139,8 @@ if env['WITH_BF_INTERNATIONAL']: defs.append('WITH_INTERNATIONAL') if env['WITH_BF_FREESTYLE']: + # TO BE REMOVED when the trunk merger is done defs.append('WITH_FREESTYLE') - incs += ' ../../freestyle' if not env['BF_DEBUG']: defs.append('NDEBUG') diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 0d5c1eb2352..6fc4ab33ad1 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3250,9 +3250,7 @@ static RNAProcessItem PROCESS_ITEMS[] = { {"rna_key.c", NULL, RNA_def_key}, {"rna_lamp.c", NULL, RNA_def_lamp}, {"rna_lattice.c", NULL, RNA_def_lattice}, -#ifdef WITH_FREESTYLE {"rna_linestyle.c", NULL, RNA_def_linestyle}, -#endif {"rna_main.c", "rna_main_api.c", RNA_def_main}, {"rna_material.c", "rna_material_api.c", RNA_def_material}, {"rna_mesh.c", "rna_mesh_api.c", RNA_def_mesh}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 1716864f23f..0489f85a37f 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -57,9 +57,7 @@ EnumPropertyItem id_type_items[] = { {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""}, {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""}, {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""}, -#ifdef WITH_FREESTYLE {ID_LS, "LINESTYLE", ICON_PARTICLE_DATA, "FreestyleLineStyle", ""}, /* FIXME proper icon */ -#endif {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""}, {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""}, {ID_MB, "META", ICON_META_DATA, "MetaBall", ""}, @@ -135,9 +133,7 @@ short RNA_type_to_ID_code(StructRNA *type) if (RNA_struct_is_a(type, &RNA_Key)) return ID_KE; if (RNA_struct_is_a(type, &RNA_Lamp)) return ID_LA; if (RNA_struct_is_a(type, &RNA_Library)) return ID_LI; -#ifdef WITH_FREESTYLE if (RNA_struct_is_a(type, &RNA_FreestyleLineStyle)) return ID_LS; -#endif if (RNA_struct_is_a(type, &RNA_Lattice)) return ID_LT; if (RNA_struct_is_a(type, &RNA_Material)) return ID_MA; if (RNA_struct_is_a(type, &RNA_MetaBall)) return ID_MB; @@ -174,9 +170,7 @@ StructRNA *ID_code_to_RNA_type(short idcode) case ID_KE: return &RNA_Key; case ID_LA: return &RNA_Lamp; case ID_LI: return &RNA_Library; -#ifdef WITH_FREESTYLE case ID_LS: return &RNA_FreestyleLineStyle; -#endif case ID_LT: return &RNA_Lattice; case ID_MA: return &RNA_Material; case ID_MB: return &RNA_MetaBall; diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index e9bf40a58b1..6ab6b8528f9 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -396,13 +396,11 @@ static void rna_def_dopesheet(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_LAMP_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "show_linestyles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLINESTYLE); RNA_def_property_ui_text(prop, "Display Line Style", "Include visualization of Line Style related Animation data"); RNA_def_property_ui_icon(prop, ICON_BRUSH_DATA, 0); /* FIXME */ RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); -#endif prop = RNA_def_property(srna, "show_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOTEX); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 98672f2fca2..640e91adabf 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -57,9 +57,7 @@ #include "BKE_node.h" #include "BKE_sequencer.h" #include "BKE_texture.h" -#ifdef WITH_FREESTYLE -# include "BKE_linestyle.h" -#endif +#include "BKE_linestyle.h" #include "ED_node.h" @@ -188,20 +186,18 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) break; } - default: - /* everything else just uses 'color_ramp' */ - path = BLI_strdup("color_ramp"); - break; - -#ifdef WITH_FREESTYLE case ID_LS: { - char *path = FRS_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data); + char *path = BKE_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data); if (path) return path; break; } -#endif + + default: + /* everything else just uses 'color_ramp' */ + path = BLI_strdup("color_ramp"); + break; } } else { @@ -273,13 +269,12 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) } break; -#ifdef WITH_FREESTYLE case ID_LS: { ListBase listbase; LinkData *link; - FRS_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase); + BKE_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase); for (link = (LinkData *)listbase.first; link; link = link->next) { RNA_pointer_create(id, &RNA_ColorRamp, link->data, &ramp_ptr); COLRAMP_GETPATH; @@ -287,7 +282,6 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) BLI_freelistN(&listbase); break; } -#endif default: /* everything else should have a "color_ramp" property */ { @@ -340,7 +334,6 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * WM_main_add_notifier(NC_TEXTURE, tex); } break; -#ifdef WITH_FREESTYLE case ID_LS: { FreestyleLineStyle *linestyle= ptr->id.data; @@ -348,7 +341,6 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * WM_main_add_notifier(NC_LINESTYLE, linestyle); break; } -#endif default: break; } diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 550a3d8f353..09ea82e5ec7 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -152,9 +152,7 @@ void RNA_def_image(struct BlenderRNA *brna); void RNA_def_key(struct BlenderRNA *brna); void RNA_def_lamp(struct BlenderRNA *brna); void RNA_def_lattice(struct BlenderRNA *brna); -#ifdef WITH_FREESTYLE void RNA_def_linestyle(struct BlenderRNA *brna); -#endif void RNA_def_main(struct BlenderRNA *brna); void RNA_def_material(struct BlenderRNA *brna); void RNA_def_mesh(struct BlenderRNA *brna); @@ -316,9 +314,7 @@ void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop); -#ifdef WITH_FREESTYLE void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop); -#endif /* ID Properties */ diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 06a7b4aa11b..389ec426428 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -259,13 +259,11 @@ static void rna_Main_masks_begin(CollectionPropertyIterator *iter, PointerRNA *p rna_iterator_listbase_begin(iter, &bmain->mask, NULL); } -#ifdef WITH_FREESTYLE static void rna_Main_linestyle_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain = (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->linestyle, NULL); } -#endif #ifdef UNIT_TEST @@ -331,9 +329,7 @@ void RNA_def_main(BlenderRNA *brna) {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil}, {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie Clips", "Movie Clip datablocks", RNA_def_main_movieclips}, {"masks", "Mask", "rna_Main_masks_begin", "Masks", "Masks datablocks", RNA_def_main_masks}, -#ifdef WITH_FREESTYLE {"linestyles", "FreestyleLineStyle", "rna_Main_linestyle_begin", "Line Styles", "Line Style datablocks", RNA_def_main_linestyles}, -#endif {NULL, NULL, NULL, NULL, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index f5c23923f81..fb0aeffcffb 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -76,9 +76,7 @@ #include "BKE_movieclip.h" #include "BKE_mask.h" #include "BKE_gpencil.h" -#ifdef WITH_FREESTYLE -# include "BKE_linestyle.h" -#endif +#include "BKE_linestyle.h" #include "DNA_armature_types.h" #include "DNA_camera_types.h" @@ -848,10 +846,9 @@ static void rna_Main_grease_pencil_remove(Main *bmain, ReportList *reports, Poin gpd->id.name + 2, ID_REAL_USERS(gpd)); } -#ifdef WITH_FREESTYLE FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name) { - FreestyleLineStyle *linestyle = FRS_new_linestyle(name, bmain); + FreestyleLineStyle *linestyle = BKE_new_linestyle(name, bmain); id_us_min(&linestyle->id); return linestyle; } @@ -865,7 +862,6 @@ void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineS /* XXX python now has invalid pointer? */ } -#endif /* tag functions, all the same */ static void rna_Main_cameras_tag(Main *bmain, int value) { tag_main_lb(&bmain->camera, value); } @@ -898,9 +894,7 @@ static void rna_Main_particles_tag(Main *bmain, int value) { tag_main_lb(&bmain- static void rna_Main_gpencil_tag(Main *bmain, int value) { tag_main_lb(&bmain->gpencil, value); } static void rna_Main_movieclips_tag(Main *bmain, int value) { tag_main_lb(&bmain->movieclip, value); } static void rna_Main_masks_tag(Main *bmain, int value) { tag_main_lb(&bmain->mask, value); } -#ifdef WITH_FREESTYLE -void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); } -#endif +static void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); } static int rna_Main_cameras_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_CA); } static int rna_Main_scenes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SCE); } @@ -1943,7 +1937,6 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); } -#ifdef WITH_FREESTYLE void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; @@ -1969,6 +1962,5 @@ void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove"); RNA_def_property_flag(parm, PROP_REQUIRED); } -#endif #endif diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index ac67a80e862..e488bedca8a 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1736,12 +1736,10 @@ static void rna_def_mpolygon(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Smooth", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "use_freestyle_face_mark", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FREESTYLE_FACE); RNA_def_property_ui_text(prop, "Freestyle Face Mark", "Face mark for Freestyle feature edge detection"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); -#endif prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION); RNA_def_property_array(prop, 3); @@ -2955,7 +2953,6 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Draw Sharp", "Display sharp edges, used with the EdgeSplit modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "show_freestyle_edge_marks", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FREESTYLE_EDGE); RNA_def_property_ui_text(prop, "Draw Freestyle Edge Marks", "Display Freestyle edge marks, used with the Freestyle renderer"); @@ -2965,7 +2962,6 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FREESTYLE_FACE); RNA_def_property_ui_text(prop, "Draw Freestyle Face Marks", "Display Freestyle face marks, used with the Freestyle renderer"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); -#endif prop = RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_EDGELEN); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0553402d111..7469aac56ad 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -32,16 +32,15 @@ #include "DNA_particle_types.h" #include "DNA_rigidbody_types.h" #include "DNA_scene_types.h" +#include "DNA_linestyle_types.h" #include "DNA_userdef_types.h" #include "DNA_world_types.h" -#ifdef WITH_FREESTYLE -# include "DNA_linestyle_types.h" -#endif #include "BLI_math.h" #include "BLF_translation.h" +#include "BKE_freestyle.h" #include "BKE_tessmesh.h" #include "RNA_define.h" @@ -336,10 +335,6 @@ EnumPropertyItem image_color_depth_items[] = { #include "RE_engine.h" -#ifdef WITH_FREESTYLE -# include "FRS_freestyle.h" -#endif - static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) { ED_space_image_uv_sculpt_update(bmain->wm.first, scene->toolsettings); @@ -1461,7 +1456,6 @@ static char *rna_ToolSettings_path(PointerRNA *ptr) return BLI_strdup("tool_settings"); } -#ifdef WITH_FREESTYLE static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr) { FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; @@ -1481,7 +1475,7 @@ static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr) { FreestyleConfig *config = (FreestyleConfig *)ptr->data; - FreestyleLineSet *lineset = FRS_get_active_lineset(config); + FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset); } @@ -1497,15 +1491,14 @@ static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, in static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr) { FreestyleConfig *config = (FreestyleConfig *)ptr->data; - return FRS_get_active_lineset_index(config); + return BKE_freestyle_lineset_get_active_index(config); } static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value) { FreestyleConfig *config = (FreestyleConfig *)ptr->data; - FRS_set_active_lineset_index(config, value); + BKE_freestyle_lineset_set_active_index(config, value); } -#endif #else @@ -1574,9 +1567,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) {EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""}, {EDGE_MODE_TAG_CREASE, "CREASE", 0, "Tag Crease", ""}, {EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""}, -#ifdef WITH_FREESTYLE {EDGE_MODE_TAG_FREESTYLE, "FREESTYLE", 0, "Tag Freestyle Edge Mark", ""}, -#endif {0, NULL, 0, NULL, NULL} }; @@ -2143,7 +2134,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS); RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer"); @@ -2151,7 +2141,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); -#endif /* passes */ prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE); @@ -2373,7 +2362,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) else RNA_def_property_clear_flag(prop, PROP_EDITABLE); } -#ifdef WITH_FREESTYLE static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; @@ -2781,7 +2769,6 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Line Sets", ""); rna_def_freestyle_linesets(brna, prop); } -#endif static void rna_def_scene_game_recast_data(BlenderRNA *brna) { @@ -3326,9 +3313,7 @@ static void rna_def_scene_render_layer(BlenderRNA *brna) rna_def_render_layer_common(srna, 1); -#ifdef WITH_FREESTYLE /* Freestyle */ - rna_def_freestyle_settings(brna); prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE); @@ -3336,7 +3321,6 @@ static void rna_def_scene_render_layer(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig"); RNA_def_property_struct_type(prop, "FreestyleSettings"); RNA_def_property_ui_text(prop, "Freestyle Settings", ""); -#endif } /* curve.splines */ @@ -3931,14 +3915,12 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; -#ifdef WITH_FREESTYLE static EnumPropertyItem freestyle_thickness_items[] = { {R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"}, {R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", "Unit line thickness is scaled by the proportion of the present vertical image " "resolution to 480 pixels"}, {0, NULL, 0, NULL, NULL}}; -#endif rna_def_scene_ffmpeg_settings(brna); #ifdef WITH_QUICKTIME @@ -4184,12 +4166,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Edge Color", "Edge color"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); -#endif /* threads */ prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); @@ -4652,7 +4632,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data around for faster re-renders"); RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update"); -#ifdef WITH_FREESTYLE /* Freestyle line thickness options */ prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode"); @@ -4663,7 +4642,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness"); RNA_def_property_range(prop, 0.f, 10000.f); RNA_def_property_ui_text(prop, "Unit Line Thickness", "Unit line thickness in pixels"); -#endif /* Scene API */ RNA_api_scene_render(srna); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 2a4a73b91c1..9e4583b84ee 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1201,12 +1201,10 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna) RNA_def_property_ui_text(prop, "Edge UV Face Select", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "freestyle_edge_mark", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Freestyle Edge Mark", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); -#endif } static void rna_def_userdef_theme_spaces_face(StructRNA *srna) @@ -1233,12 +1231,10 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna) RNA_def_property_ui_text(prop, "Face Dot Size", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); -#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "freestyle_face_mark", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "Freestyle Face Mark", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); -#endif } static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurbs) -- cgit v1.2.3