Skip to content

Instantly share code, notes, and snippets.

@pierriko pierriko/add_grid.bash
Last active Dec 26, 2015

Embed
What would you like to do?
Test add grid of specific size in Blender usually freeze over 1000x1000 grid
#!/bin/bash
for grid_size in 100 200 500 1000 2000; do
echo "blender -b -P add_grid.py -- $grid_size"
time blender -b -P add_grid.py -- $grid_size
done
# results:
# https://docs.google.com/spreadsheet/ccc?key=0AmpIySwDLOg8dDFxUlNjZWozRWhqWkF3aXBiQmViYkE
"""
usage: blender -b -P add_grid.py -- grid_size
example: blender -b -P add_grid.py -- 200
"""
import sys
import bpy
size = int(sys.argv[ sys.argv.index('--') + 1 ])
bpy.ops.mesh.primitive_grid_add(x_subdivisions = size, y_subdivisions = size)
# bpy.ops.wm.save_mainfile(filepath = '/tmp/test.blend', check_existing = False, compress = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.