diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-10-15 17:57:15 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-10-15 17:57:15 +0300 |
commit | 7bf9c70b1402ba8d11889ea1adaca688bc58bb21 (patch) | |
tree | 8ddcc8c0c7b99e4a136fd592c99a749590f9a00e /source/blender/editors/armature | |
parent | 104887800c0f221fbcffa84bb360dd9ff001d7f1 (diff) |
Fix T92083: Crash renaming bone used in Armature modifier on curve
This is caused by {rB3b6ee8cee708}.
Since rigging curves with armatures only works with envelopes (if I am
not mistaken), this stirs up the question again why we actually give the
choice for vertex groups in parenting. Anyways, curves can have armature
modifiers and renaming bones should not crash.
Now make sure we only go down the route of `BKE_object_defgroup_list`
and `BKE_object_defgroup_find_name` if vertex groups are actually
supported.
Maniphest Tasks: T92083
Differential Revision: https://developer.blender.org/D12876
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_naming.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index 35bd30377c8..de1c14a15ce 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -265,7 +265,7 @@ void ED_armature_bone_rename(Main *bmain, } } - if (BKE_modifiers_uses_armature(ob, arm)) { + if (BKE_modifiers_uses_armature(ob, arm) && BKE_object_supports_vertex_groups(ob)) { bDeformGroup *dg = BKE_object_defgroup_find_name(ob, oldname); if (dg) { BLI_strncpy(dg->name, newname, MAXBONENAME); |