When aborting, make sure the reason is available
This allows a GUI to display the reason of abortion.
This commit is contained in:
@@ -42,7 +42,7 @@ class Callback(blender_asset_tracer.trace.progress.Callback):
|
||||
missing_files: typing.Set[pathlib.Path]) -> None:
|
||||
"""Called when packing is done."""
|
||||
|
||||
def pack_aborted(self):
|
||||
def pack_aborted(self, reason: str):
|
||||
"""Called when packing was aborted."""
|
||||
|
||||
def trace_blendfile(self, filename: pathlib.Path) -> None:
|
||||
@@ -109,6 +109,9 @@ class ThreadSafeCallback(Callback):
|
||||
missing_files: typing.Set[pathlib.Path]) -> None:
|
||||
self._queue(self.wrapped.pack_done, output_blendfile, missing_files)
|
||||
|
||||
def pack_aborted(self, reason: str):
|
||||
self._queue(self.wrapped.pack_aborted, reason)
|
||||
|
||||
def trace_blendfile(self, filename: pathlib.Path) -> None:
|
||||
self._queue(self.wrapped.trace_blendfile, filename)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user