BKE_cachefile.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * ***** BEGIN GPL LICENSE BLOCK *****
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software Foundation,
  16. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. *
  18. * The Original Code is Copyright (C) 2016 Blender Foundation.
  19. * All rights reserved.
  20. *
  21. * Contributor(s): Kevin Dietrich.
  22. *
  23. * ***** END GPL LICENSE BLOCK *****
  24. */
  25. #ifndef __BKE_CACHEFILE_H__
  26. #define __BKE_CACHEFILE_H__
  27. /** \file BKE_cachefile.h
  28. * \ingroup bke
  29. */
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. struct CacheFile;
  34. struct Main;
  35. struct Scene;
  36. void BKE_cachefiles_init(void);
  37. void BKE_cachefiles_exit(void);
  38. void *BKE_cachefile_add(struct Main *bmain, const char *name);
  39. void BKE_cachefile_init(struct CacheFile *cache_file);
  40. void BKE_cachefile_free(struct CacheFile *cache_file);
  41. struct CacheFile *BKE_cachefile_copy(struct Main *bmain, const struct CacheFile *cache_file);
  42. void BKE_cachefile_make_local(struct Main *bmain, struct CacheFile *cache_file, const bool lib_local);
  43. void BKE_cachefile_reload(const struct Main *bmain, struct CacheFile *cache_file);
  44. void BKE_cachefile_ensure_handle(const struct Main *bmain, struct CacheFile *cache_file);
  45. void BKE_cachefile_update_frame(struct Main *bmain, struct Scene *scene, const float ctime, const float fps);
  46. bool BKE_cachefile_filepath_get(
  47. const struct Main *bmain, const struct CacheFile *cache_file, float frame,
  48. char r_filename[1024]);
  49. float BKE_cachefile_time_offset(struct CacheFile *cache_file, const float time, const float fps);
  50. void BKE_cachefile_clean(struct Scene *scene, struct CacheFile *cache_file);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif /* __BKE_CACHEFILE_H__ */