Blender  V2.93
BKE_cachefile.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct CacheFile;
31 struct CacheReader;
32 struct Depsgraph;
33 struct Main;
34 struct Object;
35 
36 void BKE_cachefiles_init(void);
37 void BKE_cachefiles_exit(void);
38 
39 void *BKE_cachefile_add(struct Main *bmain, const char *name);
40 
41 void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file);
42 
43 void BKE_cachefile_eval(struct Main *bmain,
44  struct Depsgraph *depsgraph,
45  struct CacheFile *cache_file);
46 
47 bool BKE_cachefile_filepath_get(const struct Main *bmain,
48  const struct Depsgraph *depsgrah,
49  const struct CacheFile *cache_file,
50  char r_filename[1024]);
51 
52 float BKE_cachefile_time_offset(const struct CacheFile *cache_file,
53  const float time,
54  const float fps);
55 
56 /* Modifiers and constraints open and free readers through these. */
57 void BKE_cachefile_reader_open(struct CacheFile *cache_file,
58  struct CacheReader **reader,
59  struct Object *object,
60  const char *object_path);
61 void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader);
62 
63 #ifdef __cplusplus
64 }
65 #endif
void * BKE_cachefile_add(struct Main *bmain, const char *name)
Definition: cachefile.c:254
void BKE_cachefile_reader_open(struct CacheFile *cache_file, struct CacheReader **reader, struct Object *object, const char *object_path)
Definition: cachefile.c:164
void BKE_cachefile_eval(struct Main *bmain, struct Depsgraph *depsgraph, struct CacheFile *cache_file)
Definition: cachefile.c:272
void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader)
Definition: cachefile.c:198
float BKE_cachefile_time_offset(const struct CacheFile *cache_file, const float time, const float fps)
void BKE_cachefiles_init(void)
Definition: cachefile.c:154
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:159
void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file)
Definition: cachefile.c:261
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
double time
const Depsgraph * depsgraph
The CacheReader struct is only used for anonymous pointers, to interface between C and C++ code....
Definition: abc_util.h:30
Definition: BKE_main.h:116
ustring name
Definition: node.h:174