diff --git a/operators/shape.py b/operators/shape.py index d4e478c..eedf141 100644 --- a/operators/shape.py +++ b/operators/shape.py @@ -63,8 +63,8 @@ class RP_OT_name_from_bone(Operator): #bl_options = {'REGISTER', 'UNDO'} def execute(self,context): - scene = context.scene - rig = scene.rig_picker.rig + col = get_picker_collection(context.object) + rig = col.rig_picker.rig bone = rig.data.bones.active if bone: @@ -84,9 +84,7 @@ class RP_OT_mirror_shape(Operator): return (context.object and context.object.type in ('MESH', 'CURVE', 'TEXT')) def execute(self,context): - scn = context.scene - ob = context.object - collection = get_picker_collection(ob) + collection = get_picker_collection(context.object) objects = context.selected_objects # Remove mirror object: