diff options
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 11f34732cfc..ef02e7d7034 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -39,15 +39,18 @@ extern "C" { struct BlendThumbnail; struct bScreen; struct LinkNode; +struct ListBase; struct Main; struct MemFile; struct ReportList; struct Scene; +struct ViewLayer; struct UserDef; struct View3D; struct bContext; struct BHead; struct FileData; +struct wmWindowManager; typedef struct BlendHandle BlendHandle; @@ -65,12 +68,19 @@ typedef struct BlendFileData { int globalf; char filename[1024]; /* 1024 = FILE_MAX */ - struct bScreen *curscreen; + struct bScreen *curscreen; /* TODO think this isn't needed anymore? */ struct Scene *curscene; + struct ViewLayer *cur_view_layer; /* layer to activate in workspaces when reading without UI */ eBlenFileType type; } BlendFileData; +typedef struct WorkspaceConfigFileData { + struct Main *main; /* has to be freed when done reading file data */ + + struct ListBase workspaces; +} WorkspaceConfigFileData; + /* skip reading some data-block types (may want to skip screen data too). */ typedef enum eBLOReadSkip { @@ -105,6 +115,7 @@ void BLO_blendhandle_close(BlendHandle *bh); /***/ #define BLO_GROUP_MAX 32 +#define BLO_EMBEDDED_STARTUP_BLEND "<startup.blend>" bool BLO_has_bfile_extension(const char *str); bool BLO_library_path_explode(const char *path, char *r_dir, char **r_group, char **r_name); @@ -124,17 +135,19 @@ struct ID *BLO_library_link_named_part(struct Main *mainl, BlendHandle **bh, con struct ID *BLO_library_link_named_part_ex( struct Main *mainl, BlendHandle **bh, const short idcode, const char *name, const int flag, - struct Scene *scene, struct View3D *v3d); -void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, struct Scene *scene, struct View3D *v3d); + struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer); +void BLO_library_link_end( + struct Main *mainl, BlendHandle **bh, int flag, + struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer); void BLO_library_link_copypaste(struct Main *mainl, BlendHandle *bh); void *BLO_library_read_struct(struct FileData *fd, struct BHead *bh, const char *blockname); -BlendFileData *blo_read_blendafterruntime(int file, const char *name, int actualsize, struct ReportList *reports); - /* internal function but we need to expose it */ -void blo_lib_link_screen_restore(struct Main *newmain, struct bScreen *curscreen, struct Scene *curscene); +void blo_lib_link_restore( + struct Main *newmain, struct wmWindowManager *curwm, + struct Scene *curscene, struct ViewLayer *cur_render_layer); typedef void (*BLOExpandDoitCallback) (void *fdhandle, struct Main *mainvar, void *idv); @@ -143,12 +156,18 @@ void BLO_expand_main(void *fdhandle, struct Main *mainvar); /* Update defaults in startup.blend & userprefs.blend, without having to save and embed it */ void BLO_update_defaults_userpref_blend(void); -void BLO_update_defaults_startup_blend(struct Main *mainvar); +void BLO_update_defaults_startup_blend(struct Main *mainvar, const char *app_template); + +/* Version patch user preferences. */ +void BLO_version_defaults_userpref_blend(struct Main *mainvar, struct UserDef *userdef); struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath); struct Main *BLO_main_from_memfile(struct MemFile *memfile, struct Main *bmain, struct Scene **r_scene); +/* datafiles (generated theme) */ +extern const struct bTheme U_theme_default; + #ifdef __cplusplus } #endif |