diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index 5047bee6b45..9ea12e3befa 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -224,6 +224,11 @@ static PointerRNA rna_Depsgraph_duplis_get(CollectionPropertyIterator *iter) return rna_pointer_inherit_refine(&iter->parent, &RNA_DepsgraphIter, iterator); } +static ID *rna_Depsgraph_evaluated_id_get(Depsgraph *depsgraph, ID *id_orig) +{ + return DEG_get_evaluated_id(depsgraph, id_orig); +} + #else static void rna_def_depsgraph_iter(BlenderRNA *brna) @@ -317,6 +322,12 @@ static void rna_def_depsgraph(BlenderRNA *brna) "rna_Depsgraph_objects_get", NULL, NULL, NULL, NULL); + func = RNA_def_function(srna, "evaluated_id_get", "rna_Depsgraph_evaluated_id_get"); + parm = RNA_def_pointer(func, "id", "ID", "", "Original ID to get evaluated complementary part for"); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_pointer(func, "evaluated_id", "ID", "", "Evaluated ID for the given original one"); + RNA_def_function_return(func, parm); + /* TODO(sergey): Find a better name. */ prop = RNA_def_property(srna, "duplis", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "DepsgraphIter"); |