Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I look for a standalone script which can export from a blender file with one single Mesh to an arbitrary 3d format (.dae, .obj, .ply, ...).

The deeper problem is, I have a directory with lots of .blend files and I want a little script which can export automatic them to the 3d files. Otherwise I would have to open each of these files in blender and export manually.

Environment:

  • Archlinux
  • Blender 2.64
share|improve this question

migrated from stackoverflow.com Oct 15 '12 at 7:44

This question came from our site for professional and enthusiast programmers.

    
I'm not sure if you'll find a link to ready made script here. Probably try to write your own using the Python API and post issues encountered(if any) here. –  George Profenza Oct 14 '12 at 16:24
add comment

1 Answer

Its really simple to write blender python scripts:

import bpy
bpy.ops.wm.open_mainfile(filepath="blabla.blend")
bpy.ops.export_scene.obj(filepath="blabla.obj")

save this script as script.py and run script from commandline

blender -P script.py

thats basically it.

share|improve this answer
    
I am on macOS, and I would like to import the bpy library. I'm totally new to python and blender : where should I put the blender lib, and where should I write my code ? –  Nicolas Zozol Nov 6 '12 at 16:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.