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:
authorIyad Ahmed <iyadahmed2001>2021-09-13 17:29:24 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-09-13 17:37:50 +0300
commit6f52ebba192b8a9c5fc1e211e4968ebb42ea8408 (patch)
tree98f353bfbd8a29625d6273526667cc909b53f025 /source/blender/freestyle
parentc9c890f196d4f695a83600edfa7782b914b5315b (diff)
UI: Freestyle UI Upgrade
Suggested and funded by [[ https://blendernpr.org/| BNPR ]], this patch aims to update the long not-updated Freestyle UI **Why do the UI upgrade:** - Freestyle UI doesn't match the rest of Blender UI, it was neglected for a long time - The current UI makes Freestyle workflows tedious and distracting **Highlights:** For before/after screenshots see https://developer.blender.org/D10505 Video: https://youtu.be/qaXhuJW_c9U Workflow video (older revision): https://youtu.be/IqbjIq_A800 Doc patch (WIP): https://github.com/bnpr/FreestyleUIUpgrade/blob/main/freestyle-ui-upgrade-docs.diff Reviewed By: #user_interface, Blendify, HooglyBoogly, Severin Differential Revision: https://developer.blender.org/D10505
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.h4
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp13
2 files changed, 2 insertions, 15 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) ?