|
Blender V5.0
|
#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_mutex.hh"#include "BLI_path_utils.hh"#include "BLI_string.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_library.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.
Functions | |
| static void | cachefile_handle_free (CacheFile *cache_file) |
| static void | cache_file_init_data (ID *id) |
| static void | cache_file_copy_data (Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int) |
| static void | cache_file_free_data (ID *id) |
| static void | cache_file_foreach_path (ID *id, BPathForeachPathData *bpath_data) |
| static void | cache_file_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| static void | cache_file_blend_read_data (BlendDataReader *reader, ID *id) |
| void | BKE_cachefile_reader_open (CacheFile *cache_file, CacheReader **reader, Object *object, const char *object_path) |
| void | BKE_cachefile_reader_free (CacheFile *cache_file, CacheReader **reader) |
| void * | BKE_cachefile_add (Main *bmain, const char *name) |
| void | BKE_cachefile_reload (Depsgraph *depsgraph, CacheFile *cache_file) |
| void | BKE_cachefile_eval (Main *bmain, Depsgraph *depsgraph, CacheFile *cache_file) |
| bool | BKE_cachefile_filepath_get (const Main *bmain, const Depsgraph *depsgraph, const CacheFile *cache_file, char r_filepath[FILE_MAX]) |
| double | BKE_cachefile_time_offset (const CacheFile *cache_file, const double time, const double fps) |
| double | BKE_cachefile_frame_offset (const CacheFile *cache_file, const double time) |
| CacheFileLayer * | BKE_cachefile_add_layer (CacheFile *cache_file, const char filepath[1024]) |
| CacheFileLayer * | BKE_cachefile_get_active_layer (CacheFile *cache_file) |
| void | BKE_cachefile_remove_layer (CacheFile *cache_file, CacheFileLayer *layer) |
Variables | |
| IDTypeInfo | IDType_ID_CF |
| void * BKE_cachefile_add | ( | Main * | bmain, |
| const char * | name ) |
Definition at line 311 of file cachefile.cc.
References BKE_id_new(), and name.
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 418 of file cachefile.cc.
References CacheFile::active_layer, BLI_addtail(), BLI_listbase_count(), CacheFileLayer::filepath, CacheFile::layers, LISTBASE_FOREACH, MEM_callocN(), STREQ, and STRNCPY().
Referenced by cachefile_layer_add_exec().
Definition at line 329 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(), 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 375 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, FILE_MAX, CacheFile::filepath, frame_len(), RenderData::frs_sec, RenderData::frs_sec_base, CacheFile::id, ID_BLEND_PATH, CacheFile::is_sequence, and Scene::r.
Referenced by BKE_cachefile_eval().
| double BKE_cachefile_frame_offset | ( | const CacheFile * | cache_file, |
| const double | time ) |
Definition at line 411 of file cachefile.cc.
References CacheFile::frame, CacheFile::frame_offset, CacheFile::is_sequence, and CacheFile::override_frame.
Referenced by modify_geometry_set(), and modify_mesh().
| CacheFileLayer * BKE_cachefile_get_active_layer | ( | CacheFile * | cache_file | ) |
Definition at line 438 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 210 of file cachefile.cc.
References ABC_CacheReader_free(), BLI_assert, BLI_gset_remove(), CACHE_FILE_TYPE_INVALID, CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, CacheFile::handle_readers, CacheFile::id, ID_TAG_COPIED_ON_EVAL, lock, 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 160 of file cachefile.cc.
References BLI_assert, BLI_gset_ptr_new(), BLI_gset_reinsert(), BLI_gset_remove(), 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, lock, 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 318 of file cachefile.cc.
References cachefile_handle_free(), DEG_get_evaluated(), 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 444 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 404 of file cachefile.cc.
References CacheFile::frame, CacheFile::frame_offset, CacheFile::is_sequence, and CacheFile::override_frame.
Referenced by BKE_cachefile_filepath_get(), modify_geometry_set(), modify_mesh(), and transformcache_evaluate().
|
static |
Definition at line 112 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 93 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 63 of file cachefile.cc.
References BLI_duplicatelist(), CacheFile::handle, CacheFile::handle_readers, CacheFile::layers, and CacheFile::object_paths.
|
static |
Definition at line 86 of file cachefile.cc.
References BKE_bpath_foreach_path_fixed_process(), and CacheFile::filepath.
|
static |
Definition at line 78 of file cachefile.cc.
References BLI_freelistN(), cachefile_handle_free(), CacheFile::layers, and CacheFile::object_paths.
|
static |
Definition at line 52 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 247 of file cachefile.cc.
References ABC_CacheReader_free(), ABC_free_handle(), BLI_gset_free(), BLI_gsetIterator_getKey(), CACHE_FILE_TYPE_INVALID, CACHEFILE_TYPE_ALEMBIC, CACHEFILE_TYPE_USD, GSET_ITER, CacheFile::handle, CacheFile::handle_filepath, CacheFile::handle_readers, lock, 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 124 of file cachefile.cc.