2
$\begingroup$

I have a few vehicle blender model files and a ground blender model files separately. the project needs to use python to automatically create vehicle instances onto the ground blender model. To do that, i will need to find blender API to load the vehicle model to ground model through the code.

On the blender api, I need find the

bpy.ops.import_scene.obj(filepath=path, axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl")  

but the API seems to only load the obj model instead of blender model. I want to use blender model is because it also has texture, loading obj model doesn't seem to have the texture loaded. (maybe this is wrong)

$\endgroup$

1 Answer 1

1
$\begingroup$

Look into bpy.ops.wm.link() and bpy.ops.wm.append(). This is how the GUI transfers objects across .blend files. (To find that out, I used the Python tooltips and hovered over the Link and Append buttons.)

$\endgroup$

You must log in to answer this question.

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