Last active
April 14, 2022 11:33
-
-
Save micahscopes/6176139 to your computer and use it in GitHub Desktop.
Batch import a folder of Wavefront OBJ files to Blender. It used to be that you could do this with the built-in OBJ import/export script, but I've been getting an error with that. Here's a workaround.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import bpy | |
path_to_dir = "/directory/full/of/obj/files/" | |
files_in_dir = os.listdir(path_to_dir) | |
for file_in_dir in files_in_dir: | |
bpy.ops.import_scene.obj(filepath=path_to_dir+file_in_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment