diff options
Diffstat (limited to 'release/ui/space_info.py')
-rw-r--r-- | release/ui/space_info.py | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/release/ui/space_info.py b/release/ui/space_info.py new file mode 100644 index 00000000000..de3346711e9 --- /dev/null +++ b/release/ui/space_info.py @@ -0,0 +1,119 @@ + +import bpy + +class INFO_HT_header(bpy.types.Header): + __space_type__ = "USER_PREFERENCES" + __idname__ = "INFO_HT_header" + + def draw(self, context): + st = context.space_data + layout = self.layout + + layout.template_header() + + if context.area.show_menus: + row = layout.row() + row.itemM("INFO_MT_file") + row.itemM("INFO_MT_add") + row.itemM("INFO_MT_timeline") + row.itemM("INFO_MT_game") + row.itemM("INFO_MT_render") + row.itemM("INFO_MT_help") + + layout.template_ID(context.window, "screen") #, new="SCREEN_OT_new", open="SCREEN_OT_unlink") + layout.template_ID(context.screen, "scene") #, new="SCENE_OT_new", unlink="SCENE_OT_unlink") + + layout.itemS() + + layout.template_operator_search() + layout.template_running_jobs() + +class INFO_MT_file(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "File" + + def draw(self, context): + layout = self.layout + + layout.operator_context = "EXEC_AREA" + layout.itemO("WM_OT_read_homefile") + layout.operator_context = "INVOKE_AREA" + layout.itemO("WM_OT_open_mainfile") + + layout.itemS() + + layout.operator_context = "EXEC_AREA" + layout.itemO("WM_OT_save_mainfile") + layout.operator_context = "INVOKE_AREA" + layout.itemO("WM_OT_save_as_mainfile") + + layout.itemS() + + layout.itemM("INFO_MT_file_external_data") + +class INFO_MT_file_external_data(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "External Data" + + def draw(self, context): + layout = self.layout + + layout.itemO("FILE_OT_pack_all", text="Pack into .blend file") + layout.itemO("FILE_OT_unpack_all", text="Unpack into Files...") + + layout.itemS() + + layout.itemO("FILE_OT_make_paths_relative") + layout.itemO("FILE_OT_make_paths_absolute") + layout.itemO("FILE_OT_report_missing_files") + layout.itemO("FILE_OT_find_missing_files") + +class INFO_MT_add(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Add" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_timeline(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Timeline" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_game(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Game" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_render(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Render" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_help(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Help" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +bpy.types.register(INFO_HT_header) +bpy.types.register(INFO_MT_file) +bpy.types.register(INFO_MT_file_external_data) +bpy.types.register(INFO_MT_add) +bpy.types.register(INFO_MT_timeline) +bpy.types.register(INFO_MT_game) +bpy.types.register(INFO_MT_render) +bpy.types.register(INFO_MT_help) + |