Blender V5.3
BKE_blendfile.hh File Reference
#include "BKE_main.hh"
#include "BLI_enum_flags.hh"
#include "BLI_function_ref.hh"
#include "BLI_map.hh"
#include "BLI_utility_mixins.hh"
#include <string>

Go to the source code of this file.

Classes

class  blender::bke::blendfile::PartialWriteContext
struct  blender::bke::blendfile::PartialWriteContext::IDAddOptions

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::blendfile

Macros

#define BLENDER_ASSET_FILE_SUFFIX   ".asset.blend"

Functions

 blender::bke::blendfile::ENUM_OPERATORS (PartialWriteContext::IDAddOperations)
Blend/Library Paths
bool blender::BKE_blendfile_extension_check (const char *str)
bool blender::BKE_blendfile_library_path_explode (const char *path, char *r_dir, char **r_group, char **r_name)
bool blender::BKE_blendfile_is_readable (const char *path, ReportList *reports)
Blend File IO (High Level)
void blender::BKE_blendfile_read_setup_readfile (bContext *C, BlendFileData *bfd, const BlendFileReadParams *params, BlendFileReadWMSetupData *wm_setup_data, BlendFileReadReport *reports, bool startup_update_defaults, const char *startup_app_template)
void blender::BKE_blendfile_read_setup_undo (bContext *C, BlendFileData *bfd, const BlendFileReadParams *params, BlendFileReadReport *reports)
BlendFileData * blender::BKE_blendfile_read (const char *filepath, const BlendFileReadParams *params, BlendFileReadReport *reports)
BlendFileData * blender::BKE_blendfile_read_from_memory (const void *file_buf, int file_buf_size, const BlendFileReadParams *params, ReportList *reports)
BlendFileData * blender::BKE_blendfile_read_from_memfile (Main *bmain, MemFile *memfile, const BlendFileReadParams *params, ReportList *reports)
void blender::BKE_blendfile_read_make_empty (bContext *C)
Blend File IO (Preferences)

Application Templates

When using app-templates, both regular & app-template preferences are used. Note that "regular" preferences refers to the preferences used with no app-template is active.

  • Reading preferences is performed for both the app-template & regular preferences.

    The preferences are merged by using some from the app-template and other settings from the regular preferences (add-ons from the app-template for example are used), undo-memory uses the regular preferences (for example).

  • Writing preferences is performed for both the app-template & regular preferences.

    Writing unmodified preference (U) into the regular preferences would loose any settings the app-template overrides. To keep default settings the regular preferences is read, add-ons etc temporarily swapped into U for writing, then swapped back out so as not to change the run-time preferences.

Note
The function BKE_blender_userdef_app_template_data_swap determines which settings the app-template overrides.
UserDef * blender::BKE_blendfile_userdef_read (const char *filepath, ReportList *reports)
UserDef * blender::BKE_blendfile_userdef_read_from_memory (const void *file_buf, int file_buf_size, ReportList *reports)
UserDef * blender::BKE_blendfile_userdef_from_defaults ()
bool blender::BKE_blendfile_userdef_write (const char *filepath, ReportList *reports)
bool blender::BKE_blendfile_userdef_write_app_template (const char *filepath, ReportList *reports)
bool blender::BKE_blendfile_userdef_write_all (ReportList *reports)
Blend File IO (WorkSpace)
WorkspaceConfigFileData * blender::BKE_blendfile_workspace_config_read (const char *filepath, const void *file_buf, int file_buf_size, ReportList *reports)
void blender::BKE_blendfile_workspace_config_data_free (WorkspaceConfigFileData *workspace_config)

Macro Definition Documentation

◆ BLENDER_ASSET_FILE_SUFFIX

#define BLENDER_ASSET_FILE_SUFFIX   ".asset.blend"