mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
GP: Hide cursor in some modes
This commit is contained in:
parent
c199040438
commit
583bc70435
1 changed files with 8 additions and 0 deletions
|
|
@ -1444,6 +1444,14 @@ static bool gp_check_cursor_region(bContext *C, int mval[2])
|
|||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
|
||||
if ((ob == NULL) ||
|
||||
(!ELEM(ob->mode, OB_MODE_GPENCIL_PAINT, OB_MODE_GPENCIL_SCULPT, OB_MODE_GPENCIL_WEIGHT)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* TODO: add more spacetypes */
|
||||
if (!ELEM(sa->spacetype, SPACE_VIEW3D)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue