diff options
Diffstat (limited to 'release/ui/space_info.py')
-rw-r--r-- | release/ui/space_info.py | 52 |
1 files changed, 44 insertions, 8 deletions
diff --git a/release/ui/space_info.py b/release/ui/space_info.py index 4188209e393..6e32cf9b071 100644 --- a/release/ui/space_info.py +++ b/release/ui/space_info.py @@ -60,6 +60,10 @@ class INFO_MT_file(bpy.types.Menu): layout.itemO("screen.userpref_show", text="User Preferences...") layout.itemS() + layout.operator_context = "INVOKE_AREA" + layout.itemO("wm.link_append", text="Link") + layout.item_booleanO("wm.link_append", "link", False, text="Append") + layout.itemS() layout.itemM("INFO_MT_file_import") layout.itemM("INFO_MT_file_export") @@ -79,6 +83,8 @@ class INFO_MT_file_import(bpy.types.Menu): def draw(self, context): layout = self.layout + + layout.itemL(text="Nothing yet") class INFO_MT_file_export(bpy.types.Menu): __space_type__ = 'INFO' @@ -115,22 +121,22 @@ class INFO_MT_add(bpy.types.Menu): layout.operator_context = "EXEC_SCREEN" - layout.item_menu_enumO( "object.mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH') - layout.item_menu_enumO( "object.curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE') - layout.item_menu_enumO( "object.surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE') - layout.item_menu_enumO( "object.metaball_add", "type", 'META', icon='ICON_OUTLINER_OB_META') + layout.item_menu_enumO("object.mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH') + layout.item_menu_enumO("object.curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE') + layout.item_menu_enumO("object.surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE') + layout.item_menu_enumO("object.metaball_add", "type", 'META', icon='ICON_OUTLINER_OB_META') layout.itemO("object.text_add", text="Text", icon='ICON_OUTLINER_OB_FONT') layout.itemS() layout.itemO("object.armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE') - layout.item_enumO("object.object_add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE') - layout.item_enumO("object.object_add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY') + layout.item_enumO("object.add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE') + layout.item_enumO("object.add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY') layout.itemS() - layout.item_enumO("object.object_add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA') - layout.item_enumO("object.object_add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP') + layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA') + layout.item_enumO("object.add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP') class INFO_MT_game(bpy.types.Menu): __space_type__ = 'INFO' @@ -182,6 +188,9 @@ class INFO_MT_help(bpy.types.Menu): layout.itemO("help.blender_eshop") layout.itemO("help.developer_community") layout.itemO("help.user_community") + layout.itemS() + layout.itemO("help.operator_cheat_sheet") + bpy.types.register(INFO_HT_header) bpy.types.register(INFO_MT_file) @@ -240,10 +249,37 @@ class HELP_OT_user_community(HelpOperator): __label__ = "User Community" __URL__ = 'http://www.blender.org/community/user-community/' +class HELP_OT_operator_cheat_sheet(bpy.types.Operator): + __idname__ = "help.operator_cheat_sheet" + __label__ = "Operator Cheet Sheet (new textblock)" + def execute(self, context): + op_strings = [] + tot = 0 + for op_module_name in dir(bpy.ops): + op_module = getattr(bpy.ops, op_module_name) + for op_submodule_name in dir(op_module): + op = getattr(op_module, op_submodule_name) + text = repr(op) + if text.startswith('bpy.ops.'): + op_strings.append(text) + tot += 1 + + op_strings.append('') + + bpy.ops.text.new() # XXX - assumes new text is always at the end! + textblock = bpy.data.texts[-1] + textblock.write('# %d Operators\n\n' % tot) + textblock.write('\n'.join(op_strings)) + textblock.name = "OperatorList.txt" + print("See OperatorList.txt textblock") + return ('FINISHED',) + + bpy.ops.add(HELP_OT_manual) bpy.ops.add(HELP_OT_release_logs) bpy.ops.add(HELP_OT_blender_website) bpy.ops.add(HELP_OT_blender_eshop) bpy.ops.add(HELP_OT_developer_community) bpy.ops.add(HELP_OT_user_community) +bpy.ops.add(HELP_OT_operator_cheat_sheet) |