Vendor debugpy for VS Code attach debugging

Bundles debugpy 1.7.0 directly in python/ so "Maya: Attach (debugpy)"
works with no per-machine pip install step. Installed via Maya 2022's
own pip so it resolved a version actually compatible with Python 3.7
(Maya 2022's interpreter), then verified import + listen() succeeds
under all three target Maya Python versions (3.7/3.9/3.10).

Also fixes a latent __file__-under-exec() bug in
start_debug_server.py (same pitfall as Maya's own plugin loader,
never hit until this exercised it) and corrects the README's Maya
Python version claim -- 2022 ships Python 3.7, not 3.9 as previously
stated, which was never independently verified until now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 09:01:16 +08:00
parent e2f2e6668a
commit ec5f52c7c6
623 changed files with 236815 additions and 12 deletions
+7 -6
View File
@@ -3,8 +3,8 @@
Turns an animated Maya skeleton into OpenPose-style stick-figure images (up
to 25 BODY_25 body/foot + 21+21 hand + 70 face = 137 keypoints), for use
with ControlNet and similar tools. Built entirely on Maya's Python API 2.0.
Targets Maya 2022-2024 (Python 3.9/3.10, PySide2 -- PySide6 also detected
automatically if present).
Targets Maya 2022-2024 (Maya 2022 = Python 3.7, 2023 = Python 3.9, 2024 =
Python 3.10; PySide2 -- PySide6 also detected automatically if present).
Body output supports two OpenPose skeleton formats, selectable per
character (see *Body model* below): **BODY_25** (25 points, includes
@@ -142,10 +142,11 @@ ARKit-named attributes, auto-connected -- see that scene for the pattern):
`.vscode/launch.json` provides:
- **`Maya: Attach (debugpy)`** -- attaches to a running, interactive Maya.
One-time setup: `"<Maya install>\bin\mayapy.exe" -m pip install debugpy`.
Each session, run `scripts/start_debug_server.py` inside Maya's Script
Editor first (see that file's docstring), then launch this config from
VS Code to hit breakpoints anywhere in `plug-ins/` or
`debugpy` is bundled in `python/` (no separate pip install needed --
verified importable under all three target Maya Python versions,
3.7/3.9/3.10). Each session, run `scripts/start_debug_server.py` inside
Maya's Script Editor first (see that file's docstring), then launch this
config from VS Code to hit breakpoints anywhere in `plug-ins/` or
`python/openpose_renderer/` -- including the draw override and render
override callbacks, which only run inside a real Maya viewport.
- **`mayapy 2022/2023/2024: Run current file`** -- runs the file you have