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
# Slight modification of https://gist.github.com/AngryLoki/3800594 | |
# Converts Object File Format (OFF) files to OBJ files in batch | |
# Allows the usage of OFF files in Gazebo Ignition | |
# blender --background --python3.7 off2obj.py -- input_dir output_dir i.e. blender --background --python off2obj.py -- off_meshes/ ./obj_meshes/ | |
# Tested with Blender 2.82 and OFF Add-on https://github.com/3Descape/blender-off-addon/tree/patch-1 | |
# Sizes all objects down to 10,10,10 | |
import os | |
import sys | |
import glob | |
import bpy |