Blender V4.5
blender::nodes::node_composite_file_output_cc::FileOutputOperation Class Reference

Inherits blender::compositor::NodeOperation.

Public Member Functions

 FileOutputOperation (Context &context, DNode node)
void execute () override
void execute_single_layer ()
void execute_single_layer_multi_view_exr (const Result &result, const ImageFormatData &format, const char *base_path, const char *layer_name)
void execute_multi_layer ()
void add_pass_for_result (FileOutput &file_output, const Result &result, const char *pass_name, const char *view_name)
float * inflate_result (const Result &result, const int2int2 size)
void add_view_for_result (FileOutput &file_output, const Result &result, const char *view_name)
float * float4_to_float3_image (int2int2 size, float *float4_image)
void add_meta_data_for_result (FileOutput &file_output, const Result &result, const char *name)
bool get_single_layer_image_base_path (const char *base_name, char *r_base_path)
void get_single_layer_image_path (const char *base_path, const ImageFormatData &format, char *r_image_path)
bool get_multi_layer_exr_image_path (const char *base_path, const char *view, const bool apply_template, char *r_image_path)
bool is_multi_layer ()
const char * get_base_path ()
bool use_file_extension ()
bool is_multi_view_exr ()
bool is_multi_view_scene ()
Public Member Functions inherited from blender::compositor::NodeOperation
 NodeOperation (Context &context, DNode node)
void evaluate () override
void compute_results_reference_counts (const Schedule &schedule)
Public Member Functions inherited from blender::compositor::Operation
 Operation (Context &context)
virtual ~Operation ()
Resultget_result (StringRef identifier)
void map_input_to_result (StringRef identifier, Result *result)
void free_results ()

Additional Inherited Members

Protected Member Functions inherited from blender::compositor::NodeOperation
void compute_preview () override
const DNodenode () const
const bNodebnode () const
bool should_compute_output (StringRef identifier)
Protected Member Functions inherited from blender::compositor::Operation
virtual Domain compute_domain ()
virtual void add_and_evaluate_input_processors ()
void add_and_evaluate_input_processor (StringRef identifier, SimpleOperation *processor)
Resultget_input (StringRef identifier) const
void switch_result_mapped_to_input (StringRef identifier, Result *result)
void populate_result (StringRef identifier, Result result)
void declare_input_descriptor (StringRef identifier, InputDescriptor descriptor)
InputDescriptorget_input_descriptor (StringRef identifier)
Contextcontext () const

Detailed Description

Definition at line 488 of file node_composite_file_output.cc.

Constructor & Destructor Documentation

◆ FileOutputOperation()

blender::nodes::node_composite_file_output_cc::FileOutputOperation::FileOutputOperation ( Context & context,
DNode node )
inline

Member Function Documentation

◆ add_meta_data_for_result()

void blender::nodes::node_composite_file_output_cc::FileOutputOperation::add_meta_data_for_result ( FileOutput & file_output,
const Result & result,
const char * name )
inline

◆ add_pass_for_result()

◆ add_view_for_result()

◆ execute()

void blender::nodes::node_composite_file_output_cc::FileOutputOperation::execute ( )
inlineoverridevirtual

◆ execute_multi_layer()

◆ execute_single_layer()

◆ execute_single_layer_multi_view_exr()

void blender::nodes::node_composite_file_output_cc::FileOutputOperation::execute_single_layer_multi_view_exr ( const Result & result,
const ImageFormatData & format,
const char * base_path,
const char * layer_name )
inline

◆ float4_to_float3_image()

float * blender::nodes::node_composite_file_output_cc::FileOutputOperation::float4_to_float3_image ( int2int2 size,
float * float4_image )
inline

◆ get_base_path()

const char * blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_base_path ( )
inline

◆ get_multi_layer_exr_image_path()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_multi_layer_exr_image_path ( const char * base_path,
const char * view,
const bool apply_template,
char * r_image_path )
inline

Get the path of the EXR image to be saved. If the given view is not empty, its corresponding file suffix will be appended to the name.

If there are any errors processing the path, the resulting path will be empty.

Parameters
apply_templateWhether to run templating on the path or not. This is needed because this function is called from more than one place, some of which have already applied templating to the path and some of which haven't. Double-applying templating can give incorrect results.
Returns
True on success, false if there were any errors processing the path.

Definition at line 950 of file node_composite_file_output.cc.

References BKE_build_template_variables_for_render_path(), BKE_image_path_from_imtype(), BKE_main_blendfile_path_from_global(), BKE_scene_multiview_view_suffix_get(), blender::compositor::Operation::context(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), R_IMF_IMTYPE_MULTILAYER, use_file_extension(), and view.

Referenced by execute_multi_layer(), and execute_single_layer_multi_view_exr().

◆ get_single_layer_image_base_path()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_single_layer_image_base_path ( const char * base_name,
char * r_base_path )
inline

Get the base path of the image to be saved, based on the base path of the node. The base name is an optional initial name of the image, which will later be concatenated with other information like the frame number, view, and extension. If the base name is empty, then the base path represents a directory, so a trailing slash is ensured.

Note: this takes care of path template expansion as well.

If there are any errors processing the path, bath_base will be set to an empty string.

Returns
True on success, false if there were any errors processing the path.

Definition at line 873 of file node_composite_file_output.cc.

References BKE_build_template_variables_for_render_path(), BKE_path_apply_template(), BLI_path_join, BLI_path_slash_ensure(), BLI_strncpy(), blender::compositor::Operation::context(), FILE_MAX, get_base_path(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and STRNCPY().

Referenced by execute_single_layer().

◆ get_single_layer_image_path()

void blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_single_layer_image_path ( const char * base_path,
const ImageFormatData & format,
char * r_image_path )
inline

◆ inflate_result()

◆ is_multi_layer()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::is_multi_layer ( )
inline

◆ is_multi_view_exr()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::is_multi_view_exr ( )
inline

◆ is_multi_view_scene()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::is_multi_view_scene ( )
inline

◆ use_file_extension()

bool blender::nodes::node_composite_file_output_cc::FileOutputOperation::use_file_extension ( )
inline

The documentation for this class was generated from the following file: