maya.core.decorators ==================== .. py:module:: maya.core.decorators .. autoapi-nested-parse:: Decorator functions for Tikmaya core functionalities. Functions --------- .. autoapisummary:: maya.core.decorators.add_aliases maya.core.decorators.alias maya.core.decorators.keepselection maya.core.decorators.protected maya.core.decorators.undo Module Contents --------------- .. py:function:: add_aliases(aliases) Attach alias properties to a class. Example Usage: @add_aliases({ "alias_name": "original_property_name", ... }) class MyClass: ... Args: aliases: A mapping of alias_name -> original_property_name. .. py:function:: alias(alias_name) Available as a decorator for loose functions. It injects 'alias_name' into the module's global scope pointing to the function. .. py:function:: keepselection(func) Decorator method to keep the current selection. Useful where the wrapped method messes with the current selection .. py:function:: protected(func: Callable[Ellipsis, Any]) -> Callable[Ellipsis, Any] Decorator that skips execution if the node no longer exists. Assumes the first argument (self) has an `exists()` method. .. py:function:: undo(func) Puts the wrapped `func` into a single Maya Undo action.