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:
authorHans Goudey <h.goudey@me.com>2021-10-08 23:02:23 +0300
committerHans Goudey <h.goudey@me.com>2021-10-08 23:02:23 +0300
commit886196b88817d1c6c2931d48b835377cf590e9ab (patch)
tree28efb0fa1478efaa585db7e90b3c12331ee708b6 /release/scripts/startup/bl_operators
parent8f8982d57c7a022a4040169e19d1943da62c42f9 (diff)
Fix T92037: Custom property edit issues with integer soft range
- Fix a typo that used the max instead of the min for the soft max - Assign the correct "last property type" when the operator starts - Only check values for the soft range when use soft range is turned on
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r--release/scripts/startup/bl_operators/wm.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 6bf45cc5a15..1ce2beca509 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1582,7 +1582,7 @@ class WM_OT_properties_edit(Operator):
min=self.min_int,
max=self.max_int,
soft_min=self.soft_min_int if self.use_soft_limits else self.min_int,
- soft_max=self.soft_max_int if self.use_soft_limits else self.min_int,
+ soft_max=self.soft_max_int if self.use_soft_limits else self.max_int,
step=self.step_int,
default=self.default_int[0] if prop_type_new == 'INT' else self.default_int[:self.array_length],
description=self.description,
@@ -1702,7 +1702,6 @@ class WM_OT_properties_edit(Operator):
name = self.property_name
self._old_prop_name = [name]
- self.last_property_type = self.property_type
item = eval("context.%s" % data_path)
if (item.id_data and item.id_data.override_library and item.id_data.override_library.reference):
@@ -1712,6 +1711,7 @@ class WM_OT_properties_edit(Operator):
# Set operator's property type with the type of the existing property, to display the right settings.
old_type = self._get_property_type(item, name)
self.property_type = old_type
+ self.last_property_type = old_type
# So that the operator can do something for unsupported properties, change the property into
# a string, just for editing in the dialog. When the operator executes, it will be converted back
@@ -1738,10 +1738,10 @@ class WM_OT_properties_edit(Operator):
if self.min_float > self.max_float:
self.min_float, self.max_float = self.max_float, self.min_float
changed = True
- if self.soft_min_float > self.soft_max_float:
- self.soft_min_float, self.soft_max_float = self.soft_max_float, self.soft_min_float
- changed = True
if self.use_soft_limits:
+ if self.soft_min_float > self.soft_max_float:
+ self.soft_min_float, self.soft_max_float = self.soft_max_float, self.soft_min_float
+ changed = True
if self.soft_max_float > self.max_float:
self.soft_max_float = self.max_float
changed = True
@@ -1752,10 +1752,10 @@ class WM_OT_properties_edit(Operator):
if self.min_int > self.max_int:
self.min_int, self.max_int = self.max_int, self.min_int
changed = True
- if self.soft_min_int > self.soft_max_int:
- self.soft_min_int, self.soft_max_int = self.soft_max_int, self.soft_min_int
- changed = True
if self.use_soft_limits:
+ if self.soft_min_int > self.soft_max_int:
+ self.soft_min_int, self.soft_max_int = self.soft_max_int, self.soft_min_int
+ changed = True
if self.soft_max_int > self.max_int:
self.soft_max_int = self.max_int
changed = True