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.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user