From a462d69bbf771e49d2fa49589608c375376b42ed Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 20 Dec 2012 07:57:26 +0000 Subject: Another big patch set by Bastien Montagne, thanks a lot! * Made Freestyle optional (turned on by default). * Fix for missing bpath.c updates in the previous merge of trunk changes. --- source/blender/makesrna/intern/CMakeLists.txt | 15 +++++++++++++-- source/blender/makesrna/intern/SConscript | 6 ++++++ 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 | 10 +++++++++- source/blender/makesrna/intern/rna_internal.h | 4 ++++ source/blender/makesrna/intern/rna_main.c | 4 ++++ source/blender/makesrna/intern/rna_main_api.c | 10 +++++++++- source/blender/makesrna/intern/rna_mesh.c | 8 ++++++++ source/blender/makesrna/intern/rna_scene.c | 24 ++++++++++++++++++++++-- source/blender/makesrna/intern/rna_userdef.c | 4 ++++ 12 files changed, 89 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 24bf6ff4aa1..a8b9b779ff8 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -54,7 +54,6 @@ set(DEFSRC rna_key.c rna_lamp.c rna_lattice.c - rna_linestyle.c rna_main.c rna_mask.c rna_material.c @@ -93,6 +92,12 @@ 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 @@ -254,7 +259,6 @@ blender_include_dirs( ../../windowmanager ../../editors/include ../../render/extern/include - ../../freestyle ../../../../intern/audaspace/intern ../../../../intern/cycles/blender ../../../../intern/guardedalloc @@ -262,6 +266,13 @@ blender_include_dirs( ../../../../intern/smoke/extern ) +if(WITH_FREESTYLE) + blender_include_dirs( + ../../freestyle + ) + add_definitions(-DWITH_FREESTYLE) +endif() + blender_include_dirs_sys( ${GLEW_INCLUDE_PATH} ) diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 5d60d416cc4..11562d729df 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -38,6 +38,8 @@ root_build_dir=normpath(env['BF_BUILDDIR']) source_files = env.Glob('*.c') source_files.remove('rna_access.c') +if not env['WITH_BF_FREESTYLE']: + source_files.remove('rna_linestyle.c') generated_files = source_files[:] generated_files.remove('rna_define.c') @@ -132,6 +134,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', ' if env['WITH_BF_INTERNATIONAL']: defs.append('WITH_INTERNATIONAL') +if env['WITH_BF_FREESTYLE']: + 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 333cdeabfa4..1b5ab2ea600 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3202,7 +3202,9 @@ 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 5efd162fe02..092c9eb2b17 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -56,7 +56,9 @@ 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", ""}, @@ -132,7 +134,9 @@ 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; @@ -169,7 +173,9 @@ 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 85af3073945..06c01012e19 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -395,11 +395,13 @@ 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 361f4a01661..851ae69ed3f 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -56,7 +56,9 @@ #include "BKE_node.h" #include "BKE_sequencer.h" #include "BKE_texture.h" -#include "BKE_linestyle.h" +#ifdef WITH_FREESTYLE +# include "BKE_linestyle.h" +#endif #include "ED_node.h" @@ -190,6 +192,7 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) 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); @@ -197,6 +200,7 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) return path; break; } +#endif } } else { @@ -268,6 +272,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) } break; +#ifdef WITH_FREESTYLE case ID_LS: { ListBase listbase; @@ -281,6 +286,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) BLI_freelistN(&listbase); break; } +#endif default: /* everything else should have a "color_ramp" property */ { @@ -333,6 +339,7 @@ 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; @@ -340,6 +347,7 @@ 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 fbb5dd569cc..636be933ced 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -151,7 +151,9 @@ 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); @@ -311,7 +313,9 @@ 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 ca4609f88c8..32db099c0c0 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -258,11 +258,13 @@ 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 @@ -328,7 +330,9 @@ 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 48db12ce14e..90cc8100718 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -72,7 +72,9 @@ #include "BKE_movieclip.h" #include "BKE_mask.h" #include "BKE_gpencil.h" -#include "BKE_linestyle.h" +#ifdef WITH_FREESTYLE +# include "BKE_linestyle.h" +#endif #include "DNA_armature_types.h" #include "DNA_camera_types.h" @@ -634,6 +636,7 @@ 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); @@ -650,6 +653,7 @@ 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); } @@ -682,7 +686,9 @@ 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 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); } @@ -1704,6 +1710,7 @@ 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; @@ -1729,5 +1736,6 @@ 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 bc67bf2da35..abc0b65a8f8 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1550,10 +1550,12 @@ static void rna_def_medge(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); +#ifdef WITH_FREESTYLE prop = RNA_def_property(srna, "use_freestyle_edge_mark", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FREESTYLE_EDGE); RNA_def_property_ui_text(prop, "Freestyle Edge Mark", "Edge mark for Freestyle feature edge detection"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); +#endif prop = RNA_def_property(srna, "is_loose", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_LOOSEEDGE); @@ -1611,10 +1613,12 @@ static void rna_def_mface(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); @@ -1713,10 +1717,12 @@ 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); @@ -2934,6 +2940,7 @@ 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"); @@ -2943,6 +2950,7 @@ 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 a0a55c663e9..ce387952947 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -38,7 +38,9 @@ #include "DNA_scene_types.h" #include "DNA_userdef_types.h" #include "DNA_world_types.h" -#include "DNA_linestyle_types.h" +#ifdef WITH_FREESTYLE +# include "DNA_linestyle_types.h" +#endif #include "BLI_math.h" @@ -330,7 +332,9 @@ EnumPropertyItem image_color_depth_items[] = { #include "RE_engine.h" -#include "FRS_freestyle.h" +#ifdef WITH_FREESTYLE +# include "FRS_freestyle.h" +#endif static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) { @@ -1448,6 +1452,7 @@ static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene), BKE_sequencer_preprocessed_cache_cleanup(); } +#ifdef WITH_FREESTYLE static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr) { FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; @@ -1491,6 +1496,7 @@ static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int FreestyleConfig *config = (FreestyleConfig *)ptr->data; FRS_set_active_lineset_index(config, value); } +#endif #else @@ -1559,7 +1565,9 @@ 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} }; @@ -2108,6 +2116,7 @@ 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"); @@ -2115,6 +2124,7 @@ 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); @@ -2336,6 +2346,7 @@ 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; @@ -2743,6 +2754,7 @@ 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) { @@ -3281,6 +3293,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); @@ -3290,6 +3303,7 @@ 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 */ @@ -3870,12 +3884,14 @@ 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 @@ -4121,10 +4137,12 @@ 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); @@ -4583,6 +4601,7 @@ 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"); @@ -4593,6 +4612,7 @@ 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 46d0744cad7..e3eacb40e83 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -967,10 +967,12 @@ 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) @@ -997,10 +999,12 @@ 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