[Bf-blender-cvs] [c7684b4] master: Fix T42026: Unit scale affects camera focal length.

Bastien Montagne noreply at git.blender.org
Tue Sep 30 15:09:10 CEST 2014


Commit: c7684b456a3236549b17e731288365331beec2ed
Author: Bastien Montagne
Date:   Tue Sep 30 15:07:44 2014 +0200
Branches: master
https://developer.blender.org/rBc7684b456a3236549b17e731288365331beec2ed

Fix T42026: Unit scale affects camera focal length.

Not a regression, yet maybe simple/safe enough for 2.72?

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

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

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index b6fc44e..67b00a8 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1994,14 +1994,13 @@ double BKE_scene_unit_scale(const UnitSettings *unit, const int unit_type, doubl
 	switch (unit_type) {
 		case B_UNIT_LENGTH:
 			return value * (double)unit->scale_length;
-		case B_UNIT_CAMERA:
-			return value * (double)unit->scale_length;
 		case B_UNIT_AREA:
 			return value * pow(unit->scale_length, 2);
 		case B_UNIT_VOLUME:
 			return value * pow(unit->scale_length, 3);
 		case B_UNIT_MASS:
 			return value * pow(unit->scale_length, 3);
+		case B_UNIT_CAMERA:  /* *Do not* use scene's unit scale for camera focal lens! See T42026. */
 		default:
 			return value;
 	}




More information about the Bf-blender-cvs mailing list