diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc index 8fc0ccd7918..9e5c107ab92 100644 --- a/intern/opencolorio/fallback_impl.cc +++ b/intern/opencolorio/fallback_impl.cc @@ -20,11 +20,13 @@ enum TransformType { TRANSFORM_SRGB_TO_LINEAR, TRANSFORM_SCALE, TRANSFORM_EXPONENT, + TRANSFORM_NONE, TRANSFORM_UNKNOWN, }; #define COLORSPACE_LINEAR ((OCIO_ConstColorSpaceRcPtr *)1) #define COLORSPACE_SRGB ((OCIO_ConstColorSpaceRcPtr *)2) +#define COLORSPACE_DATA ((OCIO_ConstColorSpaceRcPtr *)3) typedef struct OCIO_PackedImageDescription { float *data; @@ -165,6 +167,8 @@ OCIO_ConstColorSpaceRcPtr *FallbackImpl::configGetColorSpace(OCIO_ConstConfigRcP return COLORSPACE_LINEAR; else if (strcmp(name, "sRGB") == 0) return COLORSPACE_SRGB; + else if (strcmp(name, "data") == 0) + return COLORSPACE_DATA; return NULL; } @@ -179,6 +183,9 @@ int FallbackImpl::configGetIndexForColorSpace(OCIO_ConstConfigRcPtr *config, con else if (cs == COLORSPACE_SRGB) { return 1; } + else if (cs == COLORSPACE_DATA) { + return 2; + } return -1; } @@ -314,7 +321,10 @@ OCIO_ConstProcessorRcPtr *FallbackImpl::configGetProcessorWithNames(OCIO_ConstCo OCIO_ConstColorSpaceRcPtr *cs_src = configGetColorSpace(config, srcName); OCIO_ConstColorSpaceRcPtr *cs_dst = configGetColorSpace(config, dstName); 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; } 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) { return "sRGB"; } + else if (cs == COLORSPACE_DATA) { + return "data"; + } return NULL; } diff --git a/scripts/startup/bl_operators/freestyle.py b/scripts/startup/bl_operators/freestyle.py index 80520450786..12d19b19a84 100644 --- a/scripts/startup/bl_operators/freestyle.py +++ b/scripts/startup/bl_operators/freestyle.py @@ -13,8 +13,8 @@ from bpy.props import ( 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 """ - """(either a user-specified object or the active camera)""" + """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)""" bl_idname = "scene.freestyle_fill_range_by_selection" bl_label = "Fill Range by Selection" bl_options = {'INTERNAL'}