Skip to content

Instantly share code, notes, and snippets.

@PierrickKoch
Created May 3, 2013 07:53
Show Gist options
  • Select an option

  • Save PierrickKoch/5507811 to your computer and use it in GitHub Desktop.

Select an option

Save PierrickKoch/5507811 to your computer and use it in GitHub Desktop.
import bpy
# for i in `find . -name "*.blend"`; do blender -P blend_save_compress.py -b $i; done
suffix = '.z.blend'
filepath = bpy.data.filepath + suffix
bpy.ops.wm.save_mainfile(filepath=filepath, check_existing=False, compress=True)
bpy.ops.wm.quit_blender()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment