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:
authorHans Goudey <h.goudey@me.com>2022-09-02 17:09:07 +0300
committerHans Goudey <h.goudey@me.com>2022-09-02 17:09:07 +0300
commit071d5594a5045b7d9bbb62bd5523995c95815820 (patch)
tree82769a9e4947e20b222d112bdd7dbe3b506d579d /source/blender/editors/sculpt_paint
parent2879d4b636cb68d0ce08f9dc14bdb5fe55110fe9 (diff)
Use C++ API for vertex group data
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 9d5a7459b80..c1a2a326d14 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -2513,7 +2513,7 @@ static void wpaint_stroke_update_step(bContext *C,
Mesh *mesh = static_cast<Mesh *>(ob->data);
/* *** setup WeightPaintInfo - pass onto do_weight_paint_vertex *** */
- wpi.dvert = {BKE_mesh_deform_verts_for_write(mesh), mesh->totvert};
+ wpi.dvert = mesh->deform_verts_for_write();
wpi.defbase_tot = wpd->defbase_tot;
wpi.defbase_sel = wpd->defbase_sel;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
index 7737265bb1f..7aa0adfc3d4 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
@@ -50,7 +50,7 @@ static bool vertex_weight_paint_mode_poll(bContext *C)
Object *ob = CTX_data_active_object(C);
Mesh *me = BKE_mesh_from_object(ob);
return (ob && (ELEM(ob->mode, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT))) &&
- (me && me->totpoly && BKE_mesh_deform_verts(me) != nullptr);
+ (me && me->totpoly && !me->deform_verts().is_empty());
}
static void tag_object_after_update(Object *object)