2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2015 Blender Foundation. */
|
2015-04-06 10:40:12 -03:00
|
|
|
|
2018-08-08 11:49:51 +10:00
|
|
|
#pragma once
|
2020-08-07 09:50:34 +02:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
#include "COM_NodeOperation.h"
|
2020-03-06 16:45:06 +01:00
|
|
|
#include "COM_OutputFileOperation.h"
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
|
#include "BLI_path_util.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BLI_rect.h"
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
|
#include "DNA_color_types.h"
|
|
|
|
|
|
2022-03-22 00:54:42 +01:00
|
|
|
#include "IMB_openexr.h"
|
2015-04-06 10:40:12 -03:00
|
|
|
|
2021-03-23 17:12:27 +01:00
|
|
|
namespace blender::compositor {
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
class OutputOpenExrSingleLayerMultiViewOperation : public OutputSingleLayerOperation {
|
|
|
|
|
private:
|
|
|
|
|
public:
|
2022-03-11 18:21:05 +01:00
|
|
|
OutputOpenExrSingleLayerMultiViewOperation(const Scene *scene,
|
|
|
|
|
const RenderData *rd,
|
2015-04-06 10:40:12 -03:00
|
|
|
const bNodeTree *tree,
|
|
|
|
|
DataType datatype,
|
2022-07-14 21:27:58 -07:00
|
|
|
const ImageFormatData *format,
|
2015-04-06 10:40:12 -03:00
|
|
|
const char *path,
|
2021-10-13 23:01:15 +02:00
|
|
|
const char *view_name,
|
2022-01-07 11:38:08 +11:00
|
|
|
bool save_as_render);
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
|
void *get_handle(const char *filename);
|
2021-10-13 23:01:15 +02:00
|
|
|
void deinit_execution() override;
|
2015-04-06 10:40:12 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Writes inputs into OpenEXR multilayer channels. */
|
|
|
|
|
class OutputOpenExrMultiLayerMultiViewOperation : public OutputOpenExrMultiLayerOperation {
|
|
|
|
|
private:
|
|
|
|
|
public:
|
2021-01-12 16:19:54 +01:00
|
|
|
OutputOpenExrMultiLayerMultiViewOperation(const Scene *scene,
|
|
|
|
|
const RenderData *rd,
|
2015-06-19 13:00:18 +02:00
|
|
|
const bNodeTree *tree,
|
|
|
|
|
const char *path,
|
|
|
|
|
char exr_codec,
|
|
|
|
|
bool exr_half_float,
|
2021-10-13 23:01:15 +02:00
|
|
|
const char *view_name);
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
|
void *get_handle(const char *filename);
|
2021-10-13 23:01:15 +02:00
|
|
|
void deinit_execution() override;
|
2015-04-06 10:40:12 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class OutputStereoOperation : public OutputSingleLayerOperation {
|
|
|
|
|
private:
|
2021-10-13 23:01:04 +02:00
|
|
|
char name_[FILE_MAX];
|
|
|
|
|
size_t channels_;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
public:
|
2022-03-11 18:21:05 +01:00
|
|
|
OutputStereoOperation(const Scene *scene,
|
|
|
|
|
const RenderData *rd,
|
2015-04-06 10:40:12 -03:00
|
|
|
const bNodeTree *tree,
|
|
|
|
|
DataType datatype,
|
2022-07-14 21:27:58 -07:00
|
|
|
const struct ImageFormatData *format,
|
2015-04-06 10:40:12 -03:00
|
|
|
const char *path,
|
|
|
|
|
const char *name,
|
2021-10-13 23:01:15 +02:00
|
|
|
const char *view_name,
|
2022-01-07 11:38:08 +11:00
|
|
|
bool save_as_render);
|
2015-04-06 10:40:12 -03:00
|
|
|
void *get_handle(const char *filename);
|
2021-10-13 23:01:15 +02:00
|
|
|
void deinit_execution() override;
|
2015-04-06 10:40:12 -03:00
|
|
|
};
|
2021-03-23 17:12:27 +01:00
|
|
|
|
|
|
|
|
} // namespace blender::compositor
|