Repository navigation
Releases
Releases · Pouf/py-maya-scene
v0.1.0
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) -> Scenefor.mband.mafiles, told apart by content - save an unedited scene back unchanged, and rewrite only the values an edit changes
- add
Sceneattributespath,version,file_info,plugins,references,nested_references,nodes,connections - add
Scene.node(name: str) -> Nodeto get a node by unique short name or DAG path - add
Nodeattributesname,type,type_id,uuid,parent,parent_name,path,paths,is_dag,is_transform,is_default,attributes - add
Node.attr(name: str) -> Attributeand makeAttribute.valuewritable (strings, string arrays and reference edits, other values are kept as stored) - add
Referenceattributespath,namespace,node,depth,deferred,file_type - make
Reference.pathwritable, withfile_typefollowing a.maor.mbextension - 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 makeNode.namewritable, with shapes, parents, connections, instances and reference edits following like inmaya.cmds.rename(not for reference nodes and default nodes yet) - keep the
externalContentTablein step with remaps, renames and edited paths - add
Scene.replace_strings(replace: Callable[[str], str]) -> intto replace text in node names, namespaces, string values, reference paths andfileInfo(.mbonly) - add
Scene.save(path: str | Path), which refuses to overwrite, andScene.save_in_place() - add
maya-inspectCLI to print the chunk tree or chunk counts of a.mbfile
📃 Docs
- add the documentation site, with a
.mband.mafile format page
👩💻 Code
- add
py_maya_scene.binary(read_mb,write_mb) andpy_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