24#define PTCACHE_CLEAR_ALL 0
25#define PTCACHE_CLEAR_FRAME 1
26#define PTCACHE_CLEAR_BEFORE 2
27#define PTCACHE_CLEAR_AFTER 3
30#define PTCACHE_RESET_DEPSGRAPH 0
31#define PTCACHE_RESET_BAKED 1
32#define PTCACHE_RESET_OUTDATED 2
36#define PTCACHE_EXT ".bphys"
37#define PTCACHE_PATH "blendcache_"
40#define PTCACHE_FILE_READ 0
41#define PTCACHE_FILE_WRITE 1
42#define PTCACHE_FILE_UPDATE 2
45#define PTCACHE_TYPE_SOFTBODY 0
46#define PTCACHE_TYPE_PARTICLES 1
47#define PTCACHE_TYPE_CLOTH 2
48#define PTCACHE_TYPE_SMOKE_DOMAIN 3
49#define PTCACHE_TYPE_SMOKE_HIGHRES 4
50#define PTCACHE_TYPE_DYNAMICPAINT 5
51#define PTCACHE_TYPE_RIGIDBODY 6
54#define PTCACHE_TYPEFLAG_COMPRESS (1 << 16)
55#define PTCACHE_TYPEFLAG_EXTRADATA (1 << 17)
57#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
58#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
61#define PTCACHE_READ_EXACT 1
62#define PTCACHE_READ_INTERPOLATED 2
63#define PTCACHE_READ_OLD 3
66struct BlendDataReader;
68struct ClothModifierData;
69struct DynamicPaintSurface;
70struct FluidModifierData;
107#define PTCACHE_VEL_PER_SEC 1
140 const float *old_data);
209#define PEP_EDIT_RECALC 2
210#define PEP_TRANSFORM 4
372 const ListBaseT<PointCache> *ptcaches_old,
406 const char *name_src,
407 const char *name_dst);
426 ListBaseT<PointCache> *ptcaches,
const char * dirname(char *path)
These structs are the foundation for all linked lists in the library system.
#define pf(_x, _i)
Prefetch 64.
int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
int BKE_ptcache_path(PTCacheID *pid, char *dirname)
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
void BKE_ptcache_disk_to_mem(struct PTCacheID *pid)
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *pid, int mode)
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index)
void BKE_ptcache_load_external(struct PTCacheID *pid)
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct FluidModifierData *fmd)
bool BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis)
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd)
void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, struct Object *ob, struct RigidBodyWorld *rbw)
KDTree< VecBase< float, 3 > > KDTree3d
void BKE_ptcache_free(struct PointCache *cache)
void BKE_ptcache_blend_read_data(struct BlendDataReader *reader, ListBaseT< PointCache > *ptcaches, struct PointCache **ocache, int force_disk)
void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
void BKE_ptcache_mem_pointers_incr(void *cur[BPHYS_TOT_DATA])
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
BMesh const char void * data
@ PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL
void BKE_ptcache_bake(struct PTCacheBaker *baker)
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
void BKE_ptcache_ids_from_object(ListBaseT< PTCacheID > *lb, struct Object *ob, struct Scene *scene, int duplis)
void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, struct Object *ob, struct DynamicPaintSurface *surface)
void BKE_ptcache_make_particle_key(struct ParticleKey *key, int index, void **data, float time)
void BKE_ptcache_validate(struct PointCache *cache, int framenr)
void BKE_ptcache_foreach_object_cache(struct Object &ob, struct Scene &scene, bool duplis, PointCacheIdFn fn)
void BKE_ptcache_free_mem(ListBaseT< PTCacheMem > *mem_cache)
void BKE_ptcache_id_from_particles(PTCacheID *pid, struct Object *ob, struct ParticleSystem *psys)
void BKE_ptcache_free_list(ListBaseT< PointCache > *ptcaches)
void BKE_ptcache_mem_to_disk(struct PTCacheID *pid)
struct PointCache * BKE_ptcache_add(ListBaseT< PointCache > *ptcaches)
struct PointCache * BKE_ptcache_copy_list(ListBaseT< PointCache > *ptcaches_new, const ListBaseT< PointCache > *ptcaches_old, int flag)
void BKE_ptcache_blend_write(struct BlendWriter *writer, ListBaseT< PointCache > *ptcaches)
PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache)
void BKE_ptcache_update_info(PTCacheID *pid)
void BKE_ptcache_id_from_softbody(PTCacheID *pid, struct Object *ob, struct SoftBody *sb)
void BKE_ptcache_disk_cache_rename(struct PTCacheID *pid, const char *name_src, const char *name_dst)
int BKE_ptcache_data_size(int data_type)
int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm, void *cur[BPHYS_TOT_DATA])
void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid)
void BKE_ptcache_invalidate(struct PointCache *cache)
void BKE_ptcache_mem_pointers_init(struct PTCacheMem *pm, void *cur[BPHYS_TOT_DATA])
FunctionRef< bool(PTCacheID &pid, ModifierData *md)> PointCacheIdFn
struct Depsgraph * depsgraph
void(*) update_progress(void *data, float progress, int *cancel)
struct ViewLayer * view_layer
struct PTCacheEditKey * keys
ListBaseT< LinkData > pathcachebufs
PTCacheEditPoint * points
struct ParticleSystemModifierData * psmd
struct ParticleSystem * psys
struct ParticleSystem * psys_eval
struct ParticleSystemModifierData * psmd_eval
struct ParticleCacheKey ** pathcache
void * cur[BPHYS_TOT_DATA]
int(*) totwrite(void *calldata, int cfra)
void(*) read_extra_data(void *calldata, struct PTCacheMem *pm, float cfra)
int(*) read_stream(PTCacheFile *pf, void *calldata)
void(*) write_extra_data(void *calldata, struct PTCacheMem *pm, int cfra)
struct PointCache * cache
void(*) interpolate_point(int index, void *calldata, void **data, float cfra, float cfra1, float cfra2, const float *old_data)
void(*) interpolate_extra_data(void *calldata, struct PTCacheMem *pm, float cfra, float cfra1, float cfra2)
unsigned int default_step
struct PointCache ** cache_ptr
int(*) write_header(PTCacheFile *pf)
void(*) error(const struct ID *owner_id, void *calldata, const char *message)
int(*) read_header(PTCacheFile *pf)
int(*) totpoint(void *calldata, int cfra)
void(*) read_point(int index, void *calldata, void **data, float cfra, const float *old_data)
int(*) write_point(int index, void *calldata, void **data, int cfra)
ListBaseT< PointCache > * ptcaches
int(*) write_stream(PTCacheFile *pf, void *calldata)
struct ParticleData * particles
eParticleSystem_Flag psys_flag
struct PTCacheEditPoint * points
ListBaseT< PTCacheMem > mem_cache