Fix T38574 uv sculpting cursor could be visible during render preview in

image editor.
This commit is contained in:
Antonis Ryakiotakis 2014-02-11 12:40:27 +02:00
parent 10a0b1b8c3
commit 1dfd82d2bc
Notes: blender-bot 2023-02-14 11:13:19 +01:00
Referenced by issue #38574, UV sculpt (cursor) getting stuck on object change
1 changed files with 3 additions and 2 deletions

View File

@ -167,13 +167,14 @@ static int uv_sculpt_brush_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
ToolSettings *toolsettings = scene->toolsettings;
if (!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH)
if (!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH ||
!sima || ED_space_image_show_render(sima) || (sima->mode == SI_MODE_PAINT))
return 0;
em = BKE_editmesh_from_object(obedit);
ret = EDBM_mtexpoly_check(em);
if (ret && sima) {
if (ret) {
ARegion *ar = CTX_wm_region(C);
if ((toolsettings->use_uv_sculpt) && ar->regiontype == RGN_TYPE_WINDOW)
return 1;