[Bf-blender-cvs] [974053f7e94] master: Fix brush reset (missing notifier)

Campbell Barton noreply at git.blender.org
Thu Oct 5 03:33:26 CEST 2017


Commit: 974053f7e9443c71250c4c83f1a864c0f11bd473
Author: Campbell Barton
Date:   Thu Oct 5 12:32:24 2017 +1100
Branches: master
https://developer.blender.org/rB974053f7e9443c71250c4c83f1a864c0f11bd473

Fix brush reset (missing notifier)

D2843 by @uvwxyz

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

M	source/blender/editors/sculpt_paint/paint_ops.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 4f6b3d100c5..2899cfeedcf 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -264,9 +264,14 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
 
 	if (!ob || !brush) return OPERATOR_CANCELLED;
 
-	if (ob->mode & OB_MODE_SCULPT)
-		BKE_brush_sculpt_reset(brush);
 	/* TODO: other modes */
+	if (ob->mode & OB_MODE_SCULPT) {
+		BKE_brush_sculpt_reset(brush);
+	}
+	else {
+		return OPERATOR_CANCELLED;
+	}
+	WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
 
 	return OPERATOR_FINISHED;
 }



More information about the Bf-blender-cvs mailing list