Merge with 2.5 -r 21756:22173.
[blender.git] / release / ui / buttons_data_empty.py
index 7f994c94a07e28dc70c041b21fe6080c7661d2a9..09868eeb542802f1834b93c28e84a85a864b73da 100644 (file)
@@ -7,18 +7,17 @@ class DataButtonsPanel(bpy.types.Panel):
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.object
-               return (ob and ob.type == 'EMPTY')
+               return (context.object.type == 'EMPTY')
        
 class DATA_PT_empty(DataButtonsPanel):
-       __idname__ = "DATA_PT_empty"
        __label__ = "Empty"
 
        def draw(self, context):
-               ob = context.object
                layout = self.layout
+               
+               ob = context.object
 
                layout.itemR(ob, "empty_draw_type")
                layout.itemR(ob, "empty_draw_size")
                
-bpy.types.register(DATA_PT_empty)
+bpy.types.register(DATA_PT_empty)
\ No newline at end of file