Bug 438124 - Properties of masks lost when saving Krita document
Summary: Properties of masks lost when saving Krita document
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-05 16:16 UTC by grum999
Modified: 2021-09-21 14:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grum999 2021-06-05 16:16:28 UTC
SUMMARY


With last version of Krita 5 (currently using fa1b610) transformation mask can be animated and then, "pin to timeline" can be applied. 


But it seems Krita file format doesn't allows a mask to store some information like "colorlabel" or "intimeline" 

Problem is, starting to work with multiple animated transformation mask, we need to reapply all "pin to timeline" when reopening document.
And it can take time (Currently I have an animation with 12 paint layers on which transform mask is animated, and it's really boring to have to reapply "pin to timeline" each time I reopen the document)

Also, not being able to store color label on a mask (filter mask, transparency mask, ...) is a problem, because in layer stack, it's possible to set color to mask but they're lost when saving/opening document.



STEPS TO REPRODUCE (color label)
1. Create a document with a transform mask applied to a paint layer
2. Set a color label to transform mask 
3. Animate transform mask and pin it to timeline 
4. Save document 
5. Close document 
6. Re-open document


OBSERVED RESULT
Color label and pin to timeline option are lost when reopening document.

Looking maindoc.xml:

----
<masks>
 <mask filename="mask52" name="TMask-krita-t" locked="0" y="0" uuid="{6781a107-c9e1-41ed-9f92-0e2855b2cbcd}" visible="1" keyframes="mask52.keyframes.xml" nodetype="transformmask" x="0"/>
</masks>
----
We can see that attributes "colorlabel" or "intimeline" (that we can see on paintlayer for example) are missing on mask.


So problem seems to be in Krita fileformat.


EXPECTED RESULT
Color label and pint to timeline options set on document should be available after document has been saved/reopened



Grum999
Comment 1 Ahab Greybeard 2021-06-08 15:10:02 UTC
Testing with the Jun 07 5.0.0-prealpha (git dba5ce5) appimage on Debian 10:
I can confirm that the Transform Mask loses its pin to timeline and its colour label properties after saving then reopening.

Setting to confirmed
Comment 2 wolthera 2021-09-21 14:41:36 UTC
Git commit c2a66e809c73d3f92df17f6b24a8b6486af64e81 by Wolthera van Hövell tot Westerflier.
Committed on 21/09/2021 at 14:40.
Pushed by woltherav into branch 'krita/5.0'.

Save color labels and pin to timeline for masks as well.

We shouldn't forget to check if other layers-only features can
be applied to masks too, but these were the only ones I could find.

M  +2    -0    plugins/impex/libkra/kis_kra_savexml_visitor.cpp

https://invent.kde.org/graphics/krita/commit/c2a66e809c73d3f92df17f6b24a8b6486af64e81
Comment 3 wolthera 2021-09-21 14:41:50 UTC
Git commit b094ac11d8c8ac8596f041aa9c9cc204aad46e27 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 21/09/2021 at 14:41.
Pushed by woltherav into branch 'master'.

Save color labels and pin to timeline for masks as well.

We shouldn't forget to check if other layers-only features can
be applied to masks too, but these were the only ones I could find.


(cherry picked from commit c2a66e809c73d3f92df17f6b24a8b6486af64e81)

M  +2    -0    plugins/impex/libkra/kis_kra_savexml_visitor.cpp

https://invent.kde.org/graphics/krita/commit/b094ac11d8c8ac8596f041aa9c9cc204aad46e27