Bug 404408 - Tangent normal engine doesn't take canvas rotation into account.
Summary: Tangent normal engine doesn't take canvas rotation into account.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.1.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-02-15 17:55 UTC by ninao
Modified: 2019-08-02 08:26 UTC (History)
3 users (show)

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


Attachments
Grid/tool shape orientation problems (201.91 KB, image/png)
2019-06-13 19:10 UTC, Mickael Pointier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ninao 2019-02-15 17:55:06 UTC
SUMMARY
Tangent normal engine doesn't take canvas rotation into account.

STEPS TO REPRODUCE
Currently if I rotate the canvas and paint with a "normal_map" brush, it doesn't take the canvas rotation into account. It wold be really nice if there was an option to make the brush aware of the canvas rotation. My main frustration is because some angles can get quite uncomfortable to paint with the wacom pen.



SOFTWARE/OS VERSIONS
Krita 4.1.7

Linux/KDE Plasma: 
Solus 3.9999

KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

It wold be nice if the this options was optional, like a toggle in the brush to take in account the canvas rotation or completely ignore it
Comment 1 wolthera 2019-02-15 17:56:10 UTC
This used to work at some point, but I think when dmitry refactored the paintinfo for multithreaded brushtips, he refactored away the access to the canvas rotation :|
Comment 2 Mickael Pointier 2019-06-13 19:10:30 UTC
Created attachment 120846 [details]
Grid/tool shape orientation problems

The screenshot shows what happens when you try to paint pixel per pixel with a rotated view, you really don't know on which pixel you are going to paint, it's confusing :)
Comment 3 Mickael Pointier 2019-06-13 19:22:05 UTC
Issue confirmed on the latest 4.2.1 version on Windows 7
Comment 4 Halla Rempt 2019-07-04 09:44:15 UTC
Dmitry, I'm assigning this to you since it's a regression from a refactoring of paintop info from yours.
Comment 5 Dmitry Kazakov 2019-08-01 20:09:32 UTC
Git commit 123c58cddef1dce2b4fa2a16f2f6ebf4dacd5d78 by Dmitry Kazakov.
Committed on 01/08/2019 at 19:48.
Pushed by dkazakov into branch 'master'.

Fix Tangent-Normal brush on rotated/mirrored canvas

(and also in multihand brush)

Now the canvas rotation/mirroing code is fully ported to the new
API, by passing via KisPaintInformation instead of paintop settings'
temporary properties.

M  +25   -13   libs/image/brushengine/kis_paint_information.cc
M  +24   -11   libs/image/brushengine/kis_paint_information.h
M  +0    -19   libs/image/brushengine/kis_paintop_settings.cpp
M  +0    -9    libs/image/brushengine/kis_paintop_settings.h
M  +0    -1    libs/ui/CMakeLists.txt
M  +1    -13   libs/ui/canvas/kis_canvas_controller.cpp
D  +0    -58   libs/ui/canvas/kis_paintop_transformation_connector.cpp
D  +0    -43   libs/ui/canvas/kis_paintop_transformation_connector.h
M  +65   -4    libs/ui/tool/kis_painting_information_builder.cpp
M  +12   -0    libs/ui/tool/kis_painting_information_builder.h
M  +0    -6    libs/ui/tool/kis_tool_freehand.cc
M  +0    -28   libs/ui/tool/kis_tool_freehand_helper.cpp
M  +1    -4    libs/ui/tool/kis_tool_freehand_helper.h
M  +25   -39   libs/ui/tool/kis_tool_multihand_helper.cpp
M  +20   -8    plugins/paintops/defaultpaintops/brush/tests/kis_brushop_test.cpp
M  +3    -5    plugins/paintops/hairy/kis_hairy_paintop.cpp
M  +0    -2    plugins/paintops/hairy/kis_hairy_paintop.h
M  +1    -1    plugins/paintops/libpaintop/kis_current_outline_fetcher.cpp
M  +2    -5    plugins/paintops/libpaintop/kis_pressure_mirror_option.cpp
M  +0    -2    plugins/paintops/libpaintop/kis_pressure_mirror_option.h
M  +5    -11   plugins/paintops/libpaintop/kis_pressure_rotation_option.cpp
M  +0    -7    plugins/paintops/libpaintop/kis_pressure_rotation_option.h
M  +21   -30   plugins/paintops/tangentnormal/kis_tangent_tilt_option.cpp
M  +0    -3    plugins/paintops/tangentnormal/kis_tangent_tilt_option.h

https://invent.kde.org/kde/krita/commit/123c58cddef1dce2b4fa2a16f2f6ebf4dacd5d78
Comment 6 Halla Rempt 2019-08-02 08:26:53 UTC
Git commit c74ddaf2991833c7c587dec47f53456ec36304e2 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 02/08/2019 at 08:26.
Pushed by rempt into branch 'krita/4.2'.

Fix Tangent-Normal brush on rotated/mirrored canvas

(and also in multihand brush)

Now the canvas rotation/mirroing code is fully ported to the new
API, by passing via KisPaintInformation instead of paintop settings'
temporary properties.

M  +25   -13   libs/image/brushengine/kis_paint_information.cc
M  +24   -11   libs/image/brushengine/kis_paint_information.h
M  +0    -19   libs/image/brushengine/kis_paintop_settings.cpp
M  +0    -9    libs/image/brushengine/kis_paintop_settings.h
M  +0    -1    libs/ui/CMakeLists.txt
M  +1    -13   libs/ui/canvas/kis_canvas_controller.cpp
D  +0    -58   libs/ui/canvas/kis_paintop_transformation_connector.cpp
D  +0    -43   libs/ui/canvas/kis_paintop_transformation_connector.h
M  +65   -4    libs/ui/tool/kis_painting_information_builder.cpp
M  +12   -0    libs/ui/tool/kis_painting_information_builder.h
M  +0    -6    libs/ui/tool/kis_tool_freehand.cc
M  +0    -28   libs/ui/tool/kis_tool_freehand_helper.cpp
M  +1    -4    libs/ui/tool/kis_tool_freehand_helper.h
M  +25   -39   libs/ui/tool/kis_tool_multihand_helper.cpp
M  +20   -8    plugins/paintops/defaultpaintops/brush/tests/kis_brushop_test.cpp
M  +3    -5    plugins/paintops/hairy/kis_hairy_paintop.cpp
M  +0    -2    plugins/paintops/hairy/kis_hairy_paintop.h
M  +1    -1    plugins/paintops/libpaintop/kis_current_outline_fetcher.cpp
M  +2    -5    plugins/paintops/libpaintop/kis_pressure_mirror_option.cpp
M  +0    -2    plugins/paintops/libpaintop/kis_pressure_mirror_option.h
M  +5    -11   plugins/paintops/libpaintop/kis_pressure_rotation_option.cpp
M  +0    -7    plugins/paintops/libpaintop/kis_pressure_rotation_option.h
M  +21   -30   plugins/paintops/tangentnormal/kis_tangent_tilt_option.cpp
M  +0    -3    plugins/paintops/tangentnormal/kis_tangent_tilt_option.h

https://invent.kde.org/kde/krita/commit/c74ddaf2991833c7c587dec47f53456ec36304e2