@florenz Hi welcome to the forum. Sorry to hear about your issue.
This problem occurs when during any external event (e.g. blackout, power surge, HDD failure, etc) or an internal event (e.g OS permissions, OS updates, 3rd party software cleaner, virus or antivirus, etc) have interrupted Pencil2D saving procedure.
Once the XML file is erased or “not written” it can’t be restored. The only way to recover the work is to rebuild the pencil2D file with the data
resource folder which should have, hopefully, all of your drawings and assets.
Sometimes if the issue is severe and saving was interrupted early you might lose your work partially.
If you have already tried other guides, please go back to our Project Corruption Prevention guide and check the #5 SAVE FILE VERIFICATION section.
There you’ll see a guide on how to UNZIP your PCLX file and take the data folder out from the corrupted save file.
If you can’t open the file, them I’m afraid it’s not possible to recover the work
However If you can open the PCLX file by using a ZIP file manager, save the data folder elsewhere, then you can do the following:
- Open Pencil2D
- Go to File > Import > Image Predefined Set
- On the modal window press the [Browse…] button
- A file explorer from your operating system will appear. Look for the
data
folder you recovered. - Depending on how many layers and frames you have, the
data
folder will show you a sequence of images with the following naming conventions:- Example file name:
001.001.png
- The name means it is the first frame that was place on the first layer on the original file.
- Example file name:
- If you select this single file and press [Open] button, any other file that is related to it by name will be loaded into the window as a file list preview and then will be place on the specific frame that the name indicates e.g
001.006.png
will go into a new Layer 1, Frame 6,001.040.png
will go to the same Layer 1, Frame 40, and so on. - Then you can keep repeating the process for as many layers as you have.
- It’s important to note that the XML file that was deleted stored all the visual display properties for each image, so if your drawing was not made with a specific size in mind, they will probably become shifted and you will have to move them one by one.
For this in V7.0 there’s also a new tool that allows you to move many frames in a single layer at a time. To use it do the following:- Select 2 or more frames on layer that have drawings you want to reposition.
- (Optional) Create a selection around the approximate area where the drawings appear visually, if you’re unsure turn on the “onion skins” feature and check how large the selection box should be. Note: If you don’t create a selection the feature will create one for you.
- Go to Animation Menu > Reposition Selected Frames
- A floating window will appear.
- Depending on how many layers you have these will be numbered 1 through X as many bitmap layers you have. Top Bitmap layer on the timeline = Layer index #1 in this window. Any other layer that show below that will be the next logical number. Select the Layer where the drawings are.
- Now move the selection with drawing to the new position. Make sure the "Repositiond: (0,0) coordiantes in the window have updated.
- If everything is good, then click the [Reposition] button to finalize the operation.
Hopefully with this you can rebuild your file as close as it was before.
Lastly, a word of advice, make sure you always save extra backup copies to fall back in case of file corruption and check them before closing the Pencil2D app. Good luck!