Depsgraph: Use generic function for modifiers driver target
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 4 Dec 2017 12:59:17 +0000 (13:59 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 6 Dec 2017 09:21:32 +0000 (10:21 +0100)
source/blender/depsgraph/intern/builder/deg_builder_relations.cc

index 5e821ce49ab0d862f77265acf39db3c156279b7b..2755357e11b148acd2145d973fa67bf28d8a6259 100644 (file)
@@ -1018,15 +1018,8 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                }
        }
        else if (GS(id->name) == ID_OB && strstr(rna_path, "modifiers[")) {
-               OperationKey modifier_key(id,
-                                         DEG_NODE_TYPE_GEOMETRY,
-                                         DEG_OPCODE_GEOMETRY_UBEREVAL);
-               if (has_node(modifier_key)) {
-                       add_relation(driver_key, modifier_key, "Driver -> Modifier");
-               }
-               else {
-                       printf("Unexisting driver RNA path: %s\n", rna_path);
-               }
+               RNAPathKey target_key(id, rna_path);
+               add_relation(driver_key, target_key, "Driver -> Target");
        }
        else if (GS(id->name) == ID_KE && strstr(rna_path, "key_blocks[")) {
                /* Shape key driver - hook into the base geometry operation. */