large‑scale Maya Python toolset

large‑scale Maya Python toolset

cocanegirl
Explorer Explorer
246 Views
2 Replies
Message 1 of 3

large‑scale Maya Python toolset

cocanegirl
Explorer
Explorer

“How would you architect a large‑scale Maya Python toolset (dozens of tools, shared libs, UIs) so it stays modular and testable over multiple projects, rather than turning into one giant script file?

0 Likes
Accepted solutions (1)
247 Views
2 Replies
Replies (2)
Message 2 of 3

animatewithabhay
Advocate
Advocate
Accepted solution

hai @cocanegirl  Enforce clear separation of responsibilities

Split the codebase into distinct layers:

  • Core / logic
    Pure Python. No Maya imports. This contains algorithms, math, data handling, and rules.

  • Maya integration layer
    All maya.cmds and API calls live here. This layer translates scene data into inputs for the core logic.

  • UI layer
    PySide UI code only. No business logic. UI talks to controllers, not directly to Maya.

This separation alone prevents the “giant script” problem.

Use a package-based folder structure

Instead of many standalone scripts, use a proper Python package:

 

studio_tools/
├─ core/ # pure logic (testable outside Maya)
├─ maya/ # cmds / API wrappers
├─ tools/ # one folder per tool
│ └─ tween/
│ ├─ logic.py
│ ├─ controller.py
│ └─ ui.py
├─ ui/ # shared UI components
├─ config/ # per-project settings
├─ tests/ # unit tests
└─ launcher.py

 

Each tool is self-contained, and shared functionality lives in common modules.

 

 

Message 3 of 3

cocanegirl
Explorer
Explorer

thanks 😀

0 Likes