Blender  V2.93
BKE_blendfile.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 #pragma once
17 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 struct BlendFileData;
27 struct BlendFileReadParams;
28 struct ID;
29 struct Main;
30 struct MemFile;
31 struct ReportList;
32 struct UserDef;
33 struct bContext;
34 
36  struct BlendFileData *bfd,
37  const struct BlendFileReadParams *params,
38  struct ReportList *reports,
39  /* Extra args. */
40  const bool startup_update_defaults,
41  const char *startup_app_template);
42 
44  struct BlendFileData *bfd,
45  const struct BlendFileReadParams *params,
46  struct ReportList *reports);
47 
48 struct BlendFileData *BKE_blendfile_read(const char *filepath,
49  const struct BlendFileReadParams *params,
50  struct ReportList *reports);
51 
52 struct BlendFileData *BKE_blendfile_read_from_memory(const void *filebuf,
53  int filelength,
54  const struct BlendFileReadParams *params,
55  struct ReportList *reports);
56 
58  struct MemFile *memfile,
59  const struct BlendFileReadParams *params,
60  struct ReportList *reports);
62 
63 struct UserDef *BKE_blendfile_userdef_read(const char *filepath, struct ReportList *reports);
64 struct UserDef *BKE_blendfile_userdef_read_from_memory(const void *filebuf,
65  int filelength,
66  struct ReportList *reports);
68 
69 bool BKE_blendfile_userdef_write(const char *filepath, struct ReportList *reports);
70 bool BKE_blendfile_userdef_write_app_template(const char *filepath, struct ReportList *reports);
71 
72 bool BKE_blendfile_userdef_write_all(struct ReportList *reports);
73 
75  const void *filebuf,
76  int filelength,
77  struct ReportList *reports);
79  const char *filepath,
80  struct ReportList *reports);
82 
83 /* partial blend file writing */
84 void BKE_blendfile_write_partial_tag_ID(struct ID *id, bool set);
85 void BKE_blendfile_write_partial_begin(struct Main *bmain_src);
86 bool BKE_blendfile_write_partial(struct Main *bmain_src,
87  const char *filepath,
88  const int write_flags,
89  const int remap_mode,
90  struct ReportList *reports);
91 void BKE_blendfile_write_partial_end(struct Main *bmain_src);
92 
93 #ifdef __cplusplus
94 }
95 #endif
void BKE_blendfile_read_setup(struct bContext *C, struct BlendFileData *bfd, const struct BlendFileReadParams *params, struct ReportList *reports)
Definition: blendfile.c:459
void BKE_blendfile_write_partial_begin(struct Main *bmain_src)
Definition: blendfile.c:837
struct UserDef * BKE_blendfile_userdef_read(const char *filepath, struct ReportList *reports)
Definition: blendfile.c:556
struct BlendFileData * BKE_blendfile_read_from_memfile(struct Main *bmain, struct MemFile *memfile, const struct BlendFileReadParams *params, struct ReportList *reports)
Definition: blendfile.c:511
struct WorkspaceConfigFileData * BKE_blendfile_workspace_config_read(const char *filepath, const void *filebuf, int filelength, struct ReportList *reports)
Definition: blendfile.c:773
bool BKE_blendfile_userdef_write(const char *filepath, struct ReportList *reports)
Definition: blendfile.c:673
bool BKE_blendfile_workspace_config_write(struct Main *bmain, const char *filepath, struct ReportList *reports)
Definition: blendfile.c:804
struct BlendFileData * BKE_blendfile_read_from_memory(const void *filebuf, int filelength, const struct BlendFileReadParams *params, struct ReportList *reports)
Definition: blendfile.c:492
struct UserDef * BKE_blendfile_userdef_from_defaults(void)
Definition: blendfile.c:596
void BKE_blendfile_write_partial_end(struct Main *bmain_src)
Definition: blendfile.c:952
bool BKE_blendfile_userdef_write_app_template(const char *filepath, struct ReportList *reports)
Definition: blendfile.c:700
void BKE_blendfile_read_make_empty(struct bContext *C)
Definition: blendfile.c:537
void BKE_blendfile_workspace_config_data_free(struct WorkspaceConfigFileData *workspace_config)
Definition: blendfile.c:825
struct BlendFileData * BKE_blendfile_read(const char *filepath, const struct BlendFileReadParams *params, struct ReportList *reports)
Definition: blendfile.c:470
bool BKE_blendfile_write_partial(struct Main *bmain_src, const char *filepath, const int write_flags, const int remap_mode, struct ReportList *reports)
Definition: blendfile.c:871
bool BKE_blendfile_userdef_write_all(struct ReportList *reports)
Definition: blendfile.c:716
struct UserDef * BKE_blendfile_userdef_read_from_memory(const void *filebuf, int filelength, struct ReportList *reports)
Definition: blendfile.c:573
void BKE_blendfile_read_setup_ex(struct bContext *C, struct BlendFileData *bfd, const struct BlendFileReadParams *params, struct ReportList *reports, const bool startup_update_defaults, const char *startup_app_template)
Definition: blendfile.c:442
void BKE_blendfile_write_partial_tag_ID(struct ID *id, bool set)
Definition: blendfile.c:842
#define C
Definition: RandGen.cpp:39
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
Definition: DNA_ID.h:273
Definition: BKE_main.h:116