maya.core.registry ================== .. py:module:: maya.core.registry .. autoapi-nested-parse:: Registry for Maya node wrappers. Attributes ---------- .. autoapisummary:: maya.core.registry.T maya.core.registry.undocommit Functions --------- .. autoapisummary:: maya.core.registry.is_registered maya.core.registry.register maya.core.registry.resolve maya.core.registry.resolve_node_class maya.core.registry.set_default_factory Module Contents --------------- .. py:function:: is_registered(node_type: str) -> bool Check if a node type is registered in the registry. Args: node_type: The Maya node type to check. Returns: bool: True if the node type has a registered wrapper, False otherwise. .. py:function:: register(node_type: str) -> Callable[[Type[T]], Type[T]] Decorator for registering Maya node wrappers. Args: node_type: The Maya node type to register (e.g., 'transform', 'joint'). Returns: A decorator function that registers the class. Example: @register("transform") class Transform(DagNode): pass .. py:function:: resolve(name: str, class_name=None) -> Any Return an instance of the correct Node subclass based on Maya node type. Args: name: Name of the Maya node, or an existing wrapper instance. class_name: Optional specific class name to use from registry. Returns: A wrapper instance for the node. Raises: LookupError: If class_name is specified but not registered. .. py:function:: resolve_node_class(name: str) Return the most specific registered class for a given Maya node. Args: name: Name of the Maya node. Returns: Type: The registered wrapper class for the node. Raises: ValueError: If the node doesn't exist. LookupError: If no wrapper is registered and no default factory is set. .. py:function:: set_default_factory(factory: Type[T]) -> None Set the fallback factory for unregistered node types. Args: factory: The default wrapper class (typically Node) to use when no specific wrapper is registered for a node type. .. py:data:: T .. py:data:: undocommit