Created
August 6, 2019 19:02
-
-
Save Volantk/9f2c3a9308e7da0ccb120b767e5cf837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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