Revision: 21458
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21458
Author:   campbellbarton
Date:     2009-07-09 11:07:25 +0200 (Thu, 09 Jul 2009)

Log Message:
-----------
Patch from William
"moving the ID browser into its own panel. Eventually these panels should loose 
their headers to distinguish them from other, normal panels. Also a few other 
fixes for bones and armature panels."

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_armature.py
    branches/blender2.5/blender/release/ui/buttons_data_bone.py
    branches/blender2.5/blender/release/ui/buttons_data_camera.py
    branches/blender2.5/blender/release/ui/buttons_data_curve.py
    branches/blender2.5/blender/release/ui/buttons_data_lamp.py
    branches/blender2.5/blender/release/ui/buttons_data_lattice.py
    branches/blender2.5/blender/release/ui/buttons_data_mesh.py
    branches/blender2.5/blender/release/ui/buttons_data_text.py
    branches/blender2.5/blender/release/ui/buttons_material.py
    branches/blender2.5/blender/release/ui/buttons_objects.py
    branches/blender2.5/blender/release/ui/buttons_particle.py
    branches/blender2.5/blender/release/ui/buttons_texture.py
    branches/blender2.5/blender/release/ui/buttons_world.py

Modified: branches/blender2.5/blender/release/ui/buttons_data_armature.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_armature.py     
2009-07-09 08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_armature.py     
2009-07-09 09:07:25 UTC (rev 21458)
@@ -9,9 +9,9 @@
        def poll(self, context):
                return (context.armature != None)
 
-class DATA_PT_skeleton(DataButtonsPanel):
-       __idname__ = "DATA_PT_skeleton"
-       __label__ = "Skeleton"
+class DATA_PT_contextarm(DataButtonsPanel):
+       __idname__ = "DATA_PT_contextarm"
+       __label__ = " "
        
        def poll(self, context):
                return ((context.object and context.object.type == 'ARMATURE') 
or context.armature)
@@ -32,8 +32,22 @@
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
+class DATA_PT_skeleton(DataButtonsPanel):
+       __idname__ = "DATA_PT_skeleton"
+       __label__ = "Skeleton"
+       
+       def poll(self, context):
+               return ((context.object and context.object.type == 'ARMATURE') 
or context.armature)
+
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.object
+               arm = context.armature
+               space = context.space_data
+
+
                if arm:
-                       layout.itemS()
                        layout.itemR(arm, "rest_position")
 
                        split = layout.split()
@@ -124,6 +138,7 @@
                sub = split.column()
                sub.itemR(arm, "ghost_only_selected", text="Selected Only")
 
+bpy.types.register(DATA_PT_contextarm)
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)
 bpy.types.register(DATA_PT_paths)

Modified: branches/blender2.5/blender/release/ui/buttons_data_bone.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_bone.py 2009-07-09 
08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_bone.py 2009-07-09 
09:07:25 UTC (rev 21458)
@@ -9,10 +9,25 @@
        def poll(self, context):
                return (context.bone or context.edit_bone)
 
+class BONE_PT_context(BoneButtonsPanel):
+       __idname__ = "BONE_PT_context"
+       __label__ = " "
+
+       def draw(self, context):
+               layout = self.layout
+               bone = context.bone
+               if not bone:
+                       bone = context.edit_bone
+               
+               split = layout.split(percentage=0.06)
+               split.itemL(text="", icon="ICON_BONE_DATA")
+               split.itemR(bone, "name", text="")
+
 class BONE_PT_bone(BoneButtonsPanel):
        __idname__ = "BONE_PT_bone"
        __label__ = "Bone"
 
+
        def draw(self, context):
                layout = self.layout
                bone = context.bone
@@ -22,28 +37,53 @@
                split = layout.split()
 
                sub = split.column()
-               sub.itemR(bone, "name")
                sub.itemR(bone, "parent")
                sub.itemR(bone, "connected")
-               sub.itemR(bone, "deform")
 
+               sub.itemL(text="Layers:")
+               sub.template_layers(bone, "layer")
+
+               sub = split.column()
+
                sub.itemL(text="Inherit:")
