[Bf-blender-cvs] [f1c29b9bd3c] blender-v3.2-release: Fix T98368: Shading artifacts on paint/mask anchored sculpt brushes

Joseph Eagar noreply at git.blender.org
Mon May 30 12:22:06 CEST 2022


Commit: f1c29b9bd3c8241b212d7d50b2d538b980a7d62e
Author: Joseph Eagar
Date:   Mon May 30 02:48:04 2022 -0700
Branches: blender-v3.2-release
https://developer.blender.org/rBf1c29b9bd3c8241b212d7d50b2d538b980a7d62e

Fix T98368: Shading artifacts on paint/mask anchored sculpt brushes

I'm not sure what is causing this.  Vertex normals get corrupted
for paint and mask sculpt brushes but not the normal geometric
ones.  Since we don't actually need to recalculate normals
here to begin with I've just disabled it.  The code now
calls the appropriate node mark update function based on
the sculpt tool.

===================================================================

M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/release/datafiles/locale b/release/datafiles/locale
index 647c85462d8..ebc3989630d 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 647c85462d87c3a9d3a189d28d72d1bd93f4d4a8
+Subproject commit ebc3989630d18afe00624fc5e4bae6cc0de7a260
diff --git a/release/scripts/addons b/release/scripts/addons
index d936e4c01fa..1c8e7f124d1 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit d936e4c01fa263a71a7d0665628ae621283b15ee
+Subproject commit 1c8e7f124d17b64ff05cbe179264ba7c7c3aa9fc
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 61e45814503..61efd17f87b 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 61e45814503f51963c91c51aaf764612e7c5dc72
+Subproject commit 61efd17f87b45c3049091127a5619219f9d2a821
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 85ea5d5bfc6..34647cd9bf6 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1354,8 +1354,23 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata,
   SculptSession *ss = data->ob->sculpt;
 
   SculptUndoNode *unode;
-  SculptUndoType type = (data->brush->sculpt_tool == SCULPT_TOOL_MASK ? SCULPT_UNDO_MASK :
-                                                                        SCULPT_UNDO_COORDS);
+  SculptUndoType type;
+
+  switch (data->brush->sculpt_tool) {
+    case SCULPT_TOOL_MASK:
+      type = SCULPT_UNDO_MASK;
+      BKE_pbvh_node_mark_update_mask(data->nodes[n]);
+      break;
+    case SCULPT_TOOL_PAINT:
+    case SCULPT_TOOL_SMEAR:
+      type = SCULPT_UNDO_COLOR;
+      BKE_pbvh_node_mark_update_color(data->nodes[n]);
+      break;
+    default:
+      type = SCULPT_UNDO_COORDS;
+      BKE_pbvh_node_mark_update(data->nodes[n]);
+      break;
+  }
 
   if (ss->bm) {
     unode = SCULPT_undo_push_node(data->ob, data->nodes[n], type);
@@ -1397,8 +1412,6 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata,
     }
   }
   BKE_pbvh_vertex_iter_end;
-
-  BKE_pbvh_node_mark_update(data->nodes[n]);
 }
 
 static void paint_mesh_restore_co(Sculpt *sd, Object *ob)



More information about the Bf-blender-cvs mailing list