Blender V5.0
BufferParams Class Reference

#include <buffers.h>

Inherits Node.

Public Member Functions

 BufferParams ()
 BufferParams (BufferParams &&other) noexcept=default
 BufferParams (const BufferParams &other)=default
BufferParamsoperator= (BufferParams &&other)=default
BufferParamsoperator= (const BufferParams &other)=default
 ~BufferParams () override=default
void update_passes ()
void update_passes (const unique_ptr_vector< Pass > &scene_passes)
int get_pass_offset (PassType type, PassMode mode=PassMode::NOISY) const
const BufferPassfind_pass (string_view name) const
const BufferPassfind_pass (PassType type, PassMode mode=PassMode::NOISY) const
const BufferPassget_actual_display_pass (PassType type, PassMode mode=PassMode::NOISY) const
const BufferPassget_actual_display_pass (const BufferPass *pass) const
void update_offset_stride ()
bool modified (const BufferParams &other) const
Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
virtual ~Node ()=0
void set (const SocketType &input, bool value)
void set (const SocketType &input, const int value)
void set (const SocketType &input, const uint value)
void set (const SocketType &input, const uint64_t value)
void set (const SocketType &input, const float value)
void set (const SocketType &input, const float2 value)
void set (const SocketType &input, const float3 value)
void set (const SocketType &input, const char *value)
void set (const SocketType &input, ustring value)
void set (const SocketType &input, const Transform &value)
void set (const SocketType &input, Node *value)
template<class ValueType, std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void set (const SocketType &input, const ValueType &value)
void set (const SocketType &input, array< bool > &value)
void set (const SocketType &input, array< int > &value)
void set (const SocketType &input, array< float > &value)
void set (const SocketType &input, array< float2 > &value)
void set (const SocketType &input, array< float3 > &value)
void set (const SocketType &input, array< ustring > &value)
void set (const SocketType &input, array< Transform > &value)
void set (const SocketType &input, array< Node * > &value)
bool get_bool (const SocketType &input) const
int get_int (const SocketType &input) const
uint get_uint (const SocketType &input) const
uint64_t get_uint64 (const SocketType &input) const
float get_float (const SocketType &input) const
float2 get_float2 (const SocketType &input) const
float3 get_float3 (const SocketType &input) const
ustring get_string (const SocketType &input) const
Transform get_transform (const SocketType &input) const
Nodeget_node (const SocketType &input) const
const array< bool > & get_bool_array (const SocketType &input) const
const array< int > & get_int_array (const SocketType &input) const
const array< float > & get_float_array (const SocketType &input) const
const array< float2 > & get_float2_array (const SocketType &input) const
const array< float3 > & get_float3_array (const SocketType &input) const
const array< ustring > & get_string_array (const SocketType &input) const
const array< Transform > & get_transform_array (const SocketType &input) const
const array< Node * > & get_node_array (const SocketType &input) const
bool has_default_value (const SocketType &input) const
void set_default_value (const SocketType &input)
bool equals_value (const Node &other, const SocketType &socket) const
void copy_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
void set_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
bool equals (const Node &other) const
void hash (MD5Hash &md5)
size_t get_total_size_in_bytes () const
bool is_a (const NodeType *type)
bool socket_is_modified (const SocketType &input) const
bool is_modified () const
void tag_modified ()
void clear_modified ()
void print_modified_sockets () const
const NodeOwnerget_owner () const
void set_owner (const NodeOwner *owner_)
int reference_count () const
void reference ()
void dereference ()
void clear_reference_count ()

Public Attributes

NODE_DECLARE int width = 0
int height = 0
int window_x = 0
int window_y = 0
int window_width = 0
int window_height = 0
int full_x = 0
int full_y = 0
int full_width = 0
int full_height = 0
int offset = -1
int stride = -1
int pass_stride = -1
vector< BufferPasspasses
ustring layer
ustring view
int samples = 0
float exposure = 1.0f
bool use_approximate_shadow_catcher = false
bool use_transparent_background = false
Public Attributes inherited from Node
ustring name
const NodeTypetype
InternalNode internal
LeafNode leaf

Protected Member Functions

void reset_pass_offset ()
Protected Member Functions inherited from Node
template<typename T>
void set_if_different (const SocketType &input, T value)
void set_if_different (const SocketType &input, Node *value)
template<typename T>
void set_if_different (const SocketType &input, array< T > &value)
void set_if_different (const SocketType &input, array< Node * > &value)
void dereference_all_used_nodes ()

