2
$\begingroup$

This is a very old question, but I just lost track as to whether it has been done.

Is there a way to simply import an .obj file by dragging and dropping it onto your blender window?

This will make my workflow quite a bit faster, since I am just checking meshes.

$\endgroup$
1
  • $\begingroup$ Maybe you can view meshes by vtkplotter. link $\endgroup$
    – LogWell
    Commented Oct 19, 2019 at 3:08

1 Answer 1

1
$\begingroup$

This did not work the last time I tried it and I assume it still doesn't since you are asking.
The fastest way I know of to do this is to use the following script that someone posted on this site a while back for batch importing .obj files. I modified it slightly to work with OSX but the necessary Windows code is just commented out.

import os
import bpy

# put the location to the folder where the objs are located here in this fashion
#path_to_obj_dir = os.path.join('C:\\', 'Users', 'YOUR_NAME', 'Desktop', 'OBJS') #<-WINDOWS_OS
path_to_obj_dir = bpy.path.abspath('//OBJ/')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item[-3:] == 'obj']

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.obj(filepath = path_to_file)

It's supposed to look like the following. It originally searched the directory where the .blend is but one of the changes I made has the script search for .obj files in a folder called OBJ.

enter image description here

$\endgroup$
1
  • $\begingroup$ Cheers, that works fine, when I give it the exact path (same for linux and osx), and this certainly speeds-up my workflow. The inconveniences are that I need to give it a exact path each time (as i am not necessarily using a project file), and also it will load all objs in the directory unless you modify it... It is better than nothing, but I actually cannot imagine that an arbitrary .obj drag-and-dropper does not exist for blender... Just changed if item[-3:] == 'obj'] to [-4:] == '.obj' as it causes problems if u have an obj folder. Thanks for the help anyway. $\endgroup$ Commented Oct 10, 2014 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .