|
Blender V4.3
|
#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.
Variables | |
| static ShaderFxTypeInfo * | shader_fx_types [NUM_SHADER_FX_TYPES] = {nullptr} |
| void BKE_shaderfx_blend_read_data | ( | BlendDataReader * | reader, |
| ListBase * | lb, | ||
| Object * | ob ) |
Definition at line 275 of file shader_fx.cc.
References BKE_shaderfx_get_info(), BLO_read_struct_list, eShaderFxType_None, ID_IS_LINKED, and LISTBASE_FOREACH.
Referenced by object_blend_read_data().
| void BKE_shaderfx_blend_write | ( | BlendWriter * | writer, |
| ListBase * | fxbase ) |
Definition at line 259 of file shader_fx.cc.
References BKE_shaderfx_get_info(), BLO_write_struct_by_name(), LISTBASE_FOREACH, and ShaderFxTypeInfo::struct_name.
Referenced by object_blend_write().
Definition at line 210 of file shader_fx.cc.
References BKE_shaderfx_copydata(), BLI_duplicatelist(), BLI_listbase_clear(), ListBase::first, and ShaderFxData::next.
| void BKE_shaderfx_copydata | ( | ShaderFxData * | fx, |
| ShaderFxData * | target ) |
Definition at line 205 of file shader_fx.cc.
References BKE_shaderfx_copydata_ex().
Referenced by BKE_shaderfx_copy(), blender::ed::object::shaderfx_copy(), and blender::ed::object::shaderfx_copy_exec().
| void BKE_shaderfx_copydata_ex | ( | ShaderFxData * | fx, |
| ShaderFxData * | target, | ||
| const int | flag ) |
Definition at line 186 of file shader_fx.cc.
References BKE_shaderfx_get_info(), ShaderFxTypeInfo::copy_data, flag, ShaderFxData::flag, ShaderFxTypeInfo::foreach_ID_link, LIB_ID_CREATE_NO_USER_REFCOUNT, ShaderFxData::mode, 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 ShaderFxData * | fx_src, |
| ShaderFxData * | fx_dst ) |
Definition at line 158 of file shader_fx.cc.
References BKE_shaderfx_get_info(), BLI_assert, ShaderFxTypeInfo::free_data, ShaderFxTypeInfo::struct_size, and ShaderFxData::type.
| bool BKE_shaderfx_depends_ontime | ( | ShaderFxData * | fx | ) |
Definition at line 124 of file shader_fx.cc.
References BKE_shaderfx_get_info(), ShaderFxTypeInfo::depends_on_time, and ShaderFxData::type.
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().
| ShaderFxData * BKE_shaderfx_findby_name | ( | Object * | ob, |
| const char * | name ) |
Definition at line 253 of file shader_fx.cc.
References BLI_findstring(), offsetof, and Object::shader_fx.
Referenced by blender::ed::object::edit_shaderfx_property_get().
| ShaderFxData * BKE_shaderfx_findby_type | ( | Object * | ob, |
| ShaderFxType | type ) |
Definition at line 227 of file shader_fx.cc.
References ListBase::first, ShaderFxData::next, Object::shader_fx, and ShaderFxData::type.
Referenced by blender::ed::object::shaderfx_add().
| void BKE_shaderfx_foreach_ID_link | ( | Object * | ob, |
| ShaderFxIDWalkFunc | walk, | ||
| void * | user_data ) |
Definition at line 240 of file shader_fx.cc.
References BKE_shaderfx_get_info(), ListBase::first, ShaderFxTypeInfo::foreach_ID_link, ShaderFxData::next, Object::shader_fx, and ShaderFxData::type.
Referenced by blender::deg::DepsgraphNodeBuilder::build_object(), blender::deg::DepsgraphRelationBuilder::build_object(), and object_foreach_id().
| 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().
| void BKE_shaderfx_free_ex | ( | ShaderFxData * | fx, |
| const int | flag ) |
Definition at line 90 of file shader_fx.cc.
References BKE_shaderfx_get_info(), ShaderFxData::error, flag, ShaderFxTypeInfo::foreach_ID_link, ShaderFxTypeInfo::free_data, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_freeN(), 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 131 of file shader_fx.cc.
References shader_fx_types.
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_spacetype_buttons(), blender::ed::object::shaderfx_add(), blender::ed::object::shaderfx_add_itemf(), shaderfx_panel_header(), and uiTemplateShaderFx().
| bool BKE_shaderfx_has_gpencil | ( | const Object * | ob | ) |
Definition at line 37 of file shader_fx.cc.
References BKE_shaderfx_get_info(), eShaderFxType_GpencilType, LISTBASE_FOREACH, Object::shader_fx, and ShaderFxTypeInfo::type.
| 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().
| bool BKE_shaderfx_is_nonlocal_in_liboverride | ( | const Object * | ob, |
| const ShaderFxData * | shaderfx ) |
Definition at line 141 of file shader_fx.cc.
References eShaderFxFlag_OverrideLibrary_Local, ShaderFxData::flag, and ID_IS_OVERRIDE_LIBRARY.
| ShaderFxData * BKE_shaderfx_new | ( | int | type | ) |
Definition at line 54 of file shader_fx.cc.
References BKE_shaderfx_get_info(), DATA_, eShaderFxFlag_OverrideLibrary_Local, eShaderFxMode_Editmode, eShaderFxMode_Realtime, eShaderFxMode_Render, eShaderFxTypeFlag_EnableInEditmode, ShaderFxData::flag, ShaderFxTypeInfo::flags, ShaderFxTypeInfo::init_data, MEM_callocN, ShaderFxData::mode, ShaderFxData::name, ShaderFxTypeInfo::name, STRNCPY_UTF8, ShaderFxTypeInfo::struct_name, ShaderFxTypeInfo::struct_size, ShaderFxData::type, ShaderFxData::ui_expand_flag, and UI_PANEL_DATA_EXPAND_ROOT.
Referenced by object_copy_data(), blender::ed::object::shaderfx_add(), blender::ed::object::shaderfx_copy(), and blender::ed::object::shaderfx_copy_exec().
| void BKE_shaderfx_panel_expand | ( | ShaderFxData * | fx | ) |
Definition at line 153 of file shader_fx.cc.
References ShaderFxData::ui_expand_flag, and UI_PANEL_DATA_EXPAND_ROOT.
Referenced by blender::ed::outliner::outliner_set_properties_tab().
| void BKE_shaderfx_unique_name | ( | struct ListBase * | shaders, |
| struct ShaderFxData * | fx ) |
Check unique name.
Definition at line 115 of file shader_fx.cc.
References BKE_shaderfx_get_info(), BLI_uniquename(), DATA_, ShaderFxData::name, ShaderFxTypeInfo::name, offsetof, and ShaderFxData::type.
Referenced by blender::ed::object::shaderfx_add(), and blender::ed::object::shaderfx_copy_exec().
| void BKE_shaderfxType_panel_id | ( | ShaderFxType | type, |
| char * | r_idname ) |
Get an effect's panel type, which was defined in the panel_register callback.
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().
Definition at line 175 of file shader_fx.cc.
References id_us_plus(), and IDWALK_CB_USER.
Referenced by BKE_shaderfx_copydata_ex().
Definition at line 79 of file shader_fx.cc.
References id_us_min(), and IDWALK_CB_USER.
Referenced by BKE_shaderfx_free_ex().
|
static |
Definition at line 32 of file shader_fx.cc.
Referenced by BKE_shaderfx_get_info(), and BKE_shaderfx_init().