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:
authorAntony Riakiotakis <kalast@gmail.com>2013-04-13 01:58:18 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-13 01:58:18 +0400
commit9d0b08365ff2f1f0b44c3c7621f80b71c5bb5b7f (patch)
tree61213a139465fae95720a327f2d67cacadf25a7a /source/blender/makesrna/intern/rna_sculpt_paint.c
parenta074df37c7630ddc23aa74d4e957a8113955c925 (diff)
Fixes:
* Overlay invalidation did not happen when changing brush, .either through UI or through shortcuts * Add initiliazation of curves before threaded overlay texture evaluation or we may get memory leaks due to race conditions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index bb3043fabcf..b48ae3e0194 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -279,6 +279,12 @@ static char *rna_ParticleBrush_path(PointerRNA *ptr)
return BLI_strdup("tool_settings.particle_edit.brush");
}
+static void rna_Paint_brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ Brush *br = (Brush *)ptr->data;
+ BKE_paint_invalidate_overlay_all();
+ WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
+}
#else
static void rna_def_paint(BlenderRNA *brna)
@@ -294,7 +300,7 @@ static void rna_def_paint(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Brush_mode_poll");
RNA_def_property_ui_text(prop, "Brush", "Active Brush");
- RNA_def_property_update(prop, NC_BRUSH | NA_EDITED, NULL);
+ RNA_def_property_update(prop, 0, "rna_Paint_brush_update");
prop = RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH);