Fix for [#19752] I cant get the particles to render as an object
authorMatt Ebb <matt@mke3.net>
Wed, 4 Nov 2009 03:01:39 +0000 (03:01 +0000)
committerMatt Ebb <matt@mke3.net>
Wed, 4 Nov 2009 03:01:39 +0000 (03:01 +0000)
source/blender/makesrna/intern/rna_particle.c

index d261bda739e695f20c9412e0e6f0096b39f76a5e..6b0c8bee8ee07ee32fa34579ab33372bbd6c198b 100644 (file)
@@ -127,6 +127,12 @@ static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
        particle_recalc(C, ptr, PSYS_RECALC_REDO);
 }
 
+static void rna_Particle_redo_dependency(bContext *C, PointerRNA *ptr)
+{
+       DAG_scene_sort(CTX_data_scene(C));
+       rna_Particle_redo(C, ptr);
+}
+
 static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
 {
        particle_recalc(C, ptr, PSYS_RECALC_RESET);
@@ -1713,7 +1719,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Object");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles.");
-       RNA_def_property_update(prop, 0, "rna_Particle_redo");
+       RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency");
 
        prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");