modify_object
Update an object in Blender with precise controls, including location, rotation, scale, and visibility, using the Tripo MCP Server to streamline 3D scene adjustments.
Instructions
Modify an existing object in the Blender scene.
Parameters:
- name: Name of the object to modify
- location: Optional [x, y, z] location coordinates
- rotation: Optional [x, y, z] rotation in radians
- scale: Optional [x, y, z] scale factors
- visible: Optional boolean to set visibility
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location | No | ||
| name | Yes | ||
| rotation | No | ||
| scale | No | ||
| visible | No |
Implementation Reference
- src/server.py:358-397 (handler)The main handler function for the 'modify_object' tool. Decorated with @mcp.tool() which serves as both registration and schema definition via the docstring parameters. It constructs parameters and sends a 'modify_object' command to the Blender socket connection.@mcp.tool() def modify_object( ctx: Context, name: str, location: List[float] = None, rotation: List[float] = None, scale: List[float] = None, visible: bool = None, ) -> str: """ Modify an existing object in the Blender scene. Parameters: - name: Name of the object to modify - location: Optional [x, y, z] location coordinates - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors - visible: Optional boolean to set visibility """ try: # Get the global connection blender = get_blender_connection() params = {"name": name} if location is not None: params["location"] = location if rotation is not None: params["rotation"] = rotation if scale is not None: params["scale"] = scale if visible is not None: params["visible"] = visible result = blender.send_command("modify_object", params) return f"Modified object: {result['name']}" except Exception as e: logger.error(f"Error modifying object: {str(e)}") return f"Error modifying object: {str(e)}"
- src/server.py:367-376 (schema)Input schema defined in the docstring of the modify_object function, specifying parameters: name (str, required), location/rotation/scale (List[float], optional), visible (bool, optional).""" Modify an existing object in the Blender scene. Parameters: - name: Name of the object to modify - location: Optional [x, y, z] location coordinates - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors - visible: Optional boolean to set visibility """
- src/server.py:358-358 (registration)The @mcp.tool() decorator registers the modify_object function as an MCP tool.@mcp.tool()