Skip to content

Instantly share code, notes, and snippets.

View aaronjolson's full-sized avatar

Aaron Olson aaronjolson

View GitHub Profile
@aaronjolson
aaronjolson / blender_select_all_verts.py
Created June 9, 2018 22:09
Blender select all verts on cube
import bpy,bmesh
ob = bpy.data.objects['Cube']
bpy.ops.object.mode_set(mode='EDIT')
mesh=bmesh.from_edit_mesh(bpy.context.object.data)
for v in mesh.verts:
v.select = True
# trigger viewport update
bpy.context.scene.objects.active = bpy.context.scene.objects.active
@aaronjolson
aaronjolson / crush.sh
Created November 21, 2014 17:20
A bash script to be pasted into bashrc. Use the crush command to compress multiple jpgs and pngs inside of a directory. Requires pngcrush and libjpeg-progs
### Crush multiple image files in a folder
crush() {
for f in *;
do
mv "$f" `echo $f | tr ' ' '_'`
done
for f in *.png
do
echo "$f"