[Bf-blender-cvs] [5ac7186] blender-v2.77-release: Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.

Philipp Oeser noreply at git.blender.org
Tue Apr 5 10:38:02 CEST 2016


Commit: 5ac7186633fd16e1d86a7214c726e4c82453bf32
Author: Philipp Oeser
Date:   Mon Mar 21 15:45:16 2016 +0100
Branches: blender-v2.77-release
https://developer.blender.org/rB5ac7186633fd16e1d86a7214c726e4c82453bf32

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

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_uv.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index b8fec17..8ed654c 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;
 		}
 	}




More information about the Bf-blender-cvs mailing list