From cd48d4576bab3bf8d78c686433975cfee944f292 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 14 Oct 2018 19:59:27 +0300 Subject: 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. --- source/blender/modifiers/intern/MOD_datatransfer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_datatransfer.c') 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"); } } -- cgit v1.2.3