为了方便导出多个工程我写了一个python脚本匹配.spine文件然后生成对应的导出json配置挨个使用命令行导出,但是仍然会有这个问题虽然禁用了警告但还是丢失了对应的数据例如无法导出脸(出错)但是使用spine图形化手动导出可以导出
对应问题
https://zh.esotericsoftware.com/forum/d/26035-41-to-42-mesh-triangulation-error-when-opening-project-after-saving/2
所以如何在命令行导出这种具有警告的spine
附python使用的json配置
导出版本4.2.43
json_data = {
"class": "export-json",
"extension": ".json",
"format": "JSON",
"prettyPrint": True,
"nonessential": True,
"cleanUp": True,
"packAtlas": {
"stripWhitespaceX": True,
"stripWhitespaceY": True,
"rotation": True,
"alias": True,
"ignoreBlankImages": False,
"alphaThreshold": 3,
"minWidth": 16,
"minHeight": 16,
"maxWidth": 8192,
"maxHeight": 8129,
"pot": False,
"multipleOfFour": False,
"square": True,
"outputFormat": "png",
"jpegQuality": 0.9,
"premultiplyAlpha": True,
"bleed": False,
"scale": [1],
"scaleSuffix": [""],
"scaleResampling": ["bicubic"],
"paddingX": 2,
"paddingY": 2,
"edgePadding": True,
"duplicatePadding": False,
"filterMin": "Linear",
"filterMag": "Linear",
"wrapX": "ClampToEdge",
"wrapY": "ClampToEdge",
"format": "RGBA8888",
"atlasExtension": ".atlas",
"combineSubdirectories": False,
"flattenPaths": False,
"useIndexes": False,
"debug": False,
"fast": False,
"limitMemory": True,
"currentProject": True,
"packing": "rectangles",
"prettyPrint": True,
"legacyOutput": False,
"webp": None,
"autoScale": True,
"bleedIterations": 2,
"id": -1,
"ignore": False,
"separator": "_",
"silent": False
},
"packSource": "attachments",
"packTarget": "perskeleton",
"warnings": False,
"version": None,
"all": True,
"output": os.path.join(output_dir, rel_path),
"id": -1,
"input": abs_path,
"open": False
}
json配置导出警告
Have you already tried using the Spine command line interface to perform batch exports?
https://esotericsoftware.com/spine-command-line-interface
是的就是为每一个.spine文件使用-e预设json(仅修改路径信息)导出
但是无法导出含问题的插槽(应该是比如脸插槽丢失)
phtcloud Actually, there is a user who has recently been struggling with a similar mesh error issue, so the following thread may be helpful:
https://esotericsoftware.com/forum/d/28829-update-project-with-cli-/5
If you are only having trouble with a few Spine projects and do not have a large number of problematic projects, it may be better to manually correct the mesh. I think the error is probably caused by vertices being in positions where they should not be, as Nate explained in the thread above.
phtcloud By the time the stable version of 4.3 is released, all official Spine runtimes will be compatible with 4.3. However, we are currently in the process of updating the runtimes to be compatible with 4.3, so the spine-webgl runtime will also be updated in due course.
We apologize for not being able to provide a clear answer about the completion date, but we are prioritizing runtime updates and have suspended editor feature development. We appreciate your patience.
We did not yet release the 4.3 package for spine-webgl
, but you can build it from our runtime repo:
- Clone the repo
- Switch to the
4.3-beta
branch - Change directory into
spine-ts
- Run
npm i
andnpm run build
- You'll find the different builds into
spine-ts/spine-webgl/dist
(users generally use theiife
version).