Skip to main content

License: MIT + Commons Clause PyPI Python Maya Tests Platform

mayatk

Maya 2025+ tech-art toolkit built on maya.cmds + maya.api.OpenMaya (no PyMEL) — modeling, animation, materials, rigging, and scene-pipeline automation, plus one-click bridges into Marmoset, Substance Painter, RizomUV, Blender, and Unity. The tool panels over it are tentacle's.

mayatk is the Maya layer of the pythontk → uitk → {mayatk, blendertk} → tentacle ecosystem: the Maya half of every tentacle tool, as a library a script can call.

mayatk (highlighted) in the ecosystem: uitk requires pythontk; unitytk requires pythontk; mayatk requires uitk; blendertk requires uitk; tentacle requires uitk; extapps requires uitk; tentacle installs mayatk as its [maya] extra; tentacle installs blendertk as its [blender] extra; tentacle opens extapps by name (its [apps] extra) and never imports it; mayatk and blendertk share a mirrored API. tentacle and extapps are products, which nothing imports.

Install

pip install mayatk

Maya 2025+ (Python 3.11+). Every class is reached from the package root and loaded on first use, so import mayatk loads declarations and nothing else.


The design, and what it buys

  • The logic lives here; the panels live in tentacle. Every tool is a class with a plain API and no UI, and its panel only calls it. Whatever an artist does from a panel, a script, a test or an AI agent does with the same call.
  • A tool records what it changes, in the scene. Smart Bake and Texture Combine write down what they changed on a node in the scene itself, so either is reversed exactly, also after the scene was saved, closed and reopened. The Scene Exporter puts back every edit it staged before it returns.
  • A delivered file carries its own records. What an engine needs beyond the geometry (which take is which shot, the sound cues, the lightmaps, the materials as authored) is written into the exported file. The records are declared once, in pythontk, and Unity and the WebXR viewer read them through types generated from that declaration.
  • Mirrored in Blender. blendertk offers the same operations under the same names, so one tentacle panel serves both hosts, and what both need is written once, in pythontk.
  • Your session is never the test bench. MayaConnection, the test runner and the host an AI agent's calls run in each launch a Maya of their own.

The tools

A procedure sheet to engine-ready shots

Three tools carry a procedure from the sheet it is written on to the file an engine plays. Each one's page shows it at work, with a clip beside every feature.

Assess, then Build: five shots appear with their keys

  • Shot Manifest builds one shot per step of a build sheet (a CSV file or a Google Sheets link): named after the step, holding its objects, with the fades and highlights the sheet asks for already keyed. The sheet stays the source and the scene stays the animator's: the tool never writes the sheet, never creates the objects it names, never removes a shot and never keys over existing work. So Assess and Build can be run again at any point in production. Watch the demo.
  • Shot Sequencer is a timeline where the shot is the unit, not the key: move a shot's edge and every later shot follows with its keys and audio. Watch the demo.
  • Scene Exporter keeps the working scene and the exported scene apart. What it changes only for the file (the unit, the bake, the flattened joints, the takes) is staged for the write and put back afterwards, however the run ends, and a failed check stops the run before anything is written. It writes FBX, GLB or USD; in an FBX each shot goes out as its own named take, which Unity imports as an animation clip. Watch the demo.

One job taken through all three, and on into Unity: Tool demos. The exporter from code, with the panel's own defaults: Calling it from code.

Smart Bake

It finds what drives the animation (constraints, set-driven keys, expressions, IK, motion paths, driven blend shapes) and bakes only those channels, over the range the drivers animate. A bake is a transaction: each phase records what it is about to change before changing it, so a phase that fails is rolled back, and a finished bake is reversed from the same record in a later session.

import mayatk as mtk

result = mtk.SmartBake(optimize_keys=True).execute()
mtk.SmartBake.restore()             # the drivers resume

Lightmap Baker

Arnold lighting baked into engine lightmaps, wired for the engine in the same step. Light is not baked into the albedo: each mesh keeps its PBR material and texture UVs, and the lightmap is a separate HDR map on a second UV set that Unity and the glTF export both read. Every bake records what each map was baked against (the mesh, its UVs, its materials, the lights), so the tool knows which maps an edit made stale and re-bakes exactly those.

Texture Combine

Several materials become one atlas and one material, in place: the meshes keep their geometry, their UVs are repacked into one layout, and every map is resampled into it. The originals are recorded in the scene, so a combine is restored exactly, or run again when a source map is revised.

Rigs for mechanical parts

  • Articulated Rig rigs a prop of rigid parts on hinges, swivels, balls and slides (a desk lamp, a monitor arm), its joints proposed from the geometry. Each control sits in its joint's rest frame, so the value an animator keys is the joint's angle with no conversion. Unity and the WebXR viewer play that same number, and a hand that grabs the prop there writes it, solved by one model that every port is held to.
  • Shadow Rig gives an object a ground shadow an engine draws as a textured plane, projected through the light as a real shadow forms. Its Horizon type bakes a map the engine samples, so the outline follows a light that moves at runtime, drawn by one shader source that Unity and the WebXR viewer share.
  • Tube Rig rigs a hose, cable or piston from the mesh alone: it finds the tube's centerline and sizes the controls to the measured radius.

A preview that never touches undo

Preview gives any tool a live preview. A preview pass is recorded nowhere: cancel rolls the scene back from a snapshot of what the pass created, and commit replays the operation once, as a single undo step. A Ctrl+Z in the middle of a preview is still the artist's own.

