Blender
V3.3
|
#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.
Variables | |
static ShaderFxTypeInfo * | shader_fx_types [NUM_SHADER_FX_TYPES] = {NULL} |
void BKE_shaderfx_blend_read_data | ( | BlendDataReader * | reader, |
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 | ( | BlendLibReader * | reader, |
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 | ( | BlendWriter * | writer, |
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().
Definition at line 220 of file shader_fx.c.
References BKE_shaderfx_copydata(), BLI_duplicatelist(), BLI_listbase_clear(), ListBase::first, ShaderFxData::next, and src.
void BKE_shaderfx_copydata | ( | ShaderFxData * | fx, |
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 | ( | ShaderFxData * | fx, |
ShaderFxData * | target, | ||
const 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 ShaderFxData * | fx_src, |
ShaderFxData * | fx_dst | ||
) |
Definition at line 168 of file shader_fx.c.
References BKE_shaderfx_get_info(), BLI_assert, ShaderFxTypeInfo::freeData, ShaderFxTypeInfo::struct_size, and ShaderFxData::type.
bool BKE_shaderfx_depends_ontime | ( | 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().
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().
ShaderFxData* BKE_shaderfx_findby_type | ( | 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 | ( | 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 | ( | 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 | ( | ShaderFxData * | fx, |
const 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().
Definition at line 44 of file shader_fx.c.
References BKE_shaderfx_get_info(), eShaderFxType_GpencilType, ListBase::first, ShaderFxData::next, Object::shader_fx, ShaderFxTypeInfo::type, and ShaderFxData::type.
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 Object * | ob, |
const ShaderFxData * | shaderfx | ||
) |
Definition at line 149 of file shader_fx.c.
References eShaderFxFlag_OverrideLibrary_Local, ShaderFxData::flag, ID_IS_OVERRIDE_LIBRARY, and NULL.
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 | ( | 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().
|
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().
|
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().
|
static |
Definition at line 39 of file shader_fx.c.
Referenced by BKE_shaderfx_get_info(), and BKE_shaderfx_init().