Browse Source

Update mesh.py

Prevent export of Blender Decimate modifier from failing and corrupting Blender file!
pull/215/head
Mark Eggert 4 years ago committed by GitHub
parent
commit
8f3a94589e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      korman/exporter/mesh.py

2
korman/exporter/mesh.py

@ -178,7 +178,7 @@ class _MeshManager:
for cached_mod in override["modifiers"]:
mod = bo.modifiers.new(cached_mod["name"], cached_mod["type"])
for key, value in cached_mod.items():
if key in {"name", "type"}:
if key in {"name", "type"} or (cached_mod["type"] == "DECIMATE" and key=="face_count"): # Decimate attribute face_count is read-only
continue
setattr(mod, key, value)

Loading…
Cancel
Save