Bug 401919 - Clone engine cannot clone from layer that was used before (in the latest Ctrl+Click)
Summary: Clone engine cannot clone from layer that was used before (in the latest Ctrl...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.1.5
Platform: Appimage Linux
: NOR major
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-09 10:13 UTC by Griatch
Modified: 2019-04-17 13:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
(Image) (45.80 KB, image/png)
2018-12-09 19:56 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Griatch 2018-12-09 10:13:32 UTC
SUMMARY

Ctrl-clicking a source layer and then moving to another layer will not allow cloning to the new layer. Have tested all combinations of ctrl-click and Ctrl-Alt click and releasing Ctrl or keeping it so as to select both layers (as well as with the source layer visible/invisible) with the same results: You can clone within the same layer but not to another layer. 

STEPS TO REPRODUCE
1. Have two layers: Layer A with blue scribbled lines and layer B with green scribbled lines. Select a tool using the Cloning engine, such as the default Clone brush. Make sure "Clone from all Visisble Layers" is deactivated in the Clone engine settings. 
2. On Layer A, Ctrl-click to place the source on that layer somewhere on the blue scribbled lines. 
3. Move to layer B (either when keeping Ctrl pressed or not, doesn't matter) and start drawing. 

OBSERVED RESULT

You will start cloning green lines (from layer B) rather than the blue lines from the selected source layer A. 


EXPECTED RESULT

You should keep cloning from the source layer you selected. Instead it appears the source layer is always the layer you are on, regardless of where you placed your source. 


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

The desired work flow here is to have a layer A with one or more textures on it.  By selecting textures on the source layer one can then apply the texture to the target layer B using various modes. Ideally the source layer should be able to be invisible as well. This is a powerful technique and a main reason (at least for me) for using the Clone tool at all.

Compare the base functionality of the GIMP clone tool, which supports this work flow:

1) Ctrl-click Layer A
2) Hide layer A, move to layer B
3) Paint on layer B using cloning information from layer A.
Comment 1 mvowada 2018-12-09 19:56:04 UTC
Created attachment 116817 [details]
(Image)

(tested with Krita 4.2.0-pre-alpha (git f735708) - Ubuntu 14.04, i3wm)

Hi,

    1. "CTRL+ALT+LMB" doesn't seem to work in Krita 4 (https://phabricator.kde.org/R37:625c945f131968cb5d7e74592860a1ddcc49d990).
    As an aside, picking from a different image opened in Krita worked in v.2.9 not in v.4 (https://bugs.kde.org/show_bug.cgi?id=347961#c10).

    2. Cloning from an hidden layer I don't think existed in Krita. I'm sharing my proposal in case.

Note: as reported, Gimp allows to clone from an hidden layer (https://docs.gimp.org/en/glossary.html#glossary-samplemerge).


I'm going to set the status to CONFIRMED for point 1 and maybe editing the title for more clarity, please, feel free to change it back if you like. Thanks!
Comment 2 mvowada 2018-12-09 19:57:26 UTC
(confirming)
Comment 3 Tiar 2019-04-17 12:55:31 UTC
Git commit 688578f1f4e13c7260ae4e8b3312d04cd11b0e79 by Agata Cacko.
Committed on 17/04/2019 at 12:52.
Pushed by tymond into branch 'master'.

Allow Clone Brush (duplicateop) to use other layers

Before this commit, Clone Brush was supposed to
use the last layer the source was placed on
(or the current layer if the last layer was
unaccessible or the source wasn't placed yet).
In reality it used always current layer.
This commit fixes that behaviour.

M  +1    -0    plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp

https://commits.kde.org/krita/688578f1f4e13c7260ae4e8b3312d04cd11b0e79