diff --git a/app/lib/sprites/SpriteBuilder.coffee b/app/lib/sprites/SpriteBuilder.coffee index db4fe78ff..babf5178a 100644 --- a/app/lib/sprites/SpriteBuilder.coffee +++ b/app/lib/sprites/SpriteBuilder.coffee @@ -13,7 +13,9 @@ module.exports = class SpriteBuilder buildMovieClip: (animationName, movieClipArgs...) -> animData = @animationStore[animationName] - console.log "couldn't find animData from", @animationStore, "for", animationName unless animData + unless animData + console.error "couldn't find animData from", @animationStore, "for", animationName + return null locals = {} _.extend locals, @buildMovieClipShapes(animData.shapes) _.extend locals, @buildMovieClipContainers(animData.containers) diff --git a/app/models/ThangType.coffee b/app/models/ThangType.coffee index 94e54ed4a..d538ba4dd 100644 --- a/app/models/ThangType.coffee +++ b/app/models/ThangType.coffee @@ -91,6 +91,7 @@ module.exports = class ThangType extends CocoModel for animation in @requiredRawAnimations() name = animation.animation mc = @vectorParser.buildMovieClip name + continue unless mc @builder.addMovieClip mc, null, animation.scale * @options.resolutionFactor framesMap[animation.scale + "_" + name] = @builder._animations[name].frames @@ -98,6 +99,7 @@ module.exports = class ThangType extends CocoModel continue if name is 'portrait' scale = action.scale ? @get('scale') ? 1 frames = framesMap[scale + "_" + action.animation] + continue unless frames frames = @mapFrames(action.frames, frames[0]) if action.frames? next = true next = action.goesTo if action.goesTo @@ -108,6 +110,7 @@ module.exports = class ThangType extends CocoModel continue if name is 'portrait' scale = @options.resolutionFactor * (action.scale or @get('scale') or 1) s = @vectorParser.buildContainerFromStore(action.container) + continue unless s frame = @builder.addFrame(s, s.bounds, scale) @builder.addAnimation name, [frame], false diff --git a/app/views/editor/thang/edit.coffee b/app/views/editor/thang/edit.coffee index f290e76a9..9210b6c89 100644 --- a/app/views/editor/thang/edit.coffee +++ b/app/views/editor/thang/edit.coffee @@ -210,6 +210,7 @@ module.exports = class ThangTypeEditView extends View showMovieClip: (animationName) -> vectorParser = new SpriteBuilder(@thangType) movieClip = vectorParser.buildMovieClip(animationName) + return unless movieClip reg = @thangType.get('positions')?.registration if reg movieClip.regX = -reg.x