Blender  V3.3
Functions | Variables
shader_fx.c File Reference
#include <stdio.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math_vector.h"
#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_gpencil_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_shader_fx_types.h"
#include "BKE_gpencil.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_object.h"
#include "BKE_shader_fx.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "FX_shader_types.h"
#include "BLO_read_write.h"

Go to the source code of this file.

Functions

bool BKE_shaderfx_has_gpencil (const Object *ob)
 
void BKE_shaderfx_init (void)
 
ShaderFxData * BKE_shaderfx_new (int type)
 
static void shaderfx_free_data_id_us_cb (void *UNUSED(userData), Object *UNUSED(ob), ID **idpoin, int cb_flag)
 
void BKE_shaderfx_free_ex (ShaderFxData *fx, const int flag)
 
void BKE_shaderfx_free (ShaderFxData *fx)
 
bool BKE_shaderfx_unique_name (ListBase *shaders, ShaderFxData *fx)
 
bool BKE_shaderfx_depends_ontime (ShaderFxData *fx)
 
const ShaderFxTypeInfo * BKE_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 *UNUSED(userData), Object *UNUSED(ob), 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)
 
ShaderFxData * BKE_shaderfx_findby_type (Object *ob, ShaderFxType type)
 
void BKE_shaderfx_foreach_ID_link (Object *ob, ShaderFxIDWalkFunc walk, void *userData)
 
ShaderFxData * BKE_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)
 
void BKE_shaderfx_blend_read_lib (BlendLibReader *reader, Object *ob)
 

Variables

static ShaderFxTypeInfo * shader_fx_types [NUM_SHADER_FX_TYPES] = {NULL}
 

Function Documentation

◆ BKE_shaderfx_blend_read_data()

void BKE_shaderfx_blend_read_data ( BlendDataReader *  reader,
ListBase *  lb 
)

◆ BKE_shaderfx_blend_read_lib()

void BKE_shaderfx_blend_read_lib ( BlendLibReader *  reader,
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()

void BKE_shaderfx_copydata_ex ( ShaderFxData *  fx,
ShaderFxData *  target,
const int  flag 
)

◆ BKE_shaderfx_copydata_generic()

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

◆ BKE_shaderfx_depends_ontime()

bool BKE_shaderfx_depends_ontime ( ShaderFxData *  fx)

◆ BKE_shaderfx_findby_name()

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

Definition at line 259 of file shader_fx.c.

References BLI_findstring(), and Object::shader_fx.

Referenced by edit_shaderfx_property_get().

◆ BKE_shaderfx_findby_type()

ShaderFxData* BKE_shaderfx_findby_type ( Object *  ob,
ShaderFxType  type 
)

◆ BKE_shaderfx_foreach_ID_link()

void BKE_shaderfx_foreach_ID_link ( Object *  ob,
ShaderFxIDWalkFunc  walk,
void *  userData 
)

◆ BKE_shaderfx_free()

void BKE_shaderfx_free ( ShaderFxData *  fx)

Definition at line 117 of file shader_fx.c.

References BKE_shaderfx_free_ex().

Referenced by object_shaderfx_remove().

◆ BKE_shaderfx_free_ex()

void BKE_shaderfx_free_ex ( ShaderFxData *  fx,
const int  flag 
)

◆ BKE_shaderfx_get_info()

const ShaderFxTypeInfo* BKE_shaderfx_get_info ( ShaderFxType  type)

◆ 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 56 of file shader_fx.c.

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()

ShaderFxData* BKE_shaderfx_new ( int  type)

◆ BKE_shaderfx_panel_expand()

void BKE_shaderfx_panel_expand ( ShaderFxData *  fx)

Definition at line 163 of file shader_fx.c.

References ShaderFxData::ui_expand_flag, and UI_PANEL_DATA_EXPAND_ROOT.

Referenced by outliner_set_properties_tab().

◆ BKE_shaderfx_unique_name()

bool BKE_shaderfx_unique_name ( struct ListBase *  shaderfx,
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 panelRegister callback.

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

Definition at line 155 of file shader_fx.c.

References BKE_shaderfx_get_info(), ShaderFxTypeInfo::name, SHADERFX_TYPE_PANEL_PREFIX, and type.

Referenced by shaderfx_panel_id(), and shaderfx_panel_register().

◆ shaderfx_copy_data_id_us_cb()

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

Definition at line 185 of file shader_fx.c.

References id_us_plus(), IDWALK_CB_USER, and NULL.

Referenced by BKE_shaderfx_copydata_ex().

◆ shaderfx_free_data_id_us_cb()

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

Definition at line 86 of file shader_fx.c.

References id_us_min(), IDWALK_CB_USER, and NULL.

Referenced by BKE_shaderfx_free_ex().

Variable Documentation

◆ shader_fx_types

ShaderFxTypeInfo* shader_fx_types[NUM_SHADER_FX_TYPES] = {NULL}
static

Definition at line 39 of file shader_fx.c.

Referenced by BKE_shaderfx_get_info(), and BKE_shaderfx_init().