Created
June 1, 2015 16:32
-
-
Save anonymous/d30ed366f202b768e563 to your computer and use it in GitHub Desktop.
test
This file contains hidden or 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
#Script to import multiple .obj files into blender | |
import os | |
import bpy | |
# put the location to the folder where the objs are located here in this fashion | |
path_to_obj_dir = '/home/user/Desktop/brainstem/' | |
def path_iterator(path_name): | |
for fp in os.listdir(path_name): | |
if fp.endswith(".obj"): | |
yield os.path.join(path_name, fp) | |
# loop through obj files in path_name and add them to the scene | |
for obj_path in path_iterator(path_name): | |
bpy.ops.import_scene.obj(filepath=obj_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment