Merge with 2.5 rev 20373.
[blender.git] / release / ui / buttons_data_empty.py
1
2 import bpy
3
4 class DataButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "data"
8         
9         def poll(self, context):
10                 ob = context.active_object
11                 return (ob and ob.type == 'EMPTY')
12         
13 class DATA_PT_empty(DataButtonsPanel):
14         __idname__ = "DATA_PT_empty"
15         __label__ = "Empty"
16
17         def draw(self, context):
18                 ob = context.active_object
19                 layout = self.layout
20
21                 if not ob:
22                         return
23                         
24                 layout.itemR(ob, "empty_draw_type")
25                 layout.itemR(ob, "empty_draw_size")
26                 
27 bpy.types.register(DATA_PT_empty)