diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-19 16:26:24 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-19 19:11:47 +0300 |
commit | e5ffefe606092c848e25894ccead21f0de42510f (patch) | |
tree | 8c8ce3f367ca0c2637f3ec5d4cb3f4e9c9c50d42 /source/blender/compositor/operations/COM_OutputFileOperation.cc | |
parent | b5f70d92c25693e05c8ecbd79c76e5bb35a7ceb5 (diff) |
Cleanup: Use enum class for DataType.
Diffstat (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_OutputFileOperation.cc | 18 |
1 files changed, 9 insertions, 9 deletions
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; |