Blender V5.0
Pass Class Reference

#include <pass.h>

Inherits Node.

Public Member Functions

NODE_DECLARE Pass ()
PassInfo get_info () const
bool is_written () 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 ()

Static Public Member Functions

static const NodeEnumget_type_enum ()
static const NodeEnumget_mode_enum ()
static PassInfo get_info (PassType type, const PassMode mode=PassMode::DENOISED, const bool include_albedo=false, const bool is_lightgroup=false)
static bool contains (const unique_ptr_vector< Pass > &passes, PassType type)
static const Passfind (const unique_ptr_vector< Pass > &passes, const string &name)
static const Passfind (const unique_ptr_vector< Pass > &passes, PassType type, PassMode mode=PassMode::NOISY, const ustring &lightgroup=ustring())
static int get_offset (const unique_ptr_vector< Pass > &passes, const Pass *pass)

Protected Attributes

bool is_auto_
Protected Attributes inherited from Node
const NodeOwnerowner
int ref_count {0}
SocketModifiedFlags socket_modified

Friends

class Film

Additional Inherited Members

Public Attributes inherited from Node
ustring name
const NodeTypetype
InternalNode internal
LeafNode leaf
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 ()
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 50 of file pass.h.

Constructor & Destructor Documentation

◆ Pass()

Pass::Pass ( )

Definition at line 144 of file pass.cpp.

References false, is_auto_, and Node::Node().

Referenced by contains(), find(), find(), and get_offset().

Member Function Documentation

◆ contains()

bool Pass::contains ( const unique_ptr_vector< Pass > & passes,
PassType type )
static

Definition at line 400 of file pass.cpp.

References Pass(), and Node::type.

Referenced by Scene::need_global_attribute(), Scene::need_motion(), and Film::update_passes().

◆ find() [1/2]

const Pass * Pass::find ( const unique_ptr_vector< Pass > & passes,
const string & name )
static

Definition at line 413 of file pass.cpp.

References Node::name, and Pass().

Referenced by BlenderSession::draw().

◆ find() [2/2]

const Pass * Pass::find ( const unique_ptr_vector< Pass > & passes,
PassType type,
PassMode mode = PassMode::NOISY,
const ustring & lightgroup = ustring() )
static

Definition at line 424 of file pass.cpp.

References Pass(), and Node::type.

◆ get_info() [1/2]

◆ get_info() [2/2]

PassInfo Pass::get_info ( PassType type,
const PassMode mode = PassMode::DENOISED,
const bool include_albedo = false,
const bool is_lightgroup = false )
static

Definition at line 156 of file pass.cpp.

References PassInfo::direct_type, PassInfo::divide_type, float, PassInfo::indirect_type, PassInfo::is_written, LOG_DFATAL, NOISY, PassInfo::num_components, PASS_ADAPTIVE_AUX_BUFFER, PASS_AO, PASS_AOV_COLOR, PASS_AOV_VALUE, PASS_BACKGROUND, PASS_BAKE_DIFFERENTIAL, PASS_BAKE_PRIMITIVE, PASS_BAKE_SEED, PASS_CATEGORY_BAKE_END, PASS_CATEGORY_DATA_END, PASS_CATEGORY_LIGHT_END, PASS_COMBINED, PASS_CRYPTOMATTE, PASS_DENOISING_ALBEDO, PASS_DENOISING_DEPTH, PASS_DENOISING_NORMAL, PASS_DENOISING_PREVIOUS, PASS_DEPTH, PASS_DIFFUSE, PASS_DIFFUSE_COLOR, PASS_DIFFUSE_DIRECT, PASS_DIFFUSE_INDIRECT, PASS_EMISSION, PASS_GLOSSY, PASS_GLOSSY_COLOR, PASS_GLOSSY_DIRECT, PASS_GLOSSY_INDIRECT, PASS_GUIDING_AVG_ROUGHNESS, PASS_GUIDING_COLOR, PASS_GUIDING_PROBABILITY, PASS_MATERIAL_ID, PASS_MIST, PASS_MOTION, PASS_MOTION_WEIGHT, PASS_NONE, PASS_NORMAL, PASS_NUM, PASS_OBJECT_ID, PASS_POSITION, PASS_RENDER_TIME, PASS_ROUGHNESS, PASS_SAMPLE_COUNT, PASS_SHADOW_CATCHER, PASS_SHADOW_CATCHER_MATTE, PASS_SHADOW_CATCHER_SAMPLE_COUNT, PASS_TRANSMISSION, PASS_TRANSMISSION_COLOR, PASS_TRANSMISSION_DIRECT, PASS_TRANSMISSION_INDIRECT, PASS_UV, PASS_VOLUME, PASS_VOLUME_DIRECT, PASS_VOLUME_INDIRECT, PASS_VOLUME_MAJORANT, PASS_VOLUME_MAJORANT_SAMPLE_COUNT, PASS_VOLUME_SCATTER, PASS_VOLUME_TRANSMIT, PassInfo::scale, PassInfo::support_denoise, time_fast_frequency(), Node::type, PassInfo::use_compositing, PassInfo::use_denoising_albedo, PassInfo::use_exposure, and PassInfo::use_filter.

◆ get_mode_enum()

const NodeEnum * Pass::get_mode_enum ( )
static

Definition at line 116 of file pass.cpp.

References DENOISED, NodeEnum::empty(), NodeEnum::insert(), and NOISY.

Referenced by NODE_DEFINE().

◆ get_offset()

int Pass::get_offset ( const unique_ptr_vector< Pass > & passes,
const Pass * pass )
static

Definition at line 441 of file pass.cpp.

References Pass(), and PASS_UNUSED.

◆ get_type_enum()

◆ is_written()

bool Pass::is_written ( ) const

Definition at line 151 of file pass.cpp.

References get_info(), and PassInfo::is_written.

Referenced by Film::device_update(), Film::get_kernel_features(), and operator<<().

◆ Film

friend class Film
friend

Definition at line 95 of file pass.h.

References Film.

Referenced by Film.

Member Data Documentation

◆ is_auto_

bool Pass::is_auto_
protected

Definition at line 72 of file pass.h.

Referenced by Pass().


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