get picker collection since rig is stored on the picker collection and not on the scene

This commit is contained in:
florentin.luce 2025-06-10 15:23:19 +02:00
parent b4defc1296
commit 7d2216bc3b

View File

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