vault backup: 2023-09-07 16:39:38
This commit is contained in:
parent
0f2c01e4ab
commit
c67bb47327
@ -36,6 +36,37 @@ for root, subdirs, files in os.walk(pskPath):
|
||||
bpy.ops.export_scene.fbx(filepath=fbx_file,add_leaf_bones=False)
|
||||
```
|
||||
|
||||
直接生成fbx版本
|
||||
```python
|
||||
import bpy
|
||||
import os
|
||||
import math
|
||||
from io_import_scene_unreal_psa_psk_280 import *
|
||||
|
||||
pskPath = 'C:\\Users\\BlueRose\\Desktop\\ScarletNexus\\Game\\Character\\wp\\wp0100\\04_Mesh'
|
||||
|
||||
for modelroot, modeldirs, modelfiles in os.walk(pskPath):
|
||||
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
|
||||
注意:该脚本因为Blender运行bug,会导致输出的FBX文件越来越大,越来越慢。一次转换的量不建议超过50个。建议分几个文件夹,同时开多个Blender一起转换。
|
||||
```python
|
||||
@ -126,4 +157,7 @@ D:\OtherTools\GameAssets\umodel_win32\umodel_scarlet_nexus_v5.exe -path=C:\Game\
|
||||
/Game/Character/ch/ch0200/05_Animation/AS_ch0200_AL_pose004_ST.uasset
|
||||
/Game/Character/ch/ch0200/05_Animation/AS_ch0200_AL_pose005_ST.uasset
|
||||
/Game/Character/ch/ch0200/05_Animation/AS_ch0200_AL_pose006_ST.uasset
|
||||
/Game/Character/ch/ch0200/05_Animation/AS_ch0200_AL_pose007_ST.uasset
|
||||
/Game/Character/ch/ch0200/05_Animation/AS_ch0200_AL_pose007_ST.uasset
|
||||
|
||||
# 解决Blender导出问题的根骨骼问题
|
||||
使用Blender的**Better Fbx Importer & Exporter** addon就可以解决问题。
|
||||
|
Loading…
x
Reference in New Issue
Block a user