MCPcopy Create free account
hub / github.com/VAST-AI-Research/tripo-python-sdk / stylize_model

Method stylize_model

tripo3d/client.py:988–1021  ·  view source on GitHub ↗

Apply a style to an existing 3D model. Args: original_model_task_id: The task ID of the original model. style: Style to apply from PostStyle enum. block_size: Size of the blocks for stylization. Default: 80 Returns: The task

(
        self,
        original_model_task_id: str,
        style: PostStyle,
        block_size: Optional[int] = 80
    )

Source from the content-addressed store, hash-verified

986 return await self.create_task(task_data)
987
988 async def stylize_model(
989 self,
990 original_model_task_id: str,
991 style: PostStyle,
992 block_size: Optional[int] = 80
993 ) -> str:
994 """
995 Apply a style to an existing 3D model.
996
997 Args:
998 original_model_task_id: The task ID of the original model.
999 style: Style to apply from PostStyle enum.
1000 block_size: Size of the blocks for stylization. Default: 80
1001
1002 Returns:
1003 The task ID.
1004
1005 Raises:
1006 TripoRequestError: If the request fails.
1007 TripoAPIError: If the API returns an error.
1008 """
1009 task_data = {
1010 "type": "stylize_model",
1011 "original_model_task_id": original_model_task_id,
1012 "style": style,
1013 }
1014
1015 # Add optional parameters that were explicitly passed
1016 self._add_optional_params(
1017 task_data,
1018 passed_args = self._get_passed_args(),
1019 )
1020
1021 return await self.create_task(task_data)
1022
1023 async def texture_model(
1024 self,

Callers

nothing calls this directly

Calls 3

_add_optional_paramsMethod · 0.95
_get_passed_argsMethod · 0.95
create_taskMethod · 0.95

Tested by

no test coverage detected