Blender V5.0
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

bNodeSocketsocket = 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 103 of file versioning_420.cc.

Member Enumeration Documentation

◆ AlphaState

Enumerator
ALPHA_OPAQUE 
ALPHA_FULLY_TRANSPARENT 
ALPHA_SEMI_TRANSPARENT 
ALPHA_COMPLEX_MIX 

Definition at line 104 of file versioning_420.cc.

Member Function Documentation

◆ add()

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

◆ alpha_source()

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

Definition at line 122 of file versioning_420.cc.

References ALPHA_SEMI_TRANSPARENT.

Referenced by mix(), and versioning_eevee_alpha_source_get().

◆ complex_alpha()

AlphaSource AlphaSource::complex_alpha ( )
inlinestatic

Definition at line 134 of file versioning_420.cc.

References ALPHA_COMPLEX_MIX.

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

◆ fully_transparent()

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

Definition at line 130 of file versioning_420.cc.

References ALPHA_FULLY_TRANSPARENT, and socket.

Referenced by mix(), and versioning_eevee_alpha_source_get().

◆ is_complex()

bool AlphaSource::is_complex ( ) const
inline

Definition at line 155 of file versioning_420.cc.

References ALPHA_COMPLEX_MIX, and state.

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

◆ is_fully_transparent()

bool AlphaSource::is_fully_transparent ( ) const
inline

Definition at line 143 of file versioning_420.cc.

References ALPHA_FULLY_TRANSPARENT, and state.

Referenced by mix().

◆ is_opaque()

bool AlphaSource::is_opaque ( ) const
inline

Definition at line 139 of file versioning_420.cc.

References ALPHA_OPAQUE, and state.

Referenced by mix().

◆ is_semi_transparent()

bool AlphaSource::is_semi_transparent ( ) const
inline

Definition at line 151 of file versioning_420.cc.

References ALPHA_SEMI_TRANSPARENT, and state.

Referenced by add(), and mix().

◆ is_transparent()

bool AlphaSource::is_transparent ( ) const
inline

Definition at line 147 of file versioning_420.cc.

References ALPHA_OPAQUE, and state.

Referenced by add(), and mix().

◆ mix()

◆ opaque()

AlphaSource AlphaSource::opaque ( )
inlinestatic

Definition at line 126 of file versioning_420.cc.

References ALPHA_OPAQUE.

Referenced by mix(), and versioning_eevee_alpha_source_get().

Member Data Documentation

◆ is_transparency

bool AlphaSource::is_transparency = false

Definition at line 120 of file versioning_420.cc.

Referenced by versioning_eevee_material_blend_mode_settings().

◆ socket

bNodeSocket* AlphaSource::socket = nullptr

◆ state

AlphaState AlphaSource::state

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