convert pxr-usd file to msd file
Project description
usd2msd
This project is an offline converter for Omniverse-specific USD files to MSD.
This project is a sub-project. Unless explicitly specified, all paths in this README are relative to the project root, and all commands are assumed to run from that directory.
Setup Environment
This project uses pyproject.toml to manage dependencies. You can use any Python package manager
that supports PEP 518. With uv, run:
uv sync
to install runtime dependencies and the default dev dependency group.
This project requires Python >=3.10, <3.14.
Hello World USD
Run the Python script using:
uv run examples/hello_world_usd.py
This converts hello_world.usda and loads it directly into MotrixSim via the PyO3 MSD binding. No intermediate file is written.
Usage
Converter.convert() returns an msd.World object (a PyO3 Rust object) directly:
from pathlib import Path
from usd2msd import Converter
converter = Converter()
world = converter.convert(Path("scene.usda"))
# world is a motrixsim.msd.World object, ready for use in MotrixSim
To use the world in MotrixSim:
import motrixsim as mx
model = mx.load_usd("scene.usda") # internally calls Converter and builds the scene
Developer Guide
Update MSD Python Stubs
MSD types are exposed directly via PyO3 bindings from motrixsim.msd. When MSD structure in the main project changes, regenerate the Python stubs:
cd motrixsim-python/motrixsim-core
cargo run --bin stub_gen
Inspect Binary USD Files
To convert or flatten a binary USD file to readable USDA for inspection or debugging, edit and run:
uv run scripts/flatten_to_usda.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usd2msd-0.8.0-py3-none-any.whl.
File metadata
- Download URL: usd2msd-0.8.0-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.27.0 CPython/3.11.2 Linux/6.12.57+deb13-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9019c95b75843b7cfcc0d62cad3d9f93c5e1f5fc92716843a373ee2c6436c691
|
|
| MD5 |
45ad78b7136585f88677c36ddd45b25a
|
|
| BLAKE2b-256 |
0deeb59b6f756a877817cc1cb40a905ff05524ee994014da0eefa444719b12f8
|