UI:
[blender-staging.git] / release / ui / buttons_data_empty.py
index 2360178fdc73d1e2269bfa2e02a0f238695576c2..f97dedcf6cf1080cba57abdd9c887759067faf7d 100644 (file)
@@ -7,22 +7,17 @@ class DataButtonsPanel(bpy.types.Panel):
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'EMPTY')
+               return (context.object and context.object.type == 'EMPTY')
        
 class DATA_PT_empty(DataButtonsPanel):
        __idname__ = "DATA_PT_empty"
        __label__ = "Empty"
 
        def draw(self, context):
-               ob = context.active_object
                layout = self.layout
+               ob = context.object
 
-               if not ob:
-                       return
-                       
-               layout.column()
                layout.itemR(ob, "empty_draw_type")
                layout.itemR(ob, "empty_draw_size")
                
-bpy.types.register(DATA_PT_empty)
\ No newline at end of file
+bpy.types.register(DATA_PT_empty)