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/gameengine/Ketsji/BL_ActionManager.cpp | 2 +- source/gameengine/Ketsji/KX_Scene.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/gameengine/Ketsji') diff --git a/source/gameengine/Ketsji/BL_ActionManager.cpp b/source/gameengine/Ketsji/BL_ActionManager.cpp index 491be035d66..35f605f1a5f 100644 --- a/source/gameengine/Ketsji/BL_ActionManager.cpp +++ b/source/gameengine/Ketsji/BL_ActionManager.cpp @@ -28,7 +28,7 @@ #include "BL_ActionManager.h" #include "DNA_ID.h" -#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT)) +#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->tag & LIB_TAG_DOIT)) BL_ActionManager::BL_ActionManager(class KX_GameObject *obj): m_obj(obj), diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 046ad25c09c..c43b7be45dc 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -93,7 +93,7 @@ class KX_ObstacleSimulation; #endif /* for ID freeing */ -#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT)) +#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->tag & LIB_TAG_DOIT)) /** * The KX_Scene holds all data for an independent scene. It relates -- cgit v1.2.3