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
This commit is contained in:
parent
da2dfaad1a
commit
2c3985d9e6
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user