diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-27 13:53:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-27 14:00:33 +0300 |
commit | 3fcf535d2e003ad939fa1f1c7aa4d5da1b38aef7 (patch) | |
tree | 0cc5b044cdc1f7b6fa58ad1d0c3c6cafc51a7759 /source/blender/editors/object/object_add.c | |
parent | ec2ca11cba496294838bfb5fb76f7bfcef2fe8cc (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/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 7650be941d4..1cab8918abc 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1159,12 +1159,12 @@ static int object_delete_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* delete has to handle all open scenes */ - BKE_main_id_flag_listbase(&bmain->scene, LIB_DOIT, 1); + BKE_main_id_flag_listbase(&bmain->scene, LIB_TAG_DOIT, 1); for (win = wm->windows.first; win; win = win->next) { scene = win->screen->scene; - if (scene->id.flag & LIB_DOIT) { - scene->id.flag &= ~LIB_DOIT; + if (scene->id.tag & LIB_TAG_DOIT) { + scene->id.tag &= ~LIB_TAG_DOIT; DAG_relations_tag_update(bmain); @@ -1545,7 +1545,7 @@ static int convert_exec(bContext *C, wmOperator *op) /* flag data thats not been edited (only needed for !keep_original) */ if (ob->data) { - ((ID *)ob->data)->flag |= LIB_DOIT; + ((ID *)ob->data)->tag |= LIB_TAG_DOIT; } /* possible metaball basis is not in this scene */ @@ -1791,7 +1791,7 @@ static int convert_exec(bContext *C, wmOperator *op) if (!keep_original && (ob->flag & OB_DONE)) { DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - ((ID *)ob->data)->flag &= ~LIB_DOIT; /* flag not to convert this datablock again */ + ((ID *)ob->data)->tag &= ~LIB_TAG_DOIT; /* flag not to convert this datablock again */ } } CTX_DATA_END; |