Blender V5.3
blender::AlphaSource Struct Reference

Public Types

enum  AlphaState { ALPHA_OPAQUE = 0 , ALPHA_FULLY_TRANSPARENT , ALPHA_SEMI_TRANSPARENT , ALPHA_COMPLEX_MIX }

Public Member Functions

bool is_opaque () const
bool is_fully_transparent () const
bool is_transparent () const
bool is_semi_transparent () const
bool is_complex () const

Static Public Member Functions

static AlphaSource alpha_source (bNodeSocket *fac, bool inverted=false)
static AlphaSource opaque ()
static AlphaSource fully_transparent (bNodeSocket *socket=nullptr, bool inverted=false)
static AlphaSource complex_alpha ()
static AlphaSource mix (const AlphaSource &a, const AlphaSource &b, bNodeSocket *fac)
static AlphaSource add (const AlphaSource &a, const AlphaSource &b)

Public Attributes

bNodeSocket * socket = nullptr
AlphaState state
bool is_transparency = false

Detailed Description

Represents a source of transparency inside the closure part of a material node-tree. Sources can be combined together down the tree to figure out where the source of the alpha is. If there is multiple alpha source, we consider the tree as having complex alpha and don't do the versioning.

Definition at line 101 of file versioning_402.cc.

Member Enumeration Documentation

◆ AlphaState

Enumerator
ALPHA_OPAQUE 
ALPHA_FULLY_TRANSPARENT 
ALPHA_SEMI_TRANSPARENT 
ALPHA_COMPLEX_MIX 

Definition at line 102 of file versioning_402.cc.

Member Function Documentation

◆ add()

AlphaSource blender::AlphaSource::add ( const AlphaSource & a,
const AlphaSource & b )
inlinestatic

◆ alpha_source()

AlphaSource blender::AlphaSource::alpha_source ( bNodeSocket * fac,
bool inverted = false )
inlinestatic

Definition at line 120 of file versioning_402.cc.

References ALPHA_SEMI_TRANSPARENT, and inverted().

Referenced by mix(), and blender::versioning_eevee_alpha_source_get().

◆ complex_alpha()

AlphaSource blender::AlphaSource::complex_alpha ( )
inlinestatic

Definition at line 132 of file versioning_402.cc.

References ALPHA_COMPLEX_MIX.

Referenced by add(), mix(), and blender::versioning_eevee_alpha_source_get().

◆ fully_transparent()

AlphaSource blender::AlphaSource::fully_transparent ( bNodeSocket * socket = nullptr,
bool inverted = false )
inlinestatic

Definition at line 128 of file versioning_402.cc.

References ALPHA_FULLY_TRANSPARENT, inverted(), and socket.

Referenced by mix(), and blender::versioning_eevee_alpha_source_get().

◆ is_complex()

bool blender::AlphaSource::is_complex ( ) const
inline

Definition at line 153 of file versioning_402.cc.

References ALPHA_COMPLEX_MIX, and state.

Referenced by add(), mix(), and blender::versioning_eevee_material_blend_mode_settings().

◆ is_fully_transparent()

bool blender::AlphaSource::is_fully_transparent ( ) const
inline

Definition at line 141 of file versioning_402.cc.

References ALPHA_FULLY_TRANSPARENT, and state.

Referenced by mix().

◆ is_opaque()

bool blender::AlphaSource::is_opaque ( ) const
inline

Definition at line 137 of file versioning_402.cc.

References ALPHA_OPAQUE, and state.

Referenced by mix().

◆ is_semi_transparent()

bool blender::AlphaSource::is_semi_transparent ( ) const
inline

Definition at line 149 of file versioning_402.cc.

References ALPHA_SEMI_TRANSPARENT, and state.

Referenced by add(), and mix().

◆ is_transparent()

bool blender::AlphaSource::is_transparent ( ) const
inline

Definition at line 145 of file versioning_402.cc.

References ALPHA_OPAQUE, and state.

Referenced by add(), and mix().

◆ mix()

◆ opaque()

AlphaSource blender::AlphaSource::opaque ( )
inlinestatic

Definition at line 124 of file versioning_402.cc.

References ALPHA_OPAQUE.

Referenced by mix(), and blender::versioning_eevee_alpha_source_get().

Member Data Documentation

◆ is_transparency

bool blender::AlphaSource::is_transparency = false

◆ socket

bNodeSocket* blender::AlphaSource::socket = nullptr

◆ state

AlphaState blender::AlphaSource::state

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