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:
authorCampbell Barton <ideasman42@gmail.com>2020-05-13 16:19:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-13 16:19:29 +0300
commit3a1426afbd0af0a197892235ef13fca93f68805b (patch)
treead131b7de6e76699cf964c2cd781452dcea6ed94 /source/blender/editors/sculpt_paint/paint_vertex.c
parente7d5e16af11c2d80cff2e9e547000b240fc1c283 (diff)
parent5159b8e1eadb3803064a97874f7ebc059ce2be32 (diff)
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 66e72145835..a18a0145faa 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1450,8 +1450,7 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-/* for switching to/from mode */
-static bool paint_poll_test(bContext *C)
+static bool paint_mode_toggle_poll_test(bContext *C)
{
Object *ob = CTX_data_active_object(C);
if (ob == NULL || ob->type != OB_MESH) {
@@ -1460,9 +1459,6 @@ static bool paint_poll_test(bContext *C)
if (!ob->data || ID_IS_LINKED(ob->data)) {
return 0;
}
- if (CTX_data_edit_object(C)) {
- return 0;
- }
return 1;
}
@@ -1476,7 +1472,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec = wpaint_mode_toggle_exec;
- ot->poll = paint_poll_test;
+ ot->poll = paint_mode_toggle_poll_test;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -2683,7 +2679,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec = vpaint_mode_toggle_exec;
- ot->poll = paint_poll_test;
+ ot->poll = paint_mode_toggle_poll_test;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;