UI Feedback: Unit completion hint when text editing

There is this PR #116103: UI: Unit completion hint when text editing that changes the way values with a unit are entered in Blender. This is a feedback thread for this PR.

The Issue

The idea for the PR originated when @JulienKaspar mentioned that using “Adaptive” units is currently very unpredictable.

Here is an example. The “Length” units are set to “Adaptive”. When the value is “10 cm”, typing in “20” actually results in “20 m”. There is no way to know this before confirming the change.
units_adaptive

Another papercut is that it’s not easy to e.g. change the last digit of a value, because the unit is part of the edit string:
units_change_last_digit
This means you have to either navigate over the unit or erase it. All the time.

The Patch

The patch solves both issues mentioned above by placing the unit in a “completion hint” instead.

Here are the two examples from above.

When using adaptive units, the hint will show you what unit will be used when you enter a value.
units_adaptive_pr

Since the unit is no longer part of the edit string when you start editing, changing the (last) value is much easier.
units_change_last_digit_pr

Builds

You can download a build of this PR from here.

17 Likes

This doesn’t seem right. You have 10 cm, click to edit, confirm without making any changes, and it’s now 10 m?

2 Likes

Ah I see what you mean, yes this is a bug that was pointed out by @pioverfour too

1 Like

That bug highlights a trade-off in the design.

It’s intuitive for changing values in that you can edit the value that you saw before. But if you type in a new value and are not even thinking about the previous value, you now have to remember to manually type in the default unit.

2 Likes

I’m loving this, I wanted this for very long time in Blender. Especially since I deal with millimeters a lot. This will be a feedback on adaptive and hint together.

But some issues:

  • As Brecht pointed out when I start typing I expect that I’m dealing with units that I saw before, if it says 25cm and I enter 50, I assume that I’m moving to 50cm, not to 50m. That caught me off guard when it jumped around.

  • Generally it seems that intuitively when I enter for example 25cm, my mind goes “ok now we’re dealing with cms”, so from that point on I think in centimeters, and when I have more than 100cms and it starts displaying meters it weirds me out a bit. In my mind ideal is that once I manually write in unit, from that point I’m dealing with that unit untill I specify so. So if I enter 8mm, from now on I want it to be displayed in mms, even if its 4000mm, until I change it. Because otherwise what’s happening is that on every input you’re dealing with new units, and you dont always know which one.

  • For example, I entered 25cm, and its showing 25cm. Then (If what I suggest in first point is implemented), I enter 100cm, and it moves to 125cm. But now its not saying 125cm, its saying 1.25m. And next time I input something, I’m expecting that I’m still dealing cms, because that was the case before, but now its meters, and I have to be aware of that. It gets confusing quickly.

But of course, one can just not use adaptive and those who are comfortable will use it, since its a choice its always a positive. But I think what I propose will make more sense for everyone.

Other minor points:

  • As it was pointed out on devtalk, light units were adaptive already, and I hated that, its not a commonly known measurement. I suggest there to be Light Power unit, and current behavior to be Adaptive, with second choice Watts, that always stay Watts and doesn’t change automatically.

  • I found a bug with Interpolate Hair Curves modifier. When you’re adding hair with Density brush (which has distance input), on a single brush stroke entire default cube is covered in hair if Interpolate Hair Curves modifier is added. I suspect that is because Interpolate deals with Density measurement, which is confused about what unit we’re using.

1 Like

I see Temperature has adaptive units too. That can’t be right. Kelvin and Celsius aren’t related in any way, they’re two different measurement scales for different scenarios. Where does that even work?

1 Like

Yes, I guess the difference is that with this design when you start editing you’re working with the unit that is currently used, rather than the default.

I’m also confused about e.g. the watt units. It doesn’t seem consistent with how it’s working with the other units. Maybe it’s just that ‘M’ for million and ‘G’ for billion is not used in other units? Not sure.

It would force the user to always be doing the math before they input it, I think.

If right now it says 125 cm… I want 130cm…if I type 1.3 m does it convert this to meters or keep it in centimeters?

To be clear, I think the idea has merit. I basically work exclusively in meters @ actual scale whenever I can, so having to not remember how many CM is in a 1 Meter (sorry, I’m American) and letting Blender handle the conversion is always nice.

1 Like

Realistically, this is not going to be implemented for technical reasons. It would require rethinking how Blender stores data at a fundamental level, because we have no way of attaching unit metadata to properties like this.

1 Like

That is the reason we use Unitless, assuming they are meters during archviz/vfx workflows or decimeters during manufacturing workflow. Such kind of strategy allow to lock units making them always predictable.

image