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:
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build_nodes.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_nodes.cc44
1 files changed, 27 insertions, 17 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index ad8d756edc4..f38e81e0013 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -245,12 +245,12 @@ 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.
*/
- BKE_main_id_tag_all(bmain, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
/* scene ID block */
add_id_node(&scene->id);
@@ -275,6 +275,7 @@ void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene *scene)
/* object that this is a proxy for */
// XXX: the way that proxies work needs to be completely reviewed!
if (ob->proxy) {
+ ob->proxy->proxy_from = ob;
build_object(scene, base, ob->proxy);
}
@@ -318,10 +319,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;
@@ -368,7 +369,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;
@@ -433,7 +434,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;
@@ -601,7 +602,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;
}
@@ -780,6 +781,14 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
}
}
+ /* Make sure pose is up-to-date with armature updates. */
+ add_operation_node(&arm->id,
+ DEPSNODE_TYPE_PARAMETERS,
+ DEPSOP_TYPE_EXEC,
+ NULL,
+ DEG_OPCODE_PLACEHOLDER,
+ "Armature Eval");
+
/**
* Pose Rig Graph
* ==============
@@ -1020,7 +1029,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
/* ---- ob->data datablock updates ---- */
/* XXX perhaps move this to a separate function? - lukas_t */
- if (obdata->flag & LIB_DOIT) {
+ if (obdata->tag & LIB_TAG_DOIT) {
+
return;
}
/* XXX is this missing 'obdata->flag |= LIB_DOIT' ?! - lukas_t */
@@ -1105,7 +1115,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;
}
@@ -1128,7 +1138,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;
}
@@ -1161,7 +1171,7 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
build_animdata(ntree_id);
/* Parameters for drivers. */
- add_operation_node(ntree_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
+ add_operation_node(ntree_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_POST, NULL,
DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
/* nodetree's nodes... */
@@ -1174,9 +1184,9 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
build_texture(owner_node, (Tex *)bnode->id);
}
else if (bnode->type == NODE_GROUP) {
- bNodeTree *ntree = (bNodeTree *)bnode->id;
- if ((ntree_id->flag & LIB_DOIT) == 0) {
- build_nodetree(owner_node, ntree);
+ bNodeTree *group_ntree = (bNodeTree *)bnode->id;
+ if ((group_ntree->id.tag & LIB_TAG_DOIT) == 0) {
+ build_nodetree(owner_node, group_ntree);
}
}
}
@@ -1189,7 +1199,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;
}
@@ -1227,10 +1237,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 */