Allow aborting a pack operation.
For this to work well I also had to remove the sorting of blocks in trace.deps(). The sorting caused the first `yield` to be executed only after each blend file was opened, which means that the consuming for-loop takes a long time to hit its first iteration. As a result, it would respond slowly to abort requests. By not sorting the first `yield` is much sooner, resolving this issue.
This commit is contained in:
@@ -23,6 +23,9 @@ class Callback(blender_asset_tracer.trace.progress.Callback):
|
||||
missing_files: typing.Set[pathlib.Path]) -> None:
|
||||
"""Called when packing is done."""
|
||||
|
||||
def pack_aborted(self):
|
||||
"""Called when packing was aborted."""
|
||||
|
||||
def trace_blendfile(self, filename: pathlib.Path) -> None:
|
||||
"""Called for every blendfile opened when tracing dependencies."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user