0

MY Code:

import bpy

bpy.data.objects["Armature"].select_set(True)

bpy.context.view_layer.objects.active = bpy.data.objects['Armature']

bpy.ops.object.mode_set(mode='EDIT')

obj=bpy.context.object

bone=obj.pose.bones["something"]

if bone is not None:

obj.pose.bones.remove(bone)

bpy.ops.object.editmode_toggle()

Then it shows up this error message

AttributeError: 'bpy_prop_collection' object has no attribute 'remove'
L0Lock
  • 15,965
  • 1
  • 20
  • 44
  • Hello, Lathander, this does look like a duplicate. If for any reason the linked answer isn't satisfactory, edit this one explaining why, and we can re-open it for you. – Robin Betts Sep 07 '23 at 07:48

0 Answers0