• Runtimes
  • Json转换Skel失败,版本3.6.53

Json转换Skel失败,版本3.6.53

怀疑是使用了路径附件的json会转换失败

使用以下指令进行批量转换
Spine -u 3.6.53 -i xx.json -o xx -e exportSkel.json
报错信息如下:

Binary export: dk_birthday_luoxia_qianjing
Sorry, an unexpected error has occurred:
java.lang.NullPointerException
	at lt.a(SourceFile:120)
	at lv.run(SourceFile:126)

找不到关于这种报错的解决方法,请求帮助确认为什么转换失败,十分感谢!

Related Discussions
...

exportSkel.json的内容如下:

{
    "extension": ".skel",
    "project": "xxx.spine",
    "texturePacker": {
        "square": false,
        "maxWidth": 2048,
        "wrapY": "ClampToEdge",
        "wrapX": "ClampToEdge",
        "pot": true,
        "filterMin": "Linear",
        "paddingY": 2,
        "paddingX": 2,
        "scaleSuffix": [
            ""
        ],
        "ignoreBlankImages": true,
        "bleedIterations": 2,
        "duplicatePadding": false,
        "alphaThreshold": 0,
        "silent": false,
        "stripWhitespaceY": true,
        "stripWhitespaceX": true,
        "edgePadding": true,
        "premultiplyAlpha": false,
        "fast": false,
        "minWidth": 16,
        "format": "RGBA8888",
        "outputFormat": "png",
        "minHeight": 16,
        "useIndexes": false,
        "flattenPaths": false,
        "scale": [
            1.0
        ],
        "grid": false,
        "combineSubdirectories": false,
        "rotation": true,
        "bleed": true,
        "atlasExtension": ".atlas",
        "jpegQuality": 0.9,
        "filterMag": "Linear",
        "scaleResampling": [
            "bicubic"
        ],
        "maxHeight": 2048,
        "ignore": false,
        "alias": true,
        "debug": false,
        "limitMemory": true
    },
    "output": "xxx",
    "createAtlas": true,
    "class": "com.esotericsoftware.spine.editor.Prefs$ExportBinary",
    "nonessential": false
}

3.6是非常非常老的版本了。你使用它有什么特殊的理由吗?

3.6和3.7其实很相似。你可以尝试使用3.7.94版本。

然而,我建议你使用最新的4.1版本。自从旧的3.x版本以来,我们的软件经过了多年的改进和优化。
-=-=-=-
3.6 is very, very old. Is there a reason you use it?

3.6 and 3.7 are similar. You could try using 3.7.94 instead.

However, I suggest using the latest 4.1. There have been many years of improvements since the old 3.x versions.

    Nate
    感谢您的建议。
    是的,3.6版本已经很老了,但是由于项目使用的是这个版本,升级版本意味着包体需要重新编译出新包,资源需要全部重新导出,这将是巨大的工作量,因此版本升级很难实行。
    如果可以确认3.6.53版本使用路径附件时json转换skel会失败,那项目应该可以禁止使用路径附件,也勉强算一种解决方法。

    如果你真的无法从3.6升级,那也没关系。我只是想确定一下,因为升级将是最好的路径。

    一些想法:

    与大多数major.minor Spine版本不同,3.6和3.7是相似的。你可能能够用3.7.94运行CLI命令,并仍然使用生成的.skel文件在3.6.53中使用。

    你是从.spine文件导出JSON然后转换为二进制吗?你能从.spine文件中直接导出二进制吗?这可能会避免带有这个bug的代码路径。

    你能提供JSON文件吗?这可能有助于我们提供解决方案。你可以在这里发布,或者通过邮件发送到:contact@esotericsoftware.com

    -=-=-=-

    If you really can't upgrade from 3.6, OK. I just wanted to be sure, as that would be the best path.

    Some thoughts:

    Unlike most major.minor Spine versions, 3.6 and 3.7 are similar. You may be able to run the CLI command with 3.7.94 and still use the resulting .skel file with 3.6.53.

    Are you exporting JSON from a .spine file then converting to binary? Can you export binary from the .spine file? That may avoid a code path with this bug.

    Can you provide the JSON file? That may help us provide a solution. You can post it here or email: contact@esotericsoftware.com

      • تم التحرير

      Nate Unlike most major.minor Spine versions, 3.6 and 3.7 are similar. You may be able to run the CLI command with 3.7.94 and still use the resulting .skel file with 3.6.53.

      这个建议值得尝试,十分感谢,之后我会尝试使用3.7.94版本转换。

      Nate Are you exporting JSON from a .spine file then converting to binary? Can you export binary from the .spine file? That may avoid a code path with this bug.

      导出.json不是使用CLI执行的,而是使用Spine软件手动点击导出.json;很遗憾目前的流程暂时不能从.spine文件直接导出.skel文件,不过之后会往这个方向优化,实现CLI自动化流程。

      Nate Can you provide the JSON file? That may help us provide a solution. You can post it here or email:

      JSON文件出于资源保密原因不能直接发布,因为是项目的资源,之后我尝试简化后发布到这里。

      最后再次感谢您的帮助!