diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index bb20fcb271f..04e7f64712e 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -81,6 +81,14 @@ static PointerRNA rna_DepsgraphIter_parent_get(PointerRNA *ptr) return rna_pointer_inherit_refine(ptr, &RNA_Object, dupli_parent); } +static PointerRNA rna_DepsgraphIter_particle_system_get(PointerRNA *ptr) +{ + BLI_Iterator *iterator = ptr->data; + DEGObjectIterData *deg_iter = (DEGObjectIterData *)iterator->data; + return rna_pointer_inherit_refine(ptr, &RNA_ParticleSystem, + deg_iter->dupli_object_current->particle_system); +} + static void rna_DepsgraphIter_persistent_id_get(PointerRNA *ptr, int *persistent_id) { BLI_Iterator *iterator = ptr->data; @@ -277,6 +285,12 @@ static void rna_def_depsgraph_iter(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_DepsgraphIter_parent_get", NULL, NULL, NULL); + prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "ParticleSystem"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Particle System", "Particle system that this object was instanced from"); + RNA_def_property_pointer_funcs(prop, "rna_DepsgraphIter_particle_system_get", NULL, NULL, NULL); + prop = RNA_def_property(srna, "persistent_id", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "Persistent ID", "Persistent identifier for inter-frame matching of objects with motion blur"); |