vault backup: 2023-08-05 23:29:45
This commit is contained in:
parent
50b3fababb
commit
55078f900d
@ -19,7 +19,6 @@ for root, subdirs, files in os.walk(pskPath):
|
||||
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':
|
||||
@ -29,8 +28,36 @@ for root, subdirs, files in os.walk(pskPath):
|
||||
for setting in currentmesh.polygons:
|
||||
setting.use_smooth = True
|
||||
bpy.context.object.data.update()
|
||||
|
||||
# 输出骨骼模型
|
||||
bpy.ops.object.select_all(action='SELECT')
|
||||
bpy.ops.export_scene.fbx(filepath=fbx_file)
|
||||
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)
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user