Page MenuHome

Closing quotes get replaced by unit names in driver expressions.
Confirmed, NormalPublic


System Information
Operating system: Linux
Graphics card: Intel

Blender Version
Broken: 2.91, 2.92

Short description of error

When the scene unit system is set to 'IMPERIAL', the closing quotes of any driver expression that includes string literals will be replaced with the text strings of either in or ft.

E.G. SomeObj["SomeProp"] turns into SomeObj["SomePropin]. SomeObj['SomeProp'] turns into SomeObj['SomePropft].

The replacement happens when the driver expression is edited for the first time from the input field for the property which it drives. It does not happen immediately when the expression is first input, so the driver works fin until it's been edited, and it does not seem to happen when the driver is either viewed or modified from the driver editor pane.

Exact steps for others to reproduce the error

Set C.scene.unit_settings.system to 'IMPERIAL', then create a driver with a string literal expression and try to edit it from its driven value's input field.

Or download the attached file, and click on either of the two driven channels in the active object's location transform in the 3D Viewport Sidebar:

Event Timeline

Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Mar 14 2021, 8:09 PM

That is because " and ' are interpreted as units, feet and inch, although in this case they shouldn't be.