Blender V4.3
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 617 of file versioning_400.cc.

Member Enumeration Documentation

◆ AlphaState

Enumerator
ALPHA_OPAQUE 
ALPHA_FULLY_TRANSPARENT 
ALPHA_SEMI_TRANSPARENT 
ALPHA_COMPLEX_MIX 

Definition at line 618 of file versioning_400.cc.

Member Function Documentation

◆ add()

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

Definition at line 694 of file versioning_400.cc.

References b, and complex_alpha().

Referenced by versioning_eevee_alpha_source_get().

◆ alpha_source()

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

Definition at line 636 of file versioning_400.cc.

References ALPHA_SEMI_TRANSPARENT.

Referenced by mix(), and versioning_eevee_alpha_source_get().

◆ complex_alpha()

static AlphaSource AlphaSource::complex_alpha ( )
inlinestatic

Definition at line 648 of file versioning_400.cc.

References ALPHA_COMPLEX_MIX.

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

◆ fully_transparent()

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

Definition at line 644 of file versioning_400.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 669 of file versioning_400.cc.

References ALPHA_COMPLEX_MIX, and state.

◆ is_fully_transparent()

bool AlphaSource::is_fully_transparent ( ) const
inline

Definition at line 657 of file versioning_400.cc.

References ALPHA_FULLY_TRANSPARENT, and state.

◆ is_opaque()

bool AlphaSource::is_opaque ( ) const
inline

Definition at line 653 of file versioning_400.cc.

References ALPHA_OPAQUE, and state.

◆ is_semi_transparent()

bool AlphaSource::is_semi_transparent ( ) const
inline

Definition at line 665 of file versioning_400.cc.

References ALPHA_SEMI_TRANSPARENT, and state.

◆ is_transparent()

bool AlphaSource::is_transparent ( ) const
inline

Definition at line 661 of file versioning_400.cc.

References ALPHA_OPAQUE, and state.

◆ mix()

static AlphaSource AlphaSource::mix ( const AlphaSource & a,
const AlphaSource & b,
bNodeSocket * fac )
inlinestatic

◆ opaque()

static AlphaSource AlphaSource::opaque ( )
inlinestatic

Definition at line 640 of file versioning_400.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 634 of file versioning_400.cc.

◆ socket

bNodeSocket* AlphaSource::socket = nullptr

Definition at line 630 of file versioning_400.cc.

Referenced by fully_transparent().

◆ state

AlphaState AlphaSource::state

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