[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58311] trunk/blender/source/blender/ editors/sculpt_paint: fix [#36153] Crash when choosing a brush.

Campbell Barton ideasman42 at gmail.com
Tue Jul 16 08:49:03 CEST 2013


Revision: 58311
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58311
Author:   campbellbarton
Date:     2013-07-16 06:49:03 +0000 (Tue, 16 Jul 2013)
Log Message:
-----------
fix [#36153] Crash when choosing a brush.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
    trunk/blender/source/blender/editors/sculpt_paint/sculpt_intern.h

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-07-16 05:29:19 UTC (rev 58310)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-07-16 06:49:03 UTC (rev 58311)
@@ -3534,9 +3534,16 @@
 
 int sculpt_mode_poll_view3d(bContext *C)
 {
-	return (sculpt_mode_poll(C) && CTX_wm_region_view3d(C));
+	return (sculpt_mode_poll(C) &&
+	        CTX_wm_region_view3d(C));
 }
 
+int sculpt_poll_view3d(bContext *C)
+{
+	return (sculpt_poll(C) &&
+	        CTX_wm_region_view3d(C));
+}
+
 int sculpt_poll(bContext *C)
 {
 	return sculpt_mode_poll(C) && paint_poll(C);
@@ -4951,7 +4958,7 @@
 
 		BKE_paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT);
 
-		paint_cursor_start(C, sculpt_mode_poll_view3d);
+		paint_cursor_start(C, sculpt_poll_view3d);
 	}
 
 	WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt_intern.h
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt_intern.h	2013-07-16 05:29:19 UTC (rev 58310)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt_intern.h	2013-07-16 06:49:03 UTC (rev 58311)
@@ -56,7 +56,9 @@
 
 int sculpt_mode_poll(struct bContext *C);
 int sculpt_mode_poll_view3d(struct bContext *C);
+/* checks for a brush, not just sculpt mode */
 int sculpt_poll(struct bContext *C);
+int sculpt_poll_view3d(struct bContext *C);
 void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob,
                                  int need_pmap, int need_mask);
 




More information about the Bf-blender-cvs mailing list