Enable hardness for clone tool

This commit is contained in:
luboslenco
2022-05-25 21:53:45 +02:00
parent 9a7b2a2762
commit 6c7c3e2075
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ class Uniforms {
case "_brushHardness": {
var decal = Context.tool == ToolDecal || Context.tool == ToolText;
var decalMask = Operator.shortcut(Config.keymap.decal_mask + "+" + Config.keymap.action_paint, ShortcutDown);
if (Context.tool != ToolBrush && Context.tool != ToolEraser && !decalMask) return 1.0;
if (Context.tool != ToolBrush && Context.tool != ToolEraser && Context.tool != ToolClone && !decalMask) return 1.0;
var val = Context.brushHardness * Context.brushNodesHardness;
var pen = Input.getPen();
if (Config.raw.pressure_hardness && pen.down()) {
+1 -1
View File
@@ -272,7 +272,7 @@ class UIHeader {
Context.brushOpacity = ui.slider(Context.brushOpacityHandle, tr("Opacity"), 0.0, 1.0, true);
if (ui.isHovered) ui.tooltip(tr("Hold {brush_opacity} and move mouse to the left to decrease the opacity\nHold {brush_opacity} and move mouse to the right to increase the opacity", ["brush_opacity" => Config.keymap.brush_opacity]));
if (Context.tool == ToolBrush || Context.tool == ToolEraser || decalMask) {
if (Context.tool == ToolBrush || Context.tool == ToolEraser || Context.tool == ToolClone || decalMask) {
Context.brushHardness = ui.slider(Id.handle({ value: Context.brushHardness }), tr("Hardness"), 0.0, 1.0, true);
}