Skip to content

Instantly share code, notes, and snippets.

@mfirmin
mfirmin / triangulate.py
Last active April 19, 2023 12:09
Batch Triangulation of .obj files with Blender
# This script triangulates each .obj file in the input directory
# using Blender's Python API (https://docs.blender.org/api/current/index.html)
# It assumes that that the input/ and output/ directories exist
# Run with `blender --background --python triangulate.py`
# Tested with Blender 2.81
# Note: Before running, make sure the default scene is empty by opening Blender,
# selecting and deleting everything (light, camera, & cube),
# and selecting File -> defaults -> Save startup file