[Bf-blender-cvs] [0e25298dd62] temp-pbvh-texpaint-automasking: temp-pbvh-texpaint-automasking: Fix bug with view normal occlusion

Joseph Eagar noreply at git.blender.org
Tue Oct 11 20:34:04 CEST 2022


Commit: 0e25298dd6251fd4d1ea02210d0597fe6ad5ce4f
Author: Joseph Eagar
Date:   Tue Oct 11 11:31:41 2022 -0700
Branches: temp-pbvh-texpaint-automasking
https://developer.blender.org/rB0e25298dd6251fd4d1ea02210d0597fe6ad5ce4f

temp-pbvh-texpaint-automasking: Fix bug with view normal occlusion

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

M	source/blender/editors/sculpt_paint/sculpt_automasking.cc

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
index d0a46e0ebce..c4f436ab280 100644
--- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
@@ -245,14 +245,14 @@ static float automasking_view_occlusion_factor(AutomaskingCache *automasking,
                                                SculptSession *ss,
                                                PBVHVertRef vertex,
                                                uchar stroke_id,
-                                               AutomaskingNodeData * /*automask_data*/)
+                                               AutomaskingNodeData * automask_data)
 {
   char f = *(char *)SCULPT_vertex_attr_get(vertex, ss->attrs.automasking_occlusion);
 
   if (stroke_id != automasking->current_stroke_id) {
     f = *(char *)SCULPT_vertex_attr_get(
-        vertex,
-        ss->attrs.automasking_occlusion) = SCULPT_vertex_is_occluded(ss, vertex, true) ? 2 : 1;
+        vertex, ss->attrs.automasking_occlusion) =
+        SCULPT_vertex_is_occluded(ss, vertex, automask_data->have_orig_data) ? 2 : 1;
   }
 
   return f == 2;



More information about the Bf-blender-cvs mailing list