Blender Git Loki

Git Commits -> Revision 9c0de00

Revision 9c0de00 by Bastien Montagne (master)
March 2, 2016, 17:02 (GMT)
Fix T47661: cm (centimeter) unit breaks m (meter) unit in Metric.

`m` unit when used after `cm`/`mm`/etc. ones would get ignored, and the alt version of miles
would be used instead.

The root of the issue is that, in `unit_find_str`, once we get a 'hit' for a unit, we check
it's actual unit (since 'm' would also hit on 'cm', 'mm', etc.). In case that hit is not a
valid unit one, we would just return NULL, breaking the cycle of checks over that unit, and
hence missing all later usages of it.

So now, in case we have an 'invalid unit hit', we immediately retry to find it within remaining string.

Commit Details:

Full Hash: 9c0de0084bfed50a78798c1f0df51fef0ce9e2bd
Parent Commit: bee0a75
Lines Changed: +21, -17

1 Modified Path:

/source/blender/blenkernel/intern/unit.c (+21, -17) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021