Giter VIP home page Giter VIP logo

spine's Introduction

This module adds Spine animation support for godot game engine 3.0. It has been tested with Godot 3.0.2, but may contain bugs. The 2.1 module is also avaiable in the 2.1 branch

Current Spine runtime version for master branch 3.6.52.1 (Github link). Current Spine runtime version for 2.1 branch 3.5.51.

About the license

This module is forked from sanikoyes's godot branch and some of the code is forked from godot-spine-module. Both of the code are declared as MIT license.

The license of this module is under the Spine Runtimes Software License.

Usage

Add this code under modules/spine in your Godot source tree. You may either copy it or use git submodule add.

Build Godot using scons platform=x11 tools=yes target=release_debug or whatever build options you prefer.

Use the Spine type in your scene tree and load your animation into it as a resource.

Further reference

The Spine API Reference is useful to learning more about how the code works.

spine's People

Contributors

arthurtemple avatar danielytics avatar geequlim avatar rgpaul avatar sanikoyes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spine's Issues

Compile error with Godot 3.2 stable Mono

On the final build stage throws this:

"C:\Users\Teashrock\Documents\Development\Not-Mine\godot-3.2-stable\modules\mono\glue\GodotSharp\GodotSharp.sln" (целев
ой объект по умолчанию) (1) ->
"C:\Users\Teashrock\Documents\Development\Not-Mine\godot-3.2-stable\modules\mono\glue\GodotSharp\GodotSharp\GodotSharp.
csproj" (целевой объект по умолчанию) (2) ->
(Целевой объект CoreCompile) ->
  Generated\GodotObjects\Spine.cs(319,33): error CS1750: Использование значения типа "float" в качестве параметра по ум
олчанию недопустимо, так как отсутствуют стандартные методы преобразования в тип "string". [C:\Users\Teashrock\Document
s\Development\Not-Mine\godot-3.2-stable\modules\mono\glue\GodotSharp\GodotSharp\GodotSharp.csproj]
  Generated\GodotObjects\Spine.cs(328,32): error CS1750: Использование значения типа "float" в качестве параметра по ум
олчанию недопустимо, так как отсутствуют стандартные методы преобразования в тип "string". [C:\Users\Teashrock\Document
s\Development\Not-Mine\godot-3.2-stable\modules\mono\glue\GodotSharp\GodotSharp\GodotSharp.csproj]

    Предупреждений: 7
    Ошибок: 2

In case if You don't know Russian: it complains about impossibility of using "float" typed value as default parameter, because of lack of a standard methods of conversion "float" type to "string" type.

How do I create new Skin

I am trying
var newSkin = Skin.new()

or

Skin_create("new")

but all I am getting is "not declared in current class"

Eventual 3.0 compatibility

Hello,

Godot 3.0 is a reality now and some modest efforts would be enough to bring this module up to speed with the stable branch. Newer Godot features, however, open up a lot of possibilities for module developers.

Do you, as project maintainer, have something specific in mind as to what this module should look like alongside Godot 3.0 stable?
Keep on with compatibility updates, GDNative, world domination...

Thanks in advance and congrats for the nice work so far.

Build for mono

Hello I new to Godot. Is it any way to build this module for mono? I try to generate mono-glue, and have errors ERROR: _get_type_by_name_or_placeholder: Type not found. Creating placeholder: Spine.AnimationProcessMode. What I need to edit for register methods?

Compile error for godot 3.2

I want to use this module in Godot 3.2 beta2, compiling for 3.2 beta1 is ok, but it gets error when compiling for beta2.

Build error with Godot 3.1

When compiling from master branch with Godot 3.1 beta 11 I'm getting the error:

modules/spine/spine.cpp:1072:78: error: passing 'const Vector2' as 'this' argument discards qualifiers [-fpermissive]
points[idx] = Vector2(info->vertices[idx * 2], -info->vertices[idx * 2 + 1]);

