diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-20 14:12:03 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-20 14:12:03 +0400 |
commit | 8535b9bd15434dc76e599a95a041422b17153116 (patch) | |
tree | 04414340e23b4e8e139fdc2454769929276783f1 /COPYING | |
parent | 21da42bd7ad542323eb15c63fd92e0029b590172 (diff) |
Fix T38722: Adding units in Imperial setting results in inconsistent values
Now always check for a default unit, and evaluate the whole expression in this "unit space".
Not an ideal solution, but should handle most cases nicely
(we can't address all possible corner cases anyway).
Note default unit is searched in current string first (bigger unit of current system wins),
then in previous string.
Note this also replaces ',' by '+' in default separation between units,
helps solving issues with parenthesis (e.g. (1'1")*2.5 would fail in existing code)!
This would break if someone uses py ops with lower precedence than '+' (like bitwise
operations, and comparison), but these are not expected usecase here anyway.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D340
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions