Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-31 13:54:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-31 13:54:44 +0300
commitd41bf6b8e8e9b00262cfb5547fda376e620eb864 (patch)
treef255e970335dffdebbc7410901f156c97274d9aa
parent46508430f8e362551dfb23d67ba160e895a64f75 (diff)
Edit last commit
Better check if the property is set in case others want to use this property w/o SKIP_SAVE set.
-rw-r--r--release/scripts/startup/bl_operators/wm.py7
1 files changed, 4 insertions, 3 deletions
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