What do I need to fix in order for this script to export and immediatly import the same exported files into different layers? For now I’ve only managed to make the export part work, but not so much the import.
import bpy
destfolder = "E:\\FilePath\FileEndDestination\\"
objects = bpy.context.selected_objects
status = True
export_status = False
name = "Baseball"
for ob in objects:
if ob.type != 'MESH':
status = False
if (status):
bpy.ops.export_scene.obj(filepath = destfolder + name + ".obj", use_selection = True)
bpy.ops.export_scene.autodesk_3ds(filepath = destfolder + name + ".3ds", use_selection = True)
bpy.ops.export_scene.fbx(filepath = destfolder + name + ".fbx", use_selection = True)
export_status = True
if (export_status):
bpy.ops.import_scene.obj(filepath = destfolder + name + ".obj").layers[1]
bpy.ops.import_scene.autodesk_3ds(filepath = destfolder + name + ".3ds").layers[2]
bpy.ops.import_scene.fbx(filepath = destfolder + name + ".fbx").layers[3]