diff options
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index cdaf72aa191..5a2c77b5619 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -37,12 +37,12 @@ #include "BKE_unit.h" /* own include */ -#include "DNA_scene_types.h" - #ifdef WIN32 # include "BLI_winstuff.h" #endif +/* no BKE or DNA includes! */ + #define TEMP_STR_SIZE 256 #define SEP_CHR '#' @@ -791,29 +791,6 @@ double bUnit_BaseScalar(int system, int type) return unit_default(usys)->scalar; } -double bUnit_getScaleUnit(UnitSettings *unit, const int unit_type, double value) -{ - if (unit->system == USER_UNIT_NONE) { - /* Never apply scale_length when not using a unit setting! */ - return value; - } - - 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); - default: - return value; - } -} - /* external access */ bool bUnit_IsValid(int system, int type) { |