Blender  V3.3
BKE_cachefile.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2016 Blender Foundation. All rights reserved. */
3 
4 #pragma once
5 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct CacheFile;
15 struct CacheFileLayer;
16 struct CacheReader;
17 struct Depsgraph;
18 struct Main;
19 struct Object;
20 struct Scene;
21 
22 void BKE_cachefiles_init(void);
23 void BKE_cachefiles_exit(void);
24 
25 void *BKE_cachefile_add(struct Main *bmain, const char *name);
26 
27 void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file);
28 
29 void BKE_cachefile_eval(struct Main *bmain,
30  struct Depsgraph *depsgraph,
31  struct CacheFile *cache_file);
32 
33 bool BKE_cachefile_filepath_get(const struct Main *bmain,
34  const struct Depsgraph *depsgrah,
35  const struct CacheFile *cache_file,
36  char r_filename[1024]);
37 
38 double BKE_cachefile_time_offset(const struct CacheFile *cache_file, double time, double fps);
39 
40 /* Modifiers and constraints open and free readers through these. */
41 void BKE_cachefile_reader_open(struct CacheFile *cache_file,
42  struct CacheReader **reader,
43  struct Object *object,
44  const char *object_path);
45 void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader);
46 
53 bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file,
54  struct Scene *scene);
55 
56 /* Add a layer to the cache_file. Return NULL if the filename is already that of an existing layer
57  * or if the number of layers exceeds the maximum allowed layer count. */
58 struct CacheFileLayer *BKE_cachefile_add_layer(struct CacheFile *cache_file,
59  const char filename[1024]);
60 
61 struct CacheFileLayer *BKE_cachefile_get_active_layer(struct CacheFile *cache_file);
62 
63 void BKE_cachefile_remove_layer(struct CacheFile *cache_file, struct CacheFileLayer *layer);
64 
65 #ifdef __cplusplus
66 }
67 #endif
struct CacheFileLayer * BKE_cachefile_add_layer(struct CacheFile *cache_file, const char filename[1024])
Definition: cachefile.c:432
void BKE_cachefile_remove_layer(struct CacheFile *cache_file, struct CacheFileLayer *layer)
Definition: cachefile.c:457
void * BKE_cachefile_add(struct Main *bmain, const char *name)
Definition: cachefile.c:324
void BKE_cachefile_reader_open(struct CacheFile *cache_file, struct CacheReader **reader, struct Object *object, const char *object_path)
Definition: cachefile.c:174
void BKE_cachefile_eval(struct Main *bmain, struct Depsgraph *depsgraph, struct CacheFile *cache_file)
Definition: cachefile.c:342
void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader)
Definition: cachefile.c:223
double BKE_cachefile_time_offset(const struct CacheFile *cache_file, double time, double fps)
void BKE_cachefiles_init(void)
Definition: cachefile.c:164
struct CacheFileLayer * BKE_cachefile_get_active_layer(struct CacheFile *cache_file)
Definition: cachefile.c:452
bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file, struct Scene *scene)
bool BKE_cachefile_filepath_get(const struct Main *bmain, const struct Depsgraph *depsgrah, const struct CacheFile *cache_file, char r_filename[1024])
void BKE_cachefiles_exit(void)
Definition: cachefile.c:169
void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file)
Definition: cachefile.c:331
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
double time
Scene scene
const Depsgraph * depsgraph
Definition: BKE_main.h:121
string name
Definition: scene.h:198