0
$\begingroup$

I once again stumped with the add-on that I'm working on that puts the settings from the Properties Editor into a panel in the 3D Viewport sidebar. I completed the Armature Data Properties section, but the Bone Properties tab is another story. I would appreciate it if someone can help me with this seemingly simple thing.

Here is the code for the current section I'm having trouble with:

class VIEW_3D_PT_animation_bone_properties (bpy.types.Panel):
    
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Properties"
    bl_label = "Bone Properties"
    bl_idname = "view3d.animation_bone_properties"
    bl_parent_id = "view3d.animation_rig_data_properties"
    bl_options = {"DEFAULT_CLOSED"}
    
    def draw (self, context):
        layout = self.layout
        
        col = layout.column (align = True)
        col.prop_search (context.object.bone.data, "parent")
        

Before I did context.object.bone.data, I also tried context.object.data since that worked perfectly for mesh data, then context.bone from the Edit Source option. .....both contexts didn't work, even though I'm in Edit Mode, where the Bone Properties tab is.

I'm still not even half way done with my add-on, as I still have 25 or so more tabs to go, so any help with my progress would be very much appreciated.

If you're a Discord user, you can friend me for an easier time conversing with me and helping me since I'm on there a lot more. My discord is Sonario648.

$\endgroup$

1 Answer 1

0
$\begingroup$

I just figured out the answer a few days ago.

col.prop (context.active_bone, "parent", context.object.data, "edit_bones")
col.prop (context.active_bone, "use_connect")

Repeat until satisfied.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .