mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-18 05:00:55 +00:00
feat: preset APIs
This commit is contained in:
15 files changed
+2762
-277
No files matched your search
@@ -102,6 +102,12 @@ void install_slicing_pipeline_hook()
|
||||
ctx.step = step;
|
||||
ctx.print = &print;
|
||||
ctx.object = object;
|
||||
// Slicing hooks are synchronous by design and never await: the context
|
||||
// borrows Print/PrintObject that are only valid during this call, and the
|
||||
// UI thread may itself be blocked waiting on this slicing worker. An async
|
||||
// override is rejected here rather than scheduled -- cap->execute() casts
|
||||
// its Python result to ExecutionResult and a coroutine object cannot be
|
||||
// cast, so it surfaces as the SlicingError below.
|
||||
r = cap->execute(ctx);
|
||||
} catch (const CanceledException&) {
|
||||
throw; // cancellation must reach process(), never become a slicing error
|
||||
|
||||
Reference in new issue
Block a user