From 9d796df4f6376809f14ca0dd0484f63df9c72494 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 Jun 2015 13:00:18 +0200 Subject: Support half float file format storage for Multilayer EXR Quite straightforward implementation -- all the conversion magic is happening in IMB_exr_write_channels() and remained changes are only needed to pass information whether channels is to be converted to half float or not. Regular file output will use full-float for Z pass, which matches behavior of the single layer EXR files. But when saving happens with File Output node then all the passes are respecting half float settings because it's not possible to distinguish whether we're saving Z pass or not. Reviewers: juicyfruit, campbellbarton Reviewed By: campbellbarton Subscribers: maxon, effstops, fsiddi Differential Revision: https://developer.blender.org/D1353 --- source/blender/compositor/operations/COM_OutputFileOperation.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.h') diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index 58ebf055583..93468977a66 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -85,11 +85,13 @@ protected: char m_path[FILE_MAX]; char m_exr_codec; + bool m_exr_half_float; LayerList m_layers; const char *m_viewName; public: - OutputOpenExrMultiLayerOperation(const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec, const char *viewName); + OutputOpenExrMultiLayerOperation(const RenderData *rd, const bNodeTree *tree, const char *path, + char exr_codec, bool exr_half_float, const char *viewName); void add_layer(const char *name, DataType datatype, bool use_layer); @@ -102,7 +104,8 @@ public: bool isFileOutputOperation() const { return true; } }; -void add_exr_channels(void *exrhandle, const char *layerName, const DataType datatype, const char *viewName, const size_t width, float *buf); +void add_exr_channels(void *exrhandle, const char *layerName, const DataType datatype, const char *viewName, + const size_t width, bool use_half_float, float *buf); void free_exr_channels(void *exrhandle, const RenderData *rd, const char *layerName, const DataType datatype); int get_datatype_size(DataType datatype); -- cgit v1.2.3