# Support for saving and loading .ora files.

**URL:** <https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027>\
**Category:** Development\
**Created:** [22 November 2015 07:54 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027 "2015-11-22T07:54:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![soulaxe](https://discuss.pencil2d.org/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@soulaxe](https://discuss.pencil2d.org/u/soulaxe)\
**Post date:** [22 November 2015 07:54 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027/1 "2015-11-22T07:54:17Z")

</div>

Since the new .pclx file format very similar to .ora format I decided to add functionality for saving and loading as .ora. Saving will take highest bitmap layer and save its frames as readable layers in mypaint. (only one bitmap layer sadly ☹ ), other non-bitmap layers will be included still.

Currently saving is done, so all that is left is loading. Will update when done. 😃

Hopefully this will be of some use if feeef decides to continue implementing the libmypaint.

note:This is the first time I’ve done anything of this sort so expect some degree of noob coding.

---

<div class="post-metadata">

**Author:** ![feeef](https://discuss.pencil2d.org/user_avatar/discuss.pencil2d.org/feeef/32/21_2.png) [@feeef](https://discuss.pencil2d.org/u/feeef)\
**Post date:** [22 November 2015 08:04 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027/2 "2015-11-22T08:04:50Z")

</div>

Thank you very much @soulaxe! I am in the middle of fixing the save / open feature of Pencil. Let me know when you have finished implementing this and I will merge it with my updates.

---

<div class="post-metadata">

**Author:** ![JoseMoreno](https://discuss.pencil2d.org/user_avatar/discuss.pencil2d.org/josemoreno/32/7_2.png) [@JoseMoreno](https://discuss.pencil2d.org/u/JoseMoreno)\
**Post date:** [22 November 2015 14:58 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027/3 "2015-11-22T14:58:59Z")

</div>

@soulaxe Hey that is some awesome news! It doesn’t matter if it’s not as polished as you think it might be, but’s a great idea and a step in the right direction to party with other open-source software!

Also call me crazy but imagine if we could draw every keyframe in Krita and test it in Pencil in real-time, while retaining the layers in both programs? I wonder if this particular workflow would appeal to other krita artists who are looking for an animation function.

I mean this would be after the import-export functionality is developed, but thinking of implementing a plugin-like behavior with real-time share & update between programs doesn’t sound half-bad hmm… Sh\*t I hate not knowing how to use Qt and C++ to help you guys! :’(

**Thanks a lot for your hard work!!!**

---

<div class="post-metadata">

**Author:** ![soulaxe](https://discuss.pencil2d.org/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@soulaxe](https://discuss.pencil2d.org/u/soulaxe)\
**Post date:** [27 November 2015 18:02 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027/4 "2015-11-27T18:02:16Z")

</div>

Update:

I’ve ran into some problems with the code, after realising using the “save as” option to save ora files wasn’t the best approach I tried to redo it as an export option under the export menu. Everything should be somewhat functionalble but the code won’t compile due to the following errors:

> mainwindow2.obj:-1: error: LNK2019: unresolved external symbol "public: void \_\_thiscall ExportLayerOraDialog::setLayerOffset(signed char)" (?setLayerOffset@ExportLayerOraDialog@@QAEXC@Z) referenced in function "public: bool \_\_thiscall MainWindow2::exportLayerOra(void)" (?exportLayerOra@MainWindow2@@QAE\_NXZ)
> 
> mainwindow2.obj:-1: error: LNK2019: unresolved external symbol “public: signed char \_\_thiscall ExportLayerOraDialog::getLayerOffset(void)” (?getLayerOffset@ExportLayerOraDialog@@QAECXZ) referenced in function “public: bool \_\_thiscall MainWindow2::exportLayerOra(void)” (?exportLayerOra@MainWindow2@@QAE\_NXZ)
> 
> moc\_mainwindow2.obj:-1: error: LNK2019: unresolved external symbol “public: void \_\_thiscall MainWindow2::importLayerOra(void)” (?importLayerOra@MainWindow2@@QAEXXZ) referenced in function “private: static void \_\_cdecl MainWindow2::qt\_static\_metacall(class QObject \*,enum QMetaObject::Call,int,void \* \*)” (?qt\_static\_metacall@MainWindow2@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPAX@Z)

I’m not sure why this is happening but I think it might be due to setting up the QAction for the ui in ui\_mainwindow2.h

---

<div class="post-metadata">

**Author:** ![soulaxe](https://discuss.pencil2d.org/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@soulaxe](https://discuss.pencil2d.org/u/soulaxe)\
**Post date:** [2 December 2015 16:48 UTC](https://discuss.pencil2d.org/t/support-for-saving-and-loading-ora-files/1027/5 "2015-12-02T16:48:44Z")

</div>

So here’s the part where I start asking for help; I can’t seem to get past this error, and I don’t know where it’s originating from so if anyone could take a look at this and figure out what’s up

Source:

onedrive.live, com/?authkey=%21AEggSjCYJJiC3kM&cid=3AF076D53C725A64&id=3AF076D53C725A64%211095&group=0&parId=3AF076D53C725A64%211094&action=locate

I added a function called “exportLayerOra” in MainWindow2, but this is just a port of the already working implementation in the ObjectSaveLoader::Save. So if anything look there to see how its meant to work.

&nbsp;

Though if anyone would like to get their hands on a somewhat working version with ora saving here is compile before all these errors:

1drv, ms/1MWsbb7

Note: to “export” you have to use the save as option, but as I stated before you cannot re-open these, so ensure to save a .pclx also.

My posts seem to be getting deleted…
