Bug 364096 - Scml spriter export fails to properly crop the layers, fails to export animation frames
Summary: Scml spriter export fails to properly crop the layers, fails to export animat...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.0
Platform: unspecified Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-08 11:31 UTC by Theodore Imre
Modified: 2020-04-04 13:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theodore Imre 2016-06-08 11:31:02 UTC
problem 1: layers are not cropped properly.
This is due to krita's brush engine creating a dot pixel outside of the canvas area.
Spriter exporter should automatically delete all pixels that are outside of the canvas
This ugly dot appears on all body part layers:
http://i.imgur.com/8npq1XY.png
when in krita it is not visible- because it is created by krita's brush tool outside of the visible canvas.

problem2: when using animation frames in krita, i expect those to all get exported - they are useful for body part variations to later use in spriter. Instead krita only exports the very first frame of any layer that contains more than one frames.

Reproducible: Always

Steps to Reproduce:
1.open krita
2. draw 2 body part layers, one of which with multiple frames
3. export to scml spriter

Actual Results:  
all your exported body parts will not be cropped propperly and an extra ugly brush dot will be created outside of canvas:
http://i.imgur.com/8npq1XY.png

All the layers with animation frames will fail to export any frames that are not the firs frame

Expected Results:  
crop properly, export all frames (head-1,head-2..and so on)
Comment 1 Theodore Imre 2016-06-08 11:35:11 UTC
correction - any layers with animation frames completely fail to export!
Comment 2 Theodore Imre 2016-06-08 11:38:44 UTC
On the ugly dot - crop failing issue - all you need to create it is click outside of the canvas area while in the brush tool and export to spriter.

This issue is really easy to happen. Krita's brush engine should either not allow pixels to be created outside the visible canvas area

OR

spriter export should exclude all pixels outside visible canvas area by default.
Comment 3 Halla Rempt 2016-06-23 06:19:52 UTC
Well, at this point the spriter plugin doesn't do anything with animations. It's a straight port of the photoshop spriter javascript plugin. It's not perfect in that either -- there are places where we seem to do the wrong thing.
Comment 4 Theodore Imre 2016-06-23 10:07:12 UTC
The point would be to be actually better than photoshop. Especially supporting layers with frames is a very valuable addition. The spriter exporter can be used with other software - not just spriter. It can be used to export the body part images and get them in spine or creature2d or even godot. It can be used to export tileset tiles rather than body parts. It is very versatile.
Comment 5 Halla Rempt 2016-06-23 10:09:11 UTC
Well, sure. But it's already taking up all the budget to properly save a 
static image with bones and things. The Spriter format isn't very clear,
at least not to me. So I want to get that working; then there's room for
improvements, but I expect community involvement for those.
Comment 6 Halla Rempt 2016-06-23 14:58:43 UTC
Git commit 85bcf05c4c1839ba9db58cb8f8580c39c2c1fa80 by Boudewijn Rempt.
Committed on 23/06/2016 at 14:58.
Pushed by rempt into branch 'video-export-rebased'.

M  +3    -3    plugins/impex/spriter/kis_spriter_export.cpp

http://commits.kde.org/krita/85bcf05c4c1839ba9db58cb8f8580c39c2c1fa80
Comment 7 Halla Rempt 2016-06-24 06:48:02 UTC
Git commit 2ff2f1ce78bc8646f7b9566991be7944dd361808 by Boudewijn Rempt.
Committed on 24/06/2016 at 06:10.
Pushed by rempt into branch 'krita/3.0'.

M  +3    -3    plugins/impex/spriter/kis_spriter_export.cpp

http://commits.kde.org/krita/2ff2f1ce78bc8646f7b9566991be7944dd361808
Comment 8 Tiar 2020-04-04 13:41:56 UTC
From the commit it sounds as if the problem of data outside of the canvas is fixed, so now there is only exporting frames left.