[Bf-blender-cvs] [7bf9c70b140] master: Fix T92083: Crash renaming bone used in Armature modifier on curve

Philipp Oeser noreply at git.blender.org
Fri Oct 15 17:09:56 CEST 2021


Commit: 7bf9c70b1402ba8d11889ea1adaca688bc58bb21
Author: Philipp Oeser
Date:   Fri Oct 15 16:57:15 2021 +0200
Branches: master
https://developer.blender.org/rB7bf9c70b1402ba8d11889ea1adaca688bc58bb21

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

===================================================================

M	source/blender/editors/armature/armature_naming.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list