cross-platform acrobatics

This commit is contained in:
themancalledjakob 2024-11-15 20:17:50 +01:00
parent 0320a18002
commit b24d0dbca4

View file

@ -424,7 +424,13 @@ class ImportGLTF2(Operator, ConvertGLTF2_Base, ImportHelper):
elapsed_s = "{:.2f}s".format(time.time() - start_time) elapsed_s = "{:.2f}s".format(time.time() - start_time)
print("font import gltf finished in " + elapsed_s) print("font import gltf finished in " + elapsed_s)
# acrobatics to not break on MacOS
if hasattr(gltf, "log_handler"):
if hasattr(gltf.log, "removeHandler"):
gltf.log.removeHandler(gltf.log_handler) gltf.log.removeHandler(gltf.log_handler)
elif hasattr(gltf.log, "logger"):
if hasattr(gltf.log.logger, "removeHandler"):
gltf.log.logger.removeHandler(gltf.log_handler)
return {'FINISHED'} return {'FINISHED'}