20#define PTCACHE_CLEAR_ALL 0
21#define PTCACHE_CLEAR_FRAME 1
22#define PTCACHE_CLEAR_BEFORE 2
23#define PTCACHE_CLEAR_AFTER 3
26#define PTCACHE_RESET_DEPSGRAPH 0
27#define PTCACHE_RESET_BAKED 1
28#define PTCACHE_RESET_OUTDATED 2
32#define PTCACHE_EXT ".bphys"
33#define PTCACHE_PATH "blendcache_"
36#define PTCACHE_FILE_READ 0
37#define PTCACHE_FILE_WRITE 1
38#define PTCACHE_FILE_UPDATE 2
41#define PTCACHE_TYPE_SOFTBODY 0
42#define PTCACHE_TYPE_PARTICLES 1
43#define PTCACHE_TYPE_CLOTH 2
44#define PTCACHE_TYPE_SMOKE_DOMAIN 3
45#define PTCACHE_TYPE_SMOKE_HIGHRES 4
46#define PTCACHE_TYPE_DYNAMICPAINT 5
47#define PTCACHE_TYPE_RIGIDBODY 6
50#define PTCACHE_TYPEFLAG_COMPRESS (1 << 16)
51#define PTCACHE_TYPEFLAG_EXTRADATA (1 << 17)
53#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
54#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
57#define PTCACHE_READ_EXACT 1
58#define PTCACHE_READ_INTERPOLATED 2
59#define PTCACHE_READ_OLD 3
102#define PTCACHE_VEL_PER_SEC 1
135 const float *old_data);
204#define PEP_EDIT_RECALC 2
205#define PEP_TRANSFORM 4
358 const struct ListBase *ptcaches_old,
392 const char *name_src,
393 const char *name_dst);
int BKE_ptcache_data_size(int data_type)
void BKE_ptcache_mem_pointers_incr(void *cur[BPHYS_TOT_DATA])
void BKE_ptcache_free_mem(struct ListBase *mem_cache)
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis)
struct PointCache * BKE_ptcache_copy_list(struct ListBase *ptcaches_new, const struct ListBase *ptcaches_old, int flag)
bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis)
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, struct Object *ob, struct RigidBodyWorld *rbw)
void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
void BKE_ptcache_id_from_particles(PTCacheID *pid, struct Object *ob, struct ParticleSystem *psys)
void BKE_ptcache_update_info(PTCacheID *pid)
void BKE_ptcache_validate(struct PointCache *cache, int framenr)
void BKE_ptcache_bake(struct PTCacheBaker *baker)
void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid)
void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, struct Object *ob, struct DynamicPaintSurface *surface)
int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm, void *cur[BPHYS_TOT_DATA])
void BKE_ptcache_id_from_softbody(PTCacheID *pid, struct Object *ob, struct SoftBody *sb)
void BKE_ptcache_disk_to_mem(struct PTCacheID *pid)
bool BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
struct PointCache * BKE_ptcache_add(struct ListBase *ptcaches)
blender::FunctionRef< bool(PTCacheID &pid, ModifierData *md)> PointCacheIdFn
void BKE_ptcache_blend_read_data(struct BlendDataReader *reader, struct ListBase *ptcaches, struct PointCache **ocache, int force_disk)
void BKE_ptcache_load_external(struct PTCacheID *pid)
PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache)
int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index)
void BKE_ptcache_foreach_object_cache(struct Object &ob, struct Scene &scene, bool duplis, PointCacheIdFn fn)
void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
void BKE_ptcache_make_particle_key(struct ParticleKey *key, int index, void **data, float time)
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd)
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
void BKE_ptcache_mem_to_disk(struct PTCacheID *pid)
void BKE_ptcache_free_list(struct ListBase *ptcaches)
@ PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *pid, int mode)
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct FluidModifierData *fmd)
void BKE_ptcache_free(struct PointCache *cache)
void BKE_ptcache_invalidate(struct PointCache *cache)
void BKE_ptcache_disk_cache_rename(struct PTCacheID *pid, const char *name_src, const char *name_dst)
void BKE_ptcache_mem_pointers_init(struct PTCacheMem *pm, void *cur[BPHYS_TOT_DATA])
void BKE_ptcache_blend_write(struct BlendWriter *writer, struct ListBase *ptcaches)
BMesh const char void * data
#define pf(_x, _i)
Prefetch 64.
void(* update_progress)(void *data, float progress, int *cancel)
struct Depsgraph * depsgraph
struct ViewLayer * view_layer
struct PTCacheEditKey * keys
struct ParticleSystemModifierData * psmd
struct ParticleCacheKey ** pathcache
PTCacheEditPoint * points
struct ParticleSystem * psys
struct ParticleSystemModifierData * psmd_eval
struct KDTree_3d * emitter_field
struct ParticleSystem * psys_eval
void * cur[BPHYS_TOT_DATA]
struct PointCache ** cache_ptr
int(* write_stream)(PTCacheFile *pf, void *calldata)
int(* write_point)(int index, void *calldata, void **data, int cfra)
int(* write_header)(PTCacheFile *pf)
void(* read_point)(int index, void *calldata, void **data, float cfra, const float *old_data)
void(* interpolate_extra_data)(void *calldata, struct PTCacheMem *pm, float cfra, float cfra1, float cfra2)
struct ListBase * ptcaches
void(* read_extra_data)(void *calldata, struct PTCacheMem *pm, float cfra)
void(* interpolate_point)(int index, void *calldata, void **data, float cfra, float cfra1, float cfra2, const float *old_data)
unsigned int default_step
int(* totpoint)(void *calldata, int cfra)
int(* totwrite)(void *calldata, int cfra)
void(* write_extra_data)(void *calldata, struct PTCacheMem *pm, int cfra)
int(* read_stream)(PTCacheFile *pf, void *calldata)
void(* error)(const struct ID *owner_id, void *calldata, const char *message)
int(* read_header)(PTCacheFile *pf)
struct PointCache * cache
struct ListBase mem_cache
struct KDTree_3d * emitter_field
struct PTCacheEditPoint * points
struct ParticleData * particles
struct ListBase mem_cache