ndee85 / coa_tools

COA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
GNU General Public License v3.0
900 stars 139 forks source link

Dragonbones exported file fails to load in godot #80

Open blurymind opened 6 years ago

blurymind commented 6 years ago

Godot recently got a dragonbones module- allowing it to load both dragonbones 4_5 and the latest dragonbones file spec json files.

The dragonbones module can be found here: https://github.com/sanja-sa/gddragonbones

Unfortunately when trying to load the stip example exported with the laterst version of coa tools, I got this error: stipbug

  At: core\io\image_loader.cpp:53
OPENING: F:/stuff/godot/godot/dragonbones (F:::stuff::godot::godot::dragonbones)
running cmdline: "F:\stuff\godot\godot-2.1.4-dbones2.exe" "-path" "F:/stuff/godot/godot/dragonbones" "-editor"
unicode error: invalid skip
DB resource (res://Rooster_Ani/Rooster_Ani_ske.json) loaded in 0 msecs
DB resource (res://DragonBonesExport4_5/NewDragon_1_ske.json) loaded in 0 msecs
ERROR: PopupMenu::set_item_checked: Index p_idx out of size (items.size()).
   At: scene\gui\popup_menu.cpp:622
ERROR: PopupMenu::get_item_text: Index p_idx out of size (items.size()).
   At: scene\gui\popup_menu.cpp:674
ERROR: PopupMenu::set_item_checked: Index p_idx out of size (items.size()).
   At: scene\gui\popup_menu.cpp:622
ERROR: __load_file: Condition ' !__p_f ' is true. returned: nullptr
   At: modules\gddragonbones\gddragonbones.cpp:36
ERROR: GDDragonBones::GDDragonBonesResource::load_texture_atlas_data: Condition ' !p_data_texture_atlas ' is true. returned: false
   At: modules\gddragonbones\gddragonbones.cpp:59
ERROR: ResourceFormatLoaderGDDragonBones::load: Condition ' !__bret ' is true. returned: 0
   At: modules\gddragonbones\register_types.cpp:30
ERROR: Failed loading resource: res://coa-tools/exportdb/stip.json
   At: core\io\resource_loader.cpp:210
ERROR: __load_file: Condition ' !__p_f ' is true. returned: nullptr
   At: modules\gddragonbones\gddragonbones.cpp:36
ERROR: GDDragonBones::GDDragonBonesResource::load_texture_atlas_data: Condition ' !p_data_texture_atlas ' is true. returned: false
   At: modules\gddragonbones\gddragonbones.cpp:59
ERROR: ResourceFormatLoaderGDDragonBones::load: Condition ' !__bret ' is true. returned: 0
   At: modules\gddragonbones\register_types.cpp:30
ERROR: Failed loading resource: res://coa-tools/exportdb/stip.json
   At: core\io\resource_loader.cpp:210

@ndee85 I am running the latest version of the module and coa_tools. The dragonbones example files load file, exporting stip with an atlas from coa_tools fails to load

blurymind commented 6 years ago

It's possible that this happens because coa_tools doesnt export any atlas_tex json file in the same directory where the atlas file is

See attached example DragonBonesExport4_5.zip

ndee85 commented 6 years ago

Hi @blurymind, Dragonbones export needs a proper revisit. There are some things broken. I would need to take a second look at it, thats why its disabled for now. My plan is to make a rewrite in the future and implement the new fileformat, because its more powerfull. But I cannot give any estimations when I find the time right now. But thats a great step to have a dragonbones module in godot now!

blurymind commented 6 years ago

Hi @ndee85 Thank you for working on this plugin. Currently the official dragonbones animation editor has a horrible requirement to be online and logged in in order to save files, so your addon is actually going to be better than the official editor- once you get it to properly export the animation. Godot's dragonbones module works really good and there are already plans to port it over to godot 3- so we are finally getting 2d mesh deformation in godot. These are exciting times

blurymind commented 6 years ago

The module now also works in Godot 3 and Godot 3 has been released and is stable! :)

ndee85 commented 6 years ago

Oh.. thats great. I will make a complete rewrite for the exporter and use the new 5.5 Data Version.

Lately I updated to newst dragonbones version. I got a message that it will introduce a paid model. And that not all features will be available in the free version. So I asume it makes sense to update the coa tools dragonbones exporter.

But I really cannot give any estimation here. This will take some time!

blurymind commented 6 years ago

Thank you @ndee85

The latest version of the Dragonbones pro editor that can export and save files without being online or logged in is 4.9.5 - the highest file format it can save to is 4_5

The Dragonbones runtime for godot currently supports the 4_5 file format, as well as the newest one.

I complained to Dragonbones pro developers about the offline limitation - its not a service I would invest in if we can't even save our files without an internet connection.

Your addon will resolve the support for the newest file format without internet connection and also will resolve the request to be able to author dragonbones animations under linux. Their editor doesnt work on linux

blurymind commented 6 years ago

perhaps it's worth revisiting this is issue :)

ndee85 commented 6 years ago

@blurymind the new dragonbones exporter is almost in a usable state. New commit comming soon which should be ready for testing!

blurymind commented 6 years ago

thank you @ndee85 looking forward to testing it 😄 Btw just a few days ago another open source engine got support for dragonbones - Gdevelop! I will test it with that too