[Bf-committers] Unit system proposal

Campbell Barton ideasman42 at gmail.com
Tue Apr 19 03:49:37 CEST 2011


On Mon, Apr 18, 2011 at 10:46 AM, Damir Prebeg <blend.factory at gmail.com> wrote:
> Beside selection of metric and imperial system, I would like to be
> able to select "working" unit. For metric that would be [mm, cm, m,
> km], for imperial [in, ft, yd, mi]. And when one unit is selected,
> that unit is default in all numeric fields for length.
> Example: If I select metric system with cm as working unit and I type
> 2 under object's Z dimension, then that object will become 2 cm high.
> Same goes for imperial. If I select 1yd as working unit, and then I
> type 1 for Z dimension, value of that field should be 1yd, not 1'.

What you suggest is currently hard coded for each unit system,
imperial defaults to ft, metric defaults to meters, but it could be
made an option passed to the function on each conversion.

See unit.c's bUnitCollection.base_unit


More information about the Bf-committers mailing list