Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usd2msd-0.8.1-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file usd2msd-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: usd2msd-0.8.1-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

Hashes for usd2msd-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b581408f9c93e845de47aec30f3de1b8df94d21a7fb4794ea621324133ee83b
MD5 aa381d0ea53944385dcbd7b08e1d24bb
BLAKE2b-256 a110a102f4816aac19410401f86d1ffe50e5e2045d2443e962673ac026744751

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page