Skip to content

Commit 28d82e8

Browse files
committed
Well Well Well, bmesh back to the code as data.clear.geometry() nukes CRUCIAL TEXCOORD data.
1 parent 12a1152 commit 28d82e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

quickimport/operators.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,13 @@ def create_mesh_collection(context, folder: str, objects: List[bpy.types.Object]
176176
new_sub_collection.objects.link(ob)
177177

178178
if obj.type == 'MESH' and obj.data and obj.data.vertices:
179-
obj.data.clear_geometry()
179+
import bmesh #type: ignore
180+
bm = bmesh.new()
181+
bm.from_mesh(obj.data)
182+
[bm.verts.remove(v) for v in bm.verts]
183+
bm.to_mesh(obj.data)
184+
obj.data.update()
185+
bm.free()
180186
obj.name = obj.name.rsplit("-", 1)[0] + "-KeepEmpty"
181187

182188
for mod in list(obj.modifiers):

0 commit comments

Comments
 (0)