|
Blender
V3.3
|
Go to the source code of this file.
Classes | |
| struct | ShaderFxTypeInfo |
Macros | |
| #define | SHADER_FX_ACTIVE(_fx, _is_render) |
| #define | SHADER_FX_EDIT(_fx, _is_edit) ((((_fx)->mode & eShaderFxMode_Editmode) == 0) && (_is_edit)) |
| #define | SHADERFX_TYPE_PANEL_PREFIX "FX_PT_" |
Typedefs | |
| typedef void(* | ShaderFxIDWalkFunc) (void *userData, struct Object *ob, struct ID **idpoin, int cb_flag) |
| typedef void(* | ShaderFxTexWalkFunc) (void *userData, struct Object *ob, struct ShaderFxData *fx, const char *propname) |
| typedef struct ShaderFxTypeInfo | ShaderFxTypeInfo |
Enumerations | |
| enum | ShaderFxTypeType { eShaderFxType_NoneType , eShaderFxType_GpencilType } |
| enum | ShaderFxTypeFlag { eShaderFxTypeFlag_SupportsEditmode = (1 << 0) , eShaderFxTypeFlag_EnableInEditmode = (1 << 2) , eShaderFxTypeFlag_Single = (1 << 4) , eShaderFxTypeFlag_NoUserAdd = (1 << 5) } |
| #define SHADER_FX_ACTIVE | ( | _fx, | |
| _is_render | |||
| ) |
Definition at line 25 of file BKE_shader_fx.h.
| #define SHADER_FX_EDIT | ( | _fx, | |
| _is_edit | |||
| ) | ((((_fx)->mode & eShaderFxMode_Editmode) == 0) && (_is_edit)) |
Definition at line 28 of file BKE_shader_fx.h.
| #define SHADERFX_TYPE_PANEL_PREFIX "FX_PT_" |
Definition at line 136 of file BKE_shader_fx.h.
| typedef void(* ShaderFxIDWalkFunc) (void *userData, struct Object *ob, struct ID **idpoin, int cb_flag) |
Definition at line 53 of file BKE_shader_fx.h.
| typedef void(* ShaderFxTexWalkFunc) (void *userData, struct Object *ob, struct ShaderFxData *fx, const char *propname) |
Definition at line 57 of file BKE_shader_fx.h.
| typedef struct ShaderFxTypeInfo ShaderFxTypeInfo |
| enum ShaderFxTypeFlag |
| Enumerator | |
|---|---|
| eShaderFxTypeFlag_SupportsEditmode | |
| eShaderFxTypeFlag_EnableInEditmode | |
| eShaderFxTypeFlag_Single | |
| eShaderFxTypeFlag_NoUserAdd | |
Definition at line 38 of file BKE_shader_fx.h.
| enum ShaderFxTypeType |
| Enumerator | |
|---|---|
| eShaderFxType_NoneType | |
| eShaderFxType_GpencilType | |
Definition at line 30 of file BKE_shader_fx.h.
| void BKE_shaderfx_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct ListBase * | lb | ||
| ) |
Definition at line 280 of file shader_fx.c.
References BKE_shaderfx_get_info(), BLO_read_list(), eShaderFxType_None, LISTBASE_FOREACH, and NULL.
Referenced by object_blend_read_data().
| void BKE_shaderfx_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct Object * | ob | ||
| ) |
Definition at line 294 of file shader_fx.c.
References BKE_object_modifiers_lib_link_common(), BKE_shaderfx_foreach_ID_link(), eShaderFxFlag_OverrideLibrary_Local, ID_IS_LINKED, LISTBASE_FOREACH, and Object::shader_fx.
Referenced by object_blend_read_lib().
| void BKE_shaderfx_blend_write | ( | struct BlendWriter * | writer, |
| struct ListBase * | fxbase | ||
| ) |
Definition at line 264 of file shader_fx.c.
References BKE_shaderfx_get_info(), BLO_write_struct_by_name(), LISTBASE_FOREACH, NULL, and ShaderFxTypeInfo::struct_name.
Referenced by object_blend_write().
Referenced by ED_object_shaderfx_link().
| void BKE_shaderfx_copydata | ( | struct ShaderFxData * | fx, |
| struct ShaderFxData * | target | ||
| ) |
Definition at line 215 of file shader_fx.c.
References BKE_shaderfx_copydata_ex().
Referenced by BKE_shaderfx_copy(), ED_object_shaderfx_copy(), and shaderfx_copy_exec().
| void BKE_shaderfx_copydata_ex | ( | struct ShaderFxData * | fx, |
| struct ShaderFxData * | target, | ||
| int | flag | ||
| ) |
Definition at line 196 of file shader_fx.c.
References BKE_shaderfx_get_info(), ShaderFxTypeInfo::copyData, ShaderFxData::flag, ShaderFxTypeInfo::foreachIDLink, LIB_ID_CREATE_NO_USER_REFCOUNT, ShaderFxData::mode, NULL, shaderfx_copy_data_id_us_cb(), ShaderFxData::type, and ShaderFxData::ui_expand_flag.
Referenced by BKE_shaderfx_copydata(), and object_copy_data().
| void BKE_shaderfx_copydata_generic | ( | const struct ShaderFxData * | fx_src, |
| struct ShaderFxData * | fx_dst | ||
| ) |
Referenced by copyData().
| bool BKE_shaderfx_depends_ontime | ( | struct ShaderFxData * | fx | ) |
Definition at line 132 of file shader_fx.c.
References BKE_shaderfx_get_info(), ShaderFxTypeInfo::dependsOnTime, and ShaderFxData::type.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().
| struct ShaderFxData* BKE_shaderfx_findby_name | ( | struct 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().
| struct ShaderFxData* BKE_shaderfx_findby_type | ( | struct Object * | ob, |
| ShaderFxType | type | ||
| ) |
Definition at line 233 of file shader_fx.c.
References ListBase::first, ShaderFxData::next, Object::shader_fx, type, and ShaderFxData::type.
Referenced by ED_object_shaderfx_add().
| void BKE_shaderfx_foreach_ID_link | ( | struct Object * | ob, |
| ShaderFxIDWalkFunc | walk, | ||
| void * | userData | ||
| ) |
Definition at line 246 of file shader_fx.c.
References BKE_shaderfx_get_info(), ListBase::first, ShaderFxTypeInfo::foreachIDLink, ShaderFxData::next, Object::shader_fx, and ShaderFxData::type.
Referenced by BKE_shaderfx_blend_read_lib(), blender::deg::DepsgraphNodeBuilder::build_object(), blender::deg::DepsgraphRelationBuilder::build_object(), object_blend_read_expand(), and object_foreach_id().
| void BKE_shaderfx_free | ( | struct ShaderFxData * | fx | ) |
Definition at line 117 of file shader_fx.c.
References BKE_shaderfx_free_ex().
Referenced by object_shaderfx_remove().
| void BKE_shaderfx_free_ex | ( | struct ShaderFxData * | fx, |
| int | flag | ||
| ) |
Definition at line 97 of file shader_fx.c.
References BKE_shaderfx_get_info(), ShaderFxData::error, ShaderFxTypeInfo::foreachIDLink, ShaderFxTypeInfo::freeData, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_freeN, NULL, shaderfx_free_data_id_us_cb(), and ShaderFxData::type.
Referenced by BKE_object_free_shaderfx(), and BKE_shaderfx_free().
| const ShaderFxTypeInfo* BKE_shaderfx_get_info | ( | ShaderFxType | type | ) |
Definition at line 139 of file shader_fx.c.
References NULL, shader_fx_types, and type.
Referenced by BKE_shaderfx_blend_read_data(), BKE_shaderfx_blend_write(), BKE_shaderfx_copydata_ex(), BKE_shaderfx_copydata_generic(), BKE_shaderfx_depends_ontime(), BKE_shaderfx_foreach_ID_link(), BKE_shaderfx_free_ex(), BKE_shaderfx_has_gpencil(), BKE_shaderfx_new(), BKE_shaderfx_unique_name(), BKE_shaderfxType_panel_id(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry(), ED_object_shaderfx_add(), ED_spacetype_buttons(), shaderfx_add_itemf(), shaderfx_panel_header(), and uiTemplateShaderFx().
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().
| bool BKE_shaderfx_is_nonlocal_in_liboverride | ( | const struct Object * | ob, |
| const struct ShaderFxData * | shaderfx | ||
| ) |
Check whether given shaderfx is not local (i.e. from linked data) when the object is a library override.
| shaderfx | May be NULL, in which case we consider it as a non-local shaderfx case. |
Referenced by edit_shaderfx_poll_generic().
| struct ShaderFxData* BKE_shaderfx_new | ( | int | type | ) |
Definition at line 62 of file shader_fx.c.
References BKE_shaderfx_get_info(), BLI_strncpy(), DATA_, eShaderFxFlag_OverrideLibrary_Local, eShaderFxMode_Editmode, eShaderFxMode_Realtime, eShaderFxMode_Render, eShaderFxTypeFlag_EnableInEditmode, ShaderFxData::flag, ShaderFxTypeInfo::flags, ShaderFxTypeInfo::initData, MEM_callocN, ShaderFxData::mode, ShaderFxTypeInfo::name, ShaderFxData::name, ShaderFxTypeInfo::struct_name, ShaderFxTypeInfo::struct_size, type, ShaderFxData::type, and ShaderFxData::ui_expand_flag.
Referenced by ED_object_shaderfx_add(), ED_object_shaderfx_copy(), object_copy_data(), and shaderfx_copy_exec().
| void BKE_shaderfx_panel_expand | ( | struct 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().
| bool BKE_shaderfx_unique_name | ( | struct ListBase * | shaderfx, |
| struct ShaderFxData * | fx | ||
| ) |
Check unique name.
Definition at line 122 of file shader_fx.c.
References BKE_shaderfx_get_info(), BLI_uniquename(), DATA_, ShaderFxTypeInfo::name, ShaderFxData::name, blender::draw::image_engine::shaders, and ShaderFxData::type.
Referenced by ED_object_shaderfx_add(), and shaderfx_copy_exec().
| void BKE_shaderfxType_panel_id | ( | ShaderFxType | type, |
| char * | r_idname | ||
| ) |
Get an effect's panel type, which was defined in the panelRegister callback.
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().