Files
Igor AherneandClaude Opus 5.5 56d85f6eeb Spellcast3D 0.1.0
A free, open-source Windows app that takes an artist from an idea to game-ready 3D props on their own PC: pictures with Qwen-Image 2.1, 3D models with Pixal3D, an optional repaint of their textures, retopology with TriFlow, LATO.2 or Instant Meshes, and a baker for the final textures. See README.md, and DEVELOPERS.md for building from source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 02:38:33 +01:00

34 lines
1.5 KiB
Python

"""Tool adapters, keyed by tool id. See base.py for the contract."""
from __future__ import annotations
from .. import paths
from .base import LaunchSpec, StageContext, StageError, ToolAdapter
from .forge import ForgeAdapter
from .imesh import ImeshAdapter
from .lato2 import Lato2Adapter
from .pixal3d import Pixal3DAdapter
from .qwen import QwenAdapter
from .triflow import TriflowAdapter
# The image generators, one of which the root config file picks (spellcast/config.py image_backend), in the order
# of paths.STAGE_TOOLS["images"] (the default first).
IMAGE_ADAPTERS: dict[str, type[ToolAdapter]] = {paths.QWEN: QwenAdapter, paths.FORGE: ForgeAdapter}
def build_adapters(image_backend: str | None = None) -> dict[str, ToolAdapter]:
"""Every tool's adapter, with ONE image generator: `image_backend` ("qwen" | "forge"), the one the root config
file picks. Any other text (config.image_backend() gives None when the file is not valid: "") registers no image
generator at all. None registers both (tests, prepare_release)."""
return {
**{tool: adapter() for tool, adapter in IMAGE_ADAPTERS.items() if image_backend in (None, tool)},
paths.PIXAL3D: Pixal3DAdapter(),
paths.IMESH: ImeshAdapter(),
paths.LATO2: Lato2Adapter(),
paths.TRIFLOW: TriflowAdapter(),
}
__all__ = ["LaunchSpec", "StageContext", "StageError", "ToolAdapter", "ForgeAdapter", "ImeshAdapter", "Lato2Adapter",
"Pixal3DAdapter", "QwenAdapter", "TriflowAdapter", "IMAGE_ADAPTERS", "build_adapters"]