[Bf-blender-cvs] [0a2ca5860fe] sculpt-dev: Sculpt IPMask: Implement automasking for the filter

Pablo Dobarro noreply at git.blender.org
Fri Feb 26 14:59:01 CET 2021


Commit: 0a2ca5860fe1f9b198dc16a836eb2e1641d369e3
Author: Pablo Dobarro
Date:   Fri Feb 26 00:46:52 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB0a2ca5860fe1f9b198dc16a836eb2e1641d369e3

Sculpt IPMask: Implement automasking for the filter

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

M	source/blender/editors/sculpt_paint/sculpt_filter_mask.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
index 7f46cdd4c48..1ac086fdb5b 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
@@ -499,6 +499,9 @@ static void sculpt_ipmask_apply_mask_data(SculptSession *ss, const float *mask)
   PBVHVertexIter vd;
   BKE_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE)
   {
+      if (SCULPT_automasking_factor_get(filter_cache->automasking, ss, vd.index) < 0.5f) {
+          continue;
+      }
       *vd.mask = mask[vd.index];
       if (vd.mvert) {
         vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
@@ -631,9 +634,6 @@ static int sculpt_ipmask_filter_invoke(bContext *C, wmOperator *op, const wmEven
   Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
   SculptSession *ss = ob->sculpt;
   Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
-  PBVH *pbvh = ob->sculpt->pbvh;
-
-  const bool use_automasking = SCULPT_is_automasking_enabled(sd, ss, NULL);
 
   SCULPT_undo_push_begin(ob, "mask filter");



More information about the Bf-blender-cvs mailing list