2.6 Python UI files:
[blender.git] / release / scripts / startup / bl_ui / space_info.py
index debe82e7ab2ac6d694ced988fe6233864755835b..644676310fc35c7ac53597ff17ca6172d141445e 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
 
 # <pep8 compliant>
 import bpy
-from bpy.types import Header, Menu, Operator
+from bpy.types import Header, Menu
 
 
 class INFO_HT_header(Header):
 
 
 class INFO_HT_header(Header):
@@ -373,7 +373,7 @@ class INFO_MT_help(Menu):
         layout.separator()
 
         layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
         layout.separator()
 
         layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
-        layout.operator("help.operator_cheat_sheet", icon='TEXT')
+        layout.operator("wm.operator_cheat_sheet", icon='TEXT')
         layout.operator("wm.sysinfo", icon='TEXT')
         layout.separator()
         if sys.platform[:3] == "win":
         layout.operator("wm.sysinfo", icon='TEXT')
         layout.separator()
         if sys.platform[:3] == "win":
@@ -384,33 +384,5 @@ class INFO_MT_help(Menu):
         layout.separator()
         layout.operator("wm.splash", icon='BLENDER')
 
         layout.separator()
         layout.operator("wm.splash", icon='BLENDER')
 
-
-# Help operators
-
-
-class HELP_OT_operator_cheat_sheet(Operator):
-    bl_idname = "help.operator_cheat_sheet"
-    bl_label = "Operator Cheat Sheet"
-
-    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.split("\n")[-1].startswith('bpy.ops.'):
-                    op_strings.append(text)
-                    tot += 1
-
-            op_strings.append('')
-
-        textblock = bpy.data.texts.new("OperatorList.txt")
-        textblock.write('# %d Operators\n\n' % tot)
-        textblock.write('\n'.join(op_strings))
-        self.report({'INFO'}, "See OperatorList.txt textblock")
-        return {'FINISHED'}
-
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)