tripocli v2.0.0:Tripo AI 3D 生成与加工 CLI(面向 Agent 与开发者,纯 Python 标准库、零第三方依赖)
覆盖文生 3D、图生 3D、多视图、批量生成,以及重拓扑、绑定、动画、智能分割、 纹理、PBR、智能 UV、部件补全、格式导出与下载。 代码组织:一个功能一个模块(tripo/features/),入口薄壳 tripocli.py。
This commit is contained in:
commit
977f97995a
60 files changed
+5622
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"""Model version aliases.
|
||||
|
||||
The web studio exposes friendly names (``P2.0``, ``H3.1`` ...) that map onto the
|
||||
internal ``model_version`` strings the API expects. Verified against the live
|
||||
API: ``Nexus-v2.0-20260801`` and ``v3.1-20260211`` both generate successfully.
|
||||
"""
|
||||
|
||||
SMART_MESH_DEFAULT = "Nexus-v2.0-20260801"
|
||||
HIGH_DETAIL_DEFAULT = "v3.1-20260211"
|
||||
|
||||
# Aliases are matched case-insensitively.
|
||||
ALIASES = {
|
||||
# 智能网格 Smart Mesh
|
||||
"p2.0": SMART_MESH_DEFAULT,
|
||||
"p2": SMART_MESH_DEFAULT,
|
||||
"nexus-v2": SMART_MESH_DEFAULT,
|
||||
"p1.0": "Nexus-v1.0-20260214",
|
||||
"p1": "Nexus-v1.0-20260214",
|
||||
"nexus-v1": "Nexus-v1.0-20260214",
|
||||
# 高精度模型 High-Detail
|
||||
"h3.1": HIGH_DETAIL_DEFAULT,
|
||||
"v3.1": HIGH_DETAIL_DEFAULT,
|
||||
"h3.0": "v3.0-20250812",
|
||||
"v3.0": "v3.0-20250812",
|
||||
"h2.5": "v2.5-20250123",
|
||||
"v2.5": "v2.5-20250123",
|
||||
}
|
||||
|
||||
|
||||
def resolve(name, smart_mesh=False):
|
||||
"""Map a user supplied alias to an internal model version string.
|
||||
|
||||
Unknown values pass through untouched so a brand new server-side version can
|
||||
still be used without a client release.
|
||||
"""
|
||||
if not name:
|
||||
return SMART_MESH_DEFAULT if smart_mesh else HIGH_DETAIL_DEFAULT
|
||||
return ALIASES.get(name.strip().lower(), name.strip())
|
||||
|
||||
|
||||
def default_for(smart_mesh=False):
|
||||
return SMART_MESH_DEFAULT if smart_mesh else HIGH_DETAIL_DEFAULT
|
||||
Reference in new issue
Block a user