[Bf-blender-cvs] [d41bf6b8e8e] blender2.8: Edit last commit

Campbell Barton noreply at git.blender.org
Thu May 31 12:56:09 CEST 2018


Commit: d41bf6b8e8e9b00262cfb5547fda376e620eb864
Author: Campbell Barton
Date:   Thu May 31 12:54:44 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd41bf6b8e8e9b00262cfb5547fda376e620eb864

Edit last commit

Better check if the property is set in case others want to use this
property w/o SKIP_SAVE set.

===================================================================

M	release/scripts/startup/bl_operators/wm.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index d15726991d2..ee101bb3cc6 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -62,7 +62,6 @@ rna_space_type_prop = EnumProperty(
             for e in bpy.types.Space.bl_rna.properties["type"].enum_items
            ),
         default='EMPTY',
-        options={'SKIP_SAVE'},
         )
 
 
@@ -2360,8 +2359,10 @@ class WM_OT_tool_set_by_name(Operator):
             activate_by_name,
             activate_by_name_or_cycle,
         )
-        space_type = self.space_type
-        if space_type == 'EMPTY':
+
+        if self.properties.is_property_set("space_type"):
+            space_type = self.space_type
+        else:
             space_type = context.space_data.type
 
         fn = activate_by_name_or_cycle if self.cycle else activate_by_name



More information about the Bf-blender-cvs mailing list