I want to add a prop search to my addon which allows me to search and select bones of a selected armature in the scene. But I dont know the path where to find the bones of the armature. I want to have it like in the constraints panel where you can choose an armature target and a bone target.
I have created something like this:
import bpy
#
#CREATE ArFi LAYOUT START
#
class armatureFind(bpy.types.Panel):
bl_space_type="VIEW_3D"
bl_region_type="TOOLS"
bl_label="Armature Find"
bl_category="ArFi"
def draw(self, context):
layout = self.layout
box = layout.box()
box.prop(bpy.context.scene.objects, "active", text="Armature") #Problem1
box.prop(bpy.data.armatures, "rna_type", text="Bone 1", icon="VIEWZOOM") #Problem2
box.prop(bpy.data.armatures, "rna_type", text="Bone 2", icon="VIEWZOOM") #Problem3
#REGISTER CLASSES
def register():
bpy.utils.register_module(__name__)
def unregister():
bpy.utils.unregister_moduel(__name__)
if __name__ == "__main__":
register()