[Bf-blender-cvs] [c25f5a375e6] master: Fix T61313: gravity not displayed correct when changing unit scale

Brecht Van Lommel noreply at git.blender.org
Tue Sep 17 13:44:09 CEST 2019


Commit: c25f5a375e6c7469ee55a300a92eac362a46f697
Author: Brecht Van Lommel
Date:   Tue Sep 17 13:37:43 2019 +0200
Branches: master
https://developer.blender.org/rBc25f5a375e6c7469ee55a300a92eac362a46f697

Fix T61313: gravity not displayed correct when changing unit scale

Display of velocity and acceleration units should be affected by unit scale.
Arguably the behavior of the physics simulation should be for gravity to remain
constant, but such design changes are outside the scope of bug fixing. At least
the UI should correctly reflect what the physics simulation will do.

===================================================================

M	source/blender/blenkernel/intern/scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index faf3d12fdad..4f855bd7d98 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1674,6 +1674,8 @@ double BKE_scene_unit_scale(const UnitSettings *unit, const int unit_type, doubl
 
   switch (unit_type) {
     case B_UNIT_LENGTH:
+    case B_UNIT_VELOCITY:
+    case B_UNIT_ACCELERATION:
       return value * (double)unit->scale_length;
     case B_UNIT_AREA:
     case B_UNIT_POWER:



More information about the Bf-blender-cvs mailing list