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/windowmanager
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/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 5daa622a029..7ee5f363e4b 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2624,8 +2624,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* tag everything, all untagged data can be made local
* its also generally useful to know what is new
*
- * take extra care BKE_main_id_flag_all(bmain, LIB_PRE_EXISTING, false) is called after! */
- BKE_main_id_flag_all(bmain, LIB_PRE_EXISTING, true);
+ * take extra care BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false) is called after! */
+ BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* We define our working data...
* Note that here, each item 'uses' one library, and only one. */
@@ -2705,7 +2705,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* important we unset, otherwise these object wont
* link into other scenes from this blend file */
- BKE_main_id_flag_all(bmain, LIB_PRE_EXISTING, false);
+ BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* recreate dependency graph to include new objects */
DAG_scene_relations_rebuild(bmain, scene);
@@ -4832,11 +4832,11 @@ static bool previews_id_ensure_callback(void *todo_v, ID **idptr, int UNUSED(cd_
PreviewsIDEnsureStack *todo = todo_v;
ID *id = *idptr;
- if (id && (id->flag & LIB_DOIT)) {
+ if (id && (id->tag & LIB_TAG_DOIT)) {
if (ELEM(GS(id->name), ID_MA, ID_TE, ID_IM, ID_WO, ID_LA)) {
previews_id_ensure(todo->C, todo->scene, id);
}
- id->flag &= ~LIB_DOIT; /* Tag the ID as done in any case. */
+ id->tag &= ~LIB_TAG_DOIT; /* Tag the ID as done in any case. */
BLI_LINKSTACK_PUSH(todo->id_stack, id);
}
@@ -4852,8 +4852,8 @@ static int previews_ensure_exec(bContext *C, wmOperator *UNUSED(op))
ID *id;
int i;
- /* We use LIB_DOIT to check whether we have already handled a given ID or not. */
- BKE_main_id_flag_all(bmain, LIB_DOIT, true);
+ /* We use LIB_TAG_DOIT to check whether we have already handled a given ID or not. */
+ BKE_main_id_flag_all(bmain, LIB_TAG_DOIT, true);
BLI_LINKSTACK_INIT(preview_id_stack.id_stack);