From 7a1df6f7c058d156c38d38d0c58a13b281a8176e Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 16 Dec 2020 14:34:24 +0100 Subject: [PATCH] Skip cursor for fill layers --- Sources/arm/plugin/Gizmo.hx | 2 +- Sources/arm/render/LineDraw.hx | 2 +- Sources/arm/render/RenderPathPaint.hx | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/arm/plugin/Gizmo.hx b/Sources/arm/plugin/Gizmo.hx index b877b6f6..9e4ed108 100644 --- a/Sources/arm/plugin/Gizmo.hx +++ b/Sources/arm/plugin/Gizmo.hx @@ -23,7 +23,7 @@ class Gizmo { var isRender = UIHeader.inst.worktab.position == SpaceRender; var isPaint = UIHeader.inst.worktab.position == SpacePaint; var isObject = isRender && Context.object != null; - var isDecal = isPaint && Context.layer.fill_layer != null && Context.layer.uvType == UVProject; + var isDecal = isPaint && Context.layer.fill_layer != null && Context.layer.uvType == UVProject && !Context.layerIsMask; var gizmo = Context.gizmo; var hide = Operator.shortcut(Config.keymap.stencil_hide, ShortcutDown); diff --git a/Sources/arm/render/LineDraw.hx b/Sources/arm/render/LineDraw.hx index e4afcb21..b081660e 100644 --- a/Sources/arm/render/LineDraw.hx +++ b/Sources/arm/render/LineDraw.hx @@ -44,7 +44,7 @@ class LineDraw { var hide = Operator.shortcut(Config.keymap.stencil_hide, ShortcutDown) || iron.system.Input.getKeyboard().down("control"); var isPaint = UIHeader.inst.worktab.position == SpacePaint; - var isDecal = isPaint && Context.layer.fill_layer != null && Context.layer.uvType == UVProject; + var isDecal = isPaint && Context.layer.fill_layer != null && Context.layer.uvType == UVProject && !Context.layerIsMask; if (!isDecal || hide) return; mat = Context.layer.decalMat; diff --git a/Sources/arm/render/RenderPathPaint.hx b/Sources/arm/render/RenderPathPaint.hx index e12a74c3..b7dce8cd 100644 --- a/Sources/arm/render/RenderPathPaint.hx +++ b/Sources/arm/render/RenderPathPaint.hx @@ -408,7 +408,10 @@ class RenderPathPaint { !decalMask) { return; } - if (!App.uiEnabled || UIHeader.inst.worktab.position == SpaceRender) { + + var fillLayer = Context.layer.fill_layer != null && !Context.layerIsMask; + var fillMask = Context.layer.fill_mask != null && Context.layerIsMask; + if (!App.uiEnabled || App.isDragging || UIHeader.inst.worktab.position == SpaceRender || fillLayer || fillMask) { return; }