QQ登录 微博登录 帐号登录 我已阅读并接受《用户协议》
QQ、微博及系统账号均为独立账号,账号信息不互通
欢迎来到C4D模型网
赞助会员下载VIP素材
立即加入
您的会员开通成功!
您的会员开通成功!
今日下载数已用完
赞助会员
感谢您留下宝贵的建议
blender模型中有多个模型元素怎么能批量导出成单独的
blender 3.0做的一个模型中有200多个模型,怎么能把这200多个模型分别批量导出成obj或fbx的独立模型mm4C4D模型
手动导出感觉要累s人的

1条回答

0
你的模型是什么格式?导入进blender中的还是用bl制作的?告诉你个方法,批量导出fbx格式的:
1.首先需要把项目另存为.blender工程文件。
2.然后在菜单Scripting中,新建一个脚本,把下面的脚本粘贴,然后运行即可。

# exports every single object to single fbx file.
# Copyright https://www.c4d.com
# Compatible with Blender 3.5.1
 
### fbx files in dir of .blender ###
### bake_space_transform=True,Apply Transform, Bake space transform into object data, avoids getting unwanted rotations to objects when target space is not aligned with Blender’s space (WARNING! experimental option, use at own risk, known to be broken with armatures/animations) ###
 
import bpy
import os
 
# export to blend file location
basedir = os.path.dirname(bpy.data.filepath)
 
print("START Output path = "+basedir)
 
if not basedir:
    raise Exception("Blend file is not saved")
 
objects = bpy.context.collection.objects
 
def exportfunc(objName):
    name = bpy.path.clean_name(objName)
    fn = os.path.join(basedir, name)
 
    # Export gltf
#    bpy.ops.export_scene.gltf(filepath=fn + ".gltf", export_format="GLTF_SEPARATE", export_lights=False, use_selection=True)
    # Export fbx
    bpy.ops.export_scene.fbx(filepath=fn + ".fbx", use_selection=True,bake_space_transform=True)
 
    print("written:", fn)
    return
 
#Deselect all objects
for obj in objects:
    obj.select_set(False)
 
print("===Start save files===")
 
for obj in objects:
    if obj.parent == None:
        if obj.type == 'EMPTY' and len(obj.children) > 0:
            obj.select_set(True)
            for subObj in obj.children:
                subObj.select_set(True)
 
            # some exporters only use the active object
            #view_layer.objects.active = obj
            exportfunc(obj.name)
            
            #Deselect all objects
            for obj in objects:
                obj.select_set(False)
        else:
            obj.select_set(True)
            exportfunc(obj.name)
            obj.select_set(False)
    
print("All save completed!")



追答:
提醒一句:打开的模型文件一定要保存成blend,然后选中你要导出的元素,点击执行脚本
等你回答
我要提问