Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_main.h')
-rw-r--r--source/blender/blenkernel/BKE_main.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index 4d26ed11f1b..7c3a64f1cad 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -113,28 +113,38 @@ typedef struct Main {
char filepath[1024]; /* 1024 = FILE_MAX */
short versionfile, subversionfile; /* see BLENDER_FILE_VERSION, BLENDER_FILE_SUBVERSION */
short minversionfile, minsubversionfile;
- uint64_t build_commit_timestamp; /* commit's timestamp from buildinfo */
- char build_hash[16]; /* hash from buildinfo */
+ /** Commit timestamp from `buildinfo`. */
+ uint64_t build_commit_timestamp;
+ /** Commit Hash from `buildinfo`. */
+ char build_hash[16];
/** Indicate the #Main.filepath (file) is the recovered one. */
- char recovered;
+ bool recovered;
/** All current ID's exist in the last memfile undo step. */
- char is_memfile_undo_written;
+ bool is_memfile_undo_written;
/**
* An ID needs its data to be flushed back.
* use "needs_flush_to_id" in edit data to flag data which needs updating.
*/
- char is_memfile_undo_flush_needed;
+ bool is_memfile_undo_flush_needed;
/**
* Indicates that next memfile undo step should not allow reusing old bmain when re-read, but
* instead do a complete full re-read/update from stored memfile.
*/
- char use_memfile_full_barrier;
+ bool use_memfile_full_barrier;
/**
* When linking, disallow creation of new data-blocks.
* Make sure we don't do this by accident, see T76738.
*/
- char is_locked_for_linking;
+ bool is_locked_for_linking;
+
+ /**
+ * True if this main is the 'GMAIN' of current Blender.
+ *
+ * \note There should always be only one global main, all others generated temporarily for
+ * various data management process must have this property set to false..
+ */
+ bool is_global_main;
BlendThumbnail *blen_thumb;
@@ -200,6 +210,12 @@ typedef struct Main {
struct MainLock *lock;
} Main;
+/**
+ * Create a new Main data-base.
+ *
+ * \note Always generate a non-global Main, use #BKE_blender_globals_main_replace to put a newly
+ * created one in `G_MAIN`.
+ */
struct Main *BKE_main_new(void);
void BKE_main_free(struct Main *mainvar);