Merge branch 'master' into blender2.8
[blender.git] / source / blender / depsgraph / intern / depsgraph_build_relations.cc
index be8a27dfbc14b7f514b636f29b575bdcb0f4bcef..23d3b391f8a5b6f44ea90e4d7e3b1d041dd291cb 100644 (file)
@@ -242,6 +242,13 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene)
         * created or not.
         */
        BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
+       /* XXX nested node trees are not included in tag-clearing above,
+        * so we need to do this manually.
+        */
+       FOREACH_NODETREE(bmain, nodetree, id) {
+               if (id != (ID *)nodetree)
+                       nodetree->id.tag &= ~LIB_TAG_DOIT;
+       } FOREACH_NODETREE_END
 
        if (scene->set) {
                // TODO: link set to scene, especially our timesource...
@@ -1548,7 +1555,9 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
                        if (mom != ob) {
                                /* non-motherball -> cannot be directly evaluated! */
                                ComponentKey mom_key(&mom->id, DEPSNODE_TYPE_GEOMETRY);
+                               ComponentKey transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
                                add_relation(geom_key, mom_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Metaball Motherball");
+                               add_relation(transform_key, mom_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Metaball Motherball");
                        }
                        break;
                }