From e5ffefe606092c848e25894ccead21f0de42510f Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 19 Mar 2021 14:26:24 +0100 Subject: Cleanup: Use enum class for DataType. --- .../compositor/operations/COM_OutputFileOperation.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.cc') diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cc b/source/blender/compositor/operations/COM_OutputFileOperation.cc index bb1b312ffec..a6135ef064c 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cc +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cc @@ -50,11 +50,11 @@ void add_exr_channels(void *exrhandle, { /* create channels */ switch (datatype) { - case COM_DT_VALUE: + case DataType::Value: IMB_exr_add_channel( exrhandle, layerName, "V", viewName, 1, width, buf ? buf : nullptr, use_half_float); break; - case COM_DT_VECTOR: + case DataType::Vector: IMB_exr_add_channel( exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : nullptr, use_half_float); IMB_exr_add_channel(exrhandle, @@ -74,7 +74,7 @@ void add_exr_channels(void *exrhandle, buf ? buf + 2 : nullptr, use_half_float); break; - case COM_DT_COLOR: + case DataType::Color: IMB_exr_add_channel( exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : nullptr, use_half_float); IMB_exr_add_channel(exrhandle, @@ -124,13 +124,13 @@ void free_exr_channels(void *exrhandle, /* the pointer is stored in the first channel of each datatype */ switch (datatype) { - case COM_DT_VALUE: + case DataType::Value: rect = IMB_exr_channel_rect(exrhandle, layerName, "V", srv->name); break; - case COM_DT_VECTOR: + case DataType::Vector: rect = IMB_exr_channel_rect(exrhandle, layerName, "X", srv->name); break; - case COM_DT_COLOR: + case DataType::Color: rect = IMB_exr_channel_rect(exrhandle, layerName, "R", srv->name); break; default: @@ -145,11 +145,11 @@ void free_exr_channels(void *exrhandle, int get_datatype_size(DataType datatype) { switch (datatype) { - case COM_DT_VALUE: + case DataType::Value: return 1; - case COM_DT_VECTOR: + case DataType::Vector: return 3; - case COM_DT_COLOR: + case DataType::Color: return 4; default: return 0; -- cgit v1.2.3