FBX exporter conversion almost done.
[blender.git] / release / ui / space_info.py
1
2 import bpy
3
4 class INFO_HT_header(bpy.types.Header):
5         __space_type__ = "USER_PREFERENCES"
6         __idname__ = "INFO_HT_header"
7
8         def draw(self, context):
9                 st = context.space_data
10                 layout = self.layout
11                 
12                 layout.template_header()
13
14                 if context.area.show_menus:
15                         row = layout.row()
16                         row.itemM("INFO_MT_file")
17                         row.itemM("INFO_MT_add")
18                         row.itemM("INFO_MT_timeline")
19                         row.itemM("INFO_MT_game")
20                         row.itemM("INFO_MT_render")
21                         row.itemM("INFO_MT_help")
22
23                 layout.template_ID(context.window, "screen") #, new="SCREEN_OT_new", open="SCREEN_OT_unlink")
24                 layout.template_ID(context.screen, "scene") #, new="SCENE_OT_new", unlink="SCENE_OT_unlink")
25
26                 layout.itemS()
27
28                 layout.template_operator_search()
29                 layout.template_running_jobs()
30                         
31 class INFO_MT_file(bpy.types.Menu):
32         __space_type__ = "USER_PREFERENCES"
33         __label__ = "File"
34
35         def draw(self, context):
36                 layout = self.layout
37
38                 layout.operator_context = "EXEC_AREA"
39                 layout.itemO("WM_OT_read_homefile")
40                 layout.operator_context = "INVOKE_AREA"
41                 layout.itemO("WM_OT_open_mainfile")
42
43                 layout.itemS()
44
45                 layout.operator_context = "EXEC_AREA"
46                 layout.itemO("WM_OT_save_mainfile")
47                 layout.operator_context = "INVOKE_AREA"
48                 layout.itemO("WM_OT_save_as_mainfile")
49
50                 layout.itemS()
51
52                 layout.itemM("INFO_MT_file_external_data")
53
54 class INFO_MT_file_external_data(bpy.types.Menu):
55         __space_type__ = "USER_PREFERENCES"
56         __label__ = "External Data"
57
58         def draw(self, context):
59                 layout = self.layout
60
61                 layout.itemO("FILE_OT_pack_all", text="Pack into .blend file")
62                 layout.itemO("FILE_OT_unpack_all", text="Unpack into Files...")
63
64                 layout.itemS()
65
66                 layout.itemO("FILE_OT_make_paths_relative")
67                 layout.itemO("FILE_OT_make_paths_absolute")
68                 layout.itemO("FILE_OT_report_missing_files")
69                 layout.itemO("FILE_OT_find_missing_files")
70
71 class INFO_MT_add(bpy.types.Menu):
72         __space_type__ = "USER_PREFERENCES"
73         __label__ = "Add"
74
75         def draw(self, context):
76                 layout = self.layout
77                 layout.itemL(text="Nothing yet")
78
79 class INFO_MT_timeline(bpy.types.Menu):
80         __space_type__ = "USER_PREFERENCES"
81         __label__ = "Timeline"
82
83         def draw(self, context):
84                 layout = self.layout
85                 layout.itemL(text="Nothing yet")
86
87 class INFO_MT_game(bpy.types.Menu):
88         __space_type__ = "USER_PREFERENCES"
89         __label__ = "Game"
90
91         def draw(self, context):
92                 layout = self.layout
93                 layout.itemL(text="Nothing yet")
94
95 class INFO_MT_render(bpy.types.Menu):
96         __space_type__ = "USER_PREFERENCES"
97         __label__ = "Render"
98
99         def draw(self, context):
100                 layout = self.layout
101                 layout.itemL(text="Nothing yet")
102
103 class INFO_MT_help(bpy.types.Menu):
104         __space_type__ = "USER_PREFERENCES"
105         __label__ = "Help"
106
107         def draw(self, context):
108                 layout = self.layout
109                 layout.itemL(text="Nothing yet")
110
111 class INFO_PT_tabs(bpy.types.Panel):
112         __space_type__ = "USER_PREFERENCES"
113         __no_header__ = True
114
115         def draw(self, context):
116                 layout = self.layout
117                 userpref = context.user_preferences
118
119                 layout.itemR(userpref, "active_section")
120
121 class INFO_PT_view(bpy.types.Panel):
122         __space_type__ = "USER_PREFERENCES"
123         __label__ = "View"
124
125         def poll(self, context):
126                 userpref = context.user_preferences
127                 return (userpref.active_section == 'VIEW_CONTROLS')
128
129         def draw(self, context):
130                 layout = self.layout
131                 userpref = context.user_preferences
132                 view = userpref.view
133
134                 layout.itemR(view, "show_view_name")
135
136 bpy.types.register(INFO_HT_header)
137 bpy.types.register(INFO_MT_file)
138 bpy.types.register(INFO_MT_file_external_data)
139 bpy.types.register(INFO_MT_add)
140 bpy.types.register(INFO_MT_timeline)
141 bpy.types.register(INFO_MT_game)
142 bpy.types.register(INFO_MT_render)
143 bpy.types.register(INFO_MT_help)
144 bpy.types.register(INFO_PT_tabs)
145 bpy.types.register(INFO_PT_view)
146