Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-08 14:31:28 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-17 18:23:00 +0300
commitce5d079a490841ea52736dacf418357a9bbc5923 (patch)
treed6726cb0cb63e59f350fc46ca7d6d0ad3a1148f1 /source/blender/makesrna/RNA_types.h
parent6c24de95c0f3af084c2314f2ff9443efba675453 (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/makesrna/RNA_types.h')
-rw-r--r--source/blender/makesrna/RNA_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 1742e8b8795..a02bf644620 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -90,6 +90,7 @@ typedef enum PropertyUnit {
PROP_UNIT_VELOCITY = (7 << 16), /* m/s */
PROP_UNIT_ACCELERATION = (8 << 16), /* m/(s^2) */
PROP_UNIT_CAMERA = (9 << 16), /* mm */
+ PROP_UNIT_POWER = (10 << 16), /* W */
} PropertyUnit;
#define RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000)
@@ -146,6 +147,9 @@ typedef enum PropertySubType {
/* booleans */
PROP_LAYER = 40,
PROP_LAYER_MEMBER = 41,
+
+ /* light */
+ PROP_POWER = 42 | PROP_UNIT_POWER,
} PropertySubType;
/* Make sure enums are updated with these */