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);
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) {
@ LIB_ID_CREATE_NO_USER_REFCOUNT
LibraryForeachIDCallbackFlag
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
bool BKE_shaderfx_depends_ontime(struct ShaderFxData *fx)
@ eShaderFxType_GpencilType
void BKE_shaderfx_init(void)
struct ShaderFxData * BKE_shaderfx_findby_type(struct Object *ob, ShaderFxType type)
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src)
void BKE_shaderfx_free_ex(struct ShaderFxData *fx, int flag)
void BKE_shaderfx_blend_write(struct BlendWriter *writer, struct ListBase *fxbase)
void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname)
bool BKE_shaderfx_has_gpencil(const struct Object *ob)
struct ShaderFxData * BKE_shaderfx_new(int type)
void BKE_shaderfx_free(struct ShaderFxData *fx)
void BKE_shaderfx_copydata(struct ShaderFxData *fx, struct ShaderFxData *target)
void BKE_shaderfx_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb, struct Object *ob)
void BKE_shaderfx_panel_expand(struct ShaderFxData *fx)
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx, struct ShaderFxData *target, int flag)
bool BKE_shaderfx_is_nonlocal_in_liboverride(const struct Object *ob, const struct ShaderFxData *shaderfx)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
struct ShaderFxData * BKE_shaderfx_findby_name(struct Object *ob, const char *name)
void BKE_shaderfx_copydata_generic(const struct ShaderFxData *fx_src, struct ShaderFxData *fx_dst)
void BKE_shaderfx_unique_name(struct ListBase *shaders, struct ShaderFxData *fx)
void(*) ShaderFxIDWalkFunc(void *user_data, struct Object *ob, struct ID **idpoin, LibraryForeachIDCallbackFlag cb_flag)
@ eShaderFxTypeFlag_EnableInEditmode
#define SHADERFX_TYPE_PANEL_PREFIX
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void void void void void BLI_duplicatelist(ListBase *dst, const ListBase *src) ATTR_NONNULL(1
#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)
Object is a sort of wrapper for general info.
@ UI_PANEL_DATA_EXPAND_ROOT
@ eShaderFxFlag_OverrideLibrary_Local
void shaderfx_type_init(ShaderFxTypeInfo *types[])
Read Guarded memory(de)allocation.
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
static void shaderfx_copy_data_id_us_cb(void *, Object *, ID **idpoin, const LibraryForeachIDCallbackFlag cb_flag)
static ShaderFxTypeInfo * shader_fx_types[NUM_SHADER_FX_TYPES]
static void shaderfx_free_data_id_us_cb(void *, Object *, ID **idpoin, const LibraryForeachIDCallbackFlag cb_flag)
struct ShaderFxData * next
void(*) copy_data(const struct ShaderFxData *fx, struct ShaderFxData *target)
void(*) foreach_ID_link(struct ShaderFxData *fx, struct Object *ob, ShaderFxIDWalkFunc walk, void *user_data)
void(*) init_data(struct ShaderFxData *fx)
bool(*) depends_on_time(struct ShaderFxData *fx)
void(*) free_data(struct ShaderFxData *fx)