2

I want to add some custom properties to a bone by an if statement

if len(bpy.data.armatures[armSearch].bones[boneSearch].items()) > 1:                    
    itemCount = len(bpy.data.armatures[armSearch].bones[boneSearch].items()) + 1                                
    bpy.data.armatures[armSearch].bones[boneSearch]["skName"+str(itemCount)] = shapeKeySearch                     

elif len(bpy.data.armatures[armSearch].bones[boneSearch].items()) == 1:                    
    bpy.data.armatures[armSearch].bones[boneSearch]["skName"] = shapeKeySearch

else:
    bpy.data.armatures[armSearch].pose.bones[boneSearch]["skName"] = shapeKeySearch

But when I look for the ID properties in the console there are already tow of them even though I deleted them. How can I delete them completely ?

enter image description here

Tristan Salzmann
  • 228
  • 2
  • 11

1 Answers1

2

You delete custom ID property by:

del pose_bone["ID_prop_name"]
Jaroslav Jerryno Novotny
  • 51,077
  • 7
  • 129
  • 218