[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59864] trunk/blender/release/scripts/ startup/bl_operators/wm.py: starting blenderplater wasnt flipping use_deprecation_warnings when it should , also use values directly without converting to ints.

Campbell Barton ideasman42 at gmail.com
Fri Sep 6 04:50:29 CEST 2013


Revision: 59864
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59864
Author:   campbellbarton
Date:     2013-09-06 02:50:28 +0000 (Fri, 06 Sep 2013)
Log Message:
-----------
starting blenderplater wasnt flipping use_deprecation_warnings when it should, also use values directly without converting to ints.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/wm.py

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py	2013-09-06 01:40:20 UTC (rev 59863)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py	2013-09-06 02:50:28 UTC (rev 59864)
@@ -1292,20 +1292,16 @@
         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())
+        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),
+            ])
 
-        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())
-
         # finish the call with the path to the blend file
         args.append(filepath)
 
@@ -1613,11 +1609,12 @@
             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 @@
 
     def execute(self, context):
         import addon_utils
-        
+
         addon_utils.modules_refresh()
-        
+
         return {'FINISHED'}
 
 




More information about the Bf-blender-cvs mailing list