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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-27 13:53:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-27 14:00:33 +0300
commit3fcf535d2e003ad939fa1f1c7aa4d5da1b38aef7 (patch)
tree0cc5b044cdc1f7b6fa58ad1d0c3c6cafc51a7759 /source/blender/blenkernel/BKE_library.h
parentec2ca11cba496294838bfb5fb76f7bfcef2fe8cc (diff)
Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all. This change was also needed because we were getting short on ID flags, and future enhancement of 'user_one' ID behavior requires two new ones. id->flag remains for persistent data (fakeuser only, so far!), this also allows us 100% backward & forward compatibility. New id->tag is used for most flags. Though written in .blend files, its content is cleared at read time. Note that .blend file version was bumped, so that we can clear runtimeflags from old .blends, important in case we add new persistent flags in future. Also, behavior of tags (either status ones, or whether they need to be cleared before/after use) has been added as comments to their declaration. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1683
Diffstat (limited to 'source/blender/blenkernel/BKE_library.h')
-rw-r--r--source/blender/blenkernel/BKE_library.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 9a961bafbf9..ff0cad2e5ed 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -102,8 +102,8 @@ void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const bool t
void BKE_main_id_tag_listbase(struct ListBase *lb, const bool tag);
void BKE_main_id_tag_all(struct Main *mainvar, const bool tag);
-void BKE_main_id_flag_listbase(ListBase *lb, const short flag, const bool value);
-void BKE_main_id_flag_all(struct Main *bmain, const short flag, const bool value);
+void BKE_main_id_flag_listbase(ListBase *lb, const int flag, const bool value);
+void BKE_main_id_flag_all(struct Main *bmain, const int flag, const bool value);
void BKE_main_id_clear_newpoins(struct Main *bmain);
@@ -129,7 +129,7 @@ void BKE_library_callback_free_editor_id_reference_set(BKE_library_free_editor_i
/* use when "" is given to new_id() */
#define ID_FALLBACK_NAME N_("Untitled")
-#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT))
+#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->tag & LIB_TAG_DOIT))
#ifdef __cplusplus
}