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

Method rig_model

tripo3d/client.py:1156–1192  ·  view source on GitHub ↗

Rig a 3D model for animation. Args: original_model_task_id: The task ID of the original model. out_format: Output format, either "glb" or "fbx". Default: "glb" rig_type: Rigging type, either "biped" or "quadruped" or "hexapod" or "octopod" or "av

(
        self,
        original_model_task_id: str,
        model_version: Optional[Literal["v1.0-20240301", "v2.0-20250506"]] = "v1.0-20240301",
        out_format: Optional[Literal["glb", "fbx"]] = "glb",
        rig_type: Optional[RigType] = RigType.BIPED,
        spec: Optional[RigSpec] = RigSpec.TRIPO,
    )

Source from the content-addressed store, hash-verified

1154 return await self.create_task(task_data)
1155
1156 async def rig_model(
1157 self,
1158 original_model_task_id: str,
1159 model_version: Optional[Literal["v1.0-20240301", "v2.0-20250506"]] = "v1.0-20240301",
1160 out_format: Optional[Literal["glb", "fbx"]] = "glb",
1161 rig_type: Optional[RigType] = RigType.BIPED,
1162 spec: Optional[RigSpec] = RigSpec.TRIPO,
1163 ) -> str:
1164 """
1165 Rig a 3D model for animation.
1166
1167 Args:
1168 original_model_task_id: The task ID of the original model.
1169 out_format: Output format, either "glb" or "fbx". Default: "glb"
1170 rig_type: Rigging type, either "biped" or "quadruped" or "hexapod" or "octopod" or "avian" or "serpentine" or "aquatic" or "others". Default: "biped"
1171 spec: Rigging specification, either "mixamo" or "tripo". Default: "tripo"
1172
1173 Returns:
1174 The task ID for the rigging task.
1175
1176 Raises:
1177 TripoRequestError: If the request fails.
1178 TripoAPIError: If the API returns an error.
1179 ValueError: If parameters are invalid.
1180 """
1181 task_data = {
1182 "type": "animate_rig",
1183 "original_model_task_id": original_model_task_id,
1184 }
1185
1186 # Add optional parameters that were explicitly passed
1187 self._add_optional_params(
1188 task_data,
1189 passed_args = self._get_passed_args(),
1190 )
1191
1192 return await self.create_task(task_data)
1193
1194 async def retarget_animation(
1195 self,

Callers 1

mainFunction · 0.80

Calls 3

_add_optional_paramsMethod · 0.95
_get_passed_argsMethod · 0.95
create_taskMethod · 0.95

Tested by

no test coverage detected