[Bf-blender-cvs] [56aa4ea] master: Fix T39684, warn when entering sculpt mode with an object with non-
Antony Riakiotakis
noreply at git.blender.org
Thu May 15 21:50:07 CEST 2014
Commit: 56aa4eadcc3f439e79c71753299f462a83015533
Author: Antony Riakiotakis
Date: Thu May 15 22:49:02 2014 +0300
https://developer.blender.org/rB56aa4eadcc3f439e79c71753299f462a83015533
Fix T39684, warn when entering sculpt mode with an object with non-
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c9101ff..ee4dfcf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -65,6 +65,7 @@
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_paint.h"
+#include "BKE_report.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_subsurf.h"
@@ -5041,6 +5042,13 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
BKE_sculpt_mask_layers_ensure(ob, mmd);
}
+ if (!(fabsf(ob->size[0] - ob->size[1]) < 1e-4f && fabsf(ob->size[1] - ob->size[2]) < 1e-4f))
+ BKE_report(op->reports, RPT_INFO,
+ "Object has non-uniform scale, sculpting may be unpredictable");
+ else if (is_negative_m4(ob->obmat))
+ BKE_report(op->reports, RPT_INFO,
+ "Object has negative scale, sculpting may be unpredictable");
+
BKE_paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT);
paint_cursor_start(C, sculpt_poll_view3d);
More information about the Bf-blender-cvs
mailing list