Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aaronjolson/242a230b56e8716886b984085182d51b to your computer and use it in GitHub Desktop.
Save aaronjolson/242a230b56e8716886b984085182d51b to your computer and use it in GitHub Desktop.
Blender script to select the face of a cube with its normal facing the Y axis
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 f in mesh.faces:
if f.normal.y == 1.0:
f.select = True
# trigger viewport update
bpy.context.scene.objects.active = bpy.context.scene.objects.active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment