[Bf-blender-cvs] [dce768b263b] greasepencil-object: Rename all armature modifiers
Antonioya
noreply at git.blender.org
Wed Aug 29 10:40:09 CEST 2018
Commit: dce768b263b977bf16567d5df528ee4aaf360de4
Author: Antonioya
Date: Wed Aug 29 10:39:48 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBdce768b263b977bf16567d5df528ee4aaf360de4
Rename all armature modifiers
Now it's possible add several armature modifiers, so need rename all of them, not only first one.
===================================================================
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 4c5313257dc..20fccfda6b9 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -280,19 +280,19 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep,
}
}
- GpencilModifierData *gp_md = BKE_gpencil_modifiers_findByType(ob, eGpencilModifierType_Armature);
- if (gp_md) {
- ArmatureGpencilModifierData *mmd = (ArmatureGpencilModifierData *)gp_md;
- if (mmd->object && mmd->object->data == arm) {
- bDeformGroup *dg = defgroup_find_name(ob, oldname);
- if (dg) {
- BLI_strncpy(dg->name, newname, MAXBONENAME);
- }
- }
- }
-
- for (gp_md = ob->greasepencil_modifiers.first; gp_md; gp_md = gp_md->next) {
+ for (GpencilModifierData *gp_md = ob->greasepencil_modifiers.first; gp_md; gp_md = gp_md->next) {
switch (gp_md->type) {
+ case eGpencilModifierType_Armature:
+ {
+ ArmatureGpencilModifierData *mmd = (ArmatureGpencilModifierData *)gp_md;
+ if (mmd->object && mmd->object->data == arm) {
+ bDeformGroup *dg = defgroup_find_name(ob, oldname);
+ if (dg) {
+ BLI_strncpy(dg->name, newname, MAXBONENAME);
+ }
+ }
+ break;
+ }
case eGpencilModifierType_Hook:
{
HookGpencilModifierData *hgp_md = (HookGpencilModifierData *)gp_md;
More information about the Bf-blender-cvs
mailing list