2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2015 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
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
|
|
|
|
2023-05-03 14:13:27 +10:00
|
|
|
void *get_handle(const char *filepath);
|
2021-10-13 23:01:15 +02:00
|
|
|
void deinit_execution() override;
|
2015-04-06 10:40:12 -03:00
|
|
|
};
|
|
|
|
|
|
2022-11-10 11:34:10 +11:00
|
|
|
/** Writes inputs into OpenEXR multi-layer channels. */
|
2015-04-06 10:40:12 -03:00
|
|
|
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
|
|
|
|
2023-05-03 14:13:27 +10:00
|
|
|
void *get_handle(const char *filepath);
|
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:
|
2023-05-03 14:13:27 +10:00
|
|
|
/* NOTE: Using FILE_MAX here is misleading, this is not a file path. */
|
|
|
|
|
char pass_name_[FILE_MAX];
|
2021-10-13 23:01:04 +02:00
|
|
|
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,
|
2023-05-03 14:13:27 +10:00
|
|
|
const char *pass_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);
|
2023-05-03 14:13:27 +10:00
|
|
|
void *get_handle(const char *filepath);
|
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
|