Created attachment 108701 [details] Example Files I attempted to place a file layer that has a file layer within it, and it appears that it cannot work. It gets better, there's a strange message that appears. The message will appear under Windows 10 x64: - The file associated to a file layer with the name "Layer 3" is not found. Expected path: >C:/users/user/AppData/Local/Temp/Screenshot.kra Do you want to locate it? - The expected behavior is that Krita should automatically locate it based on the file that was input of a file layer within that file. Something like that. - To replicate the issue I am having, download the URDC Content Creation Support. Ok, now make a new document, and insert Dock.kra as a file layer. Other way to replicate this issue is to follow these step. 1. Make a new document, and insert any image into it except a file layer. 2. Save the document as Screenshot.kra 3. Make a new document, and use that newly saved document as a file layer and click on scale to image size. 4. Save the document as File Layer Document.kra 5. Make a new document with different image size,and insert the File Layer Document.kra 6. Proceed to read the strange message. Going ahead and locating it fix the issue, but it isn't the expected behavior.
Also, I found there seem to be a offset bug after you get around and locating the original file.
This is because of the code in Kis_safe_document_loader.ccp line 187. The file layer is copied to temp for some reason, but it probably ought to remember the original path so it can find file layers it is referencing. I don't know how this should be fixed as I don't quite understand why it is copied.
*** Bug 387354 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 394211 ***
We load a copy of the file layer because of https://bugs.kde.org/show_bug.cgi?id=325686 -- it's not safe to be loading a file that can be changed to while we're loading it.
Git commit 6828f33fe3e92fd4ca151bd44ce1886118d01ed6 by Boudewijn Rempt. Committed on 05/06/2018 at 14:32. Pushed by rempt into branch 'krita/4.0'. Do not allow .kra files as file layers Nesting .kra files is dangerous, since a .kra file can contain file layers itself, which is not supported. Related: bug 394211, bug 325686 M +4 -1 libs/ui/dialogs/kis_dlg_file_layer.cpp https://commits.kde.org/krita/6828f33fe3e92fd4ca151bd44ce1886118d01ed6
Git commit 40a1a0c0999a20744ae08244df10b679f172b724 by Boudewijn Rempt. Committed on 05/06/2018 at 14:33. Pushed by rempt into branch 'master'. Do not allow .kra files as file layers Nesting .kra files is dangerous, since a .kra file can contain file layers itself, which is not supported. Related: bug 394211, bug 325686 (cherry picked from commit 6828f33fe3e92fd4ca151bd44ce1886118d01ed6) M +4 -1 libs/ui/dialogs/kis_dlg_file_layer.cpp https://commits.kde.org/krita/40a1a0c0999a20744ae08244df10b679f172b724
Oh why?... Example: painting background and actors on separate files to be able to reuse background is really great option... Maybe some way to discard nested layers is possible?
No, because there's no way to know that the .kra file we're loading is a nested .kra file. But you can still use any other file format inside a .kra file. A good way to work would be to export the your separate files to .png, add them as file layers, but keep the original around. Only the projection is used anyway.
For future reference, this one got modified: https://bugs.kde.org/show_bug.cgi?id=403816