Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/shader_fx.c
| Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | void BKE_shaderfx_copydata_ex(ShaderFxData *fx, ShaderFxData *target, const int flag) | ||||
| } | } | ||||
| } | } | ||||
| void BKE_shaderfx_copydata(ShaderFxData *fx, ShaderFxData *target) | void BKE_shaderfx_copydata(ShaderFxData *fx, ShaderFxData *target) | ||||
| { | { | ||||
| BKE_shaderfx_copydata_ex(fx, target, 0); | BKE_shaderfx_copydata_ex(fx, target, 0); | ||||
| } | } | ||||
| void BKE_shaderfx_copy(ListBase *dst, const ListBase *src) | |||||
| { | |||||
| ShaderFxData *fx; | |||||
| ShaderFxData *srcfx; | |||||
| BLI_listbase_clear(dst); | |||||
| BLI_duplicatelist(dst, src); | |||||
| for (srcfx = src->first, fx = dst->first; srcfx && fx; srcfx = srcfx->next, fx = fx->next) { | |||||
| BKE_shaderfx_copydata(srcfx, fx); | |||||
| } | |||||
| } | |||||
| ShaderFxData *BKE_shaderfx_findby_type(Object *ob, ShaderFxType type) | ShaderFxData *BKE_shaderfx_findby_type(Object *ob, ShaderFxType type) | ||||
| { | { | ||||
| ShaderFxData *fx = ob->shader_fx.first; | ShaderFxData *fx = ob->shader_fx.first; | ||||
| for (; fx; fx = fx->next) { | for (; fx; fx = fx->next) { | ||||
| if (fx->type == type) { | if (fx->type == type) { | ||||
| break; | break; | ||||
| } | } | ||||
| Show All 27 Lines | |||||