diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-04 14:16:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-04 14:18:06 +0300 |
commit | 59562e5b259ccc1e02e4f943394ca9db5ac938c7 (patch) | |
tree | b65e300b06c3f1ddd50bb4b7c49d9089a9447db9 /source/blender/makesrna/intern/rna_depsgraph.c | |
parent | 7db4b935e15c5fbf2810cbb222fd1ff51745a826 (diff) |
Fix Cycles particle info node not working.
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"); |