def viewport_focus(object_name:str) -> None:
""" Center and fit the viewport to focus on an object in the scene.
If object_name is set to None, all objects will be put into focus. """
import maya.cmds as cmds
if object_name:
cmds.viewFit(object_name)
else:
cmds.viewFit(all=True)
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PatrickPalmer/MayaMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server