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,32 @@
|
||||
"""PBR — generate metallic/roughness/normal maps.
|
||||
|
||||
tripocli pbr -p <project_id> --wait -o pbr.glb
|
||||
|
||||
Endpoint ``/operation/pbr_generate``. Verified live: it needs the project's
|
||||
``model_version`` **and** ``part_name_list`` (``tripo_node_<operator_id>``) —
|
||||
without the node list the task is accepted but fails at 100%.
|
||||
"""
|
||||
|
||||
from . import _common
|
||||
|
||||
NAME = "pbr"
|
||||
HELP = "PBR:生成金属度/粗糙度/法线等物理材质贴图"
|
||||
|
||||
|
||||
def add_arguments(parser):
|
||||
_common.add_op_options(parser, "PBR 结果保存到该路径(可选)")
|
||||
|
||||
|
||||
def run(ctx):
|
||||
args = ctx.args
|
||||
model_version = _common.project_version(ctx.client, args.project, args.model)
|
||||
if not model_version:
|
||||
raise ValueError(f"无法读取项目 {args.project} 的 model_version,请用 -m 显式指定")
|
||||
|
||||
body = {
|
||||
"project_id": args.project,
|
||||
"model_version": model_version,
|
||||
"part_name_list": _common.node_part_name(ctx.client, args.project),
|
||||
}
|
||||
data = ctx.client.get_data("POST", "/v2/studio/operation/pbr_generate", body=body)
|
||||
return _common.run_operator(ctx, data, output=args.output, wait=args.wait, label="PBR 生成")
|
||||
Reference in new issue
Block a user