2009-05-28 05:09:25 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class OUTLINER_HT_header(bpy.types.Header):
|
|
|
|
__space_type__ = "OUTLINER"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
so = context.space_data
|
2009-05-30 06:23:17 +00:00
|
|
|
sce = context.scene
|
2009-05-28 05:09:25 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2009-06-23 00:19:10 +00:00
|
|
|
layout.template_header()
|
2009-05-28 05:09:25 +00:00
|
|
|
|
|
|
|
if context.area.show_menus:
|
|
|
|
row = layout.row(align=True)
|
2009-06-23 00:19:10 +00:00
|
|
|
row.itemM("OUTLINER_MT_view")
|
2009-05-28 05:09:25 +00:00
|
|
|
|
2009-05-30 06:23:17 +00:00
|
|
|
row = layout.row()
|
2009-05-28 23:58:18 +00:00
|
|
|
row.itemR(so, "display_mode", text="")
|
2009-05-30 06:23:17 +00:00
|
|
|
|
|
|
|
if so.display_mode == 'DATABLOCKS':
|
|
|
|
row = layout.row(align=True)
|
2009-07-17 12:26:40 +00:00
|
|
|
row.itemO("anim.keyingset_add_new", text="", icon=31)
|
2009-05-30 06:23:17 +00:00
|
|
|
# row.itemR(sce, "active_keyingset", text="KS: ")
|
|
|
|
# ks = sce.keyingsets[sce.active_keyingset - 1]
|
|
|
|
# row.itemR(ks, "name", text="")
|
|
|
|
## row.itemR(sce, "keyingsets")
|
|
|
|
|
|
|
|
row = layout.row()
|
2009-07-17 12:26:40 +00:00
|
|
|
row.itemO("outliner.keyingset_add_selected", text="", icon=31)
|
|
|
|
row.itemO("outliner.keyingset_remove_selected", text="", icon=32)
|
2009-05-30 06:23:17 +00:00
|
|
|
|
2009-07-17 12:26:40 +00:00
|
|
|
row.itemO("anim.insert_keyframe", text="", icon=514)
|
|
|
|
row.itemO("anim.delete_keyframe", text="", icon=513)
|
2009-05-30 06:23:17 +00:00
|
|
|
|
2009-05-28 05:09:25 +00:00
|
|
|
|
|
|
|
class OUTLINER_MT_view(bpy.types.Menu):
|
|
|
|
__space_type__ = "OUTLINER"
|
|
|
|
__label__ = "View"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
so = context.space_data
|
|
|
|
|
2009-05-30 06:23:17 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.itemR(so, "show_restriction_columns")
|
2009-07-17 12:26:40 +00:00
|
|
|
#layout.itemO("text.new")
|
2009-05-28 05:09:25 +00:00
|
|
|
|
|
|
|
bpy.types.register(OUTLINER_HT_header)
|
|
|
|
bpy.types.register(OUTLINER_MT_view)
|
|
|
|
|