{"id":21056220,"url":"https://github.com/christophercrouzet/bana","last_synced_at":"2025-05-15T23:33:05.987Z","repository":{"id":18039892,"uuid":"21083238","full_name":"christophercrouzet/bana","owner":"christophercrouzet","description":"Set of extensions for Autodesk Maya's Python API.","archived":false,"fork":false,"pushed_at":"2017-05-09T04:20:14.000Z","size":147,"stargazers_count":36,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-14T12:04:16.135Z","etag":null,"topics":["autodesk","extension","gorilla","maya","monkey-patching","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christophercrouzet.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-22T01:57:53.000Z","updated_at":"2025-05-05T01:43:29.000Z","dependencies_parsed_at":"2022-08-25T13:50:28.992Z","dependency_job_id":null,"html_url":"https://github.com/christophercrouzet/bana","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fbana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fbana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fbana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercrouzet%2Fbana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christophercrouzet","download_url":"https://codeload.github.com/christophercrouzet/bana/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442427,"owners_count":22071864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodesk","extension","gorilla","maya","monkey-patching","python"],"created_at":"2024-11-19T16:49:27.863Z","updated_at":"2025-05-15T23:33:01.341Z","avatar_url":"https://github.com/christophercrouzet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bana\n====\n\n.. image:: https://img.shields.io/pypi/v/bana.svg\n   :target: https://pypi.python.org/pypi/bana\n   :alt: PyPI latest version\n\n.. image:: https://readthedocs.org/projects/bana/badge/?version=latest\n   :target: https://bana.readthedocs.io\n   :alt: Documentation status\n\n.. image:: https://img.shields.io/pypi/l/bana.svg\n   :target: https://pypi.python.org/pypi/bana\n   :alt: License\n\n\nBana is a set of extensions for `Autodesk Maya`_'s Python API.\n\nThe Maya's Python API is often a good choice over the commands layer whenever\nperformances and robustness are valued. But because of its overall poor design,\nit is not uncommon that some *fundamental* functionalities are **lacking** out\nof the box and/or require too much **boilerplate** to get rolling.\n\nOther gotchas to be expected include methods that became too **daunting** to\nuse after porting in the *worst* possible way the API from C++ to Python,\n**undocumented** behaviours of certain features where error trialing is\neverything that is left, and methods **throwing** an exception when returning\n``None`` would have been more appropriate.\n\nBana aims at reducing these shortcomings to provide a more *friendly*,\n*predictable*, and *efficient* developing environment.\n\nUsing the monkey patching package |gorilla|_, new methods prefixed with ``bn``\nare inserted within some classes from the ``maya.OpenMaya*`` modules, thus\nextending their functionalities while making these new methods feel as if they\nwere built-in into Maya.\n\nSince performances are a primary reason for using the API, a set of benchmarks\nbuilt with the help of the package |revl|_ helps to ensure that these\nextensions remain as fast as possible.\n\n\nNotes\n-----\n\nBana extends on Maya's Python API 1.0 rather than 2.0 because the latter\nversion seems to be still incomplete. That being said, it is encouraged to use\nthe API 2.0 whenever possible since it provides a much more Pythonic interface\nwith increased performances.\n\nBana does *not* aim at making the API more Pythonic. This could in some cases\nimpact the performances, which goes against Bana's goal of keeping things fast.\n\nBana *does* aim at following Maya's API philosophy by providing low-level\nextensions that are not specific to a domain (e.g.: rigging).\n\n\nFeatures\n--------\n\n* easy retrieval of nodes from the scene.\n* robust and predictable specification for pattern matching with wildcards.\n* abstract away the usage of the ``maya.OpenMaya.MScriptUtil`` class.\n* performances as a top priority.\n\n\nUsage\n-----\n\n.. code-block:: python\n\n   \u003e\u003e\u003e import bana\n   \u003e\u003e\u003e bana.initialize()\n   \u003e\u003e\u003e from maya import OpenMaya\n   \u003e\u003e\u003e # Retrieve a transform node named 'root'.\n   \u003e\u003e\u003e root = OpenMaya.MFnTransform.bnGet(pattern='*|root')\n   \u003e\u003e\u003e # Recursively iterate over all the DAG nodes child of 'root'.\n   \u003e\u003e\u003e for node in root.bnFindChildren():\n   ...     print(node)\n   \u003e\u003e\u003e # Find all the mesh nodes in the scene containing the word 'Shape' but\n   ... # not belonging to any namespace.\n   \u003e\u003e\u003e for node in OpenMaya.MFnMesh.bnFind(pattern='*|*Shape*'):\n   ...     print(node)\n\n\nSee the `Tutorial`_ section from the documentation for more detailed examples\nand explanations on how to use Bana.\n\n\nDocumentation\n-------------\n\nRead the documentation online at `bana.readthedocs.io`_ or check its source in\nthe ``doc`` directory.\n\n\nAuthor\n------\n\nChristopher Crouzet\n\u003c`christophercrouzet.com \u003chttps://christophercrouzet.com\u003e`_\u003e\n\n\nThanks\n------\n\n* Justin Israel for discovering that multiple instances pointing to a same\n  Maya object return different hash values.\n\n\n.. |gorilla| replace:: ``gorilla``\n.. |revl| replace:: ``revl``\n\n.. _Autodesk Maya: http://www.autodesk.com/products/maya\n.. _bana.readthedocs.io: https://bana.readthedocs.io\n.. _GitHub project page: https://github.com/christophercrouzet/bana\n.. _gorilla: https://github.com/christophercrouzet/gorilla\n.. _revl: https://github.com/christophercrouzet/revl\n.. _Tutorial: https://bana.readthedocs.io/en/latest/tutorial.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercrouzet%2Fbana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristophercrouzet%2Fbana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercrouzet%2Fbana/lists"}