Skip to content

Releases

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 09:02

First release. py_maya_scene reads and edits Autodesk Maya scene files (.mb and .ma, Maya 2018 to 2025) without Maya.

🆕 Features

  • add py_maya_scene.parse(path: str | Path) -> Scene for .mb and .ma files, told apart by content
  • save an unedited scene back unchanged, and rewrite only the values an edit changes
  • add Scene attributes path, version, file_info, plugins, references, nested_references, nodes, connections
  • add Scene.node(name: str) -> Node to get a node by unique short name or DAG path
  • add Node attributes name, type, type_id, uuid, parent, parent_name, path, paths, is_dag, is_transform, is_default, attributes
  • add Node.attr(name: str) -> Attribute and make Attribute.value writable (strings, string arrays and reference edits, other values are kept as stored)
  • add Reference attributes path, namespace, node, depth, deferred, file_type
  • make Reference.path writable, with file_type following a .ma or .mb extension
  • add Scene.dependencies(extra: Mapping[str, Iterable[str]] | None = None) -> list[Dependency] to list every stored file path: references at every depth, file attributes (textures, caches, audio, Arnold, Alembic, Yeti, Golaem...) and paths set on referenced nodes, with image sequences flagged
  • add Scene.file_attributes(extra: Mapping[str, Iterable[str]] | None = None) -> list[Attribute]
  • add Scene.remap_paths(remap: Callable[[str], str | None], extra: Mapping[str, Iterable[str]] | None = None) -> int
  • add Scene.reference_edits() -> list[tuple[Attribute, ReferenceEdits]]
  • add Node.rename(new_name: str, *, shapes: bool = True, in_strings: bool = False) and make Node.name writable, with shapes, parents, connections, instances and reference edits following like in maya.cmds.rename (not for reference nodes and default nodes yet)
  • keep the externalContentTable in step with remaps, renames and edited paths
  • add Scene.replace_strings(replace: Callable[[str], str]) -> int to replace text in node names, namespaces, string values, reference paths and fileInfo (.mb only)
  • add Scene.save(path: str | Path), which refuses to overwrite, and Scene.save_in_place()
  • add maya-inspect CLI to print the chunk tree or chunk counts of a .mb file

📃 Docs

  • add the documentation site, with a .mb and .ma file format page

👩‍💻 Code

  • add py_maya_scene.binary (read_mb, write_mb) and py_maya_scene.ascii (Document) I/O layers
  • add node type and file attribute tables generated from Maya's own schema
  • add scripts/mayapy/ to make fixtures and dump Maya's own view of a scene
  • support Python 3.7 to 3.14, with type hints