|
Blender V5.0
|
#include "BLI_function_ref.hh"#include "DNA_boid_types.h"#include "DNA_pointcache_types.h"#include <stdio.h>Go to the source code of this file.
Classes | |
| struct | PTCacheData |
| struct | PTCacheFile |
| struct | PTCacheID |
| struct | PTCacheBaker |
| struct | PTCacheEditKey |
| struct | PTCacheEditPoint |
| struct | PTCacheUndo |
| struct | PTCacheEdit |
Typedefs | |
| typedef struct PTCacheData | PTCacheData |
| typedef struct PTCacheFile | PTCacheFile |
| typedef struct PTCacheID | PTCacheID |
| typedef struct PTCacheBaker | PTCacheBaker |
| typedef struct PTCacheEditKey | PTCacheEditKey |
| typedef struct PTCacheEditPoint | PTCacheEditPoint |
| typedef struct PTCacheUndo | PTCacheUndo |
| typedef struct PTCacheEdit | PTCacheEdit |
| using | PointCacheIdFn = blender::FunctionRef<bool(PTCacheID &pid, ModifierData *md)> |
Enumerations | |
| enum | { PTCACHE_FILE_PTCACHE = 0 } |
| enum | { PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL = (1 << 0) } |
| #define PEK_HIDE 4 |
Definition at line 187 of file BKE_pointcache.h.
Referenced by brush_puff(), blender::ed::transform::createTransParticleVerts(), and PE_hide_keys_time().
| #define PEK_SELECT 1 |
Definition at line 185 of file BKE_pointcache.h.
Referenced by brush_puff(), count_selected_keys(), blender::ed::transform::createTransParticleVerts(), foreach_mouse_hit_key_iter(), foreach_mouse_hit_point(), blender::ed::transform::gizmo_3d_foreach_selected(), hide_exec(), blender::draw::particle_batch_cache_ensure_edit_inner_pos(), blender::draw::particle_batch_cache_ensure_edit_tip_pos(), PE_deselect_all_visible_ex(), PE_lasso_select(), PE_mirror_particle(), PE_mouse_particles(), psys_cache_edit_paths_iter(), rekey_particle(), reveal_exec(), select_action_apply(), select_key(), select_key_op(), select_keys(), select_less_keys(), select_more_keys(), select_root(), select_tip(), and subdivide_particle().
| #define PEK_TAG 2 |
Definition at line 186 of file BKE_pointcache.h.
Referenced by PE_mirror_particle(), remove_tagged_keys(), select_less_keys(), select_more_keys(), and set_delete_particle_key().
| #define PEK_USE_WCO 8 |
Definition at line 188 of file BKE_pointcache.h.
Referenced by brush_add(), copy_particle_edit(), blender::ed::transform::createTransParticleVerts(), disconnect_hair(), blender::ed::transform::gizmo_3d_foreach_selected(), PE_create_particle_edit(), pe_update_hair_particle_edit_pointers(), rekey_particle(), remap_hair_emitter(), and subdivide_particle().
| #define PEP_EDIT_RECALC 2 |
Definition at line 204 of file BKE_pointcache.h.
Referenced by apply_lengths_iter(), BKE_brush_weight_get(), brush_add(), brush_comb(), brush_cut(), brush_length(), brush_puff(), brush_smooth_do(), deflect_emitter_iter(), blender::ed::transform::flushTransParticles(), hide_exec(), iterate_lengths_iter(), PE_apply_mirror(), PE_create_particle_edit(), PE_deselect_all_visible_ex(), PE_lasso_select(), PE_mirror_particle(), PE_mouse_particles(), PE_update_object(), PE_update_selection(), psys_cache_edit_paths(), psys_cache_edit_paths_iter(), psys_thread_create_path(), rekey_particle(), remove_tagged_keys(), reveal_exec(), scale_point_factor(), select_action_apply(), select_key(), select_key_op(), select_keys(), select_less_keys(), select_more_keys(), shape_cut(), and subdivide_particle().
| #define PEP_HIDE 8 |
Definition at line 206 of file BKE_pointcache.h.
Referenced by brush_cut(), blender::ed::transform::createTransParticleVerts(), blender::draw::ensure_edit_inner_points_count(), blender::draw::ensure_edit_tip_points_count(), foreach_mouse_hit_key_iter(), blender::ed::transform::gizmo_3d_foreach_selected(), hide_exec(), blender::draw::particle_batch_cache_ensure_edit_inner_pos(), blender::draw::particle_batch_cache_ensure_edit_tip_pos(), PE_mirror_x(), point_is_selected(), reveal_exec(), select_root(), select_tip(), and shape_cut().
| #define PEP_TAG 1 |
Definition at line 203 of file BKE_pointcache.h.
Referenced by brush_add(), brush_cut(), PE_mirror_particle(), PE_mirror_x(), remove_doubles_exec(), remove_tagged_keys(), remove_tagged_particles(), set_delete_particle(), and shape_cut().
| #define PEP_TRANSFORM 4 |
Definition at line 205 of file BKE_pointcache.h.
Referenced by blender::ed::transform::createTransParticleVerts(), and blender::ed::transform::flushTransParticles().
| #define PTCACHE_CLEAR_AFTER 3 |
Definition at line 23 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_clear(), BKE_ptcache_id_reset(), BKE_ptcache_read(), cloth_clear_cache(), and system_step().
| #define PTCACHE_CLEAR_ALL 0 |
Definition at line 20 of file BKE_pointcache.h.
Referenced by BKE_ptcache_bake(), BKE_ptcache_disk_to_mem(), BKE_ptcache_id_clear(), BKE_ptcache_id_reset(), BKE_ptcache_mem_to_disk(), BKE_ptcache_toggle_disk_cache(), free_hair(), psys_changed_type(), psys_prepare_physics(), and ptcache_write_needed().
| #define PTCACHE_CLEAR_BEFORE 2 |
Definition at line 22 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_clear().
| #define PTCACHE_CLEAR_FRAME 1 |
Definition at line 21 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_clear(), ptcache_mem_frame_to_disk(), ptcache_write_needed(), and ptcache_write_stream().
| #define PTCACHE_EXT ".bphys" |
Definition at line 32 of file BKE_pointcache.h.
Referenced by ptcache_file_extension().
| #define PTCACHE_FILE_READ 0 |
Definition at line 36 of file BKE_pointcache.h.
Referenced by BKE_ptcache_load_external(), ptcache_disk_frame_to_mem(), ptcache_file_open(), and ptcache_read_stream().
| #define PTCACHE_FILE_UPDATE 2 |
Definition at line 38 of file BKE_pointcache.h.
Referenced by ptcache_file_open().
| #define PTCACHE_FILE_WRITE 1 |
Definition at line 37 of file BKE_pointcache.h.
Referenced by ptcache_file_open(), ptcache_mem_frame_to_disk(), and ptcache_write_stream().
| #define PTCACHE_PATH "blendcache_" |
Definition at line 33 of file BKE_pointcache.h.
Referenced by ptcache_path().
| #define PTCACHE_READ_EXACT 1 |
Definition at line 57 of file BKE_pointcache.h.
Referenced by BKE_ptcache_read(), clothModifier_do(), sbObjectStep(), and system_step().
| #define PTCACHE_READ_INTERPOLATED 2 |
Definition at line 58 of file BKE_pointcache.h.
Referenced by BKE_ptcache_read(), clothModifier_do(), sbObjectStep(), and system_step().
| #define PTCACHE_READ_OLD 3 |
Definition at line 59 of file BKE_pointcache.h.
Referenced by BKE_ptcache_read(), clothModifier_do(), sbObjectStep(), and system_step().
| #define PTCACHE_RESET_BAKED 1 |
Definition at line 27 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_reset().
| #define PTCACHE_RESET_DEPSGRAPH 0 |
Definition at line 26 of file BKE_pointcache.h.
Referenced by BKE_object_eval_ptcache_reset(), and BKE_ptcache_id_reset().
| #define PTCACHE_RESET_OUTDATED 2 |
Definition at line 28 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_reset(), clothModifier_do(), blender::ed::sculpt_paint::dyntopo::disable(), dynamicPaint_frameUpdate(), blender::ed::object::editmode_exit_ex(), sbObjectStep(), blender::ed::transform::special_aftertrans_update__object(), and system_step().
| #define PTCACHE_TYPE_CLOTH 2 |
Definition at line 43 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_from_cloth(), BKE_ptcache_id_reset(), do_version_remove_lzo_and_lzma_compression(), pe_get_current(), ptcache_old_elemsize(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPE_DYNAMICPAINT 5 |
Definition at line 46 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_reset(), do_version_remove_lzo_and_lzma_compression(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPE_PARTICLES 1 |
Definition at line 42 of file BKE_pointcache.h.
Referenced by BKE_ptcache_bake(), BKE_ptcache_id_from_particles(), BKE_ptcache_id_reset(), do_version_remove_lzo_and_lzma_compression(), blender::ed::object::editmode_exit_ex(), pe_get_current(), ptcache_old_elemsize(), blender::ed::transform::special_aftertrans_update__object(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPE_RIGIDBODY 6 |
| #define PTCACHE_TYPE_SMOKE_DOMAIN 3 |
Definition at line 44 of file BKE_pointcache.h.
Referenced by BKE_ptcache_bake(), BKE_ptcache_id_from_smoke(), BKE_ptcache_load_external(), BKE_ptcache_update_info(), do_version_remove_lzo_and_lzma_compression(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPE_SMOKE_HIGHRES 4 |
Definition at line 45 of file BKE_pointcache.h.
Referenced by BKE_ptcache_bake(), do_version_remove_lzo_and_lzma_compression(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPE_SOFTBODY 0 |
Definition at line 41 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_from_softbody(), BKE_ptcache_id_reset(), do_version_remove_lzo_and_lzma_compression(), pe_get_current(), ptcache_old_elemsize(), timeline_cache_color_get(), and timeline_cache_is_hidden_by_setting().
| #define PTCACHE_TYPEFLAG_COMPRESS (1 << 16) |
Definition at line 50 of file BKE_pointcache.h.
Referenced by ptcache_disk_frame_to_mem(), and ptcache_mem_frame_to_disk().
| #define PTCACHE_TYPEFLAG_EXTRADATA (1 << 17) |
Definition at line 51 of file BKE_pointcache.h.
Referenced by ptcache_disk_frame_to_mem(), and ptcache_mem_frame_to_disk().
| #define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000 |
Definition at line 54 of file BKE_pointcache.h.
Referenced by ptcache_file_header_begin_read().
| #define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF |
Definition at line 53 of file BKE_pointcache.h.
Referenced by ptcache_file_header_begin_read().
| #define PTCACHE_VEL_PER_SEC 1 |
Definition at line 102 of file BKE_pointcache.h.
Referenced by BKE_ptcache_id_from_particles(), and update_velocities().
| using PointCacheIdFn = blender::FunctionRef<bool(PTCacheID &pid, ModifierData *md)> |
Definition at line 289 of file BKE_pointcache.h.
| typedef struct PTCacheBaker PTCacheBaker |
| typedef struct PTCacheData PTCacheData |
| typedef struct PTCacheEdit PTCacheEdit |
| typedef struct PTCacheEditKey PTCacheEditKey |
| typedef struct PTCacheEditPoint PTCacheEditPoint |
| typedef struct PTCacheFile PTCacheFile |
| typedef struct PTCacheID PTCacheID |
| typedef struct PTCacheUndo PTCacheUndo |
| anonymous enum |
| Enumerator | |
|---|---|
| PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL | |
Definition at line 231 of file BKE_pointcache.h.
| anonymous enum |
| Enumerator | |
|---|---|
| PTCACHE_FILE_PTCACHE | |
Definition at line 104 of file BKE_pointcache.h.
| struct PointCache * BKE_ptcache_add | ( | struct ListBase * | ptcaches | ) |
Definition at line 2933 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 3075 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, float, 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, 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 | ( | struct BlendDataReader * | reader, |
| struct ListBase * | ptcaches, | ||
| struct PointCache ** | ocache, | ||
| int | force_disk ) |
Definition at line 3813 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 | ( | struct BlendWriter * | writer, |
| struct ListBase * | ptcaches ) |
Definition at line 3719 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, float, 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().
| struct PointCache * BKE_ptcache_copy_list | ( | struct ListBase * | ptcaches_new, |
| const struct ListBase * | ptcaches_old, | ||
| int | flag ) |
Returns first point cache.
References flag.
Referenced by BKE_fluid_modifier_copy(), BKE_object_copy_particlesystem(), BKE_object_copy_softbody(), and copy_data().
| int BKE_ptcache_data_size | ( | int | data_type | ) |
Size of cache data type.
Definition at line 1649 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 3441 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 3345 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 | ( | struct Object & | ob, |
| struct Scene & | scene, | ||
| bool | duplis, | ||
| PointCacheIdFn | fn ) |
Definition at line 1248 of file pointcache.cc.
References foreach_object_ptcache().
Referenced by blender::deg::DepsgraphRelationBuilder::build_object_pointcache().
| void BKE_ptcache_free | ( | struct PointCache * | cache | ) |
Definition at line 2960 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 | ( | struct ListBase * | ptcaches | ) |
Definition at line 2971 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 | ( | struct ListBase * | mem_cache | ) |
Definition at line 2948 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 2508 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 2660 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 1087 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, |
| struct Object * | ob, | ||
| struct ClothModifierData * | clmd ) |
Definition at line 957 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, |
| struct Object * | ob, | ||
| struct DynamicPaintSurface * | surface ) |
Definition at line 1011 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, |
| struct Object * | ob, | ||
| struct ParticleSystem * | psys ) |
Definition at line 893 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, |
| struct Object * | ob, | ||
| struct RigidBodyWorld * | rbw ) |
Definition at line 1049 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 994 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 857 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 2788 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, |
| struct Scene * | scene, | ||
| float | cfra, | ||
| int * | startframe, | ||
| int * | endframe, | ||
| float * | timescale ) |
Definition at line 2691 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().
| void BKE_ptcache_ids_from_object | ( | struct ListBase * | lb, |
| struct Object * | ob, | ||
| struct Scene * | scene, | ||
| int | duplis ) |
Definition at line 1237 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(), do_version_remove_lzo_and_lzma_compression(), 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 3710 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 3498 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 | ( | struct ParticleKey * | key, |
| int | index, | ||
| void ** | data, | ||
| float | time ) |
Definition at line 251 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 1672 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 1717 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_read(), ptcache_write(), and undoptcache_to_editcache().
| void BKE_ptcache_mem_pointers_init | ( | struct PTCacheMem * | pm, |
| void * | cur[BPHYS_TOT_DATA] ) |
Definition at line 1707 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_read(), ptcache_write(), and undoptcache_to_editcache().
| int BKE_ptcache_mem_pointers_seek | ( | int | point_index, |
| struct PTCacheMem * | pm, | ||
| void * | cur[BPHYS_TOT_DATA] ) |
Definition at line 1727 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 3369 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 1253 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 2848 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 3039 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.
Main cache reading call which reads cache from disk or memory. Possible to get old or interpolated result.
Definition at line 2196 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 3396 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 3611 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 3703 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 2456 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().