[Bf-blender-cvs] [d11903b] soc-2013-paint: Add some missing notifiers and handledr for image events on the toolbar. This should solve redraw of layers after strokes.

Antony Riakiotakis noreply at git.blender.org
Thu Apr 24 00:20:34 CEST 2014


Commit: d11903be2ddb50bd6ee41dee34b742175425fcf2
Author: Antony Riakiotakis
Date:   Thu Apr 24 01:20:25 2014 +0300
https://developer.blender.org/rBd11903be2ddb50bd6ee41dee34b742175425fcf2

Add some missing notifiers and handledr for image events on the toolbar.
This should solve redraw of layers after strokes.

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

M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index c54f7e0..41e65fe 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4861,6 +4861,8 @@ bool proj_paint_add_slot(bContext *C, int type, Material *ma)
 				refresh_texpaint_image_cache(ma);
 				BKE_image_signal(ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE);
 				WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
+				WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima);
+				ED_area_tag_redraw(CTX_wm_area(C));
 			}
 
 			WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 75d7cd1..175aa5a 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1085,6 +1085,11 @@ static void view3d_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa
 			if (wmn->data == ND_DATA || wmn->action == NA_EDITED)
 				ED_region_tag_redraw(ar);
 			break;
+		case NC_IMAGE:
+			/* Update for the image layers in texture paint. */
+			if (wmn->action == NA_EDITED)
+				ED_region_tag_redraw(ar);
+			break;
 	}
 }




More information about the Bf-blender-cvs mailing list