Fix T41590: When scene scale is not 1.0, and units are "None," Blender assumes transl...
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 26 Aug 2014 10:04:24 +0000 (12:04 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 26 Aug 2014 10:31:08 +0000 (12:31 +0200)
commit0e3fa0b7618fa86e97c5f46ae7208c082fd26eb7
tree447fcae65fe6bf4086a79e03a82abb7a4138897b
parent600248783b50ddef9b809b0d4c7abd9a9b20fda3
Fix T41590: When scene scale is not 1.0, and units are "None," Blender assumes translations are in meters.

Turned out there were several issues in handling of scale parameter by numinput.
Fixed that by factorizing more some code in common with 'usual' numbuttons eval code
(new `bUnit_getScaleUnit()` helper will return valid scaled value, depending on
given system and type).

Now, numinput behaves as expected - using default unit amended by scale in case no unit is given
(i.e. entering '20' with a scale of 0.01 will give you 20cm, and '20cm' as well!).
source/blender/blenkernel/BKE_unit.h
source/blender/blenkernel/intern/unit.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/include/ED_numinput.h
source/blender/editors/interface/interface.c
source/blender/editors/mesh/editmesh_bevel.c
source/blender/editors/mesh/editmesh_inset.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/transform/transform.c
source/blender/editors/util/numinput.c