diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 14:54:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 14:54:02 +0400 |
commit | 0e3de1df4bee62d12a347e74216afa2b42632070 (patch) | |
tree | b4f1d537f5aed407f91371d008a82a1e9ea8ded8 /release/scripts | |
parent | 0e6f8e3e25d9c48501c12cdb56bc78868b568ff5 (diff) |
fix [#31661] Custom properties do no respect min/max values
also renamed function added prev commit
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index ac72b39a04d..5cc041476c9 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1124,9 +1124,15 @@ class WM_OT_properties_add(Operator): return prop_new - property = unique_name(item.keys()) + prop = unique_name(item.keys()) + + item[prop] = 1.0 + + # not essential, but without this we get [#31661] + prop_ui = rna_idprop_ui_prop_get(item, prop) + prop_ui["soft_min"] = prop_ui["min"] = 0.0 + prop_ui["soft_max"] = prop_ui["max"] = 1.0 - item[property] = 1.0 return {'FINISHED'} |