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/depsgraph/intern/depsgraph_build_nodes.cc
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/depsgraph/intern/depsgraph_build_nodes.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_nodes.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index 47aa14c7637..87af9c8aceb 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -242,7 +242,7 @@ OperationDepsNode *DepsgraphNodeBuilder::find_operation_node(
void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene *scene)
{
- /* LIB_DOIT is used to indicate whether node for given ID was already
+ /* LIB_TAG_DOIT is used to indicate whether node for given ID was already
* created or not. This flag is being set in add_id_node(), so functions
* shouldn't bother with setting it, they only might query this flag when
* needed.
@@ -315,10 +315,10 @@ void DepsgraphNodeBuilder::build_group(Scene *scene,
Group *group)
{
ID *group_id = &group->id;
- if (group_id->flag & LIB_DOIT) {
+ if (group_id->tag & LIB_TAG_DOIT) {
return;
}
- group_id->flag |= LIB_DOIT;
+ group_id->tag |= LIB_TAG_DOIT;
for (GroupObject *go = (GroupObject *)group->gobject.first;
go != NULL;
@@ -365,7 +365,7 @@ SubgraphDepsNode *DepsgraphNodeBuilder::build_subgraph(Group *group)
void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
{
- if (ob->id.flag & LIB_DOIT) {
+ if (ob->id.tag & LIB_TAG_DOIT) {
IDDepsNode *id_node = m_graph->find_id_node(&ob->id);
id_node->layers = base->lay;
return;
@@ -430,7 +430,7 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
default:
{
ID *obdata = (ID *)ob->data;
- if ((obdata->flag & LIB_DOIT) == 0) {
+ if ((obdata->tag & LIB_TAG_DOIT) == 0) {
build_animdata(obdata);
}
break;
@@ -598,7 +598,7 @@ OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcu)
void DepsgraphNodeBuilder::build_world(World *world)
{
ID *world_id = &world->id;
- if (world_id->flag & LIB_DOIT) {
+ if (world_id->tag & LIB_TAG_DOIT) {
return;
}
@@ -961,7 +961,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
// add geometry collider relations
}
- if (obdata->flag & LIB_DOIT) {
+ if (obdata->tag & LIB_TAG_DOIT) {
return;
}
@@ -1045,7 +1045,7 @@ void DepsgraphNodeBuilder::build_camera(Object *ob)
/* TODO: Link scene-camera links in somehow... */
Camera *cam = (Camera *)ob->data;
ID *camera_id = &cam->id;
- if (camera_id->flag & LIB_DOIT) {
+ if (camera_id->tag & LIB_TAG_DOIT) {
return;
}
@@ -1068,7 +1068,7 @@ void DepsgraphNodeBuilder::build_lamp(Object *ob)
{
Lamp *la = (Lamp *)ob->data;
ID *lamp_id = &la->id;
- if (lamp_id->flag & LIB_DOIT) {
+ if (lamp_id->tag & LIB_TAG_DOIT) {
return;
}
@@ -1115,7 +1115,7 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
}
else if (bnode->type == NODE_GROUP) {
bNodeTree *group_ntree = (bNodeTree *)bnode->id;
- if ((group_ntree->id.flag & LIB_DOIT) == 0) {
+ if ((group_ntree->id.tag & LIB_TAG_DOIT) == 0) {
build_nodetree(owner_node, group_ntree);
}
}
@@ -1129,7 +1129,7 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
void DepsgraphNodeBuilder::build_material(DepsNode *owner_node, Material *ma)
{
ID *ma_id = &ma->id;
- if (ma_id->flag & LIB_DOIT) {
+ if (ma_id->tag & LIB_TAG_DOIT) {
return;
}
@@ -1167,10 +1167,10 @@ void DepsgraphNodeBuilder::build_texture_stack(DepsNode *owner_node, MTex **text
void DepsgraphNodeBuilder::build_texture(DepsNode *owner_node, Tex *tex)
{
ID *tex_id = &tex->id;
- if (tex_id->flag & LIB_DOIT) {
+ if (tex_id->tag & LIB_TAG_DOIT) {
return;
}
- tex_id->flag |= LIB_DOIT;
+ tex_id->tag |= LIB_TAG_DOIT;
/* texture itself */
build_animdata(tex_id);
/* texture's nodetree */