diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-08 14:31:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-17 18:23:00 +0300 |
commit | ce5d079a490841ea52736dacf418357a9bbc5923 (patch) | |
tree | d6726cb0cb63e59f350fc46ca7d6d0ad3a1148f1 /source/blender/blenkernel/intern/scene.c | |
parent | 6c24de95c0f3af084c2314f2ff9443efba675453 (diff) |
Units: add support for light power units in Watt. Use for Eevee lights.
This affects point, spot and area lights. Sun light strength remains without
a unit. This change does not affect .blend file compatibility in any way, as
with the rest of the unit system it's purely a display and editing feature.
Not used for Cycles yet, that will be done after unifying the settings with
Eevee.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 432538f96ff..0ce17573caf 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1801,6 +1801,7 @@ double BKE_scene_unit_scale(const UnitSettings *unit, const int unit_type, doubl case B_UNIT_LENGTH: return value * (double)unit->scale_length; case B_UNIT_AREA: + case B_UNIT_POWER: return value * pow(unit->scale_length, 2); case B_UNIT_VOLUME: return value * pow(unit->scale_length, 3); |