代码拉取完成,页面将自动刷新
同步操作将从 猿菠萝/FixSpineForUnity 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2018 CodBo.All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
# http://opensource.org/licenses/MIT
import os, shutil,json
def rename():
work_dir = './'
for parent, dirnames, filenames in os.walk(work_dir):
for filename in filenames:
if filename.endswith(".atlas"):
file_path = os.path.join(parent, filename)
os.rename(file_path, file_path + ".txt")
print(file_path)
def fixJson():
work_dir = './'
for parent, dirnames, filenames in os.walk(work_dir):
for filename in filenames:
if filename.endswith(".json"):
file_path = os.path.join(parent, filename)
json1 = open(file_path,'r',encoding='utf-8').read()
if "bones" in json1 and not "skeleton" in json1:
print(file_path)
json1 = json1[0:2] + '"skeleton": { "hash": "0C6whivVQVuD/woFtbJBZAqNHq4", "spine": "3.5.03-beta", "width": 519.09, "height": 542.36, "fps": 30, "images": "" },\n' + json1[2:];
open(file_path,'w',encoding='utf-8').write(json1)
print("--------rename...--------\n")
rename()
print("--------fix json...------\n")
fixJson()
print("--------All done.--------\n")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。