diff options
author | Hans Goudey <h.goudey@me.com> | 2021-09-23 05:56:54 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-23 05:57:33 +0300 |
commit | bf948b2cef3ba340a6bba5e7bd7f4911c9a9275a (patch) | |
tree | e9b09f812e28bb287a00a66a913ef8e140dda561 /source/blender/windowmanager | |
parent | 6e77afe6ec7b6a73f218f1fef264758abcbc778a (diff) |
Custom Properties: Rewrite edit operator, improve UX
This commit changes the custom property edit operator to make editing
different properties types more obvious and expose more of the data,
made more easily possible by the recent UI data refactor.
Previously, the operator guessed the type you wanted based on what you
wrote in a text box. That was problematic, you couldn't make a string
property with a value of `1234`, and you had to know about the Python
syntax for lists in order to create an array property. It was also slow
and error prone; it was too easy to make a typo.
Improvements compared to the old operator:
- A type drop-down to choose between the property types.
- Step and precision values are exposed.
- Buttons that have the correct type based on the property.
- String properties no longer display min, max, etc. buttons.
- Generally works in more cases. The old operator tended to break.
- Choose array length with a slider.
- Easy to choose to use python evaluation when necessary.
- Code is commented, split up, and much easier to understand.
The custom property's value is purposefully not exposed, since the Edit
operator is for changing the property's metadata now, rather than the
value itself. Though in the "Python" mode the value is still available.
More improvements are possible in the future, like exposing different
subtypes, and improving the UI of the custom properties panel.
Differential Revision: https://developer.blender.org/D12435
Diffstat (limited to 'source/blender/windowmanager')
0 files changed, 0 insertions, 0 deletions