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'
# 清空场景并且导入模型
for root, subdirs, files in os.walk(psaDirPath):
for f in files:
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)
for root, subdirs, files in os.walk(psaDirPath):
for f in files:
if f.endswith('.psa'):
psa_file = os.path.join(root, f)
pskDirPath = os.path.dirname(pskPath)
fbx_file = os.path.join(pskDirPath,f)
@ -60,6 +61,10 @@ for root, subdirs, files in os.walk(psaDirPath):
bpy.ops.object.select_all(action='SELECT')
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()
```
# 其他