Bug 371938 - Cloning brush is not working
Summary: Cloning brush is not working
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-01 12:15 UTC by Nataly Novak
Modified: 2016-11-18 08:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Video example (792.95 KB, video/mp4)
2016-11-01 15:03 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nataly Novak 2016-11-01 12:15:16 UTC
When I try to use a cloning brush, it seems at first to be working, but as soon as you release the mouse, the result disappears. The source of the image seems to be wrong, too. 
Video: https://www.dropbox.com/s/vq74dp4s7x5hnkj/Screencast%202016-11-01%2015%3A11%3A49.mp4?dl=0
Comment 1 mvowada 2016-11-01 15:03:15 UTC
Created attachment 101944 [details]
Video example

Yes. Happens also with the "Freehand Brush Tool".
No issues with tablet, only mouse.

(Ubuntu 14.04 - Krita 3.0.91)
Comment 2 mvowada 2016-11-01 15:09:55 UTC
(sorry, the Clone tool is indeed a brush, of course :)
Comment 3 mvowada 2016-11-01 15:35:47 UTC
It seems it doesn't happen when: ("Tool Options" docker) > "No smoothing", is selected. Besides, I wasn't aware of Bug 369547 , sorry.

(I'm marking this as "resolved > fixed" for now... If you think yours is a different issue then please, feel free to reopen this report or let me know. Thanks! :)
Comment 4 Nataly Novak 2016-11-02 04:34:37 UTC
Actually, it happens with any smoothing option and both with the tablet and the mouse. So I'm reopenning the bug.
Comment 5 Dmitry Kazakov 2016-11-07 11:56:12 UTC
Related to bug 369119. Instant preview is disabled for Instant Preview
Comment 6 Dmitry Kazakov 2016-11-07 14:43:54 UTC
Git commit 8c5506fe319ab877343274fcd07c2c3266eaa681 by Dmitry Kazakov.
Committed on 07/11/2016 at 12:22.
Pushed by dkazakov into branch 'rempt/impex-refactoring'.

Cold init Lod Availability widget when switching presets

The problem is that we still store the semantics of the lod
availability in the *widgets*, not in the settings object itself.

One day it'll have to be refactored like we did for size, spacing
and other options.
Related: bug 369119
Fixes T4221
Ref T4250

M  +2    -0    libs/ui/widgets/kis_paintop_presets_popup.cpp

http://commits.kde.org/krita/8c5506fe319ab877343274fcd07c2c3266eaa681
Comment 7 Dmitry Kazakov 2016-11-07 14:46:16 UTC
Git commit 75144827d563efdbd5fa2b279894753e9e9c4207 by Dmitry Kazakov.
Committed on 07/11/2016 at 14:42.
Pushed by dkazakov into branch 'kazakov/try-port-clone-brush-lod'.

The first try to port Clone Brush into LoD system

It almost works, except that when the user does overlapping
self copying strokes (bitBltOldData). That is in this part:

{
    KisPainter copyPainter(m_srcdev);
    copyPainter.setCompositeOp(COMPOSITE_COPY);
    copyPainter.bitBltOldData(0, 0, realSourceDevice, srcPoint.x(), srcPoint.y(), sw, sh);
    copyPainter.end();
}

Looks like the transaction for the projection is not started
or somehow cleared.

M  +2    -0    libs/image/kis_clone_layer.cpp
M  +1    -1    libs/image/kis_indirect_painting_support.cpp
M  +1    -1    libs/image/kis_indirect_painting_support.h
M  +7    -0    libs/image/kis_layer.cc
M  +2    -0    libs/image/kis_layer.h
M  +7    -0    libs/image/kis_paint_layer.cc
M  +2    -0    libs/image/kis_paint_layer.h
M  +3    -0    libs/image/kis_selection_based_layer.cpp
M  +7    -2    plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +1    -1    plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings_widget.cpp

http://commits.kde.org/krita/75144827d563efdbd5fa2b279894753e9e9c4207
Comment 8 Dmitry Kazakov 2016-11-07 15:16:59 UTC
Git commit 72ac1393994b0bae8b3154d3ddd08d950a05636a by Dmitry Kazakov.
Committed on 07/11/2016 at 15:16.
Pushed by dkazakov into branch 'krita/3.1'.

Cold init Lod Availability widget when switching presets

The problem is that we still store the semantics of the lod
availability in the *widgets*, not in the settings object itself.

One day it'll have to be refactored like we did for size, spacing
and other options.
Related: bug 369119
Fixes T4221
Ref T4250

M  +2    -0    libs/ui/widgets/kis_paintop_presets_popup.cpp

http://commits.kde.org/krita/72ac1393994b0bae8b3154d3ddd08d950a05636a
Comment 9 Dmitry Kazakov 2016-11-18 08:25:10 UTC
The bug is now fixed: clone brush doesn't support LoD. Ideally, it should, but there is some weird problem with projections, which I cannot solve atm.