[Bf-blender-cvs] [1068021] gooseberry: Better update function for particle settings affecting nested cloth modifier.

Lukas Tönne noreply at git.blender.org
Fri Nov 21 16:02:25 CET 2014


Commit: 1068021523a5e4e9da8b7b798bbedb2e7e8aaf8c
Author: Lukas Tönne
Date:   Tue Nov 18 10:37:34 2014 +0100
Branches: gooseberry
https://developer.blender.org/rB1068021523a5e4e9da8b7b798bbedb2e7e8aaf8c

Better update function for particle settings affecting nested cloth
modifier.

===================================================================

M	source/blender/makesrna/intern/rna_particle.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 002cf84..a034e96 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -650,6 +650,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;
@@ -2404,7 +2413,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);




More information about the Bf-blender-cvs mailing list