4 class BoneButtonsPanel(bpy.types.Panel):
5 __space_type__ = "BUTTONS_WINDOW"
6 __region_type__ = "WINDOW"
9 def poll(self, context):
10 return (context.bone or context.edit_bone)
12 class BONE_PT_context(BoneButtonsPanel):
13 __idname__ = "BONE_PT_context"
16 def draw(self, context):
20 bone = context.edit_bone
22 split = layout.split(percentage=0.06)
23 split.itemL(text="", icon="ICON_BONE_DATA")
24 split.itemR(bone, "name", text="")
26 class BONE_PT_bone(BoneButtonsPanel):
27 __idname__ = "BONE_PT_bone"
31 def draw(self, context):
35 bone = context.edit_bone
37 split = layout.split()
40 sub.itemR(bone, "parent")
41 sub.itemR(bone, "connected")
43 sub.itemL(text="Layers:")
44 sub.template_layers(bone, "layer")
48 sub.itemL(text="Inherit:")
49 sub.itemR(bone, "hinge", text="Rotation")
50 sub.itemR(bone, "inherit_scale", text="Scale")
52 sub.itemL(text="Display:")
53 sub.itemR(bone, "draw_wire", text="Wireframe")
54 sub.itemR(bone, "hidden", text="Hide")
58 class BONE_PT_deform(BoneButtonsPanel):
59 __idname__ = "BONE_PT_deform"
62 def draw_header(self, context):
66 bone = context.edit_bone
68 layout.itemR(bone, "deform", text="")
70 def draw(self, context):
74 bone = context.edit_bone
76 layout.active = bone.deform
78 split = layout.split()
81 sub.itemL(text="Envelope:")
82 sub.itemR(bone, "envelope_distance", text="Distance")
83 sub.itemR(bone, "envelope_weight", text="Weight")
84 sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
87 sub.itemL(text="Curved Bones:")
88 sub.itemR(bone, "bbone_segments", text="Segments")
89 sub.itemR(bone, "bbone_in", text="Ease In")
90 sub.itemR(bone, "bbone_out", text="Ease Out")
92 sub.itemR(bone, "cyclic_offset")
95 bpy.types.register(BONE_PT_context)
96 bpy.types.register(BONE_PT_bone)
97 bpy.types.register(BONE_PT_deform)