From 3fcf535d2e003ad939fa1f1c7aa4d5da1b38aef7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 27 Dec 2015 11:53:50 +0100 Subject: 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 --- source/blender/editors/space_outliner/outliner_tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_tree.c') diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index f2d8321daa3..9175a092cee 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -392,7 +392,7 @@ static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce, for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { FreestyleLineStyle *linestyle = lineset->linestyle; if (linestyle) { - linestyle->id.flag |= LIB_DOIT; + linestyle->id.tag |= LIB_TAG_DOIT; } } } @@ -400,9 +400,9 @@ static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce, for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { FreestyleLineStyle *linestyle = lineset->linestyle; if (linestyle) { - if (!(linestyle->id.flag & LIB_DOIT)) + if (!(linestyle->id.tag & LIB_TAG_DOIT)) continue; - linestyle->id.flag &= ~LIB_DOIT; + linestyle->id.tag &= ~LIB_TAG_DOIT; outliner_add_element(soops, lb, linestyle, te, 0, 0); } } @@ -1630,7 +1630,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops) lib = (Library *)tselem->id; if (lib && lib->parent) { par = (TreeElement *)lib->parent->id.newid; - if (tselem->id->flag & LIB_INDIRECT) { + if (tselem->id->tag & LIB_TAG_INDIRECT) { /* Only remove from 'first level' if lib is not also directly used. */ BLI_remlink(&soops->tree, ten); BLI_addtail(&par->subtree, ten); -- cgit v1.2.3