Depsgraph: Add missing relations builder
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 Apr 2018 07:33:33 +0000 (09:33 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 Apr 2018 07:33:33 +0000 (09:33 +0200)
Was possible to miss some relations from being built
when parent object is linked to the scene graph indirectly.

source/blender/depsgraph/intern/builder/deg_builder_relations.cc

index 4ebc08044792c474149e18b75206e33554e6548c..dfc20286565249bb71bda64e74b5cd336c3153a8 100644 (file)
@@ -415,6 +415,8 @@ void DepsgraphRelationBuilder::build_object(Object *object)
                                     DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
        /* Parenting. */
        if (object->parent != NULL) {
+               /* Make sure parent object's relations are built. */
+               build_object(object->parent);
                /* Parent relationship. */
                build_object_parent(object);
                /* Local -> parent. */