diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 11:23:45 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 13:36:51 +0300 |
commit | 1a0cb28ae2c0734ad8d8438eb1db5b14a4c71291 (patch) | |
tree | d16620e42f7ceab70982de611d8d365b72f69f6f /source/blender/depsgraph/intern/builder/deg_builder_relations.cc | |
parent | 180e8f8bfbb8b1f4d2328d93c55563e616942a06 (diff) |
Depsgraph: Object data separation, light probes
This is a beginning of series of commits which will clearly separate
building IDs which are used as object data from object building.
The goal is to be able to always build whatever ID. Required to make
driver targets to work reliably with copy-on-write concept.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.cc')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index e0df724818d..8e826cd01df 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -615,7 +615,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object) build_camera(object); break; case OB_LIGHTPROBE: - build_lightprobe(object); + build_object_data_lightprobe(object); break; } Key *key = BKE_key_from_object(object); @@ -627,6 +627,19 @@ void DepsgraphRelationBuilder::build_object_data(Object *object) } } +void DepsgraphRelationBuilder::build_object_data_lightprobe(Object *object) +{ + LightProbe *probe = (LightProbe *)object->data; + build_lightprobe(probe); + OperationKey probe_key(&probe->id, + DEG_NODE_TYPE_PARAMETERS, + DEG_OPCODE_LIGHT_PROBE_EVAL); + OperationKey object_key(&object->id, + DEG_NODE_TYPE_PARAMETERS, + DEG_OPCODE_LIGHT_PROBE_EVAL); + add_relation(probe_key, object_key, "LightProbe Update"); +} + void DepsgraphRelationBuilder::build_object_parent(Object *object) { /* XXX: for now, need to use the component key (not just direct to the parent op), @@ -2045,23 +2058,12 @@ void DepsgraphRelationBuilder::build_movieclip(MovieClip *clip) build_animdata(&clip->id); } -void DepsgraphRelationBuilder::build_lightprobe(Object *object) +void DepsgraphRelationBuilder::build_lightprobe(LightProbe *probe) { - LightProbe *probe = (LightProbe *)object->data; if (built_map_.checkIsBuiltAndTag(probe)) { return; } build_animdata(&probe->id); - - OperationKey probe_key(&probe->id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PLACEHOLDER, - "LightProbe Eval"); - OperationKey object_key(&object->id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PLACEHOLDER, - "LightProbe Eval"); - add_relation(probe_key, object_key, "LightProbe Update"); } void DepsgraphRelationBuilder::build_copy_on_write_relations() |