Merge branch 'blender-v3.5-release'

This commit is contained in:
Brecht Van Lommel 2023-03-06 23:14:18 +01:00
commit 1658de6769
2 changed files with 16 additions and 3 deletions

View File

@ -20,11 +20,13 @@ enum TransformType {
TRANSFORM_SRGB_TO_LINEAR, TRANSFORM_SRGB_TO_LINEAR,
TRANSFORM_SCALE, TRANSFORM_SCALE,
TRANSFORM_EXPONENT, TRANSFORM_EXPONENT,
TRANSFORM_NONE,
TRANSFORM_UNKNOWN, TRANSFORM_UNKNOWN,
}; };
#define COLORSPACE_LINEAR ((OCIO_ConstColorSpaceRcPtr *)1) #define COLORSPACE_LINEAR ((OCIO_ConstColorSpaceRcPtr *)1)
#define COLORSPACE_SRGB ((OCIO_ConstColorSpaceRcPtr *)2) #define COLORSPACE_SRGB ((OCIO_ConstColorSpaceRcPtr *)2)
#define COLORSPACE_DATA ((OCIO_ConstColorSpaceRcPtr *)3)
typedef struct OCIO_PackedImageDescription { typedef struct OCIO_PackedImageDescription {
float *data; float *data;
@ -165,6 +167,8 @@ OCIO_ConstColorSpaceRcPtr *FallbackImpl::configGetColorSpace(OCIO_ConstConfigRcP
return COLORSPACE_LINEAR; return COLORSPACE_LINEAR;
else if (strcmp(name, "sRGB") == 0) else if (strcmp(name, "sRGB") == 0)
return COLORSPACE_SRGB; return COLORSPACE_SRGB;
else if (strcmp(name, "data") == 0)
return COLORSPACE_DATA;
return NULL; return NULL;
} }
@ -179,6 +183,9 @@ int FallbackImpl::configGetIndexForColorSpace(OCIO_ConstConfigRcPtr *config, con
else if (cs == COLORSPACE_SRGB) { else if (cs == COLORSPACE_SRGB) {
return 1; return 1;
} }
else if (cs == COLORSPACE_DATA) {
return 2;
}
return -1; return -1;
} }
@ -314,7 +321,10 @@ OCIO_ConstProcessorRcPtr *FallbackImpl::configGetProcessorWithNames(OCIO_ConstCo
OCIO_ConstColorSpaceRcPtr *cs_src = configGetColorSpace(config, srcName); OCIO_ConstColorSpaceRcPtr *cs_src = configGetColorSpace(config, srcName);
OCIO_ConstColorSpaceRcPtr *cs_dst = configGetColorSpace(config, dstName); OCIO_ConstColorSpaceRcPtr *cs_dst = configGetColorSpace(config, dstName);
FallbackTransform transform; FallbackTransform transform;
if (cs_src == COLORSPACE_LINEAR && cs_dst == COLORSPACE_SRGB) { if (cs_src == COLORSPACE_DATA || cs_dst == COLORSPACE_DATA) {
transform.type = TRANSFORM_NONE;
}
else if (cs_src == COLORSPACE_LINEAR && cs_dst == COLORSPACE_SRGB) {
transform.type = TRANSFORM_LINEAR_TO_SRGB; transform.type = TRANSFORM_LINEAR_TO_SRGB;
} }
else if (cs_src == COLORSPACE_SRGB && cs_dst == COLORSPACE_LINEAR) { else if (cs_src == COLORSPACE_SRGB && cs_dst == COLORSPACE_LINEAR) {
@ -433,6 +443,9 @@ const char *FallbackImpl::colorSpaceGetName(OCIO_ConstColorSpaceRcPtr *cs)
else if (cs == COLORSPACE_SRGB) { else if (cs == COLORSPACE_SRGB) {
return "sRGB"; return "sRGB";
} }
else if (cs == COLORSPACE_DATA) {
return "data";
}
return NULL; return NULL;
} }

View File

@ -13,8 +13,8 @@ from bpy.props import (
class SCENE_OT_freestyle_fill_range_by_selection(Operator): class SCENE_OT_freestyle_fill_range_by_selection(Operator):
"""Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object """ """Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object """ \
"""(either a user-specified object or the active camera)""" """(either a user-specified object or the active camera)"""
bl_idname = "scene.freestyle_fill_range_by_selection" bl_idname = "scene.freestyle_fill_range_by_selection"
bl_label = "Fill Range by Selection" bl_label = "Fill Range by Selection"
bl_options = {'INTERNAL'} bl_options = {'INTERNAL'}