diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2022-10-30 18:33:15 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2022-10-30 18:33:15 +0300 |
commit | 45cd4c9c829c903c2596c6c2054ebda5e31f7c44 (patch) | |
tree | 85fb1645aa82fe4ede26bb1e2fc9c171a340a770 /source/blender/makesrna/intern | |
parent | e59a413091010c80963959095dc6b774a3c513fc (diff) |
Add Wavelength unit type for Thin Film and Wavelength sockets
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 3592ecd84c8..e30b829b936 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3368,6 +3368,8 @@ static const char *rna_property_subtypename(PropertySubType type) return "PROP_POWER"; case PROP_TEMPERATURE: return "PROP_TEMPERATURE"; + case PROP_WAVELENGTH: + return "PROP_WAVELENGTH"; default: { /* in case we don't have a type preset that includes the subtype */ if (RNA_SUBTYPE_UNIT(type)) { @@ -3407,6 +3409,8 @@ static const char *rna_property_subtype_unit(PropertySubType type) return "PROP_UNIT_POWER"; case PROP_UNIT_TEMPERATURE: return "PROP_UNIT_TEMPERATURE"; + case PROP_UNIT_WAVELENGTH: + return "PROP_UNIT_WAVELENGTH"; default: return "PROP_UNIT_UNKNOWN"; } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 9ae6b25360a..a7ddb55a4a6 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -11930,6 +11930,10 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna) PROP_TIME_ABSOLUTE); rna_def_node_socket_float( brna, "NodeSocketFloatDistance", "NodeSocketInterfaceFloatDistance", PROP_DISTANCE); + rna_def_node_socket_float(brna, + "NodeSocketFloatWavelength", + "NodeSocketInterfaceFloatWavelength", + PROP_WAVELENGTH); rna_def_node_socket_int(brna, "NodeSocketInt", "NodeSocketInterfaceInt", PROP_NONE); rna_def_node_socket_int( diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 54ccba24247..312cf702254 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -74,7 +74,8 @@ const EnumPropertyItem rna_enum_property_type_items[] = { {PROP_DISTANCE, "DISTANCE", 0, "Distance", ""}, \ {PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""}, \ {PROP_POWER, "POWER", 0, "Power", ""}, \ - {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""} + {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, \ + {PROP_WAVELENGTH, "WAVELENGTH", 0, "Wavelength", ""} #define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ARRAY_ITEMS \ {PROP_COLOR, "COLOR", 0, "Color", ""}, \ @@ -146,6 +147,7 @@ const EnumPropertyItem rna_enum_property_unit_items[] = { {PROP_UNIT_CAMERA, "CAMERA", 0, "Camera", ""}, {PROP_UNIT_POWER, "POWER", 0, "Power", ""}, {PROP_UNIT_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, + {PROP_UNIT_WAVELENGTH, "WAVELENGTH", 0, "Wavelength", ""}, {0, NULL, 0, NULL, NULL}, }; |