Bug 390033 - [Fill Layer] 3.x files filled with full black and can't edit color
Summary: [Fill Layer] 3.x files filled with full black and can't edit color
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords: regression, release_blocker, triaged
Depends on:
Blocks:
 
Reported: 2018-02-07 19:04 UTC by David REVOY
Modified: 2018-02-08 11:13 UTC (History)
1 user (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 David REVOY 2018-02-07 19:04:34 UTC
Hi,

There is an issue when loading an artwork made with a "Fill Layers" created with previous version of Krita: they load full black. It breaks the artworks. Also, no way to fix it manually in 4.0.0~git because any color fall-back immediately to black. It's only possible to get a color of a "Fill Layers" at creation. Editing it fall-back to black too.

Examples:
=========
[1] Artwork in 4.0.0~git: https://www.peppercarrot.com/extras/temp/2018-02-07_screenshot_194624_net.jpg 
[2] Same one in 3.x: https://www.peppercarrot.com/0_sources/0ther/artworks/low-res/2017-03-14_rainy-days_by-David-Revoy.jpg )

How to reproduce:
=================
1. Load the artwork made with Krita 3.x using fill layers :
   Demo file: https://www.peppercarrot.com/0_sources/0ther/artworks/zip/2017-03-14_rainy-days_by-David-Revoy.zip
2. The layer at the bottom of the stack named "---" is a "Fill Layer" supposed to fill canvas with white color. It's black in Krita 4.0.0~git
3. Try to change the property of the layer to switch color to white.
(It's also possible to use the [+] on the layer stack and manually create a new "Fill Layer", then edit the color. Save, reload; edit again as a testing scenario)

Result:
=======
The "Fill Layer" load the color as black, even after editing the color.

Expected:
=========
- It would be nice if "Fill Layer" could load the good color, as saved in the original *.kra file (done with Krita 3.x, or previous)
- It would be nice to be able again to switch color. 

Thank you!
Comment 1 Halla Rempt 2018-02-08 11:13:29 UTC
Git commit 288a5e2afb28c68079f6f8b62bbf05db5093982f by Boudewijn Rempt.
Committed on 08/02/2018 at 11:12.
Pushed by rempt into branch 'master'.

Fix determining the format for a color value

QVariant::canConvert and QVariant::convert are not suitable here,
so check for the type. This fixes loading color generator layers.

M  +31   -15   libs/image/kis_properties_configuration.cc
M  +3    -1    libs/image/tests/kis_properties_configuration_test.cpp
M  +1    -0    libs/pigment/KoColor.h
M  +2    -6    plugins/impex/libkra/kis_kra_load_visitor.cpp

https://commits.kde.org/krita/288a5e2afb28c68079f6f8b62bbf05db5093982f