Last active
December 26, 2015 23:59
-
-
Save PierrickKoch/7234720 to your computer and use it in GitHub Desktop.
Test add grid of specific size in Blender usually freeze over 1000x1000 grid
This file contains hidden or 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
| #!/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 |
This file contains hidden or 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
| """ | |
| 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