GithubHelp home page GithubHelp logo

godot_scml_importer's People

Contributors

doctor-g avatar nikibobi avatar wojtossfm 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

Watchers

 avatar  avatar  avatar

godot_scml_importer's Issues

SCML is not loaded properly.

OS: Windows 11 x64
Godot version: 4.1 stable
addon version: 0.9.0, 0.9.1

Example Project:
scml_test_4_1.zip

Description:

  1. Add SCML importer addon.
  2. Copy and paste a Spriter Pro project folder into godot project folder.
  3. Enable SCML importer addon.
  4. See some error messages.
    image
  5. Open scml file by double-click.
  6. Scml file opened, but not properly. (missing "hopper/idle", only "impacts/impact1" but not loaded properly either)

Does not work with Godot 4.0

I'm just trying this out with Godot 4.0 and it doesn't work. I get syntax errors as well as api usage errors.

Thanks for this btw! Looking forward to trying it out if it ends up working on 4.0.

Extend and correct CharacterMap handling

In #6 the parsing breakage from including character maps was fixed but there was no work put into checking whether they are handled correctly. This issue has been raised to see if it works correctly and potentially can be improved.

Tried importing a character and got hit with thousands of errors. Trying to run the SCML file makes a blank scene and gives an "Error while loading file"

Most of the errors were a repeat of the first one here:

res://addons/import_scml/import_plugin.gd:202 - Invalid get index 'folder' (on base: 'Dictionary'). res://addons/import_scml/import_plugin.gd:202 - Invalid get index 'folder' (on base: 'Dictionary'). res://addons/import_scml/import_plugin.gd:202 - Invalid get index 'folder' (on base: 'Dictionary'). res://addons/import_scml/import_plugin.gd:202 - Invalid get index 'folder' (on base: 'Dictionary'). res://addons/import_scml/import_plugin.gd:202 - Invalid get index 'folder' (on base: 'Dictionary'). res://addons/import_scml/import_plugin.gd:404 - Assertion failed. scene/resources/packed_scene.cpp:1053 - Parameter "p_scene" is null. scene/resources/packed_scene.cpp:1053 - Parameter "p_scene" is null. core/io/file_access.cpp:807 - Condition "f.is_null()" is true. Continuing. core/io/file_access.cpp:807 - Condition "f.is_null()" is true. Continuing.

An older save file of the character did import, but only the first animation. Could be related to that older save file using less features, such as hitboxes, events, sound events or properties.

z-index usage is subpar leading to clipping issues

While the effect on a single character is correct when multiple character cross this seems to break.

A solution seems to be:

  • to not actually set the z-index
  • instead use it as a guide when ordering the children for each parent

Seemed in the scenes where I tried it this led to the expected ordering visually being maintained while removing the issue of multiple characters crossing and sprites clipping over each other in awkward ways.

Issue with animations in cross-fades

Here's a way to demonstrate the issue I mentioned. I've been tinkering with the animations from CraftPix, and you can reproduce the situation using one of their free downloads, such as the goblin from this set. In the download, you'll find Goblin/PNG/VectorParts, which contains the figure parts as well as Animations.scml.

The animations look fine in isolation; the problem only arises when crossfading between them, as the rotations will sometimes go "the long way around." There are different ways to reproduce the problem, but here's a particular workflow that I was commonly using.

  1. With the SCML importer enabled (and this patch in place), import the goblin parts and animations as described above.
  2. Open the Animations.scml file and create a New Inherited scene when prompted. Save that as a new scene, then remove the inheritance by right-clicking on the root of tree and selecting "Clear Inheritance." This is required to be able to edit the animations.
  3. In the AnimationPlayer node, disable looping on the Idle and Walking animations.
  4. Create an AnimationTreePlayer node. Connect the AnimationPlayer to it. Make its root node into an AnimationNodeStateMachine.
  5. In the state machine, add the Idle and Walking animations, then add automatic transitions to go between them that change at the end of the animation. (That's why the looping was removed above.) Set the animation tree player to Active.
  6. Add a crossfade (e.g. 0.2 seconds) between the animations. Now you will be able to see that the change between animations has the head spinning almost a complete circle.

I hope that helps!

Originally posted by @doctor-g in #21 (comment)

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.