import sys
import bpy
import os
path="F:\\temp\\ha\\dah\\Tp\\Scenes\\Source"
for i,j,k in os.walk(path):
for a in k:
if a.endswith(".gltf"):
#clean out the scene
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
currentpsth=path+"\\"+a
bpy.ops.import_scene.gltf(filepath=currentpsth)
fname,ext = os.path.splitext(a)
outpath="F:\\临时\\删除\\temp\\"+fname+".fbx"
bpy.ops.export_scene.fbx(filepath=outpath)
通过blender 进行模型格式转化,利用blender 模型导入导出功能,基于python 获取文件,进行循环导入导出