2.5 Buttons
[blender-staging.git] / release / ui / buttons_data_bone.py
1
2 import bpy
3  
4 class BoneButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "bone"
8         
9         def poll(self, context):
10                 ob = context.active_object
11                 return (ob and ob.type == 'ARMATURE')
12
13 class BONE_PT_bone(BoneButtonsPanel):
14         __idname__ = "BONE_PT_bone"
15         __label__ = "Bone"
16
17         def draw(self, context):
18                 bone = context.active_object.data.bones[0]
19                 layout = self.layout
20
21                 split = layout.split()
22
23                 sub = split.column()
24                 sub.itemR(bone, "name")
25                 sub.itemR(bone, "parent")
26                 sub.itemR(bone, "connected")
27                 sub.itemR(bone, "deform")
28
29                 sub.itemL(text="Inherit:")
30                 sub.itemR(bone, "hinge")
31                 sub.itemR(bone, "inherit_scale")
32
33                 sub.itemL(text="Envelope:")
34                 sub.itemR(bone, "envelope_distance", text="Distance")
35                 sub.itemR(bone, "envelope_weight", text="Weight")
36                 sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
37
38                 sub = split.column()
39                 #sub.itemR(bone, "layer")
40                 sub.itemL(text="Display:")
41                 sub.itemR(bone, "draw_wire", text="Wireframe")
42                 sub.itemR(bone, "editmode_hidden", text="Hide (EditMode)")
43                 sub.itemR(bone, "pose_channel_hidden", text="Hide (PoseMode)")
44
45                 sub.itemL(text="Curved Bones:")
46                 sub.itemR(bone, "bbone_segments", text="Segments")
47                 sub.itemR(bone, "bbone_in", text="Ease In")
48                 sub.itemR(bone, "bbone_out", text="Ease Out")
49                 
50                 sub.itemR(bone, "cyclic_offset")
51
52 bpy.types.register(BONE_PT_bone)
53