Arrange 2 extends the functionality of Krita’s standard arrange tools for vector layers, adding support to aligning and distributing a mix all of types of layers.
Copy the Arrange2 folder and arrange2.desktop to the pykrita directory found in your Krita resources folder.
Start Krita and enable the plugin at: Settings > Configure Krita... > Python Plugin Manager
Restart Krita.
Enable the Arrange docker.
The alignment and distribution tools will appear on the old Arrange docker.
By default Krita will activate the Select Shapes Tool when you select a vector layer. That will display the old Arrange docker contents so you can arrange shapes within a same vector layer. To use the new tools you’ll need to select any other tool, like the Move tool.
Features
It supports all kinds of layers, including groups.
You can choose to align elements to the Active Layer, the Canvas or all Selected Layers.
Elements are distributed according to their coordinates on canvas, not their Z order like Krita’s arrange for vectors.
There are four new Edge-to-edge distribution modes.
They were added to make it easier to place elements side-by-side without any spaces, making up for the current lack of snapping to edges when moving layers. It’s very helpful when creating layouts, presentations for clients showing design options, step-by-step progressions and more.
The plugin also patches a minor bug in which when the original Arrange docker gets initialized it would change the height of the docker, squeezing other dockers. Now it’s more well behaved with a smaller minimum height.
Layer Types Support
Some layers types like fills don’t have dimensions, beginning or end. In this case they’re only supported in some operations under specific circumstances.
Layers Support Table
Layer Type
Directly Selected
Parent / Source Selected
Align
Distribute
Notes
Paint Layer
Yes
Y/N
Won’t move when hidden or with edition lock.
Vector Layer
Yes
Y/N
Won’t move when hidden or with edition lock.
Colorize Layer
Yes
Y/N
Won’t move when hidden or with edition lock.
Clone Layer
Yes
Y/N
Won’t move when hidden or with edition lock. If it’s a source to another clone it’ll also move.
Clone Layer
No
Y/N
*
*
Clones of layers being moved will also move because they’re relative to them. Their positions won’t be corrected unless they’re also being moved by being directly selected or are inside a group being moved.
Group Layer
Yes
Y/N
When a group is selected its children layers will move as a single unit. Hidden layers will also move, but layers with edition lock won’t.
Layers Inside Group
Yes
No
When the parent group isn’t selected layers will move individually.
Fill / Filter Layer
Y/N
Yes
Will move with parent group.
Fill / Filter Layer
Yes
No
*
The layer won’t move without a parent. When it’s the Active Layer during alignments the selected layers will align to the canvas instead.
Masks
Yes
Y/N
*
*
Move when inside groups or together with a parent layer. Will move even when hidden, but not edition locked.
Masks
No
Yes
Can’t be moved on their own.
Limitations
You can’t redo and undo Arrange 2 actions because they aren’t part of the layer history.
Arranging or distributing layers outside the canvas bounds may fail because they don’t inform their dimensions or positions relative to the canvas.
Testing
This plugin was developed and tested on Krita 5.2.2. It seems to work okay.
I’d like you to pay close attention to groups and clone layers in particular when using it. Clone layers are special kind of evil and the brunt of the work done was to compel them to behave as expected.
I’m also still pretty new to Krita and might have overlooked some layer usage situations. Don’t hesitate to let me know!
Development Notes
The only reason this is a plugin instead of a patch for Krita is because I can’t code in C++. If you can, please feel free to translate this code and implement the patch. It’d be greatly appreciated!
I’m sure there’s some leftover clutter in the code from past approaches to issues here and there, but I’m dead and I want to get it out of the door.
Thank you for making this! I was really bummed to find the arrangement tools were limited to just vector layers on a project I was working on a while back. Hope this functionality could be implemented into stock Krita at some point in the future
Thanks!..I coded something similar but it didn’t have UI and worked with only one type of alignment. I was postponing working on it further. But now I don’t have to.
I’m allways testing arrangement and align plugins and your seems to be the one of the best out here!
After more than 3 years on Krita I still wonder why this functionally it’s not built into the software already hahaha
I tried it for a moment, and when you press ctrl z the layers go crazy, they change order and do not return to the previous position, nor do I get the buttons at the bottom right “active”, but I can press on them anyway and there are changes, otherwise I don’t understand very well how to use the tool in general
I’m glad y’all been finding it useful! I also missed that functionality and while it’s just a straightforward logic problem some layer types didn’t make it that quick to implement. I’d rather have devs focus on advanced features and tricky bugs and leave the simple stuff like this for hobbyists.
If no one picks it up for implementation until 2025 maybe I’ll pick it up again as a learning C++ project.
Undo/redo are known limitations. I can’t do anything about it because afaik there’s no python API to connect to that functionality.
I don’t understand what you mean by getting the buttons active. Perhaps you’ve got an unsupported alignment option selected? “Canvas” and “Active” only work for alignment operations, when selected the other ones such as distribute are disabled so users don’t get confused when they they try to use them with these two and nothing happens.
They don’t support these options because you can’t distribute layers relative to the canvas or one active layer, by design these options always take all selected layers into account, using their order and combined bounds in the new placement.
You also need to have at least three layers selected to perform most distribute and spacing actions.
Do you think it’d be better communicated by removing the disabling and showing a warning instead when the user tries to use the wrong relativity option and operation combination?
Sorry for late response, the problem was that I only select 2 layers. If you want, it may be a good idea to add the warning that you have to select at least three layers to be able to apply the arrangement.
In my opinion this could be a very good plugin, although the developers should also focus a little more on the section of working with vectors, and have it implemented in some way applicable to normal layers as well.
In version 5.2.3 on Fedora Arratge 2 it doesn’t work for me, actually no script works for me anymore. In Krita 5.2.8 beta it works. However, this tool or similar would be needed by default
HI Guys ! I installed the plugin( ver. 1.0) as said (Mac M1, Krita 5.2.6) and restarted Krita. The plugin appears in the list of scripts and is activated, but its docker does not appear in the dockers list though. Why could it be, please ?
Hi! I’ve been the most negligent add-on author, this period of final and first months of the year tends to be the busiest for me.
The plugin hijacks the default Arrange panel when the right tool (move) + the right kinds of layers are selected. It replaces the message saying arranging is not supported when anything but vector layers is selected.
This way there’s no need to keep yet another docker open when you want to align anything.
If no script works it sounds something is wrong with your install. Have you tried the usual fixes?
Got it ! I can manage now ! Thank you for your kind response. Your approach is actually clever. Hopefully, your plugin will count among the native features of Krita , in the future. This is very useful.