github m3trik/pythontk v0.8.90
pythontk v0.8.90

9 hours ago
  • 2026-07-17 — USD support, zero-dep: file_utils/usd.py (UsdFile / UsdzPackager / UsdMeshWriter + obj_to_usd / obj_to_usdz). Pure-Python USD primitives with no pxr dependency, per the package charter: format sniffing by magic bytes (#usda/PXR-USDC/zip — content wins over extension), a spec-compliant .usdz writer/verifier over stdlib zipfile (stored entries, 64-byte-aligned data offsets via zero-padded extra fields, default layer first — UsdzPackager.verify reads data offsets back from the local headers), UsdzPackager.from_layer (self-contained package from a text layer: on-disk texture refs pulled in under textures/ and rewritten; composed by mayatk's .usdz export), and a .usda mesh author + minimal OBJ/MTL reader — the no-DCC publish path (photogrammetry: Metashape OBJ in, QuickLook-ready USDZ out, no license). Cross-validated against the real USD runtime twice over: the optional usd-core wheel opens the authored layers/packages in test_usd.py, and Blender's importer + bundled pxr accept them in blendertk's suite. DCC-native USD I/O builds on this downstream (mayatk/blendertk env_utils/usd.py).

  • 2026-07-17 — Package-structure review: no relocations warranted; core_utils' flat layout documented as deliberate (no code change to the tree). An architectural pass over the package tree confirmed the existing layout is sound and holds a convention worth stating: a root <name>_utils/ subpackage earns its place with either a _<name>_utils.py facade (StrUtils, MathUtils, FileUtils, … — 9 of the 10 leaf packages) or a multi-module primitive family (geo_utilsPolyline/PointCloud/RailSurface, the lone justified facade-less package). A first cut of this review had split Color into a new color_utils/ and the mesh tools into a new mesh_utils/; both were reverted — each is a lone module that clears neither bar, and wrapping a single module in a package (or inventing a ColorUtils/MeshUtils facade to justify one) is nesting-for-cosmetics, the same YAGNI wrapper CLAUDE.md warns off. Color/ColorPair/Palette stay in core_utils/color.py (a homeless shared primitive lodged beside the other cross-cutting code — the precedent is Metadata living in file_utils); MeshConvert/MeshCleaner stay in file_utils (mesh files are files, and MeshCleaner manipulates topology, which geo_utils' charter explicitly disclaims). What did land: core_utils/__init__ now documents its cluster taxonomy (class infrastructure / app-process orchestration / config & persistence / package-dev infra / pipeline primitives / data structures / the homeless color primitive / engines) and why it stays flat — its module paths are cross-package import contracts (module_resolver ×20 downstream sites, app_launcher ×15, logging_mixin ×11, …), so re-nesting would be ~70 import edits across five packages for zero functional gain. Also fixed create_namespace_aliases' docstring example: it referenced the long-gone core_utils.auto_instancer module (broken since that engine's relocation) and its trailing pkg.Instancing() line didn't match the alias it set up. Rather than repoint it at another concrete module — value types like color can't even be fused (multiple-inheritance layout conflict), and any real reference rots when modules move — it's now an abstract, drift-proof FooMixin/BarMixin example that also documents the co-inheritability constraint the previous forms silently violated. (The standalone create_namespace_aliases function has no callers ecosystem-wide — packages declare aliases via the resolver's namespace_aliases map — so this is doc-only.) Public root API unchanged throughout; full suite green (1919 tests, 0 failures, 17 skipped).

Don't miss a new pythontk release

NewReleases is sending notifications on new releases.