Fix T59059: Blender crashing after adding particle system and dynamic paint (Brush).
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 9 Dec 2018 20:48:37 +0000 (21:48 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 9 Dec 2018 20:48:37 +0000 (21:48 +0100)
Looks like this bug has been there since ages (at least present before
2.79 official release...).

source/blender/makesrna/intern/rna_dynamicpaint.c

index 42f8e2a..2561c96 100644 (file)
@@ -157,12 +157,17 @@ static void rna_DynamicPaintSurfaces_changeFormat(Main *bmain, Scene *scene, Poi
        rna_DynamicPaintSurface_reset(bmain, scene, ptr);
 }
 
-static void rna_DynamicPaint_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_DynamicPaint_reset_dependency(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
 {
-       rna_DynamicPaintSurface_reset(bmain, scene, ptr);
        DAG_relations_tag_update(bmain);
 }
 
+static void rna_DynamicPaintSurface_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+       rna_DynamicPaintSurface_reset(bmain, scene, ptr);
+       rna_DynamicPaint_reset_dependency(bmain, scene, ptr);
+}
+
 static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr)
 {
        DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
@@ -427,7 +432,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Group");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Brush Group", "Only use brush objects from this group");
-       RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_reset_dependency");
+       RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset_dependency");
 
 
        /*