INNER CODE UNIT · Python
progress
untoldengine/UntoldEngine · scripts/untold-blender-addon/untold_exporter/__init__.py:179
def progress(stage: str, done: int, total: int, detail: str) -> None:
if stage == "Compress geometry" and done >= total:
compression_summary["detail"] = detail
percent = (100.0 * done) / max(total, 1)
suffix = f" - {detail}" if detail else ""
wm.progress_update(percent)
workspace.status_text_set(f"Untold Export: {stage} {percent:5.1f}%{suffix}")
print(f"[Untold Exporter] {percent:5.1f}% {stage}{suffix}", flush=True)
# Force the status bar to redraw now; the UI does not refresh on
# its own while this blocking export operator is running.
if not bpy.app.background:
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
try:
result = exporter_bridge().export_asset(
context=context,
output_path=output_path,
scope=self.scope,