Commit: 67fdff9d69fbf58ae49af8ff36439801fa847d74 Author: Joseph Eagar Date: Wed May 4 20:33:43 2022 -0700 Branches: sculpt-dev https://developer.blender.org/rB67fdff9d69fbf58ae49af8ff36439801fa847d74
Sculpt-dev: Fix merge bug and broken origmask * Remove error check for PBVH_BMESH that's not valid in sculpt-dev. * Fix bug in original mask api. =================================================================== M source/blender/blenkernel/BKE_pbvh.h M source/blender/blenkernel/intern/pbvh.c M source/blender/editors/sculpt_paint/sculpt.c =================================================================== diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 35fb213ef89..1ac14c8ab55 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -583,6 +583,7 @@ void BKE_pbvh_node_fully_masked_set(PBVHNode *node, int fully_masked); bool BKE_pbvh_node_fully_masked_get(PBVHNode *node); void BKE_pbvh_node_fully_unmasked_set(PBVHNode *node, int fully_masked); bool BKE_pbvh_node_fully_unmasked_get(PBVHNode *node); +void BKE_pbvh_node_mark_curvature_update(PBVHNode *node); void BKE_pbvh_mark_rebuild_pixels(PBVH *pbvh); void BKE_pbvh_vert_mark_update(PBVH *pbvh, SculptVertRef vertex); diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index e068faf9c43..37749572f14 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -4268,6 +4268,8 @@ void BKE_pbvh_check_tri_areas(PBVH *pbvh, PBVHNode *node) } break; } + case PBVH_GRIDS: + break; case PBVH_BMESH: { BMFace *f; const int cd_face_area = pbvh->cd_face_area; @@ -5268,6 +5270,10 @@ bool BKE_pbvh_get_origvert( copy_v3_v3(mv->origco, pbvh->verts[vertex.i].co); copy_v3_v3(mv->origno, pbvh->vert_normals[vertex.i]); mask = (float *)CustomData_get_layer(pbvh->vdata, CD_PAINT_MASK); + + if (mask) { + mask += vertex.i; + } } else { const CCGKey *key = BKE_pbvh_get_grid_key(pbvh); @@ -5281,7 +5287,7 @@ bool BKE_pbvh_get_origvert( } if (mask) { - mv->origmask = (ushort)(mask[vertex.i] * 65535.0f); + mv->origmask = (ushort)(*mask * 65535.0f); } if (pbvh->color_layer) { diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index fc0877ff9c2..5d82357f8d1 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -7762,10 +7762,8 @@ bool SCULPT_handles_colors_report(SculptSession *ss, ReportList *reports) { switch (BKE_pbvh_type(ss->pbvh)) { case PBVH_FACES: - return true; case PBVH_BMESH: - BKE_report(reports, RPT_ERROR, "Not supported in dynamic topology mode"); - return false; + return true; case PBVH_GRIDS: BKE_report(reports, RPT_ERROR, "Not supported in multiresolution mode"); return false; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs