ProtoArt / spritec

The Sprite Compiler turns your 3D models into 2D spritesheets
https://protoart.me/
Mozilla Public License 2.0
32 stars 5 forks source link

GUI: animation breaks for unnamed animations #205

Open daose opened 4 years ago

daose commented 4 years ago

Two issues:

  1. UI side is using three.js animation names (which will convert missing names into animation_0 that spritec doesn't understand)

Need to read .load(...).parser.json.animations[i].name instead of .load(...).animations[i].name

  1. spritec binding assumes that a None for animation name means we don't want animations, but it could be that we just want to use the unnamed animation instead (which spritec does support, although not sure if they support choosing between 2 unnamed animation)

Need to widen granularity from animation.name to animation itself that could be null and handle it in spritec_binding. This will allow animation to contain animation.name which is null.

sunjay commented 4 years ago

We do not currently support choosing between two unnamed animations (cc @JLSJamesShi). The reasoning being that we don't know how someone would want to select between them if they don't have a name. Also, we'd really rather them just name their animations rather than add support for that.

spritec binding assumes that a None for animation name means we don't want animations

Maybe you could represent this with an empty string instead?