Fix T52741: Follow track with depth object crashes Blender with new depsgraph
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 14 Sep 2017 07:31:54 +0000 (12:31 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 14 Sep 2017 07:31:54 +0000 (12:31 +0500)
source/blender/depsgraph/intern/builder/deg_builder_relations.cc

index ce5ecf7994899c5840eb5309517ce5145024308d..e9d7b33de6bfcd371ff81b3b03c222c40caaafca 100644 (file)
@@ -701,8 +701,12 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id,
                                        depends_on_camera = true;
                                }
                                if (data->depth_ob) {
-                                       ComponentKey depth_key(&data->depth_ob->id, DEG_NODE_TYPE_TRANSFORM);
-                                       add_relation(depth_key, constraint_op_key, cti->name);
+                                       ComponentKey depth_transform_key(&data->depth_ob->id,
+                                                                        DEG_NODE_TYPE_TRANSFORM);
+                                       ComponentKey depth_geometry_key(&data->depth_ob->id,
+                                                                       DEG_NODE_TYPE_GEOMETRY);
+                                       add_relation(depth_transform_key, constraint_op_key, cti->name);
+                                       add_relation(depth_geometry_key, constraint_op_key, cti->name);
                                }
                        }
                        else if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) {