From ce5d079a490841ea52736dacf418357a9bbc5923 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 8 Feb 2019 12:31:28 +0100 Subject: 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. --- source/blender/python/intern/bpy_props.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/python/intern/bpy_props.c') 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 \ -- cgit v1.2.3