Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / release / ui / buttons_data_bone.py
index 5aac44b..1eb0937 100644 (file)
@@ -2,8 +2,8 @@
 import bpy
  
 class BoneButtonsPanel(bpy.types.Panel):
-       __space_type__ = 'PROPERTIES'
-       __region_type__ = 'WINDOW'
+       __space_type__ = "PROPERTIES"
+       __region_type__ = "WINDOW"
        __context__ = "bone"
        
        def poll(self, context):
@@ -20,7 +20,7 @@ class BONE_PT_context_bone(BoneButtonsPanel):
                        bone = context.edit_bone
                
                row = layout.row()
-               row.itemL(text="", icon='ICON_BONE_DATA')
+               row.itemL(text="", icon="ICON_BONE_DATA")
                row.itemR(bone, "name", text="")
 
 class BONE_PT_transform(BoneButtonsPanel):
@@ -58,10 +58,6 @@ class BONE_PT_transform(BoneButtonsPanel):
                        col = row.column()
                        if pchan.rotation_mode == 'QUATERNION':
                                col.itemR(pchan, "rotation", text="Rotation")
-                       elif pchan.rotation_mode == 'AXIS_ANGLE':
-                               col.itemL(text="Rotation")
-                               col.itemR(pchan, "rotation_angle", text="Angle")
-                               col.itemR(pchan, "rotation_axis", text="Axis")
                        else:
                                col.itemR(pchan, "euler_rotation", text="Rotation")
 
@@ -78,15 +74,10 @@ class BONE_PT_bone(BoneButtonsPanel):
        def draw(self, context):
                layout = self.layout
                
-               ob = context.object
                bone = context.bone
                arm = context.armature
-               
                if not bone:
                        bone = context.edit_bone
-                       pchan = None
-               else:
-                       pchan = ob.pose.pose_channels[context.bone.name]
 
                split = layout.split()
 
@@ -96,14 +87,14 @@ class BONE_PT_bone(BoneButtonsPanel):
                        col.itemR(bone, "parent", text="")
                else:
                        col.item_pointerR(bone, "parent", arm, "edit_bones", text="")
-               
+
                row = col.row()
                row.active = bone.parent != None
                row.itemR(bone, "connected")
-               
+
                col.itemL(text="Layers:")
-               col.itemR(bone, "layer", text="")
-               
+               col.template_layers(bone, "layer")
+
                col = split.column()
                col.itemL(text="Inherit:")
                col.itemR(bone, "hinge", text="Rotation")
@@ -111,17 +102,6 @@ class BONE_PT_bone(BoneButtonsPanel):
                col.itemL(text="Display:")
                col.itemR(bone, "draw_wire", text="Wireframe")
                col.itemR(bone, "hidden", text="Hide")
-               
-               if ob and pchan:
-                       split = layout.split()
-                       
-                       col = split.column()
-                       col.itemL(text="Bone Group:")
-                       col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
-                       
-                       col = split.column()
-                       col.itemL(text="Custom Shape:")
-                       col.itemR(pchan, "custom_shape", text="")
 
 class BONE_PT_inverse_kinematics(BoneButtonsPanel):
        __label__ = "Inverse Kinematics"
@@ -198,18 +178,18 @@ class BONE_PT_deform(BoneButtonsPanel):
        __default_closed__ = True
 
        def draw_header(self, context):
-               bone = context.bone
+               layout = self.layout
                
+               bone = context.bone
                if not bone:
                        bone = context.edit_bone
                        
-               self.layout.itemR(bone, "deform", text="")
+               layout.itemR(bone, "deform", text="")
 
        def draw(self, context):
                layout = self.layout
                
                bone = context.bone
-               
                if not bone:
                        bone = context.edit_bone