diff options
Diffstat (limited to 'source')
4 files changed, 8 insertions, 27 deletions
diff --git a/source/blender/freestyle/intern/application/AppConfig.h b/source/blender/freestyle/intern/application/AppConfig.h index 61beff33876..adb6d906e68 100644 --- a/source/blender/freestyle/intern/application/AppConfig.h +++ b/source/blender/freestyle/intern/application/AppConfig.h @@ -115,10 +115,6 @@ static const string OPTIONS_FILE("options.xml"); static const string OPTIONS_CURRENT_DIRS_FILE("current_dirs.xml"); static const string OPTIONS_QGLVIEWER_FILE("qglviewer.xml"); -// Default options -static const real DEFAULT_SPHERE_RADIUS = 1.0; -static const real DEFAULT_DKR_EPSILON = 0.0; - } // namespace Config } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 7772a30c5f4..c74fd60fe35 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -65,9 +65,6 @@ using namespace Freestyle; extern "C" { -#define DEFAULT_SPHERE_RADIUS 1.0f -#define DEFAULT_DKR_EPSILON 0.0f - struct FreestyleGlobals g_freestyle; // Freestyle configuration @@ -433,14 +430,8 @@ static void prepare(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph) } // set parameters - if (config->flags & FREESTYLE_ADVANCED_OPTIONS_FLAG) { - controller->setSphereRadius(config->sphere_radius); - controller->setSuggestiveContourKrDerivativeEpsilon(config->dkr_epsilon); - } - else { - controller->setSphereRadius(DEFAULT_SPHERE_RADIUS); - controller->setSuggestiveContourKrDerivativeEpsilon(DEFAULT_DKR_EPSILON); - } + controller->setSphereRadius(config->sphere_radius); + controller->setSuggestiveContourKrDerivativeEpsilon(config->dkr_epsilon); controller->setFaceSmoothness((config->flags & FREESTYLE_FACE_SMOOTHNESS_FLAG) ? true : false); controller->setCreaseAngle(RAD2DEGF(config->crease_angle)); controller->setVisibilityAlgo((config->flags & FREESTYLE_CULLING) ? diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index 4d4fbaed29a..ab1e7aa903c 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -40,7 +40,7 @@ enum { FREESTYLE_RIDGES_AND_VALLEYS_FLAG = 1 << 1, FREESTYLE_MATERIAL_BOUNDARIES_FLAG = 1 << 2, FREESTYLE_FACE_SMOOTHNESS_FLAG = 1 << 3, - FREESTYLE_ADVANCED_OPTIONS_FLAG = 1 << 4, + /* FREESTYLE_ADVANCED_OPTIONS_FLAG = 1 << 4, */ /* UNUSED */ FREESTYLE_CULLING = 1 << 5, FREESTYLE_VIEW_MAP_CACHE = 1 << 6, FREESTYLE_AS_RENDER_PASS = 1 << 7, diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ce7c93a46b3..badaaa14aa4 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4597,12 +4597,12 @@ void rna_def_freestyle_settings(BlenderRNA *brna) {FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, - "Python Scripting Mode", + "Python Scripting", "Advanced mode for using style modules written in Python"}, {FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, - "Parameter Editor Mode", + "Parameter Editor", "Basic mode for interactive style parameter editing"}, {0, NULL, 0, NULL, NULL}, }; @@ -4613,7 +4613,7 @@ void rna_def_freestyle_settings(BlenderRNA *brna) {FREESTYLE_QI_RANGE, "RANGE", 0, - "QI Range", + "Quantitative Invisibility", "Select feature edges within a range of quantitative invisibility (QI) values"}, {0, NULL, 0, NULL, NULL}, }; @@ -4930,14 +4930,6 @@ void rna_def_freestyle_settings(BlenderRNA *brna) prop, "Face Smoothness", "Take face smoothness into account in view map calculation"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); - prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OPTIONS_FLAG); - RNA_def_property_ui_text( - prop, - "Advanced Options", - "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( @@ -4957,11 +4949,13 @@ void rna_def_freestyle_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sphere_radius"); + RNA_def_property_float_default(prop, 1.0); RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_default(prop, 0.0); RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon"); RNA_def_property_range(prop, -1000.0, 1000.0); RNA_def_property_ui_text( |