How ynput/ayon-motionbuilder works
Project type and purpose
• This is not a full-stack website or microservice mesh, but an Autodesk MotionBuilder addon (“client”) that integrates MotionBuilder into the Ayon pipeline. It provides import/export hooks, menu items, and publishing workflows inside MotionBuilder, and it communicates with an Ayon “server” (pipeline service) for settings, versioning, and publishing.
File structure
• Top-level:
• client/ayon_motionbuilder – Python package loaded as the MotionBuilder addon
• server/settings.py – empty stub for server-side configs (Ayon server)
• create_package.py & package.py & pyproject.toml – scripts and config for building the addon
• docs/ & mkdocs.yml – documentation site
• .github/workflows – CI/CD (lint, release, upload to Ynput cloud)
• client/ayon_motionbuilder splits into:
• addon.py & version.py – entry points for the plugin
• api/ – wrappers to talk to Ayon’s REST API, pipeline utils, menu and plugin registration
• hooks/ – code injected into MotionBuilder at startup or via scripts
• plugins/{create,load,publish}/ – discrete workflow steps (create animations, load caches, publish work files)
README for additional insights
• Describes required user settings (MotionBuilder binary path in Ayon UI)
• Lists supported workflows (import model/rig/animation, export animation, open/save/publish workfiles)
• Instructs users to run create_package.py to assemble the addon for distribution
Components and interactions
a. Main components
1. Autodesk MotionBuilder Application (external 3D DCC)
2. Ayon MotionBuilder Addon (the client plugin)
– Entry module (addon.py)
– API submodule (lib.py, pipeline.py, menu.py, plugin.py)
– Hooks (startup scripts, injected Python)
– Workflow plugins (create, load, publish)
3. Ayon Pipeline Server (settings registry, version control, publishing endpoints)
4. Packaging & CI/CD
– create_package.py / package.py (build logic)
– GitHub Actions (lint, release, upload)
5. Documentation site (mkdocs)
b. Relationships & data flow
• On MotionBuilder launch, the Addon’s startup hook registers menu items and initializes the API.
• When the user invokes a workflow (e.g., “Publish Animation”), the plugin calls into api/pipeline.py, which sends HTTP requests to the Ayon server.
• The server responds with project settings, version numbers, storage locations.
• The plugin reads/writes the MotionBuilder scene and pushes files back to Ayon’s storage.
• Packaging scripts bundle the client code into an installable MotionBuilder addon, while GitHub Actions automate testing and releases.
c. Architectural patterns & design principles
• Modular plugin design: each workflow step is its own plugin under plugins/
• Clear separation of concerns between MotionBuilder API calls (hooks/), pipeline communication (api/), and packaging
• CI/CD ensures repeatable builds and automated release to cloud or PyPI
d. Key technologies/frameworks
• Python 3.x packaging (pyproject.toml)
• Ayon REST API (HTTP client inside api/lib.py)
• MotionBuilder Python environment (injected hooks & scripts)
• GitHub Actions for CI/CD
• MkDocs for documentation
Summary Guidance
• Break the plugin into its runtime modules (entry, API, hooks, workflows).
• How those modules interact at startup and during user-driven workflows.
• External dependencies: MotionBuilder host and Ayon server endpoints.
• Build/release subsystem as a secondary but important pathway.