Add Multibrush 'Copy Translate at Intervals' mode
The first commit fixes a bug where the Multibrush's Rotation and Radius options weren't loaded from the config correctly.
The second commit is based on this feature request on KA: https://krita-artists.org/t/multibrush-copy-translate-interval-x-and-y/ .
This adds a "Copy Translate at Intervals" mode to the Multibrush tool, which is similar to Copy Translate, but sets the brushes automatically at X and Y intervals to split the image or selection into a grid and draw simultaneously in each rectangle.
I am not sure about the wording of any of the strings
(the mode name "Copy Translate at Intervals",
the warning Multibrush Tool does not support more than %1 brushes; use a larger interval.
).
Test Plan
- Set the Multibrush Tool to "Copy Translate at Intervals".
- Change the intervals, drawing inside the given rectangles (visible with "Show Origin" which shows the brush locations) should work as expected. With one interval set to 0 and the other not, it should make a single line of brushes.
- An interval that would cause >50 brushes should show a warning on the canvas instead, since too many brushes would cause extreme lag.
- Add a selection; the intervals should be bounded to the selection instead of the image (so that they start at the selection rect's top left).
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.