57 cache_file->
scale = 1.0f;
63 std::optional<Library *> ,
71 cache_file_dst->
handle =
nullptr;
98 cache_file->
handle =
nullptr;
115 cache_file->
handle =
nullptr;
169 const char *object_path)
171#if defined(WITH_ALEMBIC) || defined(WITH_USD)
175 if (cache_file->
handle ==
nullptr) {
179 switch (cache_file->
type) {
191 cache_file->
handle, *reader,
object, object_path);
213 UNUSED_VARS(cache_file, reader,
object, object_path);
219#if defined(WITH_ALEMBIC) || defined(WITH_USD)
223 if (*reader !=
nullptr) {
227 switch (cache_file->
type) {
257#if defined(WITH_ALEMBIC) || defined(WITH_USD)
266 if (*reader !=
nullptr) {
267 switch (cache_file->
type) {
294 switch (cache_file->
type) {
309 cache_file->
handle =
nullptr;
329 if (cache_file_eval) {
396 const double fps =
double(scene->r.frs_sec) /
double(scene->r.frs_sec_base);
415 return cache_file->
is_sequence ? frame : frame / fps - time_offset;
434 if (
STREQ(layer->filepath, filepath)) {
443 STRNCPY(layer->filepath, filepath);
void ABC_CacheReader_free(struct CacheReader *reader)
void ABC_free_handle(struct CacheArchiveHandle *handle)
struct CacheReader * CacheReader_open_alembic_object(struct CacheArchiveHandle *handle, struct CacheReader *reader, struct Object *object, const char *object_path, bool is_sequence)
struct CacheArchiveHandle * ABC_create_handle(const struct Main *bmain, const char *filepath, const struct CacheFileLayer *layers, struct ListBase *object_paths)
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
void * BKE_id_new(Main *bmain, short type, const char *name)
void BKE_id_blend_write(BlendWriter *writer, ID *id)
float BKE_scene_ctime_get(const Scene *scene)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
GSet * BLI_gset_ptr_new(const char *info)
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
bool BLI_gset_reinsert(GSet *gs, void *key, GSetKeyFreeFP keyfreefp)
#define GSET_ITER(gs_iter_, gset_)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_remove(GSet *gs, const void *key, GSetKeyFreeFP keyfreefp)
#define LISTBASE_FOREACH(type, var, list)
void void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool void BLI_path_frame_strip(char *path, char *r_ext, size_t ext_maxncpy) ATTR_NONNULL(1
bool BLI_path_frame_get(const char *path, int *r_frame, int *r_digits_len) ATTR_NONNULL(1
bool BLI_path_extension_ensure(char *path, size_t path_maxncpy, const char *ext) ATTR_NONNULL(1
bool BLI_path_frame(char *path, size_t path_maxncpy, int frame, int digits) ATTR_NONNULL(1)
bool BLI_path_extension_check_glob(const char *path, const char *ext_fnmatch) ATTR_NONNULL(1
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
pthread_spinlock_t SpinLock
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void BLI_spin_lock(SpinLock *spin)
void BLI_spin_end(SpinLock *spin)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLT_I18NCONTEXT_ID_CACHEFILE
typedef double(DMatrix)[4][4]
void DEG_id_tag_update(ID *id, unsigned int flags)
bool DEG_is_active(const Depsgraph *depsgraph)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
ID * DEG_get_original_id(ID *id)
ID * DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
#define ID_BLEND_PATH(_bmain, _id)
@ CACHEFILE_VELOCITY_UNIT_SECOND
struct CacheFile CacheFile
@ CACHE_FILE_TYPE_INVALID
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
static float frame_len(const Frame *frame)
bool BKE_cache_file_uses_render_procedural(const CacheFile *cache_file, Scene *scene)
double BKE_cachefile_time_offset(const CacheFile *cache_file, const double time, const double fps)
static void cachefile_handle_free(CacheFile *cache_file)
void BKE_cachefile_reader_free(CacheFile *cache_file, CacheReader **reader)
static void cache_file_free_data(ID *id)
static void cache_file_copy_data(Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int)
void BKE_cachefiles_init()
void BKE_cachefile_remove_layer(CacheFile *cache_file, CacheFileLayer *layer)
CacheFileLayer * BKE_cachefile_get_active_layer(CacheFile *cache_file)
static void cache_file_init_data(ID *id)
static void cache_file_blend_write(BlendWriter *writer, ID *id, const void *id_address)
CacheFileLayer * BKE_cachefile_add_layer(CacheFile *cache_file, const char filepath[1024])
static void cache_file_foreach_path(ID *id, BPathForeachPathData *bpath_data)
void * BKE_cachefile_add(Main *bmain, const char *name)
void BKE_cachefiles_exit()
static void cache_file_blend_read_data(BlendDataReader *reader, ID *id)
bool BKE_cachefile_filepath_get(const Main *bmain, const Depsgraph *depsgraph, const CacheFile *cache_file, char r_filepath[FILE_MAX])
void BKE_cachefile_reload(Depsgraph *depsgraph, CacheFile *cache_file)
void BKE_cachefile_eval(Main *bmain, Depsgraph *depsgraph, CacheFile *cache_file)
void BKE_cachefile_reader_open(CacheFile *cache_file, CacheReader **reader, Object *object, const char *object_path)
const Depsgraph * depsgraph
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
bool RE_engine_supports_alembic_procedural(const RenderEngineType *render_type, Scene *scene)
RenderEngineType * RE_engines_find(const char *idname)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
CacheArchiveHandle * USD_create_handle(Main *, const char *filepath, ListBase *object_paths)
CacheReader * CacheReader_open_usd_object(CacheArchiveHandle *handle, CacheReader *reader, Object *object, const char *object_path)
void USD_free_handle(CacheArchiveHandle *handle)
void USD_CacheReader_free(CacheReader *reader)
struct CacheArchiveHandle * handle
char handle_filepath[1024]
struct GSet * handle_readers
char use_render_procedural