vault backup: 2023-08-06 12:26:44
This commit is contained in:
74
06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md
Normal file
74
06-DCC/Blender/导出PSK_PSA脚本 & 部分UModel AES Key.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# PSK
|
||||
```python
|
||||
import bpy
|
||||
import os
|
||||
import math
|
||||
from io_import_scene_unreal_psa_psk_280 import *
|
||||
|
||||
pskPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Character\\Enemy'
|
||||
|
||||
for root, subdirs, files in os.walk(pskPath):
|
||||
for dirName in subdirs:
|
||||
print(root + '\\'+ dirName)
|
||||
for modelroot, modeldirs, modelfiles in os.walk(root + '\\'+ dirName +'\\Model'):
|
||||
for f in modelfiles:
|
||||
if f.endswith('.psk'):
|
||||
psk_file = os.path.join(modelroot, f)
|
||||
fbx_file = os.path.splitext(psk_file)[0] + ".fbx"
|
||||
# 清空场景
|
||||
bpy.ops.object.select_all(action='SELECT')
|
||||
bpy.ops.object.delete()
|
||||
pskimport(psk_file, bReorientBones = False)
|
||||
# 使用SmoothShading
|
||||
for obj in bpy.data.objects:
|
||||
if obj.type=='MESH':
|
||||
obj.data.use_auto_smooth = True
|
||||
obj.data.auto_smooth_angle = math.radians(180)
|
||||
currentmesh = obj.data
|
||||
for setting in currentmesh.polygons:
|
||||
setting.use_smooth = True
|
||||
|
||||
# 输出骨骼模型
|
||||
bpy.ops.object.select_all(action='SELECT')
|
||||
bpy.ops.export_scene.fbx(filepath=fbx_file,add_leaf_bones=False)
|
||||
```
|
||||
|
||||
# PSA
|
||||
```python
|
||||
import bpy
|
||||
import os
|
||||
import math
|
||||
from io_import_scene_unreal_psa_psk_280 import *
|
||||
pskPath = 'C:\\Users\\BlueRose\\Desktop\\BLUEPROTOCOL\\Game\\Character\\Enemy\\E000_00\\Model\\SK_CH_E000_00.psk'
|
||||
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'):
|
||||
psa_file = os.path.join(root, f)
|
||||
pskDirPath = os.path.dirname(pskPath)
|
||||
fbx_file = os.path.join(pskDirPath,f)
|
||||
fbx_file = os.path.splitext(fbx_file)[0] + ".fbx"
|
||||
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)
|
||||
```
|
||||
|
||||
# 其他
|
||||
获取UModel解包游戏所需的AES Key:https://cs.rin.ru/forum/viewtopic.php?t=100672
|
||||
|
||||
## 蓝色协议
|
||||
AES Key:0xEA9051DDACE1CCF98A0510F0E370BD986A75C74756E0309E6A578A47AF564255
|
||||
UE版本为:4.27.2
|
||||
|
||||
## 绯红结系
|
||||
AES Key is 0x48AE8311350417BDC50A440FCD0E98B2FA6BCEAE3EDA8D0E24881F205E6C4540
|
||||
UE版本为:4.25
|
Reference in New Issue
Block a user