|
Blender V4.5
|
#include <algorithm>#include <cstdio>#include <cstdlib>#include <cstring>#include <sys/stat.h>#include <sys/types.h>#include <dirent.h>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_ID.h"#include "DNA_dynamicpaint_types.h"#include "DNA_fluid_types.h"#include "DNA_modifier_types.h"#include "DNA_object_force_types.h"#include "DNA_object_types.h"#include "DNA_particle_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "DNA_space_types.h"#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_appdir.hh"#include "BKE_cloth.hh"#include "BKE_collection.hh"#include "BKE_duplilist.hh"#include "BKE_dynamicpaint.h"#include "BKE_fluid.h"#include "BKE_global.hh"#include "BKE_lib_id.hh"#include "BKE_library.hh"#include "BKE_main.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_particle.h"#include "BKE_pointcache.h"#include "BKE_scene.hh"#include "BKE_softbody.h"#include "BLO_read_write.hh"#include "DEG_depsgraph_query.hh"#include "BIK_api.h"Go to the source code of this file.
Macros | |
| #define | LZO_OUT_LEN(size) |
| #define | PTCACHE_DATA_FROM(data, type, from) |
| #define | PTCACHE_DATA_TO(data, type, index, to) |
| #define | DURIAN_POINTCACHE_LIB_OK 1 |
| #define | DPAINT_CACHE_VERSION "1.01" |
| #define | MAX_PTCACHE_PATH FILE_MAX |
| #define | MAX_PTCACHE_FILE (FILE_MAX * 2) |
Functions | |
| static int | ptcache_file_compressed_read (PTCacheFile *pf, uchar *result, uint len) |
| static int | ptcache_file_compressed_write (PTCacheFile *pf, uchar *in, uint in_len, uchar *out, int mode) |
| static int | ptcache_file_write (PTCacheFile *pf, const void *f, uint tot, uint size) |
| static int | ptcache_file_read (PTCacheFile *pf, void *f, uint tot, uint size) |
| static int | ptcache_basic_header_read (PTCacheFile *pf) |
| static int | ptcache_basic_header_write (PTCacheFile *pf) |
| static void | ptcache_add_extra_data (PTCacheMem *pm, uint type, uint count, void *data) |
| static int | ptcache_softbody_write (int index, void *soft_v, void **data, int) |
| static void | ptcache_softbody_read (int index, void *soft_v, void **data, float, const float *old_data) |
| static void | ptcache_softbody_interpolate (int index, void *soft_v, void **data, float cfra, float cfra1, float cfra2, const float *old_data) |
| static int | ptcache_softbody_totpoint (void *soft_v, int) |
| static void | ptcache_softbody_error (const ID *, void *, const char *) |
| void | BKE_ptcache_make_particle_key (ParticleKey *key, int index, void **data, float time) |
| static int | ptcache_particle_write (int index, void *psys_v, void **data, int cfra) |
| static void | ptcache_particle_read (int index, void *psys_v, void **data, float cfra, const float *old_data) |
| static void | ptcache_particle_interpolate (int index, void *psys_v, void **data, float cfra, float cfra1, float cfra2, const float *old_data) |
| static int | ptcache_particle_totpoint (void *psys_v, int) |
| static void | ptcache_particle_error (const ID *, void *, const char *) |
| static int | ptcache_particle_totwrite (void *psys_v, int cfra) |
| static void | ptcache_particle_extra_write (void *psys_v, PTCacheMem *pm, int) |
| static void | ptcache_particle_extra_read (void *psys_v, PTCacheMem *pm, float) |
| static int | ptcache_cloth_write (int index, void *cloth_v, void **data, int) |
| static void | ptcache_cloth_read (int index, void *cloth_v, void **data, float, const float *old_data) |
| static void | ptcache_cloth_interpolate (int index, void *cloth_v, void **data, float cfra, float cfra1, float cfra2, const float *old_data) |
| static void | ptcache_cloth_extra_write (void *cloth_v, PTCacheMem *pm, int) |
| static void | ptcache_cloth_extra_read (void *cloth_v, PTCacheMem *pm, float) |
| static int | ptcache_cloth_totpoint (void *cloth_v, int) |
| static void | ptcache_cloth_error (const ID *owner_id, void *cloth_v, const char *message) |
| static int | ptcache_dynamicpaint_totpoint (void *sd, int) |
| static void | ptcache_dynamicpaint_error (const ID *, void *, const char *) |
| static int | ptcache_dynamicpaint_write (PTCacheFile *pf, void *dp_v) |
| static int | ptcache_dynamicpaint_read (PTCacheFile *pf, void *dp_v) |
| static int | ptcache_rigidbody_write (int index, void *rb_v, void **data, int) |
| static void | ptcache_rigidbody_read (int index, void *rb_v, void **data, float, const float *old_data) |
| static void | ptcache_rigidbody_interpolate (int index, void *rb_v, void **data, float cfra, float cfra1, float cfra2, const float *old_data) |
| static int | ptcache_rigidbody_totpoint (void *rb_v, int) |
| static void | ptcache_rigidbody_error (const ID *, void *, const char *) |
| void | BKE_ptcache_id_from_softbody (PTCacheID *pid, Object *ob, SoftBody *sb) |
| void | BKE_ptcache_id_from_particles (PTCacheID *pid, Object *ob, ParticleSystem *psys) |
| void | BKE_ptcache_id_from_cloth (PTCacheID *pid, Object *ob, ClothModifierData *clmd) |
| void | BKE_ptcache_id_from_smoke (PTCacheID *pid, Object *ob, FluidModifierData *fmd) |
| void | BKE_ptcache_id_from_dynamicpaint (PTCacheID *pid, Object *ob, DynamicPaintSurface *surface) |
| void | BKE_ptcache_id_from_rigidbody (PTCacheID *pid, Object *ob, RigidBodyWorld *rbw) |
| PTCacheID | BKE_ptcache_id_find (Object *ob, Scene *scene, PointCache *cache) |
| static bool | foreach_object_particle_ptcache (Object *object, PointCacheIdFn callback) |
| static bool | foreach_object_modifier_ptcache (Object *object, PointCacheIdFn callback) |
| static bool | foreach_object_ptcache (Scene *scene, Object *object, int duplis, PointCacheIdFn callback) |
| void | BKE_ptcache_ids_from_object (ListBase *lb, Object *ob, Scene *scene, int duplis) |
| void | BKE_ptcache_foreach_object_cache (Object &ob, Scene &scene, bool duplis, PointCacheIdFn fn) |
| bool | BKE_ptcache_object_has (Scene *scene, Object *ob, int duplis) |
| static const char * | ptcache_file_extension (const PTCacheID *pid) |
| static int | ptcache_frame_from_filename (const char *filename, const char *ext) |
| static int | ptcache_path (PTCacheID *pid, char dirname[MAX_PTCACHE_PATH]) |
| static size_t | ptcache_filepath_ext_append (PTCacheID *pid, char filepath[MAX_PTCACHE_FILE], const size_t filepath_len, const bool use_frame_number, const int cfra) |
| static int | ptcache_filepath (PTCacheID *pid, char filepath[MAX_PTCACHE_FILE], int cfra, const bool do_path, const bool do_ext) |
| static PTCacheFile * | ptcache_file_open (PTCacheID *pid, int mode, int cfra) |
| static void | ptcache_file_close (PTCacheFile *pf) |
| static int | ptcache_file_data_read (PTCacheFile *pf) |
| static int | ptcache_file_data_write (PTCacheFile *pf) |
| static int | ptcache_file_header_begin_read (PTCacheFile *pf) |
| static int | ptcache_file_header_begin_write (PTCacheFile *pf) |
| int | BKE_ptcache_data_size (int data_type) |
| static void | ptcache_file_pointers_init (PTCacheFile *pf) |
| int | BKE_ptcache_mem_index_find (PTCacheMem *pm, uint index) |
| void | BKE_ptcache_mem_pointers_init (PTCacheMem *pm, void *cur[BPHYS_TOT_DATA]) |
| void | BKE_ptcache_mem_pointers_incr (void *cur[BPHYS_TOT_DATA]) |
| int | BKE_ptcache_mem_pointers_seek (int point_index, PTCacheMem *pm, void *cur[BPHYS_TOT_DATA]) |
| static void | ptcache_data_alloc (PTCacheMem *pm) |
| static void | ptcache_data_free (PTCacheMem *pm) |
| static void | ptcache_data_copy (void *from[], void *to[]) |
| static void | ptcache_extra_free (PTCacheMem *pm) |
| static void | ptcache_mem_clear (PTCacheMem *pm) |
| static int | ptcache_old_elemsize (PTCacheID *pid) |
| static void | ptcache_find_frames_around (PTCacheID *pid, uint frame, int *r_fra1, int *r_fra2) |
| static PTCacheMem * | ptcache_disk_frame_to_mem (PTCacheID *pid, int cfra) |
| static int | ptcache_mem_frame_to_disk (PTCacheID *pid, PTCacheMem *pm) |
| static int | ptcache_read_stream (PTCacheID *pid, int cfra) |
| static int | ptcache_read (PTCacheID *pid, int cfra) |
| static int | ptcache_interpolate (PTCacheID *pid, float cfra, int cfra1, int cfra2) |
| int | BKE_ptcache_read (PTCacheID *pid, float cfra, bool no_extrapolate_old) |
| static int | ptcache_write_stream (PTCacheID *pid, int cfra, int totpoint) |
| static int | ptcache_write (PTCacheID *pid, int cfra, int overwrite) |
| static int | ptcache_write_needed (PTCacheID *pid, int cfra, int *overwrite) |
| int | BKE_ptcache_write (PTCacheID *pid, uint cfra) |
| void | BKE_ptcache_id_clear (PTCacheID *pid, int mode, uint cfra) |
| bool | BKE_ptcache_id_exist (PTCacheID *pid, int cfra) |
| void | BKE_ptcache_id_time (PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale) |
| int | BKE_ptcache_id_reset (Scene *scene, PTCacheID *pid, int mode) |
| int | BKE_ptcache_object_reset (Scene *scene, Object *ob, int mode) |
| PointCache * | BKE_ptcache_add (ListBase *ptcaches) |
| void | BKE_ptcache_free_mem (ListBase *mem_cache) |
| void | BKE_ptcache_free (PointCache *cache) |
| void | BKE_ptcache_free_list (ListBase *ptcaches) |
| static PointCache * | ptcache_copy (PointCache *cache, const bool copy_data) |
| PointCache * | BKE_ptcache_copy_list (ListBase *ptcaches_new, const ListBase *ptcaches_old, const int flag) |
| void | BKE_ptcache_quick_cache_all (Main *bmain, Scene *scene, ViewLayer *view_layer) |
| static void | ptcache_dt_to_str (char *str, size_t str_maxncpy, double dtime) |
| void | BKE_ptcache_bake (PTCacheBaker *baker) |
| void | BKE_ptcache_disk_to_mem (PTCacheID *pid) |
| void | BKE_ptcache_mem_to_disk (PTCacheID *pid) |
| void | BKE_ptcache_toggle_disk_cache (PTCacheID *pid) |
| void | BKE_ptcache_disk_cache_rename (PTCacheID *pid, const char *name_src, const char *name_dst) |
| void | BKE_ptcache_load_external (PTCacheID *pid) |
| void | BKE_ptcache_update_info (PTCacheID *pid) |
| void | BKE_ptcache_validate (PointCache *cache, int framenr) |
| void | BKE_ptcache_invalidate (PointCache *cache) |
| void | BKE_ptcache_blend_write (BlendWriter *writer, ListBase *ptcaches) |
| static void | direct_link_pointcache_mem (BlendDataReader *reader, PTCacheMem *pm) |
| static void | direct_link_pointcache (BlendDataReader *reader, PointCache *cache) |
| void | BKE_ptcache_blend_read_data (BlendDataReader *reader, ListBase *ptcaches, PointCache **ocache, int force_disk) |
Variables | |
| static CLG_LogRef | LOG = {"bke.pointcache"} |
| static int | ptcache_data_size [] |
| static int | ptcache_extra_datasize [] |
| #define DPAINT_CACHE_VERSION "1.01" |
Definition at line 678 of file pointcache.cc.
Referenced by ptcache_dynamicpaint_read(), and ptcache_dynamicpaint_write().
| #define DURIAN_POINTCACHE_LIB_OK 1 |
Definition at line 107 of file pointcache.cc.
| #define LZO_OUT_LEN | ( | size | ) |
Definition at line 86 of file pointcache.cc.
Referenced by ptcache_dynamicpaint_write(), ptcache_file_compressed_write(), and ptcache_mem_frame_to_disk().
| #define MAX_PTCACHE_FILE (FILE_MAX * 2) |
Definition at line 1311 of file pointcache.cc.
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_exist(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), ptcache_file_open(), ptcache_filepath(), and ptcache_filepath_ext_append().
| #define MAX_PTCACHE_PATH FILE_MAX |
Definition at line 1310 of file pointcache.cc.
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), and ptcache_path().
| #define PTCACHE_DATA_FROM | ( | data, | |
| type, | |||
| from ) |
Definition at line 92 of file pointcache.cc.
Referenced by ptcache_cloth_write(), ptcache_particle_write(), ptcache_rigidbody_write(), and ptcache_softbody_write().
| #define PTCACHE_DATA_TO | ( | data, | |
| type, | |||
| index, | |||
| to ) |
Definition at line 98 of file pointcache.cc.
Referenced by BKE_ptcache_make_particle_key(), ptcache_cloth_read(), ptcache_particle_read(), ptcache_rigidbody_interpolate(), ptcache_rigidbody_read(), and ptcache_softbody_read().
| PointCache * BKE_ptcache_add | ( | ListBase * | ptcaches | ) |
Definition at line 3020 of file pointcache.cc.
References BLI_addtail(), PointCache::endframe, PointCache::index, MEM_callocN(), PointCache::startframe, and PointCache::step.
Referenced by BKE_fluid_modifier_create_type_data(), BKE_modifier_blend_write(), blo_do_versions_280(), blo_do_versions_pre250(), dynamicPaint_createNewSurface(), init_data(), object_add_or_copy_particle_system(), ptcache_add_new_exec(), and sbNew().
| void BKE_ptcache_bake | ( | struct PTCacheBaker * | baker | ) |
Bake cache or simulate to current frame with settings defined in the baker. if bake is not given run simulations to current frame.
Definition at line 3162 of file pointcache.cc.
References PTCacheBaker::anim_init, PTCacheBaker::bake, PTCacheBaker::bake_job, BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), BKE_ptcache_ids_from_object(), BKE_ptcache_write(), BKE_scene_graph_update_for_newframe(), BLI_assert, BLI_freelistN(), BLI_time_now_seconds(), PTCacheID::cache, PTCacheID::calldata, RenderData::cfra, DEG_get_evaluated(), depsgraph, PTCacheBaker::depsgraph, PointCache::endframe, ListBase::first, PointCache::flag, RenderData::framelen, G, GS, ID_OB, PointCache::last_exact, LISTBASE_FOREACH, MAX_DUPLI_RECUR, MAXFRAME, ID::name, PTCacheID::next, Base::object, PTCacheID::owner_id, ParticleSystem::part, PART_EMITTER, PART_HAIR, PART_PHYS_KEYED, ParticleSettings::phystype, PTCacheBaker::pid, printf, progress, psys_eval_get(), psys_get_pointcache_start_end(), PTCACHE_BAKED, PTCACHE_BAKING, PTCACHE_CLEAR_ALL, PTCACHE_DISK_CACHE, ptcache_dt_to_str(), PTCACHE_OUTDATED, PTCACHE_REDO_NEEDED, PTCACHE_SIMULATION_VALID, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_RIGIDBODY, PTCACHE_TYPE_SMOKE_DOMAIN, PTCACHE_TYPE_SMOKE_HIGHRES, PTCacheBaker::quick_step, Scene::r, PTCacheBaker::render, PTCacheBaker::scene, SETLOOPER_VIEW_LAYER, RenderData::sfra, PointCache::startframe, ParticleSettings::type, PTCacheID::type, PTCacheBaker::update_progress, and PTCacheBaker::view_layer.
Referenced by BKE_ptcache_quick_cache_all(), ptcache_bake_exec(), ptcache_job_startjob(), and update_physics_cache().
| void BKE_ptcache_blend_read_data | ( | BlendDataReader * | reader, |
| ListBase * | ptcaches, | ||
| PointCache ** | ocache, | ||
| int | force_disk ) |
Definition at line 3900 of file pointcache.cc.
References BLO_read_struct, BLO_read_struct_list, direct_link_pointcache(), ListBase::first, ListBase::last, LISTBASE_FOREACH, and PTCACHE_DISK_CACHE.
Referenced by BKE_modifier_blend_read_data(), BKE_particle_system_blend_read_data(), object_blend_read_data(), and scene_blend_read_data().
| void BKE_ptcache_blend_write | ( | BlendWriter * | writer, |
| ListBase * | ptcaches ) |
Definition at line 3806 of file pointcache.cc.
References BKE_ptcache_data_size(), BLI_assert_unreachable, BLO_write_float_array(), BLO_write_struct, BLO_write_struct_array, BLO_write_uint32_array(), BPHYS_DATA_BOIDS, BPHYS_DATA_INDEX, BPHYS_EXTRA_CLOTH_ACCELERATION, BPHYS_EXTRA_FLUID_SPRINGS, BPHYS_TOT_DATA, i, LISTBASE_FOREACH, and PTCACHE_DISK_CACHE.
Referenced by BKE_modifier_blend_write(), BKE_particle_system_blend_write(), object_blend_write(), and scene_blend_write().
| PointCache * BKE_ptcache_copy_list | ( | ListBase * | ptcaches_new, |
| const ListBase * | ptcaches_old, | ||
| const int | flag ) |
Definition at line 3106 of file pointcache.cc.
References BLI_addtail(), BLI_listbase_clear(), ListBase::first, flag, LIB_ID_COPY_CACHES, PointCache::next, and ptcache_copy().
| int BKE_ptcache_data_size | ( | int | data_type | ) |
Size of cache data type.
Definition at line 1708 of file pointcache.cc.
References ptcache_data_size.
Referenced by BKE_ptcache_blend_write(), and direct_link_pointcache_mem().
| void BKE_ptcache_disk_cache_rename | ( | struct PTCacheID * | pid, |
| const char * | name_src, | ||
| const char * | name_dst ) |
Rename all disk cache files with a new name. Doesn't touch the actual content of the files.
Definition at line 3528 of file pointcache.cc.
References BLI_path_join, BLI_rename_overwrite(), PTCacheID::cache, closedir(), dirent::d_name, len, MAX_PTCACHE_FILE, MAX_PTCACHE_PATH, PointCache::name, opendir(), ptcache_filepath(), ptcache_filepath_ext_append(), ptcache_frame_from_filename(), ptcache_path(), readdir(), STREQ, STREQLEN, and STRNCPY().
| void BKE_ptcache_disk_to_mem | ( | struct PTCacheID * | pid | ) |
Convert disk cache to memory cache.
Definition at line 3432 of file pointcache.cc.
References BKE_ptcache_id_clear(), BLI_addtail(), PTCacheID::cache, PointCache::endframe, PointCache::flag, PointCache::mem_cache, PTCACHE_BAKED, PTCACHE_CLEAR_ALL, ptcache_disk_frame_to_mem(), and PointCache::startframe.
Referenced by BKE_ptcache_toggle_disk_cache(), and psys_make_temp_pointcache().
| void BKE_ptcache_foreach_object_cache | ( | Object & | ob, |
| Scene & | scene, | ||
| bool | duplis, | ||
| PointCacheIdFn | fn ) |
Definition at line 1257 of file pointcache.cc.
References foreach_object_ptcache().
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_pointcache().
| void BKE_ptcache_free | ( | PointCache * | cache | ) |
Definition at line 3047 of file pointcache.cc.
References BKE_ptcache_free_mem(), PointCache::cached_frames, PointCache::edit, PointCache::free_edit, PointCache::mem_cache, and MEM_freeN().
Referenced by BKE_ptcache_free_list(), and ptcache_remove_exec().
| void BKE_ptcache_free_list | ( | ListBase * | ptcaches | ) |
Definition at line 3058 of file pointcache.cc.
References BKE_ptcache_free(), and BLI_pophead().
Referenced by BKE_fluid_modifier_copy(), BKE_modifier_blend_write(), BKE_rigidbody_free_world(), copy_data(), dynamicPaint_freeSurface(), dynamicPaint_Modifier_copy(), fluid_modifier_freeDomain(), free_data(), psys_free(), and sbFree().
| void BKE_ptcache_free_mem | ( | ListBase * | mem_cache | ) |
Definition at line 3035 of file pointcache.cc.
References BLI_freelistN(), ListBase::first, PTCacheMem::next, and ptcache_mem_clear().
Referenced by BKE_ptcache_free(), psys_clear_temp_pointcache(), undoptcache_free_data(), and undoptcache_to_editcache().
Definition at line 2595 of file pointcache.cc.
References BKE_ptcache_id_exist(), BLI_delete(), BLI_freelinkN(), BLI_freelistN(), BLI_path_join, BLI_strncpy(), PTCacheID::cache, PointCache::cached_frames, closedir(), dirent::d_name, PointCache::endframe, ListBase::first, PointCache::flag, PTCacheMem::frame, PointCache::last_exact, len, ID::lib, MAX_PTCACHE_FILE, MAX_PTCACHE_PATH, MEM_allocN_len, PointCache::mem_cache, PTCacheMem::next, opendir(), PTCacheID::owner_id, PTCACHE_BAKED, PTCACHE_CLEAR_AFTER, PTCACHE_CLEAR_ALL, PTCACHE_CLEAR_BEFORE, PTCACHE_CLEAR_FRAME, PTCACHE_DISK_CACHE, ptcache_filepath(), ptcache_filepath_ext_append(), PTCACHE_FLAG_INFO_DIRTY, ptcache_frame_from_filename(), PTCACHE_IGNORE_CLEAR, ptcache_mem_clear(), ptcache_path(), readdir(), PointCache::startframe, and STREQLEN.
Referenced by BKE_ptcache_bake(), BKE_ptcache_disk_to_mem(), BKE_ptcache_id_reset(), BKE_ptcache_mem_to_disk(), BKE_ptcache_read(), BKE_ptcache_toggle_disk_cache(), cloth_clear_cache(), free_hair(), psys_changed_type(), psys_prepare_physics(), ptcache_mem_frame_to_disk(), ptcache_write_needed(), ptcache_write_stream(), and system_step().
| bool BKE_ptcache_id_exist | ( | PTCacheID * | pid, |
| int | cfra ) |
Definition at line 2747 of file pointcache.cc.
References BLI_exists(), PTCacheID::cache, PointCache::cached_frames, PointCache::endframe, ListBase::first, PointCache::flag, PTCacheMem::frame, MAX_PTCACHE_FILE, PointCache::mem_cache, PTCacheMem::next, PTCACHE_DISK_CACHE, ptcache_filepath(), and PointCache::startframe.
Referenced by BKE_ptcache_id_clear(), BKE_ptcache_read(), BKE_ptcache_update_info(), ptcache_find_frames_around(), ptcache_write(), and ptcache_write_needed().
| PTCacheID BKE_ptcache_id_find | ( | struct Object * | ob, |
| struct Scene * | scene, | ||
| struct PointCache * | cache ) |
| ob | Optional, may be NULL. |
| scene | Optional may be NULL. |
Definition at line 1096 of file pointcache.cc.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), LISTBASE_FOREACH, MAX_DUPLI_RECUR, and result.
Referenced by ptcache_add_new_exec(), ptcache_baker_create(), and ptcache_remove_exec().
| void BKE_ptcache_id_from_cloth | ( | PTCacheID * | pid, |
| Object * | ob, | ||
| ClothModifierData * | clmd ) |
Definition at line 966 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, BPHYS_DATA_XCONST, PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, PTCacheID::data_types, PTCacheID::default_step, PTCacheID::error, PTCacheID::file_type, Object::id, PointCache::index, PTCacheID::info_types, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PTCacheID::max_step, PTCacheID::owner_id, ClothModifierData::point_cache, ptcache_basic_header_read(), ptcache_basic_header_write(), ptcache_cloth_error(), ptcache_cloth_extra_read(), ptcache_cloth_extra_write(), ptcache_cloth_interpolate(), ptcache_cloth_read(), ptcache_cloth_totpoint(), ptcache_cloth_write(), PTCACHE_FILE_PTCACHE, PTCACHE_TYPE_CLOTH, ClothModifierData::ptcaches, PTCacheID::ptcaches, PTCacheID::read_extra_data, PTCacheID::read_header, PTCacheID::read_point, PTCacheID::read_stream, PTCacheID::stack_index, PTCacheID::totpoint, PTCacheID::totwrite, PTCacheID::type, PTCacheID::write_extra_data, PTCacheID::write_header, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_object_reset(), cloth_clear_cache(), clothModifier_do(), and foreach_object_modifier_ptcache().
| void BKE_ptcache_id_from_dynamicpaint | ( | PTCacheID * | pid, |
| Object * | ob, | ||
| DynamicPaintSurface * | surface ) |
Definition at line 1020 of file pointcache.cc.
References BPHYS_DATA_DYNAMICPAINT, PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, PTCacheID::data_types, PTCacheID::default_step, PTCacheID::error, PTCacheID::file_type, Object::id, PointCache::index, PTCacheID::info_types, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PTCacheID::max_step, PTCacheID::owner_id, DynamicPaintSurface::pointcache, ptcache_basic_header_read(), ptcache_basic_header_write(), ptcache_dynamicpaint_error(), ptcache_dynamicpaint_read(), ptcache_dynamicpaint_totpoint(), ptcache_dynamicpaint_write(), PTCACHE_FILE_PTCACHE, PTCACHE_TYPE_DYNAMICPAINT, DynamicPaintSurface::ptcaches, PTCacheID::ptcaches, PTCacheID::read_extra_data, PTCacheID::read_header, PTCacheID::read_point, PTCacheID::read_stream, PTCacheID::stack_index, PTCacheID::totpoint, PTCacheID::totwrite, PTCacheID::type, PTCacheID::write_extra_data, PTCacheID::write_header, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_object_reset(), dynamicPaint_frameUpdate(), and foreach_object_modifier_ptcache().
| void BKE_ptcache_id_from_particles | ( | PTCacheID * | pid, |
| Object * | ob, | ||
| ParticleSystem * | psys ) |
Definition at line 902 of file pointcache.cc.
References ParticleSettings::avefac, ParticleSettings::avemode, BPHYS_DATA_AVELOCITY, BPHYS_DATA_BOIDS, BPHYS_DATA_INDEX, BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_TIMES, BPHYS_DATA_VELOCITY, PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, PTCacheID::data_types, PTCacheID::default_step, PTCacheID::error, PTCacheID::file_type, ParticleSettings::flag, PTCacheID::flag, SPHFluidSettings::flag, ParticleSettings::fluid, Object::id, PointCache::index, PTCacheID::info_types, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PTCacheID::max_step, PTCacheID::owner_id, ParticleSystem::part, PART_AVE_RAND, PART_HAIR, PART_PHYS_BOIDS, PART_PHYS_FLUID, PART_ROT_VEL, PART_ROTATIONS, ParticleSettings::phystype, ParticleSystem::pointcache, ptcache_basic_header_read(), ptcache_basic_header_write(), PTCACHE_FILE_PTCACHE, ptcache_particle_error(), ptcache_particle_extra_read(), ptcache_particle_extra_write(), ptcache_particle_interpolate(), ptcache_particle_read(), ptcache_particle_totpoint(), ptcache_particle_totwrite(), ptcache_particle_write(), PTCACHE_TYPE_PARTICLES, PTCACHE_VEL_PER_SEC, ParticleSystem::ptcaches, PTCacheID::ptcaches, PTCacheID::read_extra_data, PTCacheID::read_header, PTCacheID::read_point, PTCacheID::read_stream, ParticleSettings::rotmode, SPH_VISCOELASTIC_SPRINGS, PTCacheID::stack_index, PTCacheID::totpoint, PTCacheID::totwrite, ParticleSettings::type, PTCacheID::type, PTCacheID::write_extra_data, PTCacheID::write_header, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_bake(), BKE_ptcache_object_reset(), foreach_object_particle_ptcache(), free_hair(), psys_changed_type(), psys_make_temp_pointcache(), psys_prepare_physics(), and system_step().
| void BKE_ptcache_id_from_rigidbody | ( | PTCacheID * | pid, |
| Object * | ob, | ||
| RigidBodyWorld * | rbw ) |
Definition at line 1058 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, PTCacheID::data_types, PTCacheID::default_step, PTCacheID::error, PTCacheID::file_type, Object::id, PointCache::index, PTCacheID::info_types, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PTCacheID::max_step, PTCacheID::owner_id, RigidBodyWorld_Shared::pointcache, ptcache_basic_header_read(), ptcache_basic_header_write(), PTCACHE_FILE_PTCACHE, ptcache_rigidbody_error(), ptcache_rigidbody_interpolate(), ptcache_rigidbody_read(), ptcache_rigidbody_totpoint(), ptcache_rigidbody_write(), PTCACHE_TYPE_RIGIDBODY, PTCacheID::ptcaches, RigidBodyWorld_Shared::ptcaches, PTCacheID::read_extra_data, PTCacheID::read_header, PTCacheID::read_point, PTCacheID::read_stream, RigidBodyWorld::shared, PTCacheID::stack_index, PTCacheID::totpoint, PTCacheID::totwrite, PTCacheID::type, PTCacheID::write_extra_data, PTCacheID::write_header, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_object_reset(), foreach_object_ptcache(), and scene_lib_override_apply_post().
| void BKE_ptcache_id_from_smoke | ( | PTCacheID * | pid, |
| struct Object * | ob, | ||
| struct FluidModifierData * | fmd ) |
The fluid modifier does not actually use this anymore, but some parts of Blender expect that it still has a point cache currently. For example, the fluid modifier uses DEG_add_collision_relations, which internally creates relations with the point cache.
Definition at line 1003 of file pointcache.cc.
References PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, FluidModifierData::domain, Object::id, PointCache::index, PTCacheID::owner_id, FluidDomainSettings::point_cache, PTCACHE_TYPE_SMOKE_DOMAIN, FluidDomainSettings::ptcaches, PTCacheID::ptcaches, PTCacheID::stack_index, and PTCacheID::type.
Referenced by BKE_ptcache_object_reset(), and foreach_object_modifier_ptcache().
Definition at line 866 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, PTCacheID::cache, PTCacheID::cache_ptr, PTCacheID::calldata, PTCacheID::data_types, PTCacheID::default_step, PTCacheID::error, PTCacheID::file_type, Object::id, PointCache::index, PTCacheID::info_types, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PTCacheID::max_step, PTCacheID::owner_id, SoftBody_Shared::pointcache, ptcache_basic_header_read(), ptcache_basic_header_write(), PTCACHE_FILE_PTCACHE, ptcache_softbody_error(), ptcache_softbody_interpolate(), ptcache_softbody_read(), ptcache_softbody_totpoint(), ptcache_softbody_write(), PTCACHE_TYPE_SOFTBODY, PTCacheID::ptcaches, SoftBody_Shared::ptcaches, PTCacheID::read_extra_data, PTCacheID::read_header, PTCacheID::read_point, PTCacheID::read_stream, SoftBody::shared, PTCacheID::stack_index, PTCacheID::totpoint, PTCacheID::totwrite, PTCacheID::type, PTCacheID::write_extra_data, PTCacheID::write_header, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_object_reset(), foreach_object_ptcache(), and sbObjectStep().
Definition at line 2875 of file pointcache.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_invalidate(), PTCacheID::cache, PTCacheID::calldata, RenderData::cfra, clear(), cloth_free_modifier(), dynamicPaint_clearSurface(), PointCache::flag, psys_reset(), PSYS_RESET_DEPSGRAPH, PTCACHE_BAKED, PTCACHE_CLEAR_AFTER, PTCACHE_CLEAR_ALL, PTCACHE_OUTDATED, PTCACHE_REDO_NEEDED, PTCACHE_RESET_BAKED, PTCACHE_RESET_DEPSGRAPH, PTCACHE_RESET_OUTDATED, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_DYNAMICPAINT, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_SOFTBODY, Scene::r, reset(), sbFreeSimulation(), and PTCacheID::type.
Referenced by BKE_ptcache_object_reset(), clothModifier_do(), dynamicPaint_frameUpdate(), sbObjectStep(), and system_step().
| void BKE_ptcache_id_time | ( | PTCacheID * | pid, |
| Scene * | scene, | ||
| float | cfra, | ||
| int * | startframe, | ||
| int * | endframe, | ||
| float * | timescale ) |
Definition at line 2778 of file pointcache.cc.
References BKE_scene_ctime_get(), BKE_scene_frame_to_ctime(), PTCacheID::cache, PointCache::cached_frames, PointCache::cached_frames_len, RenderData::cfra, closedir(), dirent::d_name, PointCache::endframe, ListBase::first, PointCache::flag, PTCacheMem::frame, len, MAX_PTCACHE_FILE, MAX_PTCACHE_PATH, PointCache::mem_cache, MEM_calloc_arrayN(), MEM_freeN(), PTCacheMem::next, opendir(), PTCACHE_DISK_CACHE, ptcache_filepath(), ptcache_filepath_ext_append(), ptcache_frame_from_filename(), ptcache_path(), Scene::r, readdir(), PointCache::startframe, and STREQLEN.
Referenced by BKE_ptcache_toggle_disk_cache(), clothModifier_do(), dynamicPaint_frameUpdate(), sbObjectStep(), and system_step().
Definition at line 1246 of file pointcache.cc.
References BLI_addtail(), ListBase::first, foreach_object_ptcache(), ListBase::last, and MEM_mallocN().
Referenced by BKE_ptcache_bake(), BKE_ptcache_id_find(), blo_do_versions_250(), blender::ed::object::editmode_exit_ex(), object_cacheIgnoreClear(), object_lib_override_apply_post(), pe_get_current(), ptcache_free_bake_all_exec(), blender::ed::transform::special_aftertrans_update__object(), and timeline_draw_cache().
| void BKE_ptcache_invalidate | ( | struct PointCache * | cache | ) |
Set correct flags after unsuccessful simulation step.
Definition at line 3797 of file pointcache.cc.
References PointCache::flag, PointCache::last_exact, PTCACHE_SIMULATION_VALID, PointCache::simframe, and PointCache::startframe.
Referenced by BKE_ptcache_id_reset(), clothModifier_do(), do_init_cloth(), psys_reset(), sbObjectStep(), and system_step().
| void BKE_ptcache_load_external | ( | struct PTCacheID * | pid | ) |
Loads simulation from external (disk) cache files.
Definition at line 3585 of file pointcache.cc.
References PTCacheID::cache, PointCache::cached_frames, PointCache::cached_frames_len, closedir(), dirent::d_name, PointCache::endframe, PointCache::flag, PointCache::index, len, MAX_PTCACHE_FILE, MAX_PTCACHE_PATH, MAXFRAME, MEM_freeN(), opendir(), pf, PTCACHE_BAKED, PTCACHE_DISK_CACHE, ptcache_file_close(), ptcache_file_extension(), ptcache_file_header_begin_read(), ptcache_file_open(), PTCACHE_FILE_READ, ptcache_file_read(), ptcache_filepath(), PTCACHE_FLAG_INFO_DIRTY, ptcache_frame_from_filename(), PTCACHE_FRAMES_SKIPPED, ptcache_old_elemsize(), PTCACHE_OUTDATED, ptcache_path(), PTCACHE_READ_INFO, PTCACHE_SIMULATION_VALID, PTCACHE_TYPE_SMOKE_DOMAIN, PTCacheID::read_header, readdir(), SNPRINTF, PointCache::startframe, STREQLEN, STRNCPY(), PointCache::totpoint, and PTCacheID::type.
| void BKE_ptcache_make_particle_key | ( | ParticleKey * | key, |
| int | index, | ||
| void ** | data, | ||
| float | time ) |
Definition at line 258 of file pointcache.cc.
References ParticleKey::ave, BPHYS_DATA_AVELOCITY, BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, ParticleKey::co, data, OB_NEGX, OB_POSZ, PTCACHE_DATA_TO, ParticleKey::rot, ParticleKey::time, vec_to_quat(), and ParticleKey::vel.
Referenced by get_pointcache_keys_for_time(), ptcache_cloth_interpolate(), ptcache_particle_interpolate(), ptcache_particle_read(), and ptcache_softbody_interpolate().
| int BKE_ptcache_mem_index_find | ( | struct PTCacheMem * | pm, |
| unsigned int | index ) |
Is point with index in memory cache? Check to see if point number "index" is in pm (uses binary search for index data).
Definition at line 1731 of file pointcache.cc.
References BPHYS_DATA_INDEX, data, PTCacheMem::data, and PTCacheMem::totpoint.
Referenced by BKE_ptcache_mem_pointers_seek(), get_pointcache_keys_for_time(), get_pointcache_times_for_particle(), and psys_get_dietime_from_cache().
| void BKE_ptcache_mem_pointers_incr | ( | void * | cur[BPHYS_TOT_DATA] | ) |
Definition at line 1776 of file pointcache.cc.
References BPHYS_TOT_DATA, i, and ptcache_data_size.
Referenced by PE_create_particle_edit(), ptcache_disk_frame_to_mem(), ptcache_interpolate(), ptcache_mem_frame_to_disk(), ptcache_read(), ptcache_write(), and undoptcache_to_editcache().
| void BKE_ptcache_mem_pointers_init | ( | PTCacheMem * | pm, |
| void * | cur[BPHYS_TOT_DATA] ) |
Definition at line 1766 of file pointcache.cc.
References BPHYS_TOT_DATA, PTCacheMem::data, PTCacheMem::data_types, and i.
Referenced by ptcache_disk_frame_to_mem(), ptcache_interpolate(), ptcache_mem_frame_to_disk(), ptcache_read(), ptcache_write(), and undoptcache_to_editcache().
| int BKE_ptcache_mem_pointers_seek | ( | int | point_index, |
| PTCacheMem * | pm, | ||
| void * | cur[BPHYS_TOT_DATA] ) |
Definition at line 1786 of file pointcache.cc.
References BKE_ptcache_mem_index_find(), BPHYS_TOT_DATA, PTCacheMem::data, PTCacheMem::data_types, i, and ptcache_data_size.
Referenced by PE_create_particle_edit(), and ptcache_write().
| void BKE_ptcache_mem_to_disk | ( | struct PTCacheID * | pid | ) |
Convert memory cache to disk cache.
Definition at line 3456 of file pointcache.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_write(), PTCacheID::cache, ListBase::first, PointCache::flag, PointCache::mem_cache, PTCacheMem::next, PTCACHE_BAKED, PTCACHE_CLEAR_ALL, PTCACHE_DISK_CACHE, and ptcache_mem_frame_to_disk().
Referenced by BKE_ptcache_toggle_disk_cache().
Check whether object has a point cache.
Definition at line 1262 of file pointcache.cc.
References foreach_object_ptcache().
Referenced by blender::deg::DepsgraphNodeBuilder::build_object_pointcache(), and blender::deg::DepsgraphRelationBuilder::build_particle_systems().
Definition at line 2935 of file pointcache.cc.
References BIK_clear_cache(), BKE_ptcache_id_from_cloth(), BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_from_particles(), BKE_ptcache_id_from_rigidbody(), BKE_ptcache_id_from_smoke(), BKE_ptcache_id_from_softbody(), BKE_ptcache_id_reset(), PTCacheID::cache, FluidDomainSettings::cache_type, DynamicPaintModifierData::canvas, FluidModifierData::domain, eModifierType_Cloth, eModifierType_DynamicPaint, eModifierType_Fluid, ListBase::first, PointCache::flag, RigidBodyOb::flag, FLUID_DOMAIN_CACHE_REPLAY, ID_RECALC_PSYS_CHILD, ID_RECALC_PSYS_REDO, LISTBASE_FOREACH, MOD_FLUID_TYPE_DOMAIN, Object::modifiers, DynamicPaintSurface::next, OB_ARMATURE, PART_HAIR, Object::particlesystem, Object::pose, PSYS_RESET_ALL, PTCACHE_BAKED, PTCACHE_OUTDATED, RBO_FLAG_NEEDS_RESHAPE, reset(), Object::rigidbody_constraint, Object::rigidbody_object, Scene::rigidbody_world, Object::soft, DynamicPaintCanvasSettings::surfaces, FluidModifierData::type, and Object::type.
Referenced by BKE_object_eval_ptcache_reset(), blender::ed::sculpt_paint::dyntopo::disable(), blender::ed::object::editmode_exit_ex(), and blender::ed::transform::special_aftertrans_update__object().
| void BKE_ptcache_quick_cache_all | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct ViewLayer * | view_layer ) |
Bakes cache with cache_step sized jumps in time, not accurate but very fast.
Definition at line 3126 of file pointcache.cc.
References PTCacheBaker::anim_init, PTCacheBaker::bake, BKE_ptcache_bake(), PTCacheBaker::bmain, Scene::physics_settings, PhysicsSettings::quick_cache_step, PTCacheBaker::quick_step, PTCacheBaker::render, PTCacheBaker::scene, and PTCacheBaker::view_layer.
| int BKE_ptcache_read | ( | PTCacheID * | pid, |
| float | cfra, | ||
| bool | no_extrapolate_old ) |
Main cache reading call which reads cache from disk or memory. Possible to get old or interpolated result.
Definition at line 2283 of file pointcache.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_id_exist(), PTCacheID::cache, PTCacheID::calldata, PointCache::flag, floor, PTCacheID::interpolate_point, PointCache::last_exact, PTCACHE_CLEAR_AFTER, ptcache_find_frames_around(), PTCACHE_FRAMES_SKIPPED, ptcache_interpolate(), PTCACHE_OUTDATED, ptcache_read(), PTCACHE_READ_EXACT, PTCACHE_READ_INFO, PTCACHE_READ_INTERPOLATED, PTCACHE_READ_OLD, ptcache_read_stream(), PTCacheID::read_point, PTCacheID::read_stream, ret, PointCache::simframe, and PTCacheID::totpoint.
Referenced by clothModifier_do(), dynamicPaint_frameUpdate(), sbObjectStep(), and system_step().
| void BKE_ptcache_toggle_disk_cache | ( | struct PTCacheID * | pid | ) |
Convert disk cache to memory cache and vice versa. Clears the cache that was converted.
Definition at line 3483 of file pointcache.cc.
References BKE_main_blendfile_path_from_global(), BKE_object_delete_ptcache(), BKE_ptcache_disk_to_mem(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_mem_to_disk(), PTCacheID::cache, PointCache::cached_frames, PointCache::cached_frames_len, PointCache::flag, G, G_DEBUG, PointCache::index, PointCache::last_exact, MEM_freeN(), PTCacheID::owner_id, printf, PTCACHE_CLEAR_ALL, PTCACHE_DISK_CACHE, and PTCACHE_FLAG_INFO_DIRTY.
| void BKE_ptcache_update_info | ( | PTCacheID * | pid | ) |
Definition at line 3698 of file pointcache.cc.
References BKE_ptcache_id_exist(), BLI_str_format_byte_unit(), BLI_STR_FORMAT_INT32_GROUPED_SIZE, BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE, BLI_str_format_int_grouped(), BPHYS_TOT_DATA, PTCacheID::cache, PTCacheID::calldata, PTCacheMem::data, PointCache::endframe, PTCacheMem::extradata, ListBase::first, PointCache::flag, i, PointCache::info, PointCache::last_exact, LISTBASE_FOREACH, MEM_allocN_len, PointCache::mem_cache, PTCacheMem::next, PTCACHE_DISK_CACHE, PTCACHE_EXTERNAL, PTCACHE_FLAG_INFO_DIRTY, PTCACHE_FRAMES_SKIPPED, PTCACHE_OUTDATED, PTCACHE_TYPE_SMOKE_DOMAIN, RPT_, SNPRINTF, PointCache::startframe, STRNCPY(), PointCache::totpoint, PTCacheID::totpoint, and PTCacheID::type.
| void BKE_ptcache_validate | ( | struct PointCache * | cache, |
| int | framenr ) |
Set correct flags after successful simulation step.
Definition at line 3790 of file pointcache.cc.
References PointCache::flag, PTCACHE_SIMULATION_VALID, and PointCache::simframe.
Referenced by clothModifier_do(), dynamicPaint_frameUpdate(), sbObjectStep(), and system_step().
Main cache writing call. Writes cache to disk or memory.
Definition at line 2543 of file pointcache.cc.
References PTCacheID::cache, PointCache::cached_frames, PTCacheID::calldata, PTCacheID::data_types, error(), PointCache::flag, PTCacheID::info_types, PointCache::last_exact, PTCACHE_FLAG_INFO_DIRTY, PTCACHE_FRAMES_SKIPPED, ptcache_write(), ptcache_write_needed(), ptcache_write_stream(), PointCache::startframe, PTCacheID::totpoint, PTCacheID::write_point, and PTCacheID::write_stream.
Referenced by BKE_ptcache_bake(), BKE_ptcache_mem_to_disk(), clothModifier_do(), dynamicPaint_frameUpdate(), sbObjectStep(), and system_step().
|
static |
Definition at line 3880 of file pointcache.cc.
References BLI_listbase_clear(), BLO_read_struct_list, PointCache::cached_frames, PointCache::cached_frames_len, direct_link_pointcache_mem(), PointCache::edit, PointCache::flag, PointCache::free_edit, LISTBASE_FOREACH, PointCache::mem_cache, PTCACHE_DISK_CACHE, PTCACHE_SIMULATION_VALID, and PointCache::simframe.
Referenced by BKE_ptcache_blend_read_data().
|
static |
Definition at line 3849 of file pointcache.cc.
References BKE_ptcache_data_size(), BLO_read_float_array(), BLO_read_struct_array, BLO_read_struct_list, BLO_read_uint32_array(), BPHYS_DATA_BOIDS, BPHYS_DATA_INDEX, BPHYS_EXTRA_CLOTH_ACCELERATION, BPHYS_EXTRA_FLUID_SPRINGS, BPHYS_TOT_DATA, PTCacheMem::data, PTCacheMem::extradata, i, LISTBASE_FOREACH, and PTCacheMem::totpoint.
Referenced by direct_link_pointcache().
|
static |
Definition at line 1158 of file pointcache.cc.
References BKE_ptcache_id_from_cloth(), BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_from_smoke(), DynamicPaintModifierData::canvas, eModifierType_Cloth, eModifierType_DynamicPaint, eModifierType_Fluid, ListBase::first, MOD_FLUID_TYPE_DOMAIN, Object::modifiers, DynamicPaintSurface::next, ModifierData::next, DynamicPaintCanvasSettings::surfaces, and FluidModifierData::type.
Referenced by foreach_object_ptcache().
|
static |
Definition at line 1126 of file pointcache.cc.
References BKE_ptcache_id_from_particles(), ELEM, ListBase::first, ParticleSystem::next, PART_FLUID, PART_HAIR, PART_PHYS_KEYED, PART_PHYS_NO, Object::particlesystem, and PSYS_HAIR_DYNAMICS.
Referenced by foreach_object_ptcache().
|
static |
Definition at line 1197 of file pointcache.cc.
References BKE_ptcache_id_from_rigidbody(), BKE_ptcache_id_from_softbody(), FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_OBJECT_RECURSIVE_END, foreach_object_modifier_ptcache(), foreach_object_particle_ptcache(), foreach_object_ptcache(), Object::instance_collection, Object::rigidbody_object, Scene::rigidbody_world, and Object::soft.
Referenced by BKE_ptcache_foreach_object_cache(), BKE_ptcache_ids_from_object(), BKE_ptcache_object_has(), and foreach_object_ptcache().
|
static |
Definition at line 164 of file pointcache.cc.
References BLI_addtail(), count, data, PTCacheExtra::data, PTCacheMem::extradata, MEM_callocN(), MEM_mallocN(), ptcache_extra_datasize, size(), PTCacheExtra::totdata, and PTCacheExtra::type.
Referenced by ptcache_cloth_extra_write(), and ptcache_particle_extra_write().
|
static |
Definition at line 136 of file pointcache.cc.
Referenced by BKE_ptcache_id_from_cloth(), BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_from_particles(), BKE_ptcache_id_from_rigidbody(), and BKE_ptcache_id_from_softbody().
|
static |
Definition at line 151 of file pointcache.cc.
References pf.
Referenced by BKE_ptcache_id_from_cloth(), BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_from_particles(), BKE_ptcache_id_from_rigidbody(), and BKE_ptcache_id_from_softbody().
|
static |
Definition at line 650 of file pointcache.cc.
References BKE_modifier_set_error(), BLI_assert, GS, ClothModifierData::hairdata, ID_OB, ClothModifierData::modifier, and ID::name.
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 626 of file pointcache.cc.
References Cloth::average_acceleration, BPHYS_EXTRA_CLOTH_ACCELERATION, ClothModifierData::clothObject, copy_v3_v3(), PTCacheExtra::data, PTCacheMem::extradata, ListBase::first, PTCacheExtra::next, PTCacheExtra::type, and zero_v3().
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 617 of file pointcache.cc.
References Cloth::average_acceleration, BPHYS_EXTRA_CLOTH_ACCELERATION, ClothModifierData::clothObject, is_zero_v3(), and ptcache_add_extra_data().
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 573 of file pointcache.cc.
References BKE_ptcache_make_particle_key(), ClothModifierData::clothObject, ParticleKey::co, copy_v3_v3(), data, mul_v3_fl(), psys_interpolate_particle(), ClothVertex::v, ParticleKey::vel, Cloth::verts, and ClothVertex::x.
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 555 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, BPHYS_DATA_XCONST, ClothModifierData::clothObject, data, PTCACHE_DATA_TO, ClothVertex::v, Cloth::verts, ClothVertex::x, and ClothVertex::xconst.
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 644 of file pointcache.cc.
References ClothModifierData::clothObject, and Cloth::mvert_num.
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 543 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, BPHYS_DATA_XCONST, ClothModifierData::clothObject, data, PTCACHE_DATA_FROM, ClothVertex::v, Cloth::verts, ClothVertex::x, and ClothVertex::xconst.
Referenced by BKE_ptcache_id_from_cloth().
|
static |
Definition at line 3065 of file pointcache.cc.
References BLI_addtail(), BLI_listbase_clear(), BPHYS_TOT_DATA, PointCache::cached_frames, PointCache::cached_frames_len, copy_data(), PTCacheMem::data, PointCache::edit, PointCache::flag, i, LISTBASE_FOREACH, PointCache::mem_cache, MEM_dupallocN(), PTCACHE_DISK_CACHE, PTCACHE_EXTERNAL, PTCACHE_IGNORE_LIBPATH, and PointCache::simframe.
Referenced by BKE_ptcache_copy_list().
|
static |
Definition at line 1807 of file pointcache.cc.
References BPHYS_TOT_DATA, PTCacheMem::data, PTCacheMem::data_types, i, MEM_callocN(), ptcache_data_size, and PTCacheMem::totpoint.
Referenced by ptcache_disk_frame_to_mem(), and ptcache_write().
|
static |
Definition at line 1830 of file pointcache.cc.
References BPHYS_TOT_DATA, i, and ptcache_data_size.
Referenced by ptcache_disk_frame_to_mem(), and ptcache_mem_frame_to_disk().
|
static |
Definition at line 1819 of file pointcache.cc.
References BPHYS_TOT_DATA, data, PTCacheMem::data, i, and MEM_freeN().
Referenced by ptcache_mem_clear().
|
static |
Definition at line 1936 of file pointcache.cc.
References BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BLI_addtail(), BPHYS_TOT_DATA, PTCacheExtra::data, PTCacheMem::data, PTCacheMem::data_types, error(), PTCacheMem::extradata, PTCacheMem::frame, G, G_DEBUG, i, MEM_callocN(), MEM_freeN(), pf, printf, ptcache_data_alloc(), ptcache_data_copy(), ptcache_data_size, ptcache_extra_datasize, ptcache_file_close(), ptcache_file_compressed_read(), ptcache_file_data_read(), ptcache_file_header_begin_read(), ptcache_file_open(), ptcache_file_pointers_init(), PTCACHE_FILE_READ, ptcache_file_read(), ptcache_mem_clear(), PTCACHE_TYPEFLAG_COMPRESS, PTCACHE_TYPEFLAG_EXTRADATA, PTCacheID::read_header, PTCacheExtra::totdata, PTCacheMem::totpoint, PTCacheExtra::type, and PTCacheID::type.
Referenced by BKE_ptcache_disk_to_mem(), ptcache_interpolate(), ptcache_read(), and ptcache_write().
|
static |
Definition at line 3142 of file pointcache.cc.
References BLI_snprintf(), and str.
Referenced by BKE_ptcache_bake().
|
static |
Definition at line 671 of file pointcache.cc.
Referenced by BKE_ptcache_id_from_dynamicpaint().
|
static |
Definition at line 717 of file pointcache.cc.
References CLOG_ERROR, DynamicPaintSurface::data, DPAINT_CACHE_VERSION, ELEM, DynamicPaintSurface::format, LOG, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, pf, ptcache_file_compressed_read(), ptcache_file_read(), STREQLEN, PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, and UNPACK4.
Referenced by BKE_ptcache_id_from_dynamicpaint().
|
static |
Definition at line 660 of file pointcache.cc.
References DynamicPaintSurface::data, and PaintSurfaceData::total_points.
Referenced by BKE_ptcache_id_from_dynamicpaint().
|
static |
Definition at line 680 of file pointcache.cc.
References DynamicPaintSurface::data, DPAINT_CACHE_VERSION, ELEM, DynamicPaintSurface::format, LZO_OUT_LEN, MEM_callocN(), MEM_freeN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, out, pf, PTCACHE_COMPRESS_LZO, ptcache_file_compressed_write(), ptcache_file_write(), PaintSurfaceData::total_points, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
Referenced by BKE_ptcache_id_from_dynamicpaint().
|
static |
Definition at line 1842 of file pointcache.cc.
References BLI_freelistN(), PTCacheExtra::data, PTCacheMem::extradata, ListBase::first, MEM_freeN(), and PTCacheExtra::next.
Referenced by ptcache_mem_clear().
|
static |
Definition at line 1498 of file pointcache.cc.
References MEM_freeN(), and pf.
Referenced by BKE_ptcache_load_external(), ptcache_disk_frame_to_mem(), ptcache_mem_frame_to_disk(), ptcache_read_stream(), and ptcache_write_stream().
|
static |
Definition at line 1506 of file pointcache.cc.
References in, len, MEM_calloc_arrayN(), MEM_freeN(), pf, ptcache_file_read(), result, and size().
Referenced by ptcache_disk_frame_to_mem(), and ptcache_dynamicpaint_read().
|
static |
Definition at line 1554 of file pointcache.cc.
References in, LZO_OUT_LEN, MEM_calloc_arrayN(), MEM_freeN(), out, pf, PTCACHE_COMPRESS_LZMA, PTCACHE_COMPRESS_LZO, ptcache_file_write(), and size().
Referenced by ptcache_dynamicpaint_write(), and ptcache_mem_frame_to_disk().
|
static |
Definition at line 1633 of file pointcache.cc.
References BPHYS_TOT_DATA, i, pf, ptcache_data_size, and ptcache_file_read().
Referenced by ptcache_disk_frame_to_mem().
|
static |
Definition at line 1646 of file pointcache.cc.
References BPHYS_TOT_DATA, i, pf, ptcache_data_size, and ptcache_file_write().
Referenced by ptcache_mem_frame_to_disk().
|
static |
Definition at line 1274 of file pointcache.cc.
References PTCacheID::file_type, PTCACHE_EXT, and PTCACHE_FILE_PTCACHE.
Referenced by BKE_ptcache_load_external(), and ptcache_filepath_ext_append().
|
static |
Definition at line 1660 of file pointcache.cc.
References BLI_fseek(), error(), pf, PTCACHE_TYPEFLAG_FLAGMASK, PTCACHE_TYPEFLAG_TYPEMASK, and STREQLEN.
Referenced by BKE_ptcache_load_external(), ptcache_disk_frame_to_mem(), and ptcache_read_stream().
|
static |
Definition at line 1690 of file pointcache.cc.
References pf.
Referenced by ptcache_mem_frame_to_disk(), and ptcache_write_stream().
|
static |
Caller must close after!
Definition at line 1454 of file pointcache.cc.
References BKE_main_blendfile_path_from_global(), BLI_file_ensure_parent_dir_exists(), BLI_fopen(), PTCacheID::cache, PointCache::flag, ID::lib, MAX_PTCACHE_FILE, MEM_mallocN(), PTCacheID::owner_id, pf, PTCACHE_EXTERNAL, PTCACHE_FILE_READ, PTCACHE_FILE_UPDATE, PTCACHE_FILE_WRITE, and ptcache_filepath().
Referenced by BKE_ptcache_load_external(), ptcache_disk_frame_to_mem(), ptcache_mem_frame_to_disk(), ptcache_read_stream(), and ptcache_write_stream().
|
static |
Definition at line 1713 of file pointcache.cc.
References BPHYS_DATA_AVELOCITY, BPHYS_DATA_BOIDS, BPHYS_DATA_INDEX, BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_SIZE, BPHYS_DATA_TIMES, BPHYS_DATA_VELOCITY, and pf.
Referenced by ptcache_disk_frame_to_mem(), ptcache_mem_frame_to_disk(), and ptcache_read_stream().
|
static |
Definition at line 1625 of file pointcache.cc.
Referenced by BKE_ptcache_load_external(), ptcache_disk_frame_to_mem(), ptcache_dynamicpaint_read(), ptcache_file_compressed_read(), and ptcache_file_data_read().
|
static |
Definition at line 1629 of file pointcache.cc.
Referenced by ptcache_dynamicpaint_write(), ptcache_file_compressed_write(), ptcache_file_data_write(), and ptcache_mem_frame_to_disk().
|
static |
Definition at line 1403 of file pointcache.cc.
References BKE_main_blendfile_path_from_global(), BLI_snprintf_rlen(), BLI_strncpy_rlen(), PTCacheID::cache, PointCache::flag, len, MAX_PTCACHE_FILE, ID::name, PointCache::name, PTCacheID::owner_id, PTCACHE_EXTERNAL, ptcache_filepath_ext_append(), ptcache_path(), and UNUSED_VARS.
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_exist(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), and ptcache_file_open().
|
static |
Definition at line 1351 of file pointcache.cc.
References BKE_object_insert_ptcache(), BLI_assert, BLI_snprintf_rlen(), PTCacheID::cache, PointCache::flag, GS, ID_OB, PointCache::index, len, MAX_PTCACHE_FILE, ID::name, PTCacheID::owner_id, PTCACHE_EXTERNAL, ptcache_file_extension(), and PTCacheID::stack_index.
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), and ptcache_filepath().
Definition at line 1878 of file pointcache.cc.
References BKE_ptcache_id_exist(), PTCacheID::cache, PointCache::endframe, ListBase::first, PointCache::flag, PTCacheMem::frame, ListBase::last, PointCache::mem_cache, PTCacheMem::next, PTCacheMem::prev, PTCACHE_DISK_CACHE, and PointCache::startframe.
Referenced by BKE_ptcache_read().
|
static |
Similar to BLI_path_frame_get, but takes into account the stack-index which is after the frame.
Definition at line 1286 of file pointcache.cc.
References frame_len(), len, num, and STRNCPY().
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), and BKE_ptcache_load_external().
|
static |
Definition at line 2225 of file pointcache.cc.
References BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BPHYS_DATA_INDEX, BPHYS_TOT_DATA, PTCacheID::cache, PTCacheID::calldata, PTCacheID::data_types, PTCacheMem::data_types, PTCacheID::error, PTCacheMem::extradata, ListBase::first, PointCache::flag, PTCacheMem::frame, i, PTCacheID::interpolate_extra_data, PTCacheID::interpolate_point, PointCache::mem_cache, MEM_freeN(), PTCacheMem::next, PTCacheID::owner_id, PTCACHE_DISK_CACHE, ptcache_disk_frame_to_mem(), ptcache_mem_clear(), PTCacheID::totpoint, and PTCacheMem::totpoint.
Referenced by BKE_ptcache_read().
|
static |
Definition at line 1857 of file pointcache.cc.
References ptcache_data_free(), and ptcache_extra_free().
Referenced by BKE_ptcache_free_mem(), BKE_ptcache_id_clear(), ptcache_disk_frame_to_mem(), ptcache_interpolate(), ptcache_read(), and ptcache_write().
|
static |
Definition at line 2026 of file pointcache.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BPHYS_TOT_DATA, PTCacheID::cache, PointCache::compression, PTCacheExtra::data, PTCacheMem::data, PTCacheMem::data_types, error(), PTCacheMem::extradata, ListBase::first, PTCacheMem::frame, G, G_DEBUG, i, LZO_OUT_LEN, MEM_callocN(), MEM_freeN(), PTCacheExtra::next, out, pf, printf, PTCACHE_CLEAR_FRAME, ptcache_data_copy(), ptcache_data_size, ptcache_extra_datasize, ptcache_file_close(), ptcache_file_compressed_write(), ptcache_file_data_write(), ptcache_file_header_begin_write(), ptcache_file_open(), ptcache_file_pointers_init(), PTCACHE_FILE_WRITE, ptcache_file_write(), PTCACHE_TYPEFLAG_COMPRESS, PTCACHE_TYPEFLAG_EXTRADATA, PTCacheExtra::totdata, PTCacheMem::totpoint, PTCacheExtra::type, PTCacheID::type, and PTCacheID::write_header.
Referenced by BKE_ptcache_mem_to_disk(), and ptcache_write().
|
static |
Definition at line 1863 of file pointcache.cc.
References PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_SOFTBODY, and PTCacheID::type.
Referenced by BKE_ptcache_load_external().
|
static |
Definition at line 472 of file pointcache.cc.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 522 of file pointcache.cc.
References ParticleSystem::alloc_fluidsprings, BPHYS_EXTRA_FLUID_SPRINGS, PTCacheExtra::data, PTCacheMem::extradata, ListBase::first, ParticleSystem::fluid_springs, MEM_dupallocN(), MEM_freeN(), PTCacheExtra::next, ParticleSystem::tot_fluidsprings, PTCacheExtra::totdata, and PTCacheExtra::type.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 509 of file pointcache.cc.
References BPHYS_EXTRA_FLUID_SPRINGS, SPHFluidSettings::flag, ParticleSettings::fluid, ParticleSystem::fluid_springs, ParticleSystem::part, PART_PHYS_FLUID, ParticleSettings::phystype, ptcache_add_extra_data(), SPH_VISCOELASTIC_SPRINGS, and ParticleSystem::tot_fluidsprings.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 388 of file pointcache.cc.
References BKE_ptcache_make_particle_key(), BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, data, ParticleData::dietime, interp_qt_qtqt(), mul_v3_fl(), ParticleSystem::part, ParticleSystem::particles, ParticleSystem::pointcache, psys_interpolate_particle(), ParticleKey::rot, rot, ParticleData::state, PointCache::step, sub_v3_v3v3(), ParticleData::time, ParticleKey::time, ParticleSettings::timetweak, ParticleSystem::totpart, unit_qt(), and ParticleKey::vel.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 320 of file pointcache.cc.
References BKE_ptcache_make_particle_key(), ParticleData::boid, BPHYS_DATA_BOIDS, BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_SIZE, BPHYS_DATA_TIMES, BPHYS_DATA_VELOCITY, ParticleKey::co, BoidParticle::data, data, ParticleData::dietime, ParticleData::lifetime, mul_v3_fl(), ParticleSystem::part, PART_PHYS_BOIDS, ParticleSystem::particles, ParticleSettings::phystype, ParticleData::prev_state, PTCACHE_DATA_TO, ParticleKey::rot, ParticleData::size, ParticleData::state, sub_v3_v3v3(), ParticleData::time, ParticleKey::time, ParticleSettings::timetweak, ParticleSystem::totpart, unit_qt(), and ParticleKey::vel.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 466 of file pointcache.cc.
References ParticleSystem::totpart.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 479 of file pointcache.cc.
References ParticleData::dietime, ParticleSettings::flag, ParticleSystem::part, PART_DIED, ParticleSystem::particles, ParticleSystem::pointcache, PointCache::step, step, ParticleData::time, and ParticleSystem::totpart.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 274 of file pointcache.cc.
References ParticleKey::ave, ParticleData::boid, BPHYS_DATA_AVELOCITY, BPHYS_DATA_BOIDS, BPHYS_DATA_INDEX, BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_SIZE, BPHYS_DATA_TIMES, BPHYS_DATA_VELOCITY, ParticleKey::co, BoidParticle::data, data, ParticleData::dietime, ParticleSettings::flag, ParticleData::lifetime, ParticleSystem::part, PART_DIED, PART_PHYS_BOIDS, ParticleSystem::particles, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleData::prev_state, PTCACHE_DATA_FROM, ParticleKey::rot, ParticleData::size, ParticleData::state, PointCache::step, step, ParticleData::time, ParticleKey::time, and ParticleKey::vel.
Referenced by BKE_ptcache_id_from_particles().
|
static |
Definition at line 1313 of file pointcache.cc.
References BKE_main_blendfile_path_from_global(), BKE_tempdir_session, BLI_path_abs(), BLI_path_extension_strip(), BLI_path_is_rel(), BLI_path_slash_ensure(), BLI_path_split_file_part(), BLI_snprintf(), BLI_strncpy(), PTCacheID::cache, dirname(), PointCache::flag, ID::lib, lib, MAX_PTCACHE_PATH, PTCacheID::owner_id, PointCache::path, PTCACHE_EXTERNAL, PTCACHE_IGNORE_LIBPATH, and PTCACHE_PATH.
Referenced by BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), and ptcache_filepath().
|
static |
Definition at line 2168 of file pointcache.cc.
References BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BPHYS_DATA_INDEX, BPHYS_TOT_DATA, PTCacheID::cache, PTCacheID::calldata, PTCacheID::data_types, PTCacheMem::data_types, PTCacheID::error, PTCacheMem::extradata, ListBase::first, PointCache::flag, PTCacheMem::frame, i, PointCache::mem_cache, MEM_freeN(), PTCacheMem::next, PTCacheID::owner_id, PTCACHE_DISK_CACHE, ptcache_disk_frame_to_mem(), ptcache_mem_clear(), PTCacheID::read_extra_data, PTCacheID::read_point, PTCacheID::totpoint, and PTCacheMem::totpoint.
Referenced by BKE_ptcache_read().
|
static |
Definition at line 2120 of file pointcache.cc.
References PTCacheID::calldata, error(), PTCacheID::error, G, G_DEBUG, PTCacheID::owner_id, pf, printf, ptcache_file_close(), ptcache_file_header_begin_read(), ptcache_file_open(), ptcache_file_pointers_init(), PTCACHE_FILE_READ, PTCacheID::read_header, PTCacheID::read_stream, PTCacheID::totpoint, and PTCacheID::type.
Referenced by BKE_ptcache_read().
|
static |
Definition at line 857 of file pointcache.cc.
Referenced by BKE_ptcache_id_from_rigidbody().
|
static |
Definition at line 811 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, data, interp_qt_qtqt(), interp_v3_v3v3(), RigidBodyWorld::objects, RigidBodyOb::orn, pos, RigidBodyOb::pos, PTCACHE_DATA_TO, RBO_TYPE_ACTIVE, Object::rigidbody_object, and RigidBodyOb::type.
Referenced by BKE_ptcache_id_from_rigidbody().
|
static |
Definition at line 785 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, data, RigidBodyWorld::objects, RigidBodyOb::orn, RigidBodyOb::pos, PTCACHE_DATA_TO, RBO_TYPE_ACTIVE, Object::rigidbody_object, and RigidBodyOb::type.
Referenced by BKE_ptcache_id_from_rigidbody().
|
static |
Definition at line 850 of file pointcache.cc.
References RigidBodyWorld::numbodies.
Referenced by BKE_ptcache_id_from_rigidbody().
|
static |
Definition at line 761 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, data, RigidBodyWorld::objects, RigidBodyOb::orn, RigidBodyOb_Shared::physics_object, RigidBodyOb::pos, PTCACHE_DATA_FROM, RB_body_get_orientation(), RB_body_get_position(), RBO_TYPE_ACTIVE, Object::rigidbody_object, RigidBodyOb::shared, and RigidBodyOb::type.
Referenced by BKE_ptcache_id_from_rigidbody().
|
static |
Definition at line 249 of file pointcache.cc.
Referenced by BKE_ptcache_id_from_softbody().
|
static |
Definition at line 204 of file pointcache.cc.
References BKE_ptcache_make_particle_key(), SoftBody::bpoint, ParticleKey::co, copy_v3_v3(), data, mul_v3_fl(), BodyPoint::pos, psys_interpolate_particle(), BodyPoint::vec, and ParticleKey::vel.
Referenced by BKE_ptcache_id_from_softbody().
|
static |
Definition at line 189 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, SoftBody::bpoint, data, BodyPoint::pos, PTCACHE_DATA_TO, and BodyPoint::vec.
Referenced by BKE_ptcache_id_from_softbody().
|
static |
Definition at line 244 of file pointcache.cc.
References SoftBody::totpoint.
Referenced by BKE_ptcache_id_from_softbody().
|
static |
Definition at line 179 of file pointcache.cc.
References BPHYS_DATA_LOCATION, BPHYS_DATA_VELOCITY, SoftBody::bpoint, data, BodyPoint::pos, PTCACHE_DATA_FROM, and BodyPoint::vec.
Referenced by BKE_ptcache_id_from_softbody().
|
static |
Definition at line 2416 of file pointcache.cc.
References BKE_ptcache_id_exist(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BKE_ptcache_mem_pointers_seek(), BLI_addtail(), BPHYS_TOT_DATA, PTCacheID::cache, PTCacheID::calldata, PTCacheID::data_types, PTCacheMem::data_types, error(), PointCache::flag, PTCacheMem::frame, i, PTCacheID::info_types, ListBase::last, PointCache::mem_cache, MEM_callocN(), MEM_freeN(), ptcache_data_alloc(), PTCACHE_DISK_CACHE, ptcache_disk_frame_to_mem(), ptcache_mem_clear(), ptcache_mem_frame_to_disk(), PointCache::startframe, PTCacheID::totpoint, PTCacheMem::totpoint, PTCacheID::totwrite, PTCacheID::write_extra_data, and PTCacheID::write_point.
Referenced by BKE_ptcache_write().
|
static |
Definition at line 2489 of file pointcache.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_id_exist(), PTCacheID::cache, PointCache::endframe, PointCache::flag, PTCacheMem::frame, ListBase::last, PointCache::mem_cache, PTCacheMem::prev, PTCACHE_CLEAR_ALL, PTCACHE_CLEAR_FRAME, PTCACHE_DISK_CACHE, PTCACHE_REDO_NEEDED, PointCache::startframe, PointCache::step, and step.
Referenced by BKE_ptcache_write().
|
static |
Definition at line 2378 of file pointcache.cc.
References BKE_ptcache_id_clear(), PTCacheID::calldata, PTCacheID::data_types, error(), G, G_DEBUG, pf, printf, PTCACHE_CLEAR_FRAME, ptcache_file_close(), ptcache_file_header_begin_write(), ptcache_file_open(), PTCACHE_FILE_WRITE, PTCacheID::type, PTCacheID::write_header, and PTCacheID::write_stream.
Referenced by BKE_ptcache_write().
|
static |
Definition at line 109 of file pointcache.cc.
|
static |
Definition at line 111 of file pointcache.cc.
Referenced by BKE_ptcache_data_size(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_seek(), ptcache_data_alloc(), ptcache_data_copy(), ptcache_disk_frame_to_mem(), ptcache_file_data_read(), ptcache_file_data_write(), and ptcache_mem_frame_to_disk().
|
static |
Definition at line 122 of file pointcache.cc.
Referenced by ptcache_add_extra_data(), ptcache_disk_frame_to_mem(), and ptcache_mem_frame_to_disk().