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/python | |
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/python')
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 5 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_utils_units.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 52354e7f740..f901572a423 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -131,6 +131,7 @@ static const EnumPropertyItem property_subtype_array_items[] = { {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Color Gamma", ""}, {PROP_LAYER, "LAYER", 0, "Layer", ""}, {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}, + {PROP_POWER, "Power", 0, "Power", ""}, {PROP_NONE, "NONE", 0, "None", ""}, {0, NULL, 0, NULL, NULL}, @@ -139,7 +140,7 @@ static const EnumPropertyItem property_subtype_array_items[] = { #define BPY_PROPDEF_SUBTYPE_ARRAY_DOC \ " :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', " \ "'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', " \ - "'XYZ', 'COLOR_GAMMA', 'LAYER', 'LAYER_MEMBER', 'NONE'].\n" \ + "'XYZ', 'COLOR_GAMMA', 'LAYER', 'LAYER_MEMBER', 'POWER', 'NONE'].\n" \ " :type subtype: string\n" /* PyObject's */ @@ -1902,7 +1903,7 @@ static void bpy_prop_callback_assign_enum(struct PropertyRNA *prop, PyObject *ge " :type description: string\n" \ #define BPY_PROPDEF_UNIT_DOC \ -" :arg unit: Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION', 'MASS', 'CAMERA'].\n" \ +" :arg unit: Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION', 'MASS', 'CAMERA', 'POWER'].\n" \ " :type unit: string\n" \ #define BPY_PROPDEF_NUM_MIN_DOC \ diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c index ca27212822a..3d890143720 100644 --- a/source/blender/python/intern/bpy_utils_units.c +++ b/source/blender/python/intern/bpy_utils_units.c @@ -59,6 +59,7 @@ static const char *bpyunits_ucategorie_items[] = { "VELOCITY", "ACCELERATION", "CAMERA", + "POWER", NULL, }; |