Hand-offs, and a live headset preview

One call exports the selection and opens it in Marmoset Toolbag, Substance 3D Painter or a fresh Blender, and runs a script from a template on arrival (mtk.MarmosetBridge().send(template="bake")). The Unity bridge exports into a Unity project's Assets/, and the RizomUV bridge unwraps the selection there and brings the UVs back.

mtk.WebXrPreview().push() sends the selection to a browser instead. A tab left open, including one in a PC-tethered headset, shows each new push without a reload, baked lightmaps included: Live WebXR preview.

Also

  • AutoInstancer(separate_combined=True) takes one combined mesh, sorts its shells back into the repeated assemblies they came from, and instances those: copies that touch, or that are rotated or uniformly scaled, are still matched, and what repeats nowhere is merged into one mesh.
  • SceneAnalyzer.run_audit() is a game-readiness report (rendered against unique triangles, draw calls, each material's texture cost in GPU memory, what to fix first) that measures each mesh shape once and weights it by its instances, so an instanced scene reads as it will render.
  • HierarchySync compares the scene's hierarchy with a reference file, then pulls in what is missing and repairs what was renamed or reparented.
  • MayaConnection launches a Maya of its own and runs code in it from any Python process. For an AI agent, mayatk registers Maya with pythontk's operations, so calls over MCP run in a Maya started for them (setup).
Package map: where each thing lives
Package What it holds
anim_utils Animation curves, shots, blendshape animation, playblast, smart bake
audio_utils Audio clips, ffmpeg-backed conversion, timeline-keyed events
cam_utils View capture and framing, camera clipping, cameras from the current view, view state save and restore
core_utils CoreUtils, Components, AutoInstancer, the scene audit and repair helpers, the tool preview, MASH bridge
display_utils Visibility & isolation, color ID, exploded view
edit_utils Selection, naming, primitives, snap, bevel, bridge, mirror, duplicate (linear/radial/grid), mesh graph
env_utils MayaConnection, the maya operation host (MayaSceneFiles), workspaces, namespace sandbox, references, hierarchy sync, FBX/USD, scene exporter, Blender + Unity bridges, WebXR preview
light_utils Lightmap baker, Light rigs, HDR manager, lights-from-geometry
mat_utils GameShader, RenderEffects (per-object opacity / highlight channels), ImageToPlane, MatUpdater, shader templates, emissive groups, Marmoset + Substance bridges
node_utils NodeUtils, Attributes, the Channels engine, shared scene data nodes
nurbs_utils NURBS surfaces, ImageTracer, curve-to-tube
render_utils Renderer switching, render settings and their presets
rig_utils Controls, skinning, tube / wheel / telescope / shadow / articulated rigs
ui_utils MayaUiHandler (also opens uitk's editors with no tentacle: mtk.MayaUiHandler.instance().editors.show("ui_browser")), the marking-menu host adapter, channel box, native menus, hotkey collision check, node icons
uv_utils Unwrap, pack and transfer UVs, Texture Combine, Rizom bridge
xform_utils Freeze and restore transforms, pivots, alignment and placement, matrices

The whole public surface, searched live from the installed source: python -m pythontk ops run api.search "query=<words>".


Guides

Guide What it covers
Shot Manifest The sheet's columns and templates, behaviors, Assess, Build, Local Edits, Export, and the rules it keeps
Shot Sequencer The views, the shot, clip and key gestures, the graph editor
Scene Exporter Every task and check, the file-name tokens, what the file carries, presets, the call from code
Shot data in the FBX → Unity Shots as named Unity animation clips, with their metadata and audio events
Scene data nodes What each record holds, and what an FBX, GLB or USD export carries
Lightmap Baker The panel, presets, which lights light a bake, where the maps land, re-baking what changed
Light Rigs A scene's lights saved as a named rig, swapped and restored exactly
Texture Combine Packing, scale overrides per material, mesh and island, restore and re-combine, UV / texture transfer
Articulated Rig The joint types and how they are found, the rig, the record the runtimes pose, grab semantics
Shadow Rig: the Horizon type A design review: the options weighed and the contract Maya, Unity and the WebXR viewer are built against
Emissive groups Regions whose glow plays on its own, as materials, and what each package holds
Live WebXR preview What the preview builds and what survives the trip

Format specs: the Scene Exporter's preset JSON, key by key. The Shot Manifest writes its mapping-file reference, MAPPING_FORMAT.md, into the mapping folder it opens.


License

MIT with the Commons Clause — see LICENSE. Free to use, modify and share, including in paid production work; what it forbids is selling mayatk, or a product or service whose value comes mainly from it. The Blender-side scripts under env_utils/blender_bridge/templates/ are plain MIT, since code that runs inside Blender must be GPL-compatible.

Metadata

Release files for mayatk 0.36.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mayatk 0.36.0
File Interpreter ABI Platform Actions
mayatk-0.36.0-py3-none-any.whl Python 3 none any Details for mayatk-0.36.0-py3-none-any.whl

Release files / mayatk-0.36.0-py3-none-any.whl

Download URL mayatk-0.36.0-py3-none-any.whl
Size 2.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3badac193c561e7ba8ace7e9038a7bcb6b288ec094cc57b53dc957b1a1764185
BLAKE2b-256 checksum
How to use checksums
8d9d788c1c10c1ea2d5704b9f83e2f722efe18a0bf7e800ec6abf1a83aabbd27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for mayatk 0.36.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.36.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page