Skip to content

Instantly share code, notes, and snippets.

@lowteq
Created February 9, 2020 01:39
Show Gist options
  • Save lowteq/d10f1ad4fe48790a782cd8069f033765 to your computer and use it in GitHub Desktop.
Save lowteq/d10f1ad4fe48790a782cd8069f033765 to your computer and use it in GitHub Desktop.
select points where x is greater than 0
import bpy
import bmesh
bpy.ops.object.mode_set(mode='OBJECT')
obj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
mesh = bmesh.from_edit_mesh(obj.data)
bpy.ops.mesh.select_all(action="DESELECT")
for v in mesh.verts:
print(v.co.x)
if v.co.x > 0:
v.select = True
else:
v.select = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment