Created
June 9, 2018 22:49
-
-
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
This file contains 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
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