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:
authorJoseph Eagar <joeedh@gmail.com>2020-12-21 12:08:24 +0300
committerJoseph Eagar <joeedh@gmail.com>2020-12-21 12:08:24 +0300
commitb3fff9b07aa32dd9421143aeed1a941632f55322 (patch)
treeaff29045c84bb609d2bdfa0b926d35a4004983a1 /source/blender/editors/sculpt_paint/paint_mask.c
parent681e2b6134e8142d258fcbaafab0c8d9b19fac69 (diff)
parent84cc00f3b68e12209e000008f992fad3ac48f757 (diff)
Merge remote-tracking branch 'origin/master' into temp_bmesh_multires
Also redid vcol boundary tool icon, and made a little icon for sculpt color paint.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 4bfb4f140bc..713049137ce 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -1554,6 +1554,11 @@ static int sculpt_trim_gesture_box_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ if (ss->totvert == 0) {
+ /* No geometry to trim or to detect a valid position for the trimming shape. */
+ return OPERATOR_CANCELLED;
+ }
+
SculptGestureContext *sgcontext = sculpt_gesture_init_from_box(C, op);
if (!sgcontext) {
return OPERATOR_CANCELLED;
@@ -1591,6 +1596,11 @@ static int sculpt_trim_gesture_lasso_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ if (ss->totvert == 0) {
+ /* No geometry to trim or to detect a valid position for the trimming shape. */
+ return OPERATOR_CANCELLED;
+ }
+
SculptGestureContext *sgcontext = sculpt_gesture_init_from_lasso(C, op);
if (!sgcontext) {
return OPERATOR_CANCELLED;