fix issues.

- fix issue according to python linter
- do not write vt group if no changes. reduce the cost of virtools group class.
This commit is contained in:
2023-11-17 22:00:22 +08:00
parent 1a2dd08092
commit 1432c2990a
3 changed files with 15 additions and 6 deletions

View File

@ -236,7 +236,7 @@ def _import_virtools_meshes(
# return
yield face
def mtl_iterator() -> typing.Iterator[bpy.types.Material]:
def mtl_iterator() -> typing.Iterator[bpy.types.Material | None]:
for vtmtl in vtmesh.get_material_slots():
if vtmtl:
yield material_cret_map.get(vtmtl, None)