dictionary index for faces

I need to create a dictionary by the following

for face in NMesh.faces

dict[face_unique_identifier] = formula

is there a unique identifier for faces?

I would have thought that there would have been face.index but that didn’t work.

I need it to be something I can access quickly, but I don’t see anything that works.

LetterRip

A tuple of the verts (or their indices) that make up the face will be unique for each face.

I know i can do something like

id = []
for vert in face.v:
id.append(vert.index)

key = (id[:])

but I need something that is quick

i also tried using face.normal which seemed like it should have worked, but it gave me an error.

what I’m doing is caching culling related information. As long as the normal hasn’t changed, I can reuse my transform of the normal to global coordiantes. And if the view vector hasn’t changed, then I can reuse the dotproduct that i calculated.

LetterRip

I was being retarded … doh!

The normal was working fine as a key,

apparently I was trying to delete a key that wasn’t added and thus was getting the key error…

LetterRip