blender/release/ui/space_outliner.py
Matt Ebb 970f9f3ee2 * Wrapped outliner space in RNA, and added a python ui file for the header.
Brecht, would you be able to have a look at this if you have time - I can't 
figure out how to trigger the python file to register the header instead of 
what's in outliner_header.c.
2009-05-28 05:09:25 +00:00

38 lines
746 B
Python

import bpy
class OUTLINER_HT_header(bpy.types.Header):
__space_type__ = "OUTLINER"
__idname__ = "OUTLINER_HT_header"
def draw(self, context):
so = context.space_data
layout = self.layout
layout.template_header(context)
if context.area.show_menus:
row = layout.row(align=True)
row.itemM(context, "OUTLINER_MT_view")
row = layout.row(align=True)
row.itemR(so, "display_mode")
class OUTLINER_MT_view(bpy.types.Menu):
__space_type__ = "OUTLINER"
__label__ = "View"
def draw(self, context):
layout = self.layout
so = context.space_data
layout.column()
row.itemR(so, "show_restriction_columns")
#layout.itemO("TEXT_OT_new")
bpy.types.register(OUTLINER_HT_header)
bpy.types.register(OUTLINER_MT_view)