Protected Attributes

int pass_offset_ [kNumPassOffsets]
Protected Attributes inherited from Node
const NodeOwnerowner
int ref_count {0}
SocketModifiedFlags socket_modified

Static Protected Attributes

static constexpr int kNumPassOffsets = PASS_NUM * 2

Additional Inherited Members

Static Protected Member Functions inherited from Node
template<typename T>
static Tget_socket_value (const Node *node, const SocketType &socket)

Detailed Description

Definition at line 65 of file buffers.h.

Constructor & Destructor Documentation

◆ BufferParams() [1/3]

BufferParams::BufferParams ( )

Definition at line 112 of file buffers.cpp.

References Node::Node(), and reset_pass_offset().

Referenced by BufferParams(), BufferParams(), modified(), operator=(), operator=(), and ~BufferParams().

◆ BufferParams() [2/3]

BufferParams::BufferParams ( BufferParams && other)
defaultnoexcept

References BufferParams().

◆ BufferParams() [3/3]

BufferParams::BufferParams ( const BufferParams & other)
default

References BufferParams().

◆ ~BufferParams()

BufferParams::~BufferParams ( )
overridedefault

Member Function Documentation

◆ find_pass() [1/2]

const BufferPass * BufferParams::find_pass ( PassType type,
PassMode mode = PassMode::NOISY ) const

Definition at line 185 of file buffers.cpp.

References passes, and Node::type.

◆ find_pass() [2/2]

const BufferPass * BufferParams::find_pass ( string_view name) const

◆ get_actual_display_pass() [1/2]

const BufferPass * BufferParams::get_actual_display_pass ( const BufferPass * pass) const

◆ get_actual_display_pass() [2/2]

const BufferPass * BufferParams::get_actual_display_pass ( PassType type,
PassMode mode = PassMode::NOISY ) const

◆ get_pass_offset()

◆ modified()

◆ operator=() [1/2]

BufferParams & BufferParams::operator= ( BufferParams && other)
default

References BufferParams().

◆ operator=() [2/2]

BufferParams & BufferParams::operator= ( const BufferParams & other)
default

References BufferParams().

◆ reset_pass_offset()

void BufferParams::reset_pass_offset ( )
protected

Definition at line 157 of file buffers.cpp.

References i, kNumPassOffsets, pass_offset_, and PASS_UNUSED.

Referenced by BufferParams(), and update_passes().

◆ update_offset_stride()

void BufferParams::update_offset_stride ( )

◆ update_passes() [1/2]

◆ update_passes() [2/2]

void BufferParams::update_passes ( const unique_ptr_vector< Pass > & scene_passes)

Definition at line 135 of file buffers.cpp.

References BufferPass::offset, pass_stride, PASS_UNUSED, passes, and update_passes().

Member Data Documentation

◆ exposure

float BufferParams::exposure = 1.0f

◆ full_height

◆ full_width

◆ full_x

◆ full_y

◆ height

◆ kNumPassOffsets

int BufferParams::kNumPassOffsets = PASS_NUM * 2
staticconstexprprotected

Definition at line 142 of file buffers.h.

Referenced by reset_pass_offset().

◆ layer

ustring BufferParams::layer

Definition at line 96 of file buffers.h.

Referenced by BlenderSession::bake(), modified(), and BlenderSession::render().

◆ offset

◆ pass_offset_

int BufferParams::pass_offset_[kNumPassOffsets]
protected

Definition at line 147 of file buffers.h.

Referenced by get_pass_offset(), reset_pass_offset(), and update_passes().

◆ pass_stride

◆ passes

◆ samples

int BufferParams::samples = 0

Definition at line 98 of file buffers.h.

◆ stride

◆ use_approximate_shadow_catcher

bool BufferParams::use_approximate_shadow_catcher = false

Definition at line 100 of file buffers.h.

Referenced by PathTraceTile::get_pass_pixels(), and modified().

◆ use_transparent_background

bool BufferParams::use_transparent_background = false

Definition at line 101 of file buffers.h.

Referenced by PathTraceTile::get_pass_pixels(), and modified().

◆ view

ustring BufferParams::view

Definition at line 97 of file buffers.h.

Referenced by modified(), and BlenderSession::render().

◆ width

◆ window_height

◆ window_width

◆ window_x

◆ window_y


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