Skip to main content
added 54 characters in body
Source Link
pink vertex
  • 9.9k
  • 1
  • 26
  • 45

Seems like you are passing a vertex though you named it coord.

verts = current_obj.data.vertices
coords_2d = [world_to_camera_view(scene, cam, vverts[index].co) for vindex in face.vertices ]

face.vertices does not contain a collection of mesh vertices, but a list of vertex indices. You need to retrieve the actual vertex and use its coordinate (v.co).

Seems like you are passing a vertex though you named it coord.

coords_2d = [world_to_camera_view(scene, cam, v.co) for v in face.vertices ]

face.vertices does not contain a collection of mesh vertices, but a list of vertex indices. You need to retrieve the actual vertex and use its coordinate (v.co).

Seems like you are passing a vertex though you named it coord.

verts = current_obj.data.vertices
coords_2d = [world_to_camera_view(scene, cam, verts[index].co) for index in face.vertices ]

face.vertices does not contain a collection of mesh vertices, but a list of vertex indices. You need to retrieve the actual vertex and use its coordinate (v.co).

added a bit more explanation
Source Link
CodeManX
  • 29.7k
  • 3
  • 92
  • 131

Seems like you are passing a vertex though you named it coord.

coords_2d = [world_to_camera_view(scene, cam, v.co) for v in face.vertices ]

face.vertices does not contain a collection of mesh vertices, but a list of vertex indices. You need to retrieve the actual vertex and use its coordinate (v.co).

Seems like you are passing a vertex though you named it coord.

coords_2d = [world_to_camera_view(scene, cam, v.co) for v in face.vertices ]

Seems like you are passing a vertex though you named it coord.

coords_2d = [world_to_camera_view(scene, cam, v.co) for v in face.vertices ]

face.vertices does not contain a collection of mesh vertices, but a list of vertex indices. You need to retrieve the actual vertex and use its coordinate (v.co).

Source Link
pink vertex
  • 9.9k
  • 1
  • 26
  • 45

Seems like you are passing a vertex though you named it coord.

coords_2d = [world_to_camera_view(scene, cam, v.co) for v in face.vertices ]