UI: Matt, check space_outliner.c diff to see how to get python
[blender-staging.git] / release / ui / space_outliner.py
1
2 import bpy
3
4 class OUTLINER_HT_header(bpy.types.Header):
5         __space_type__ = "OUTLINER"
6         __idname__ = "OUTLINER_HT_header"
7
8         def draw(self, context):
9                 so = context.space_data
10                 layout = self.layout
11
12                 layout.template_header(context)
13
14                 if context.area.show_menus:
15                         row = layout.row(align=True)
16                         row.itemM(context, "OUTLINER_MT_view")
17                         
18                 row = layout.row(align=True)
19                 row.itemR(so, "display_mode", text="")
20
21 class OUTLINER_MT_view(bpy.types.Menu):
22         __space_type__ = "OUTLINER"
23         __label__ = "View"
24
25         def draw(self, context):
26                 layout = self.layout
27                 so = context.space_data
28
29                 layout.column()
30                 row.itemR(so, "show_restriction_columns")
31                 #layout.itemO("TEXT_OT_new")
32
33 bpy.types.register(OUTLINER_HT_header)
34 bpy.types.register(OUTLINER_MT_view)
35