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:
authorPablo Dobarro <pablodp606@gmail.com>2020-10-30 00:32:22 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-10-30 20:13:25 +0300
commit99a7c917eab7612bf4b3f00b1bf392a6fb143251 (patch)
treed2615c694c5a39b224b33e5c33f450bdcebe2cb6 /source/blender/editors/sculpt_paint/paint_cursor.c
parent39be99645263f3abee5a5adb927cf08daaed665d (diff)
Sculpt: Dyntopo detail size edit operator
This introduces a new operator to edit the detail size of constant detail mode in dyntopo. The way this operator works and the functionality it provides is similar to the "Voxel size edit" operator for the voxel remesher. It also includes a sample mode. When pressing Ctrl, the detail size will be sampled from the surface under the cursor, updating the preview in real time. This allows quick resolution changes without using the operator multiple times. The operator is set to Shift + D, replacing the old way to change the constant detail size of dyntopo. Shift + R will remain available to be enabled when the voxel remesher works with dyntopo. Deciding if both detail sizes can be unified needs a separate discussion as the new dyntopo can work with detail sizes in parts of the mesh that can easily crash the remesher. The structure of these operators is similar, but the data they control, ranges, drawing and setup functions are completely different, making it hard to merge them into one. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9355
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index f0285c8faf3..550913fc8af 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1310,6 +1310,11 @@ static bool paint_cursor_context_init(bContext *C,
Object *active_object = pcontext->vc.obact;
pcontext->ss = active_object ? active_object->sculpt : NULL;
+ if (pcontext->ss && pcontext->ss->draw_faded_cursor) {
+ pcontext->outline_alpha = 0.3f;
+ copy_v3_fl(pcontext->outline_col, 0.8f);
+ }
+
pcontext->is_stroke_active = pcontext->ups->stroke_active;
return true;