diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-14 19:59:27 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-14 20:48:39 +0300 |
commit | cd48d4576bab3bf8d78c686433975cfee944f292 (patch) | |
tree | 5f8e443721807efdecb0c975ff7428864881cacd /source/blender/modifiers | |
parent | 9a38a91f411b721eb8f61401fdc86521933aec87 (diff) |
Depsgraph: Add proper API functions for CustomDataMask dependencies.
There were a few copies of the same few lines in depsgraph build code,
so it seems to be logical to introduce a function for it, and make it
accessible from C code for completeness.
As an example, register the mask needs of the Data Transfer modifier.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_datatransfer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index ac45ce8732d..6c99b5d95b3 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -129,7 +129,9 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte { DataTransferModifierData *dtmd = (DataTransferModifierData *) md; if (dtmd->ob_source != NULL) { - DEG_add_object_relation(ctx->node, dtmd->ob_source, DEG_OB_COMP_GEOMETRY, "DataTransfer Modifier"); + CustomDataMask mask = BKE_object_data_transfer_dttypes_to_cdmask(dtmd->data_types); + + DEG_add_object_customdata_relation(ctx->node, dtmd->ob_source, DEG_OB_COMP_GEOMETRY, mask, "DataTransfer Modifier"); } } |