|
Blender V4.3
|
#include <cstring>#include <optional>#include "DNA_cachefile_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_fileops.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_bpath.hh"#include "BKE_cachefile.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_scene.hh"#include "DEG_depsgraph_query.hh"#include "RE_engine.h"#include "BLO_read_write.hh"#include "MEM_guardedalloc.h"Go to the source code of this file.
Variables | |
| IDTypeInfo | IDType_ID_CF |
| static SpinLock | spin |
Determine whether the CacheFile should use a render engine procedural. If so, data is not read from the file and bounding boxes are used to represent the objects in the Scene. Render engines will receive the bounding box as a placeholder but can instead load the data directly if they support it.
Definition at line 418 of file cachefile.cc.
References CACHEFILE_TYPE_ALEMBIC, RE_engine_supports_alembic_procedural(), RE_engines_find(), CacheFile::type, and CacheFile::use_render_procedural.
Referenced by depends_on_time(), modify_geometry_set(), modify_mesh(), and transformcache_evaluate().
| void * BKE_cachefile_add | ( | Main * | bmain, |
| const char * | name ) |
Definition at line 318 of file cachefile.cc.
References BKE_id_new(), and ID_CF.
Referenced by import_file(), and blender::io::usd::import_startjob().
| CacheFileLayer * BKE_cachefile_add_layer | ( | CacheFile * | cache_file, |
| const char | filepath[1024] ) |
Add a layer to the cache_file. Return NULL if the filepath is already that of an existing layer or if the number of layers exceeds the maximum allowed layer count.
Definition at line 431 of file cachefile.cc.
References CacheFile::active_layer, BLI_addtail(), BLI_listbase_count(), CacheFile::layers, LISTBASE_FOREACH, MEM_callocN, STREQ, and STRNCPY.
Referenced by cachefile_layer_add_exec().
Definition at line 336 of file cachefile.cc.
References ABC_create_handle(), BKE_cachefile_filepath_get(), BLI_assert, BLI_duplicatelist(), BLI_freelistN(), BLI_path_extension_check_glob(), cachefile_handle_free(), CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, DEG_get_original_id(), DEG_is_active(), depsgraph, FILE_MAX, ListBase::first, CacheFile::handle, CacheFile::handle_filepath, CacheFile::id, ID_TAG_COPIED_ON_EVAL, CacheFile::layers, CacheFile::object_paths, STREQ, STRNCPY, ID::tag, CacheFile::type, and blender::io::usd::USD_create_handle().
Referenced by blender::deg::DepsgraphNodeBuilder::build_cachefile().
| bool BKE_cachefile_filepath_get | ( | const Main * | bmain, |
| const Depsgraph * | depsgraph, | ||
| const CacheFile * | cache_file, | ||
| char | r_filepath[FILE_MAX] ) |
Definition at line 382 of file cachefile.cc.
References BKE_cachefile_time_offset(), BKE_scene_ctime_get(), BLI_exists(), BLI_path_abs(), BLI_path_extension_ensure(), BLI_path_frame(), BLI_path_frame_get(), BLI_path_frame_strip(), BLI_strncpy(), DEG_get_evaluated_scene(), depsgraph, double(), FILE_MAX, CacheFile::filepath, frame_len(), CacheFile::id, ID_BLEND_PATH, int, and CacheFile::is_sequence.
Referenced by BKE_cachefile_eval().
| CacheFileLayer * BKE_cachefile_get_active_layer | ( | CacheFile * | cache_file | ) |
Definition at line 452 of file cachefile.cc.
References CacheFile::active_layer, BLI_findlink(), and CacheFile::layers.
Referenced by cachefile_layer_move_exec(), and cachefile_layer_remove_exec().
| void BKE_cachefile_reader_free | ( | CacheFile * | cache_file, |
| CacheReader ** | reader ) |
Definition at line 217 of file cachefile.cc.
References ABC_CacheReader_free(), BLI_assert, BLI_gset_remove(), BLI_spin_lock(), BLI_spin_unlock(), CACHE_FILE_TYPE_INVALID, CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, CacheFile::handle_readers, CacheFile::id, ID_TAG_COPIED_ON_EVAL, spin, ID::tag, CacheFile::type, UNUSED_VARS, and blender::io::usd::USD_CacheReader_free().
Referenced by free_data(), and transformcache_free().
| void BKE_cachefile_reader_open | ( | CacheFile * | cache_file, |
| CacheReader ** | reader, | ||
| Object * | object, | ||
| const char * | object_path ) |
Definition at line 166 of file cachefile.cc.
References BLI_assert, BLI_gset_ptr_new(), BLI_gset_reinsert(), BLI_gset_remove(), BLI_spin_lock(), BLI_spin_unlock(), CACHE_FILE_TYPE_INVALID, CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, CacheReader_open_alembic_object(), blender::io::usd::CacheReader_open_usd_object(), CacheFile::handle, CacheFile::handle_readers, CacheFile::id, ID_TAG_COPIED_ON_EVAL, CacheFile::is_sequence, spin, ID::tag, CacheFile::type, and UNUSED_VARS.
Referenced by modify_geometry_set(), modify_mesh(), and transformcache_evaluate().
| void BKE_cachefile_reload | ( | Depsgraph * | depsgraph, |
| CacheFile * | cache_file ) |
Definition at line 325 of file cachefile.cc.
References cachefile_handle_free(), DEG_get_evaluated_id(), DEG_id_tag_update(), depsgraph, CacheFile::id, and ID_RECALC_SYNC_TO_EVAL.
Referenced by reload_cachefile().
| void BKE_cachefile_remove_layer | ( | CacheFile * | cache_file, |
| CacheFileLayer * | layer ) |
Definition at line 458 of file cachefile.cc.
References CacheFile::active_layer, BLI_remlink(), CacheFile::layers, and MEM_freeN().
Referenced by cachefile_layer_remove_exec().
| double BKE_cachefile_time_offset | ( | const CacheFile * | cache_file, |
| const double | time, | ||
| const double | fps ) |
Definition at line 411 of file cachefile.cc.
References double(), CacheFile::frame, CacheFile::frame_offset, CacheFile::is_sequence, CacheFile::override_frame, and time.
Referenced by BKE_cachefile_filepath_get(), modify_geometry_set(), modify_mesh(), and transformcache_evaluate().
| void BKE_cachefiles_exit | ( | ) |
Definition at line 161 of file cachefile.cc.
References BLI_spin_end(), and spin.
Referenced by BKE_blender_free().
| void BKE_cachefiles_init | ( | ) |
Definition at line 156 of file cachefile.cc.
References BLI_spin_init(), and spin.
Referenced by main().
|
static |
Definition at line 111 of file cachefile.cc.
References BLI_listbase_clear(), BLO_read_struct_list, CacheFile::handle, CacheFile::handle_filepath, CacheFile::handle_readers, CacheFile::layers, and CacheFile::object_paths.
|
static |
Definition at line 92 of file cachefile.cc.
References BKE_id_blend_write(), BLI_listbase_clear(), BLO_write_id_struct, BLO_write_struct, CacheFile::handle, CacheFile::handle_filepath, CacheFile::handle_readers, CacheFile::id, CacheFile::layers, LISTBASE_FOREACH, and CacheFile::object_paths.
|
static |
Definition at line 62 of file cachefile.cc.
References BLI_duplicatelist(), CacheFile::handle, CacheFile::handle_readers, CacheFile::layers, and CacheFile::object_paths.
|
static |
Definition at line 85 of file cachefile.cc.
References BKE_bpath_foreach_path_fixed_process(), and CacheFile::filepath.
|
static |
Definition at line 77 of file cachefile.cc.
References BLI_freelistN(), cachefile_handle_free(), CacheFile::layers, and CacheFile::object_paths.
|
static |
Definition at line 51 of file cachefile.cc.
References BLI_assert, CACHEFILE_VELOCITY_UNIT_SECOND, MEMCMP_STRUCT_AFTER_IS_ZERO, CacheFile::scale, STRNCPY, CacheFile::velocity_name, and CacheFile::velocity_unit.
|
static |
Definition at line 255 of file cachefile.cc.
References ABC_CacheReader_free(), ABC_free_handle(), BLI_gset_free(), BLI_gsetIterator_getKey(), BLI_spin_lock(), BLI_spin_unlock(), CACHE_FILE_TYPE_INVALID, CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, GSET_ITER, CacheFile::handle, CacheFile::handle_filepath, CacheFile::handle_readers, spin, CacheFile::type, UNUSED_VARS, blender::io::usd::USD_CacheReader_free(), and blender::io::usd::USD_free_handle().
Referenced by BKE_cachefile_eval(), BKE_cachefile_reload(), and cache_file_free_data().
| IDTypeInfo IDType_ID_CF |
Definition at line 123 of file cachefile.cc.
|
static |
Definition at line 154 of file cachefile.cc.
Referenced by BKE_cachefile_reader_free(), BKE_cachefile_reader_open(), BKE_cachefiles_exit(), BKE_cachefiles_init(), BLI_spin_end(), BLI_spin_init(), BLI_spin_lock(), BLI_spin_unlock(), cachefile_handle_free(), blender::compositor::DirectionalBlurOperation::init_execution(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::is_identity(), and update_courant_num().