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:
authorPhilipp Oeser <noreply@developer.blender.org>2016-03-21 17:45:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-03-21 17:45:16 +0300
commit2c3985d9e684b855cc765863bd4af02fb72e3fe3 (patch)
treec0fbf0259d72487f9cb93af43392d4f76a39ad29 /source/blender/editors/sculpt_paint
parentda2dfaad1a5686b899fce4f309cc0b8d4a349f49 (diff)
Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.
rB5b3af3dd made the poll function here slightly too laxist. To be backported to 2.77 should we make an 'a' release. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D1861
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index b8fec17ca5a..8ed654c7042 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -175,9 +175,9 @@ static int uv_sculpt_brush_poll_do(bContext *C, const bool check_region)
em = BKE_editmesh_from_object(obedit);
ret = EDBM_mtexpoly_check(em);
- if (ret && check_region) {
+ if (ret) {
ARegion *ar = CTX_wm_region(C);
- if (!((toolsettings->use_uv_sculpt) && (ar->regiontype == RGN_TYPE_WINDOW))) {
+ if ((!toolsettings->use_uv_sculpt) || (check_region && ar && (ar->regiontype == RGN_TYPE_WINDOW))) {
ret = 0;
}
}