Bug 348178 - [Layer-style] only one layer with a style can be saved in *.kra
Summary: [Layer-style] only one layer with a style can be saved in *.kra
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: 2.9
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-24 13:54 UTC by David REVOY
Modified: 2015-05-27 21:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test kra, 3 layers, 3 layer style ( drop shadows) only one recover on open. (57.21 KB, application/x-krita)
2015-05-24 13:54 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2015-05-24 13:54:12 UTC
Created attachment 92808 [details]
test kra, 3 layers, 3 layer style ( drop shadows) only one recover on open.

Hi, I just setup 3 illustrations using various layer-style on group, subgroups , etc...
I saved them as *.kra ; and tried to export as JPG later with a script ( using commandline ). 
My exported JPG were all missing layer-styles effect. I decided to re-open my project source *.kra with Krita GUI to see what's happen  : all layer-style were lost exept a single one.

I must redo the work now, and find a way to do temporary backing the effects ; or decide to totally change the project visual aspect. That's why I mark this bug as grave.

To reproduce :
============
- Do a project with (example) three layers and shapes ( in attachment )
- assign layer-style to each layers ( eg, default drop shadows on each layers  )
- Save as *.kra
- Re-open the file. 

Result :
======
Only a single layer from the three will recover layer-style. ( and orientation of 'global light' of the drop shadows will be inverted ). 
As far as I experienced in my test, I can reproduce on complex layer stack, with groups, subgroups, or simple stack. The only layer who recover a layer-style is the one in the most bottom of the stack. 

Expected result :
==============
Layer-style to be saved, and recovered on re-open of document.
Comment 1 Dmitry Kazakov 2015-05-25 07:38:40 UTC
Hi, David!

As a temporary solution you can save your styles in separate ASL files and then load them for your layers if something failed. And I'll check your bug asap.
Comment 2 David REVOY 2015-05-25 11:36:26 UTC
Thank you @Dmitry for looking at it, and also for the temporary workaround.
Comment 3 brusheco 2015-05-27 09:47:02 UTC
yes confirmed on windows, good thing I saw this before starting a layer style project.
Comment 4 Halla Rempt 2015-05-27 10:17:28 UTC
Upgrading to critical, since it's data loss.
Comment 5 Dmitry Kazakov 2015-05-27 18:52:20 UTC
The funny thing is everything works with PSD. Only .kra is affected.
Comment 6 Dmitry Kazakov 2015-05-27 20:52:25 UTC
Git commit e056ebb0eb354e8fe7e18d596d4a623918256496 by Dmitry Kazakov.
Committed on 27/05/2015 at 20:48.
Pushed by dkazakov into branch 'calligra/2.9'.

Fixed saving multiple layer styles into .kra

M  +0    -1    krita/image/tests/kis_layer_styles_test.cpp
M  +35   -40   krita/libpsd/asl/kis_asl_writer.cpp
M  +3    -2    krita/libpsd/psd.cpp
M  +1    -3    krita/libpsd/psd.h
M  +0    -1    krita/ui/kis_asl_layer_style_serializer.cpp
M  +57   -0    krita/ui/tests/kis_kra_saver_test.cpp
M  +2    -0    krita/ui/tests/kis_kra_saver_test.h

http://commits.kde.org/calligra/e056ebb0eb354e8fe7e18d596d4a623918256496
Comment 7 David REVOY 2015-05-27 21:31:37 UTC
Thank you Dmitry!
Comment 8 Dmitry Kazakov 2015-05-27 21:41:18 UTC
Git commit 3b16ff375e8752aa92d6ec9a2f4c7587d45d4543 by Dmitry Kazakov.
Committed on 27/05/2015 at 21:41.
Pushed by dkazakov into branch 'calligra/2.9'.

Fix "Use Global Light" switch to perform correctly

PSD doesn't store "global light" as any separate entity, so just
sync all the global values in the UI.

M  +56   -4    krita/ui/dialogs/kis_dlg_layer_style.cpp
M  +7    -0    krita/ui/dialogs/kis_dlg_layer_style.h

http://commits.kde.org/calligra/3b16ff375e8752aa92d6ec9a2f4c7587d45d4543
Comment 9 Dmitry Kazakov 2015-05-27 21:42:03 UTC
You are welcome, David! :)