starting blenderplater wasnt flipping use_deprecation_warnings when it should, also...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 6 Sep 2013 02:50:28 +0000 (02:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 6 Sep 2013 02:50:28 +0000 (02:50 +0000)
release/scripts/startup/bl_operators/wm.py

index 13ee0cc10663ce0eff816c36e0895449d2ca82fd..909842d3c2b76f1d74cbde1dc24ff72cebf3d54c 100644 (file)
@@ -1292,19 +1292,15 @@ class WM_OT_blenderplayer_start(Operator):
         bpy.ops.wm.save_as_mainfile('EXEC_DEFAULT', filepath=filepath, copy=True)
 
         # start the command line call with the player path
-        args = []
-        args.append(player_path)
+        args = [player_path]
 
         # handle some UI options as command line arguments
-        value = 1 if gs.show_framerate_profile else 0
-        args.extend(("-g show_framerate = %d"%value).split())
-        args.extend(("-g show_profile = %d"%value).split())
-
-        value = 1 if gs.show_debug_properties else 0
-        args.extend(("-g show_properties = %d"%value).split())
-
-        value = 1 if gs.use_deprecation_warnings else 0
-        args.extend(("-g ignore_deprecation_warnings = %d"%value).split())
+        args.extend([
+            "-g", "show_framerate=%d" % gs.show_framerate_profile,
+            "-g", "show_profile=%d" % gs.show_framerate_profile,
+            "-g", "show_properties=%d" % gs.show_debug_properties,
+            "-g", "ignore_deprecation_warnings=%d" % (not gs.use_deprecation_warnings),
+            ])
 
         # finish the call with the path to the blend file
         args.append(filepath)
@@ -1613,11 +1609,12 @@ class WM_OT_addon_enable(Operator):
             info_ver = info.get("blender", (0, 0, 0))
 
             if info_ver > bpy.app.version:
-                self.report({'WARNING'}, ("This script was written Blender "
-                                          "version %d.%d.%d and might not "
-                                          "function (correctly), "
-                                          "though it is enabled") %
-                                         info_ver)
+                self.report({'WARNING'},
+                            ("This script was written Blender "
+                             "version %d.%d.%d and might not "
+                             "function (correctly), "
+                             "though it is enabled" %
+                             info_ver))
             return {'FINISHED'}
         else:
 
@@ -1722,9 +1719,9 @@ class WM_OT_addon_refresh(Operator):
 
     def execute(self, context):
         import addon_utils
-        
+
         addon_utils.modules_refresh()
-        
+
         return {'FINISHED'}