I have a binary
.ply file of a model, is there a way with blender to retrieve the number (i.e. their position in the file) of the faces corresponding to a set of vertices that I select in edit mode.
The header of my
.ply file is the following:
ply format binary_big_endian 1.0 comment CREATED BY FPLY_BMSH_RX01 element vertex 1572866 property float x property float y property float z element face 3145728 property list int int vertex_index end_header
I've tried to do that with the following script (from Getting the number of faces a certain vertex is part of):
import bpy import bmesh me = bpy.context.object.data # Get a BMesh representation bm = bmesh.new() # create an empty BMesh bm.from_mesh(me) # fill it in from a Mesh for f in bm.faces: for v in f.verts: lf = v.link_faces print('num faces:', len(lf), 'faces: ', lf[:]) break
But despite the vertices I have selected I always get the same list of faces as output.