diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/SConscript | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 16 |
3 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 15f5253257a..d62a2e2c76e 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -265,6 +265,9 @@ if(WITH_BULLET) endif() if(WITH_FREESTYLE) + list(APPEND INC + ../../freestyle + ) add_definitions(-DWITH_FREESTYLE) endif() diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 08cbd6143a5..179a332336e 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -143,6 +143,7 @@ if env['WITH_BF_CYCLES']: if env['WITH_BF_FREESTYLE']: defs.append('WITH_FREESTYLE') + incs += ' ../../freestyle' if env['OURPLATFORM'] == 'linux': cflags='-pthread' diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 97890997bbb..9af38ae2322 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -370,6 +370,10 @@ EnumPropertyItem bake_save_mode_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); @@ -1179,6 +1183,13 @@ static void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene) DAG_id_tag_update(&scene->id, 0); } +static void rna_Scene_use_view_map_cache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ +#ifdef WITH_FREESTYLE + FRS_free_view_map_cache(); +#endif +} + static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value) { Scene *scene = (Scene *)ptr->id.data; @@ -3109,6 +3120,11 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) "Enable advanced edge detection options (sphere radius and Kr derivative epsilon)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); + prop = RNA_def_property(srna, "use_view_map_cache", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_VIEW_MAP_CACHE); + RNA_def_property_ui_text(prop, "View Map Cache", "Keep the computed view map and avoid re-calculating it if mesh geometry is unchanged"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_view_map_cache_update"); + prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sphere_radius"); RNA_def_property_range(prop, 0.0, 1000.0); |