Patch from William
[blender-staging.git] / release / ui / buttons_objects.py
index 3138f447ad2f078f7e47c94a81d428e5d4c2b36c..4e3ab2672dcd19de2ae7a2c8a6f448739d91fc89 100644 (file)
@@ -6,6 +6,20 @@ class ObjectButtonsPanel(bpy.types.Panel):
        __region_type__ = "WINDOW"
        __context__ = "object"
 
+class OBJECT_PT_context(ObjectButtonsPanel):
+       __idname__ = "OBJECT_PT_context"
+       __label__ = " "
+
+       def draw(self, context):
+               layout = self.layout
+               ob = context.object
+               
+               split = layout.split(percentage=0.06)
+               split.itemL(text="", icon="ICON_OBJECT_DATA")
+               split.itemR(ob, "name", text="")
+               
+                       
+                       
 class OBJECT_PT_transform(ObjectButtonsPanel):
        __idname__ = "OBJECT_PT_transform"
        __label__ = "Transform"
@@ -124,6 +138,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
                sub.itemR(ob, "up_axis", text="Up Axis")
                sub.itemR(ob, "track_rotation", text="Rotation")
 
+bpy.types.register(OBJECT_PT_context)
 bpy.types.register(OBJECT_PT_transform)
 bpy.types.register(OBJECT_PT_groups)
 bpy.types.register(OBJECT_PT_display)