From 345c312d73bed93c8d06d04841c09dda6c28ad90 Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Sun, 6 Aug 2023 20:26:32 +0800 Subject: [PATCH] vault backup: 2023-08-06 20:26:32 --- .../导出PSK_PSA脚本 & 部分UModel AES Key.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md b/06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md index 5325b8b..7754076 100644 --- a/06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md +++ b/06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md @@ -43,13 +43,14 @@ pskPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Character\\Enemy\\E 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 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) + psa_file = os.path.join(root, f) pskDirPath = os.path.dirname(pskPath) fbx_file = os.path.join(pskDirPath,f) @@ -57,9 +58,13 @@ for root, subdirs, files in os.walk(psaDirPath): print(fbx_file) psaimport(psa_file) - + 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() ``` # 其他