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,28 @@
|
||||
"""3D 风格化 — stylize an existing model.
|
||||
|
||||
tripocli stylize -p <project_id> --style clay --wait
|
||||
|
||||
实测请求体 ``{project_id, model_version, style}``(``style:"clay"`` 被服务端接受)。
|
||||
⚠️ `style` 的**完整合法取值未确认**(该页面的 chunk 在生成页未加载,无法枚举);
|
||||
若传入不支持的风格,服务端会在任务阶段报错。
|
||||
"""
|
||||
|
||||
from . import _common
|
||||
|
||||
NAME = "stylize"
|
||||
HELP = "3D 风格化:把已有模型转成某种风格(如 clay 黏土风)"
|
||||
|
||||
|
||||
def add_arguments(parser):
|
||||
_common.add_op_options(parser, "风格化结果保存到该路径(可选)")
|
||||
parser.add_argument("--style", default="clay", help="目标风格(默认 clay 黏土风)")
|
||||
|
||||
|
||||
def run(ctx):
|
||||
args = ctx.args
|
||||
model_version = _common.project_version(ctx.client, args.project, args.model)
|
||||
body = {"project_id": args.project, "style": args.style}
|
||||
if model_version:
|
||||
body["model_version"] = model_version
|
||||
data = ctx.client.get_data("POST", "/v2/studio/operation/stylize", body=body)
|
||||
return _common.run_operator(ctx, data, output=args.output, wait=args.wait, label="风格化")
|
||||
Reference in new issue
Block a user