If I delete all #if (VERSION_MAJOR == 3 && VERSION_MINOR >= 1) conditions and corresponding else branches (leaving only 3.1 lines) the compilations succeeds.
However, in this case I'm getting the following when I try to add resource to Spine node:

[1] /usr/lib/libc.so.6(+0x37e00) [0x7f419a5f5e00] (??:0)
[2] /usr/lib/libc.so.6(+0x15f715) [0x7f419a71d715] (??:0)
[3] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(spSkeletonJson_readSkeletonData+0x19f) [0x161a702] (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/src/spine/SkeletonJson.c:600)
[4] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(spSkeletonJson_readSkeletonDataFile+0x7d) [0x161a539] (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/src/spine/SkeletonJson.c:573)
[5] ResourceFormatLoaderSpine::load(String const&, String const&, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/register_types.cpp:190 (discriminator 3))
[6] ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/core/io/resource_loader.cpp:272 (discriminator 6))
[7] ResourceLoader::load(String const&, String const&, bool, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/core/io/resource_loader.cpp:408)
[8] EditorPropertyResource::_file_selected(String const&) (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_properties.cpp:1983)
[9] MethodBind1<String const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[10] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[11] Object::emit_signal(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1229 (discriminator 1))
[12] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1285)
[13] EditorFileDialog::_action_pressed() (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_file_dialog.cpp:357 (discriminator 4))
[14] EditorFileDialog::_item_dc_selected(int) (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_file_dialog.cpp:535)
[15] MethodBind1<int>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[16] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[17] Object::emit_signal(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1229 (discriminator 1))
[18] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1285)
[19] ItemList::_gui_input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/gui/item_list.cpp:566 (discriminator 4))
[20] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[21] Object::call_multilevel(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:777 (discriminator 1))
[22] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:884)
[23] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1542 (discriminator 2))
[24] Viewport::_gui_input_event(Ref<InputEvent>) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1844 (discriminator 3))
[25] Viewport::input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:2668 (discriminator 2))
[26] Viewport::_vp_input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1319)
[27] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[28] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[29] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:868)
[30] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/scene_tree.cpp:262)
[31] SceneTree::input_event(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/scene_tree.cpp:418 (discriminator 6))
[32] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:414)
[33] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:260)
[34] InputDefault::flush_accumulated_events() (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:677)
[35] OS_X11::process_xevents() (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/os_x11.cpp:2462)
[36] OS_X11::run() (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/os_x11.cpp:3004)
[37] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(main+0xdc) [0x1179232] (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/godot_x11.cpp:56)
[38] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f419a5e2223] (??:0)
[39] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(_start+0x2e) [0x117909e] (??:?)
-- END OF BACKTRACE --

How do you load Spine files?

Sorry if this isn't the right place to ask...

I select load from the menu on the "Resource" key under Spine in the properties inspector and the file browser states that it recognises .json and .skel files, amongst others, but when I try to load one of the sample exports from Spine (I've tried alien and spineboy, both json and skel files) that I've copied into my Godot project directory, I get an error Error loading file: Not a resource.

The same same steps worked in this video https://www.youtube.com/watch?v=m0liBPf1NW8

What am I missing? Thanks!

Error while build in register_types.cpp + 212

ERR_FAIL_COND_V_MSG(res->data == NULL, RES(), bin->error);

Yes. There is some bug:

#if defined(ERR_FAIL_COND_V_MSG)
            ERR_FAIL_COND_V_MSG(res->data == NULL, RES(), bin->error);
#else
            ERR_EXPLAIN(bin->error);
            ERR_FAIL_COND_V(res->data == NULL, RES());
            ERR_FAIL_COND_V_MSG(res->data == NULL, RES(), bin->error); // AAAA WATAFK
#endif

In code, we check the ERR_FAIL_COND_V_MSG is defined, but if it isn't, we whatever use it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.