From fbdd994d675ffcfb530fac99edb685bb1c5011d6 Mon Sep 17 00:00:00 2001 From: "florentin.luce" Date: Tue, 10 Jun 2025 15:43:44 +0200 Subject: [PATCH] Rename all shapes from related bones name --- operators/shape.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/operators/shape.py b/operators/shape.py index eedf141..2f32bd2 100644 --- a/operators/shape.py +++ b/operators/shape.py @@ -60,16 +60,16 @@ class RP_OT_create_shape(Operator): class RP_OT_name_from_bone(Operator): bl_label = 'Name Shape from selected bones' bl_idname = 'rigpicker.name_from_bone' + bl_description = 'Rename all shapes from related bones name' #bl_options = {'REGISTER', 'UNDO'} def execute(self,context): - col = get_picker_collection(context.object) - rig = col.rig_picker.rig - bone = rig.data.bones.active - if bone: - context.object.name = bone.name - context.object.rig_picker.name = bone.name + col = get_picker_collection(context.object) + + for ob in col.all_objects: + if ob.rig_picker.shape_type == 'BONE': + ob.name = ob.rig_picker.name return {'FINISHED'}