Multibrush "copy translate" mode
ClosedPublic

Authored by pavelb on Jan 15 2019, 2:16 AM.

Details

Summary

Adds new "copy translate" mode to multibrush

video showcase:
https://www.youtube.com/watch?v=FBLKi7daAE4

There are still some things to be polished and ironed out, but it's already good enough for first review

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pavelb requested review of this revision.Jan 15 2019, 2:16 AM
pavelb created this revision.

Hi Pavel,

I am commenting as a painter, and not on code. This feature is really nice and It can really help in certain cases. However the older translate option would also help for some scenarios, for example drawing grass or fur or hair etc. Is this option going to replace the older translate option? Is it possible to keep both options anyhow?

thank you

rempt added a subscriber: rempt.Jan 15 2019, 8:53 AM

Curious... I get a build error:

/home/boud/dev/krita/plugins/tools/basictools/kis_tool_multihand.cpp: In member function ‘virtual QWidget* KisToolMultihand::createOptionWidget()’:
/home/boud/dev/krita/plugins/tools/basictools/kis_tool_multihand.cpp:396:55: error: invalid use of non-static member function ‘void QAbstractButton::clicked(bool)’

connect(customUI->addSubbrushButton, QPushButton::clicked, this, &slotAddSubbrushesMode);
                                                  ^~~~~~~

/home/boud/dev/krita/plugins/tools/basictools/kis_tool_multihand.cpp:396:71: error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&KisToolMultihand::slotAddSubbrushesMode’ [-fpermissive]

connect(customUI->addSubbrushButton, QPushButton::clicked, this, &slotAddSubbrushesMode);
                                                                  ^~~~~~~~~~~~~~~~~~~~~

/home/boud/dev/krita/plugins/tools/basictools/kis_tool_multihand.cpp:397:75: error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&KisToolMultihand::slotRemoveAllSubbrushes’ [-fpermissive]

connect(customUI->removeSubbrushButton, &QPushButton::clicked, this, &slotRemoveAllSubbrushes);

Curious... I get a build error:

These lines should be of course,

connect(customUI->addSubbrushButton, &QPushButton::clicked, this, &KisToolMultihand::slotAddSubbrushesMode);
connect(customUI->removeSubbrushButton, &QPushButton::clicked, this, &KisToolMultihand::slotRemoveAllSubbrushes);

Strange that MinGW 7.3 doesn't catch this, not even as a warning

pavelb updated this revision to Diff 49503.Jan 15 2019, 9:23 AM

fix typos

pavelb updated this revision to Diff 49504.Jan 15 2019, 9:30 AM

fix translate ui

Hi Pavel,

I am commenting as a painter, and not on code. This feature is really nice and It can really help in certain cases. However the older translate option would also help for some scenarios, for example drawing grass or fur or hair etc. Is this option going to replace the older translate option? Is it possible to keep both options anyhow?

thank you

right now it's implemented as a fifth mode for the tool, the old functionality is still there

rempt accepted this revision.Jan 15 2019, 9:48 AM

Works fine for me, and I can access the older items as well.

libs/ui/tool/kis_tool.h
299

Hm, I see that PAN_MODE and MIRROR_AXIS_SETUP_MODE aren't used. I would still say that OTHER and OTHER_1 needs to have a more descriptive name. The comment that OTHER "isn't used now" is wrong in any case :-)

plugins/tools/basictools/kis_tool_multihand.cpp
85

Before we push, we should get rid of temporary debug messages.

This revision is now accepted and ready to land.Jan 15 2019, 9:48 AM
pavelb updated this revision to Diff 49512.Jan 15 2019, 11:15 AM

remove temporary debug calls
fix show axes checkbox, force redraw on "add" button click
code style

there are no issues left that i could find

Have you got commit access? If not, I can push it for you, but I need to know your name and email address.

pavelb added inline comments.Jan 15 2019, 11:20 AM
libs/ui/tool/kis_tool.h
299

Qt does tend to use more descriptive names, like "User" and "MaxUser" for example :)
http://doc.qt.io/qt-5/qevent.html#Type-enum

pavel belski, genosimple at gmail com

For the next patch, we'll have to make you get a KDE identity and developer access :-)

This revision was automatically updated to reflect the committed changes.