Fix T42026: Unit scale affects camera focal length.

Not a regression, yet maybe simple/safe enough for 2.72?
This commit is contained in:
Bastien Montagne 2014-09-30 15:07:44 +02:00 committed by Sergey Sharybin
parent 725e8ba47e
commit 5358026368
Notes: blender-bot 2023-02-14 10:01:18 +01:00
Referenced by issue #42026, Unit scale affects camera focal length
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}