script which dumps ui as xml in a fake blender envieonment.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 07:06:27 +0000 (07:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 07:06:27 +0000 (07:06 +0000)
useful for testing for bad api use (make sure UI uses limited functions).

release/scripts/ui/space_info.py

index 8d440c0a02d8bd31cc68191e474d281e2c9a0d31..0b79063c3e95651add974bbc54f7cf088465f2c7 100644 (file)
@@ -348,6 +348,8 @@ class INFO_MT_help(bpy.types.Menu):
     bl_label = "Help"
 
     def draw(self, context):
+        import sys
+
         layout = self.layout
 
         layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
@@ -366,7 +368,7 @@ class INFO_MT_help(bpy.types.Menu):
         layout.operator("help.operator_cheat_sheet", icon='TEXT')
         layout.operator("wm.sysinfo", icon='TEXT')
         layout.separator()
-        if bpy.app.build_platform[0:7] == 'Windows':
+        if sys.platform == "win32":
             layout.operator("wm.toggle_console", icon='CONSOLE')
             layout.separator()
         layout.operator("anim.update_data_paths", text="FCurve/Driver 2.54 fix", icon='HELP')