Skip to content

Instantly share code, notes, and snippets.

@Volantk
Created August 6, 2019 19:02
Show Gist options
  • Select an option

  • Save Volantk/9f2c3a9308e7da0ccb120b767e5cf837 to your computer and use it in GitHub Desktop.

Select an option

Save Volantk/9f2c3a9308e7da0ccb120b767e5cf837 to your computer and use it in GitHub Desktop.
def find_non_unwrapped_faces(bm, select = False):
uv_layer = bm.loops.layers.uv.verify()
bm.faces.layers.tex.verify() # currently blender needs both layers.
found = []
zero = Vector((0,0))
for f in bm.faces:
totalpos = Vector((0,0))
for l in f.loops:
luv = l[uv_layer]
#print(luv.uv)
totalpos += luv.uv
if totalpos == zero:
found.append(f)
if select:
for f in found:
f.select = True
return found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment