pyobjc-framework-modelio provides Python bindings for Apple's ModelIO framework, enabling macOS applications to work with 3D assets, meshes, materials, and other related data. As part of the larger PyObjC project, it typically releases new versions to align with new macOS SDKs, with version 12.1 being the current stable release.
pip install pyobjc-framework-modelioVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a simple 3D cube mesh using ModelIO, add it to an MDLAsset, and then export it to an OBJ file. This code is macOS-specific due to its reliance on Apple's ModelIO framework.
Upgrade to a compatible Python version (e.g., Python 3.10+ for PyObjC 12.x) or use an older PyObjC version that supports your Python environment.
Review any custom `__new__` or `__init__` methods in Python subclasses of Objective-C classes, especially those mimicking initializer patterns, to ensure correct reference handling.
Develop and run PyObjC applications exclusively on macOS. For cross-platform development, consider alternative libraries.
If experiencing issues with `__init__` not being called correctly on subclasses, especially when `__new__` is involved, ensure you are on PyObjC 10.3.1 or later. Review your `__new__` and `__init__` implementations for compatibility with PyObjC's object lifecycle.
Avoid using PyObjC in a free-threading enabled Python environment unless explicitly stated as fully supported for your PyObjC version. Consult the PyObjC release notes for specific guidance on free-threading compatibility.