diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index 32cf20ac483..883ea48410e 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -770,7 +770,14 @@ bool BKE_modifiers_uses_armature(Object *ob, bArmature *arm) for (; md; md = md->next) { if (md->type == eModifierType_Armature) { - ArmatureModifierData *amd = (ArmatureModifierData *)md; + ArmatureModifierData *amd = reinterpret_cast(md); + if (amd->object && amd->object->data == arm) { + return true; + } + } + else if (md->type == eModifierType_GreasePencilArmature) { + GreasePencilArmatureModifierData *amd = reinterpret_cast( + md); if (amd->object && amd->object->data == arm) { return true; } diff --git a/source/blender/editors/armature/armature_naming.cc b/source/blender/editors/armature/armature_naming.cc index eb0edad95ae..af2a8273109 100644 --- a/source/blender/editors/armature/armature_naming.cc +++ b/source/blender/editors/armature/armature_naming.cc @@ -262,6 +262,12 @@ void ED_armature_bone_rename(Main *bmain, bDeformGroup *dg = BKE_object_defgroup_find_name(ob, oldname); if (dg) { STRNCPY(dg->name, newname); + + if (ob->type == OB_GREASE_PENCIL) { + /* Update vgroup names stored in CurvesGeometry */ + BKE_grease_pencil_vgroup_name_update(ob, oldname, dg->name); + } + DEG_id_tag_update(static_cast(ob->data), ID_RECALC_GEOMETRY); } }