-               sub.itemR(bone, "hinge")
-               sub.itemR(bone, "inherit_scale")
+               sub.itemR(bone, "hinge", text="Rotation")
+               sub.itemR(bone, "inherit_scale", text="Scale")
+               
+               sub.itemL(text="Display:")
+               sub.itemR(bone, "draw_wire", text="Wireframe")
+               sub.itemR(bone, "hidden", text="Hide")
 
+
+               
+class BONE_PT_deform(BoneButtonsPanel):
+       __idname__ = "BONE_PT_deform"
+       __label__ = "Deform"
+
+       def draw_header(self, context):
+               layout = self.layout
+               bone = context.bone
+               if not bone:
+                       bone = context.edit_bone
+                       
+               layout.itemR(bone, "deform", text="")
+
+       def draw(self, context):
+               layout = self.layout
+               bone = context.bone
+               if not bone:
+                       bone = context.edit_bone
+       
+               layout.active = bone.deform
+                       
+               split = layout.split()
+
+               sub = split.column()
                sub.itemL(text="Envelope:")
                sub.itemR(bone, "envelope_distance", text="Distance")
                sub.itemR(bone, "envelope_weight", text="Weight")
                sub.itemR(bone, "multiply_vertexgroup_with_envelope", 
text="Multiply")
-
                sub = split.column()
-               sub.itemL(text="Layers:")
-               sub.template_layers(bone, "layer")
                
-               sub.itemL(text="Display:")
-               sub.itemR(bone, "draw_wire", text="Wireframe")
-               sub.itemR(bone, "hidden", text="Hide")
-
                sub.itemL(text="Curved Bones:")
                sub.itemR(bone, "bbone_segments", text="Segments")
                sub.itemR(bone, "bbone_in", text="Ease In")
@@ -51,4 +91,7 @@
                
                sub.itemR(bone, "cyclic_offset")
 
+
+bpy.types.register(BONE_PT_context)
 bpy.types.register(BONE_PT_bone)
+bpy.types.register(BONE_PT_deform)

Modified: branches/blender2.5/blender/release/ui/buttons_data_camera.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_camera.py       
2009-07-09 08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_camera.py       
2009-07-09 09:07:25 UTC (rev 21458)
@@ -9,9 +9,9 @@
        def poll(self, context):
                return (context.camera != None)
                
-class DATA_PT_camera(DataButtonsPanel):
-       __idname__ = "DATA_PT_camera"
-       __label__ = "Lens"
+class DATA_PT_context(DataButtonsPanel):
+       __idname__ = "DATA_PT_context"
+       __label__ = " "
        
        def poll(self, context):
                return (context.object and context.object.type == 'CAMERA')
@@ -32,6 +32,21 @@
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
+
+class DATA_PT_camera(DataButtonsPanel):
+       __idname__ = "DATA_PT_camera"
+       __label__ = "Lens"
+       
+       def poll(self, context):
+               return (context.object and context.object.type == 'CAMERA')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.object
+               cam = context.camera
+               space = context.space_data
+
                if cam:
                        layout.itemS()
                        layout.itemR(cam, "type", expand=True)
@@ -86,5 +101,6 @@
                colsub.itemR(cam, "passepartout_alpha", text="Alpha", 
slider=True)
                col.itemR(cam, "draw_size", text="Size")
                
+bpy.types.register(DATA_PT_context)
 bpy.types.register(DATA_PT_camera)
 bpy.types.register(DATA_PT_camera_display)

Modified: branches/blender2.5/blender/release/ui/buttons_data_curve.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_curve.py        
2009-07-09 08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_curve.py        
2009-07-09 09:07:25 UTC (rev 21458)
@@ -9,9 +9,10 @@
        def poll(self, context):
                return (context.object and context.object.type == 'CURVE' and 
context.curve)
 
-class DATA_PT_shape_curve(DataButtonsPanel):
-       __idname__ = "DATA_PT_shape_curve"
-       __label__ = "Shape"
+
+class DATA_PT_context(DataButtonsPanel):
+       __idname__ = "DATA_PT_context"
+       __label__ = " "
        
        def poll(self, context):
                return (context.object and context.object.type == 'CURVE')
@@ -32,8 +33,24 @@
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
+
+class DATA_PT_shape_curve(DataButtonsPanel):
+       __idname__ = "DATA_PT_shape_curve"
+       __label__ = "Shape"
+       
+       def poll(self, context):
+               return (context.object and context.object.type == 'CURVE')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.object
+               curve = context.curve
+               space = context.space_data
+
+
+
                if curve:
