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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 0b15ee36355..3cb613ac5ca 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1875,11 +1875,14 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
{
Scene *scene= CTX_data_scene(C);
struct PaintStroke *stroke = op->customdata;
- ToolSettings *ts= CTX_data_tool_settings(C);
+ ToolSettings *ts= scene->toolsettings;
VPaint *wp= ts->wpaint;
Object *ob= CTX_data_active_object(C);
struct WPaintData *wpd;
Mesh *me;
+
+// bDeformGroup *dg;
+
float mat[4][4], imat[4][4];
if(scene->obedit) return OPERATOR_CANCELLED;
@@ -1924,6 +1927,20 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
return OPERATOR_PASS_THROUGH;
}
+#if 0
+ /* check if we are attempting to paint onto a locked vertex group,
+ * and other options disallow it from doing anything useful */
+ dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
+ if ( (dg->flag & DG_LOCK_WEIGHT) &&
+ (ts->auto_normalize == FALSE) &&
+ (ts->multipaint == FALSE) )
+ {
+ BKE_report(op->reports, RPT_WARNING, "Active group is locked, multi-paint/normalize disabled, aborting");
+
+ return OPERATOR_CANCELLED;
+ }
+#endif
+
/* ALLOCATIONS! no return after this line */
/* make mode data storage */
wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");