I have coordinates (XYZ) and I want to find if a vertex exists at that position.
I was able to get all positions of vertices from my object, but I have not been able to find the vertex in the vertex list. (The vertex is in my model, and in the correct position)
Is there a better way to get positions of all vertices in my object, or a better way to search through the list?
My code:
import bpy
import bmesh
ob = bpy.context.active_object
v = ob.data.vertices[0].co
iloc = 0
for i in ob.data.vertices:
mushroom = ob.data.vertices[iloc].co
#print(mushroom)
if "<Vector (-0.3750, -1.800, 5.2441)>" == mushroom:
print(mushroom)
iloc += 1