INNER CODE UNIT · Python

_asset_output_path

untoldengine/UntoldEngine · scripts/untold-blender-addon/untold_exporter/__init__.py:166

    def _asset_output_path(filepath: str) -> Path:
        selected_path = Path(filepath).expanduser().resolve()
        asset_name = selected_path.stem or "asset"
        return selected_path.parent / asset_name / f"{asset_name}.untold"

    def execute(self, context: bpy.types.Context) -> set[str]:
        output_path = self._asset_output_path(self.filepath)
        compression_summary = {"detail": None}

        wm = context.window_manager
        workspace = context.workspace
        wm.progress_begin(0, 100)

        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 ""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…