Blender V4.3
shader_fx.cc File Reference
#include <cstdio>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_shader_fx_types.h"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_screen.hh"
#include "BKE_shader_fx.h"
#include "FX_shader_types.h"
#include "BLO_read_write.hh"

Go to the source code of this file.

Functions

bool BKE_shaderfx_has_gpencil (const Object *ob)
 
void BKE_shaderfx_init ()
 
ShaderFxDataBKE_shaderfx_new (int type)
 
static void shaderfx_free_data_id_us_cb (void *, Object *, ID **idpoin, int cb_flag)
 
void BKE_shaderfx_free_ex (ShaderFxData *fx, const int flag)
 
void BKE_shaderfx_free (ShaderFxData *fx)
 
void BKE_shaderfx_unique_name (ListBase *shaders, ShaderFxData *fx)
 
bool BKE_shaderfx_depends_ontime (ShaderFxData *fx)
 
const ShaderFxTypeInfoBKE_shaderfx_get_info (ShaderFxType type)
 
bool BKE_shaderfx_is_nonlocal_in_liboverride (const Object *ob, const ShaderFxData *shaderfx)
 
void BKE_shaderfxType_panel_id (ShaderFxType type, char *r_idname)
 
void BKE_shaderfx_panel_expand (ShaderFxData *fx)
 
void BKE_shaderfx_copydata_generic (const ShaderFxData *fx_src, ShaderFxData *fx_dst)
 
static void shaderfx_copy_data_id_us_cb (void *, Object *, ID **idpoin, int cb_flag)
 
void BKE_shaderfx_copydata_ex (ShaderFxData *fx, ShaderFxData *target, const int flag)
 
void BKE_shaderfx_copydata (ShaderFxData *fx, ShaderFxData *target)
 
void BKE_shaderfx_copy (ListBase *dst, const ListBase *src)
 
ShaderFxDataBKE_shaderfx_findby_type (Object *ob, ShaderFxType type)
 
void BKE_shaderfx_foreach_ID_link (Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
 
ShaderFxDataBKE_shaderfx_findby_name (Object *ob, const char *name)
 
void BKE_shaderfx_blend_write (BlendWriter *writer, ListBase *fxbase)
 
void BKE_shaderfx_blend_read_data (BlendDataReader *reader, ListBase *lb, Object *ob)
 

Variables

static ShaderFxTypeInfoshader_fx_types [NUM_SHADER_FX_TYPES] = {nullptr}
 

Function Documentation

◆ BKE_shaderfx_blend_read_data()

void BKE_shaderfx_blend_read_data ( BlendDataReader * reader,
ListBase * lb,
Object * ob )

◆ BKE_shaderfx_blend_write()

void BKE_shaderfx_blend_write ( BlendWriter * writer,
ListBase * fxbase )

◆ BKE_shaderfx_copy()

void BKE_shaderfx_copy ( ListBase * dst,
const ListBase * src )

◆ BKE_shaderfx_copydata()

void BKE_shaderfx_copydata ( ShaderFxData * fx,
ShaderFxData * target )

◆ BKE_shaderfx_copydata_ex()

◆ BKE_shaderfx_copydata_generic()

void BKE_shaderfx_copydata_generic ( const ShaderFxData * fx_src,
ShaderFxData * fx_dst )

◆ BKE_shaderfx_depends_ontime()

◆ BKE_shaderfx_findby_name()

ShaderFxData * BKE_shaderfx_findby_name ( Object * ob,
const char * name )

◆ BKE_shaderfx_findby_type()

ShaderFxData * BKE_shaderfx_findby_type ( Object * ob,
ShaderFxType type )

◆ BKE_shaderfx_foreach_ID_link()

◆ BKE_shaderfx_free()

void BKE_shaderfx_free ( ShaderFxData * fx)

Definition at line 110 of file shader_fx.cc.

References BKE_shaderfx_free_ex().

Referenced by blender::ed::object::object_shaderfx_remove().

◆ BKE_shaderfx_free_ex()

◆ BKE_shaderfx_get_info()

◆ BKE_shaderfx_has_gpencil()

bool BKE_shaderfx_has_gpencil ( const Object * ob)

◆ BKE_shaderfx_init()

void BKE_shaderfx_init ( void )

Initialize global data (type info and some common global storage).

Definition at line 48 of file shader_fx.cc.

References shader_fx_types, and shaderfx_type_init().

Referenced by main().

◆ BKE_shaderfx_is_nonlocal_in_liboverride()

bool BKE_shaderfx_is_nonlocal_in_liboverride ( const Object * ob,
const ShaderFxData * shaderfx )

◆ BKE_shaderfx_new()

◆ BKE_shaderfx_panel_expand()

void BKE_shaderfx_panel_expand ( ShaderFxData * fx)

◆ BKE_shaderfx_unique_name()

void BKE_shaderfx_unique_name ( struct ListBase * shaders,
struct ShaderFxData * fx )

◆ BKE_shaderfxType_panel_id()

void BKE_shaderfxType_panel_id ( ShaderFxType type,
char * r_idname )

Get an effect's panel type, which was defined in the panel_register callback.

Note
ShaderFx panel types are assumed to be named with the struct name field concatenated to the defined prefix.

Definition at line 147 of file shader_fx.cc.

References BKE_shaderfx_get_info(), BKE_ST_MAXNAME, BLI_string_join, ShaderFxTypeInfo::name, and SHADERFX_TYPE_PANEL_PREFIX.

Referenced by shaderfx_panel_id(), and shaderfx_panel_register().

◆ shaderfx_copy_data_id_us_cb()

static void shaderfx_copy_data_id_us_cb ( void * ,
Object * ,
ID ** idpoin,
int cb_flag )
static

Definition at line 175 of file shader_fx.cc.

References id_us_plus(), and IDWALK_CB_USER.

Referenced by BKE_shaderfx_copydata_ex().

◆ shaderfx_free_data_id_us_cb()

static void shaderfx_free_data_id_us_cb ( void * ,
Object * ,
ID ** idpoin,
int cb_flag )
static

Definition at line 79 of file shader_fx.cc.

References id_us_min(), and IDWALK_CB_USER.

Referenced by BKE_shaderfx_free_ex().

Variable Documentation

◆ shader_fx_types

ShaderFxTypeInfo* shader_fx_types[NUM_SHADER_FX_TYPES] = {nullptr}
static

Definition at line 32 of file shader_fx.cc.

Referenced by BKE_shaderfx_get_info(), and BKE_shaderfx_init().