diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 13:01:38 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 13:36:52 +0300 |
commit | 22370929fe407eb43bdc7511799fa655e14a4b9e (patch) | |
tree | 8525cc457c1ad87e7f037ebde66a79acfd30037f /source/blender/depsgraph | |
parent | 7810c60fe37b017c715b8214d497e3b5ca200038 (diff) |
Depsgraph: Expand object data datablocks for drivers
Drivers can reference object data datablock directly, and if there
was no object in the scene with that datablock, blender will crash.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 23 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 23 |
2 files changed, 46 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 607e1389c5f..8861ffc956a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -383,12 +383,27 @@ void DepsgraphNodeBuilder::build_id(ID* id) { return; } switch (GS(id->name)) { + case ID_AR: + build_armature((bArmature *)id); + break; + case ID_CA: + build_camera((Camera *)id); + break; case ID_GR: build_collection((Collection *)id); break; case ID_OB: build_object(-1, (Object *)id, DEG_ID_LINKED_INDIRECTLY); break; + case ID_KE: + build_shapekeys((Key *)id); + break; + case ID_LA: + build_lamp((Lamp *)id); + break; + case ID_LP: + build_lightprobe((LightProbe *)id); + break; case ID_NT: build_nodetree((bNodeTree *)id); break; @@ -410,8 +425,16 @@ void DepsgraphNodeBuilder::build_id(ID* id) { case ID_MC: build_movieclip((MovieClip *)id); break; + case ID_ME: + case ID_CU: + case ID_MB: + case ID_LT: + build_object_data_geometry_datablock(id); + break; default: fprintf(stderr, "Unhandled ID %s\n", id->name); + BLI_assert(!"Should never happen"); + break; } } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index d91d80cead6..26f5c167627 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -399,12 +399,27 @@ void DepsgraphRelationBuilder::build_id(ID *id) return; } switch (GS(id->name)) { + case ID_AR: + build_armature((bArmature *)id); + break; + case ID_CA: + build_camera((Camera *)id); + break; case ID_GR: build_collection(NULL, (Collection *)id); break; case ID_OB: build_object(NULL, (Object *)id); break; + case ID_KE: + build_shapekeys((Key *)id); + break; + case ID_LA: + build_lamp((Lamp *)id); + break; + case ID_LP: + build_lightprobe((LightProbe *)id); + break; case ID_NT: build_nodetree((bNodeTree *)id); break; @@ -423,8 +438,16 @@ void DepsgraphRelationBuilder::build_id(ID *id) case ID_MC: build_movieclip((MovieClip *)id); break; + case ID_ME: + case ID_CU: + case ID_MB: + case ID_LT: + build_object_data_geometry_datablock(id); + break; default: fprintf(stderr, "Unhandled ID %s\n", id->name); + BLI_assert(!"Should never happen"); + break; } } |