krita-resize-yt.mp4
It iterate on every leaf layer (layer without children), take their boundary, and calculate the minimum size of the document (also named image/canvas) for them to fit into.
It only take visible layers. It does not crop anything (nothing ever get deleted). Meaning, running this script after re-enabling a layer, that has something drawn outside the canvas, will enlarge the canvas.
It is basically a "trim to all visible layers" instead of "trim to current layer".
It is useful when you make a sprite, and want to remove the unused space before exporting.
-
Copy
resize_to_visible.desktop
file andresize_to_visible
folder to Resources folder.
Example:%APPDATA%\krita\pykrita
for Window. -
resize_to_visible.action
file go into your installation folder:<your_installation_path>\share\krita\actions
. -
Restart Krita.
In the menu bar, Tools -> Scripts -> Resize to Visible
.
Use Tools --> Script --> Resize to visible (animation)
to take in account all frames. It loop over the animation length.
To setup a shortcut, go into Configure Krita -> Keyboard Shortcuts -> Scripts -> My Scripts -> Resize to visible