Archived
Harden BAT against missing/broken libraries and zstandard failures
- ExportBatPack and BAT_OT_export_zip: catch EnvironmentError (typically
raised when zstandard is missing or the installed wheel is incompatible
with the embedded Python) and any other exception, and report it via
self.report instead of crashing the operator.
- file2blocks.BlockIterator: skip libraries that fail to open with a
warning instead of aborting the whole trace, so production blends with
one stale linked library still pack.
- preferences: use __package__ (stable, full dotted path) for the
AddonPreferences bl_idname instead of __name__.split('.')[0], which
breaks when the add-on is loaded under an unexpected module name.
- magic_compression: zstandard handling tweaks alongside the operator
error reports above.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -133,7 +133,11 @@ class BlockIterator:
|
||||
continue
|
||||
|
||||
log.debug("Expanding %d blocks in %s", len(idblocks), lib_path)
|
||||
libfile = self.open_blendfile(lib_path)
|
||||
try:
|
||||
libfile = self.open_blendfile(lib_path)
|
||||
except Exception:
|
||||
log.warning("Failed to open library %s, skipping", lib_path, exc_info=True)
|
||||
continue
|
||||
yield from self.iter_blocks(libfile, idblocks)
|
||||
|
||||
def _queue_all_blocks(self, bfile: blendfile.BlendFile):
|
||||
|
||||
Reference in New Issue
Block a user