Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-11-18 12:37:34 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:08 +0300
commit790b9319560b0e974702f1671172a8daf6cd2a03 (patch)
tree2066a113d32724f1bff01b66cc196a8edc81bf89 /source/blender/makesrna
parent60bf6c123fae87f8ced5c2f33a6c14cab50d94c2 (diff)
Better update function for particle settings affecting nested cloth
modifier.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 781012de652..6d411cf7608 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -645,6 +645,15 @@ static void rna_Particle_redo_child(Main *bmain, Scene *scene, PointerRNA *ptr)
particle_recalc(bmain, scene, ptr, PSYS_RECALC_CHILD);
}
+static void rna_Particle_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ Object *ob = (Object *)ptr->id.data;
+
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
+}
+
+
static ParticleSystem *rna_particle_system_for_target(Object *ob, ParticleTarget *target)
{
ParticleSystem *psys;
@@ -2322,7 +2331,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "bending_random");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Bending Stiffness", "Random stiffness of hairs");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_cloth_update");
/*TODO: not found in UI, readonly? */
prop = RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE);