vault backup: 2023-08-06 20:26:32

This commit is contained in:
BlueRose 2023-08-06 20:26:32 +08:00
parent 446ab684b3
commit 345c312d73

View File

@ -43,13 +43,14 @@ pskPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Character\\Enemy\\E
psaDirPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Animations\\Enemy\\E000' psaDirPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Animations\\Enemy\\E000'
# 清空场景并且导入模型 # 清空场景并且导入模型
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
pskimport(pskPath, bReorientBones = False, bImportmesh = False, bImportbone = True)
for root, subdirs, files in os.walk(psaDirPath): for root, subdirs, files in os.walk(psaDirPath):
for f in files: for f in files:
if f.endswith('.psa'): if f.endswith('.psa'):
bpy.ops.scene.new(type='EMPTY')
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
pskimport(pskPath, bReorientBones = False, bImportmesh = False, bImportbone = True)
psa_file = os.path.join(root, f) psa_file = os.path.join(root, f)
pskDirPath = os.path.dirname(pskPath) pskDirPath = os.path.dirname(pskPath)
fbx_file = os.path.join(pskDirPath,f) fbx_file = os.path.join(pskDirPath,f)
@ -57,9 +58,13 @@ for root, subdirs, files in os.walk(psaDirPath):
print(fbx_file) print(fbx_file)
psaimport(psa_file) psaimport(psa_file)
bpy.ops.object.select_all(action='SELECT') bpy.ops.object.select_all(action='SELECT')
bpy.ops.export_scene.fbx(filepath=fbx_file,add_leaf_bones=False) bpy.ops.export_scene.fbx(filepath=fbx_file,add_leaf_bones=False)
bpy.ops.scene.new(type='EMPTY')
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
``` ```
# 其他 # 其他