134 if (type < NUM_SHADER_FX_TYPES && type > 0 &&
shader_fx_types[type]->name[0] !=
'\0') {
169 const char *fx_src_data = ((
const char *)fx_src) + data_size;
170 char *fx_dst_data = ((
char *)fx_dst) + data_size;
172 memcpy(fx_dst_data, fx_src_data,
size_t(fxi->
struct_size) - data_size);
190 target->mode = fx->
mode;
191 target->flag = fx->
flag;
231 for (; fx; fx = fx->
next) {
232 if (fx->
type == type) {
244 for (; fx; fx = fx->
next) {
261 if (fxbase ==
nullptr) {
267 if (fxi ==
nullptr) {
284 fx->flag &= ~eShaderFxFlag_OverrideLibrary_Local;
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ eShaderFxType_GpencilType
@ eShaderFxTypeFlag_EnableInEditmode
#define SHADERFX_TYPE_PANEL_PREFIX
void(* ShaderFxIDWalkFunc)(void *user_data, struct Object *ob, struct ID **idpoin, int cb_flag)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
#define STRNCPY_UTF8(dst, src)
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
#define BLI_string_join(...)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
#define BLO_read_struct_list(reader, struct_name, list)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object is a sort of wrapper for general info.
@ UI_PANEL_DATA_EXPAND_ROOT
@ eShaderFxFlag_OverrideLibrary_Local
struct ShaderFxData ShaderFxData
void shaderfx_type_init(ShaderFxTypeInfo *types[])
Read Guarded memory(de)allocation.
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void BKE_shaderfx_copydata(ShaderFxData *fx, ShaderFxData *target)
ShaderFxData * BKE_shaderfx_new(int type)
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)
ShaderFxData * BKE_shaderfx_findby_type(Object *ob, ShaderFxType type)
void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname)
void BKE_shaderfx_blend_write(BlendWriter *writer, ListBase *fxbase)
void BKE_shaderfx_panel_expand(ShaderFxData *fx)
void BKE_shaderfx_unique_name(ListBase *shaders, ShaderFxData *fx)
void BKE_shaderfx_copy(ListBase *dst, const ListBase *src)
void BKE_shaderfx_free_ex(ShaderFxData *fx, const int flag)
void BKE_shaderfx_blend_read_data(BlendDataReader *reader, ListBase *lb, Object *ob)
void BKE_shaderfx_foreach_ID_link(Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
bool BKE_shaderfx_has_gpencil(const Object *ob)
bool BKE_shaderfx_depends_ontime(ShaderFxData *fx)
bool BKE_shaderfx_is_nonlocal_in_liboverride(const Object *ob, const ShaderFxData *shaderfx)
static ShaderFxTypeInfo * shader_fx_types[NUM_SHADER_FX_TYPES]
static void shaderfx_free_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_free(ShaderFxData *fx)
ShaderFxData * BKE_shaderfx_findby_name(Object *ob, const char *name)
struct ShaderFxData * next
void(* copy_data)(const struct ShaderFxData *fx, struct ShaderFxData *target)
void(* free_data)(struct ShaderFxData *fx)
void(* init_data)(struct ShaderFxData *fx)
void(* foreach_ID_link)(struct ShaderFxData *fx, struct Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
bool(* depends_on_time)(struct ShaderFxData *fx)