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>2019-09-24 00:06:11 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-09-24 16:51:47 +0300
commitaea8c0102ac79b04147458ff07a0886b87396b30 (patch)
tree44261df1ef615ae5930fd78d50a5d9ec36effb37 /source/blender/editors/sculpt_paint/paint_cursor.c
parenta9d3e95bea0c7b6e0577d38eea841b3886df814f (diff)
Fix T70140: Topology Automasking and 2D Falloff don't work correctly together
Reviewed By: jbakker Maniphest Tasks: T70140 Differential Revision: https://developer.blender.org/D5878
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 523469912e1..466615f4a94 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1349,6 +1349,17 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* Only sculpt mode cursor for now */
/* Disable for PBVH_GRIDS */
bool is_multires = ss && ss->pbvh && BKE_pbvh_type(ss->pbvh) == PBVH_GRIDS;
+
+ SculptCursorGeometryInfo gi;
+ float mouse[2] = {x - ar->winrct.xmin, y - ar->winrct.ymin};
+ bool is_cursor_over_mesh = false;
+
+ /* Update the active vertex */
+ if ((mode == PAINT_MODE_SCULPT) && !ups->stroke_active) {
+ is_cursor_over_mesh = sculpt_cursor_geometry_info_update(
+ C, &gi, mouse, !(brush->falloff_shape & BRUSH_AIRBRUSH));
+ }
+
if ((mode == PAINT_MODE_SCULPT) && ss && !is_multires &&
!(brush->falloff_shape & BRUSH_AIRBRUSH)) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
@@ -1363,11 +1374,9 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
}
if (!ups->stroke_active) {
- SculptCursorGeometryInfo gi;
- float mouse[2] = {x - ar->winrct.xmin, y - ar->winrct.ymin};
int prev_active_vertex_index = ss->active_vertex_index;
bool update_previews = false;
- if (sculpt_cursor_geometry_info_update(C, &gi, mouse, true) && !alpha_overlay_active) {
+ if (is_cursor_over_mesh && !alpha_overlay_active) {
if (prev_active_vertex_index != ss->active_vertex_index) {
update_previews = true;