diff options
author | Hans Goudey <h.goudey@me.com> | 2021-07-05 21:58:23 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-07-05 21:58:23 +0300 |
commit | 56ca4fe5bb3c3d8cd92a1c99fc83856aaefdd0c2 (patch) | |
tree | dbf92bdac6520a404055011d20c4eef9c0f6a30a /source/blender/editors | |
parent | 648b9c6159330f3ff313293b0126398963246627 (diff) |
Fixes from review comments
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 3 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index d223f326bbb..67e1bd5294b 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1523,8 +1523,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) point2D = (tGPspoint *)tgpf->sbuffer; const int def_nr = tgpf->gpd->vertex_group_active_index - 1; - const ListBase *defbase = BKE_object_defgroup_list(tgpf->ob); - const bool have_weight = (bool)BLI_findlink(defbase, def_nr); + const bool have_weight = (bool)BLI_findlink(&tgpf->gpd->vertex_group_names, def_nr); if ((ts->gpencil_flags & GP_TOOL_FLAG_CREATE_WEIGHTS) && (have_weight)) { BKE_gpencil_dvert_ensure(gps); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index e05344760f4..4ea599fd30e 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2843,9 +2843,10 @@ static bool vertex_group_vert_select_unlocked_poll(bContext *C) return false; } - if (BKE_object_defgroup_active_index_get(ob) != 0) { + const int def_nr = BKE_object_defgroup_active_index_get(ob); + if (def_nr != 0) { const ListBase *defbase = BKE_object_defgroup_list(ob); - const bDeformGroup *dg = BLI_findlink(defbase, BKE_object_defgroup_active_index_get(ob) - 1); + const bDeformGroup *dg = BLI_findlink(defbase, def_nr - 1); if (dg) { return !(dg->flag & DG_LOCK_WEIGHT); } |