-                       layout.itemS()
                        layout.itemR(curve, "curve_2d")                 
                                                        
                        split = layout.split()
@@ -46,7 +63,7 @@
                        colsub.itemR(curve, "back")
                        
                        col.itemL(text="Textures:")
-                       col.itemR(curve, "uv_orco")
+#                      col.itemR(curve, "uv_orco")
                        col.itemR(curve, "auto_texspace")
                        
                        sub = split.column()    
@@ -56,10 +73,10 @@
                        sub.itemR(curve, "render_resolution_u", text="Render U")
                        sub.itemR(curve, "render_resolution_v", text="Render V")
 
-                       sub.itemL(text="Display:")
-                       sub.itemL(text="HANDLES")
-                       sub.itemL(text="NORMALS")
-                       sub.itemR(curve, "vertex_normal_flip")
+#                      sub.itemL(text="Display:")
+#                      sub.itemL(text="HANDLES")
+#                      sub.itemL(text="NORMALS")
+#                      sub.itemR(curve, "vertex_normal_flip")
 
 class DATA_PT_geometry(DataButtonsPanel):
        __idname__ = "DATA_PT_geometry"
@@ -141,6 +158,7 @@
                sub.itemR(currentcurve, "radius_interpolation", text="Tilt")
                sub.itemR(currentcurve, "smooth")
                
+bpy.types.register(DATA_PT_context)
 bpy.types.register(DATA_PT_shape_curve)
 bpy.types.register(DATA_PT_geometry)
 bpy.types.register(DATA_PT_pathanim)

Modified: branches/blender2.5/blender/release/ui/buttons_data_lamp.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-07-09 
08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-07-09 
09:07:25 UTC (rev 21458)
@@ -19,9 +19,9 @@
                lamp = context.lamp
                layout.template_preview(lamp)
        
-class DATA_PT_lamp(DataButtonsPanel):
-       __idname__ = "DATA_PT_lamp"
-       __label__ = "Lamp"
+class DATA_PT_context(DataButtonsPanel):
+       __idname__ = "DATA_PT_context"
+       __label__ = " "
        
        def poll(self, context):
                return ((context.object and context.object.type == 'LAMP') or 
context.lamp)
@@ -42,8 +42,21 @@
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
-               layout.itemS()
 
+class DATA_PT_lamp(DataButtonsPanel):
+       __idname__ = "DATA_PT_lamp"
+       __label__ = "Lamp"
+       
+       def poll(self, context):
+               return ((context.object and context.object.type == 'LAMP') or 
context.lamp)
+
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.object
+               lamp = context.lamp
+               space = context.space_data
+
                layout.itemR(lamp, "type", expand=True)
                
                split = layout.split()
@@ -244,6 +257,7 @@
 
                layout.template_curve_mapping(lamp.falloff_curve)
 
+bpy.types.register(DATA_PT_context)
 bpy.types.register(DATA_PT_preview)
 bpy.types.register(DATA_PT_lamp)
 bpy.types.register(DATA_PT_shadow)

Modified: branches/blender2.5/blender/release/ui/buttons_data_lattice.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_lattice.py      
2009-07-09 08:39:58 UTC (rev 21457)
+++ branches/blender2.5/blender/release/ui/buttons_data_lattice.py      
2009-07-09 09:07:25 UTC (rev 21458)
@@ -9,9 +9,9 @@
        def poll(self, context):
                return (context.lattice != None)
        
-class DATA_PT_lattice(DataButtonsPanel):
-       __idname__ = "DATA_PT_lattice"
-       __label__ = "Lattice"
+class DATA_PT_context(DataButtonsPanel):
+       __idname__ = "DATA_PT_context"
+       __label__ = " "
        
        def poll(self, context):
                return (context.object and context.object.type == 'LATTICE')
@@ -32,9 +32,22 @@
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
+
+class DATA_PT_lattice(DataButtonsPanel):
+       __idname__ = "DATA_PT_lattice"
+       __label__ = "Lattice"
+       
+       def poll(self, context):
+               return (context.object and context.object.type == 'LATTICE')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.object
+               lat = context.lattice
+               space = context.space_data
+

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to