ue-mcp-tripo 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/shared/loadouts.d.ts +56 -0
- package/dist/shared/loadouts.js +158 -0
- package/dist/shared/loadouts.js.map +1 -0
- package/dist/tasks/Generate.d.ts +18 -1
- package/dist/tasks/Generate.js +141 -28
- package/dist/tasks/Generate.js.map +1 -1
- package/dist/tasks/Loadouts.d.ts +12 -0
- package/dist/tasks/Loadouts.js +26 -0
- package/dist/tasks/Loadouts.js.map +1 -0
- package/dist/ui/settings.html +1 -1
- package/knowledge/tripo.md +29 -1
- package/package.json +4 -3
- package/skills/cli/SKILL.md +29 -1
- package/ue-mcp.plugin.yml +99 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The plugin pins an exact tripo-cli version as a dependency and runs it from its
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- ue-mcp 1.4.16-beta.
|
|
9
|
+
- ue-mcp 1.4.16-beta.13 or later
|
|
10
10
|
- A Tripo account with credits
|
|
11
11
|
|
|
12
12
|
## Install
|
|
@@ -45,10 +45,10 @@ This runs a single `tripo make`, writes its output to `<project>/Saved/Tripo/<na
|
|
|
45
45
|
```
|
|
46
46
|
tripo make "a stylized knight in plate armor" --for anim
|
|
47
47
|
--then "rig-check,rig:rig_type=biped,spec=unreal,out_format=glb,retarget:animation=preset:idle,out_format=glb"
|
|
48
|
-
-p pbr=
|
|
48
|
+
-p pbr=false --model H3.1 -o <project>/Saved/Tripo/AStylizedKnightInPlateArmor --json --yes --no-open
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Defaults are the cheapest the CLI can price: model H3.1, GLB output
|
|
51
|
+
Defaults are the cheapest the CLI can price: model H3.1, GLB output and no PBR (`pbr=true` turns it on), the same as Tripo's own guidance. The plugin deliberately does not follow the Tripo skill's rule of defaulting to P2. A premium model, `texture_quality=detailed` or `geometry_quality=detailed` is used only when you pass it through `model` or `params`. GLB is the default because the FBX conversion produced tiny scale and cracked meshes that the same task as GLB did not have.
|
|
52
52
|
|
|
53
53
|
The result lists the settings used and the credit estimate (generation only; rig, retarget, texture and convert steps are billed on top), the Tripo task ids and the credits spent. The raw GLB and `preview.png` are saved to the job folder with `tripo task get --download`, and the result gives their paths and when Tripo's download links expire. If the import cannot run, for example when ue-mcp does not give the plugin access to `asset(import_model)`, the call still succeeds with `status=generated` and the ready `asset(action="import_model", ...)` call to make next.
|
|
54
54
|
|
|
@@ -64,6 +64,53 @@ The result lists the settings used and the credit estimate (generation only; rig
|
|
|
64
64
|
| `prepareImages=false` | Sends multiview images as they are instead of preparing them. |
|
|
65
65
|
| `place`, `location`, `destination`, `name`, ... | Passed to `asset(import_model)`. |
|
|
66
66
|
|
|
67
|
+
### Loadouts
|
|
68
|
+
|
|
69
|
+
A loadout is a named bundle of generate settings, chosen by subject. `tripo(action="generate", loadout="humanoid", prompt="...")` applies it, and any option in the call overrides the loadout field by field. All built-ins use model H3.1 and standard texture quality.
|
|
70
|
+
|
|
71
|
+
| Loadout | Settings |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `humanoid` | `smart_low_poly`, face limit 8000, no PBR, `delight`, `texture_alignment=original_image`, `orientation=align_image`, biped rig with `spec=unreal`, GLB, skeletal import with a physics asset. The CLI selects the texture version `delight` needs; the plan shows it, and about 30 credits for generation. |
|
|
74
|
+
| `creature` | Quadruped rig, GLB, face limit 20000, no PBR, skeletal import with a physics asset. |
|
|
75
|
+
| `prop` | No rig, face limit 5000, no PBR, static import. |
|
|
76
|
+
| `hero-prop` | No rig, face limit 30000, PBR, static import. |
|
|
77
|
+
| `environment` | No rig, face limit 50000, PBR, static import with Nanite on. |
|
|
78
|
+
|
|
79
|
+
`tripo(action="loadouts")` is free and lists every loadout with its resolved settings. The dry run and every result list the resolved settings and where each came from: a loadout, or the call's own option.
|
|
80
|
+
|
|
81
|
+
A project adds or changes loadouts under `ue-mcp.pluginConfig.tripo.loadouts` in the project's config (`tripo` is the plugin's name without the `ue-mcp-` prefix), and every agent on the project gets them. An override replaces only the fields it names, a new name adds a loadout, `null` removes one, and `extends` starts from another loadout:
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
ue-mcp:
|
|
85
|
+
pluginConfig:
|
|
86
|
+
tripo:
|
|
87
|
+
loadouts:
|
|
88
|
+
SLS character:
|
|
89
|
+
extends: humanoid
|
|
90
|
+
faceLimit: 15000
|
|
91
|
+
animation: idle
|
|
92
|
+
environment: null
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Fields: `model`, `rig`, `rigType`, `spec`, `animation`, `pbr`, `format`, `segmentHint`, `faceLimit`, `textureQuality`, `params`, `then`, and the import options `kind`, `destination`, `importMaterials`, `importTextures`, `importAnimations`, `createPhysicsAsset`, `nanite`, `place`, `onConflict` and `save`, plus `description` and `guidance` text. Loadouts need ue-mcp 1.4.16-beta.12 or later.
|
|
96
|
+
|
|
97
|
+
### Separating garments
|
|
98
|
+
|
|
99
|
+
`segmentHint="poncho, body"` (also a loadout field) separates parts that generation fused. make's `--then` chain has no smartsegment step, so after generating, the plugin runs `tripo mesh smartsegment` on the raw GLB with the hint, then rigs the segmented model with the usual chain. Plain `mesh segment` fused a poncho that smartsegment separated. It costs 55 credits at list price on top of the estimate (the dry run says so), is off by default, and cannot be combined with `task` or `then`. The result's `segmentation` block has the hint, task id and credits. Tripo rescales a file it re-imports for rigging; the result warns with the factor when it is not 1. If a stage fails, the call still succeeds with the model it has and a warning.
|
|
100
|
+
|
|
101
|
+
### Garments as cloth
|
|
102
|
+
|
|
103
|
+
Generated garments are often double-walled, and two walls simulate as two sheets that balloon and clip. The plugin's agent guidance walks through simulating a single-layer sheet in the garment's place with core ue-mcp actions:
|
|
104
|
+
|
|
105
|
+
1. Generate with `segmentHint` so the garment is its own section.
|
|
106
|
+
2. Check its skin weight shares with `asset(read_skeletal_mesh_weight_report)` and move weight off the arms with `asset(restrict_skeletal_mesh_influences)`.
|
|
107
|
+
3. Check penetration with `asset(measure_section_penetration)` and push the garment out with `asset(offset_section_outward)`.
|
|
108
|
+
4. Check the collision bodies with `animation(check_physics_asset_fit)`.
|
|
109
|
+
5. Measure the double walls with `asset(measure_section_layers)`.
|
|
110
|
+
6. Build the sheet with `asset(build_garment_proxy_section)`. A sheet below its quality thresholds is refused without writing anything, and the result carries the report saying which check failed.
|
|
111
|
+
7. Create clothing from the sheet with `asset(create_clothing_from_section)` and `removeFromMesh=true`.
|
|
112
|
+
8. Bind that clothing to the render garment's section with `asset(bind_cloth_to_section)`, so the sheet drives the thick garment.
|
|
113
|
+
|
|
67
114
|
### Turnaround images
|
|
68
115
|
|
|
69
116
|
For a character turnaround, pass `views={front: ..., left: ..., back: ..., right: ...}` (front plus at least one other) or `images` with files named by view. Generate prepares the views before upload and writes them to `<jobDir>/views` as `front.png`, `left.png` and so on, which is how the CLI reads each view. Your originals are not changed. Preparation:
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { default as Generate, makeArgs, chainFor } from "./tasks/Generate.js";
|
|
8
8
|
export { default as PrepareImages } from "./tasks/PrepareImages.js";
|
|
9
|
+
export { default as Loadouts } from "./tasks/Loadouts.js";
|
|
10
|
+
export { resolveOptions, loadoutsFrom } from "./shared/loadouts.js";
|
|
9
11
|
export { prepareViews } from "./shared/images.js";
|
|
10
12
|
export { default as Cli } from "./tasks/Cli.js";
|
|
11
13
|
export { cliPath, cliVersion, runCli, withAddedFlags, ADDED_FLAGS } from "./shared/cli.js";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { default as Generate, makeArgs, chainFor } from "./tasks/Generate.js";
|
|
8
8
|
export { default as PrepareImages } from "./tasks/PrepareImages.js";
|
|
9
|
+
export { default as Loadouts } from "./tasks/Loadouts.js";
|
|
10
|
+
export { resolveOptions, loadoutsFrom } from "./shared/loadouts.js";
|
|
9
11
|
export { prepareViews } from "./shared/images.js";
|
|
10
12
|
export { default as Cli } from "./tasks/Cli.js";
|
|
11
13
|
export { cliPath, cliVersion, runCli, withAddedFlags, ADDED_FLAGS } from "./shared/cli.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loadouts: named bundles of generate settings.
|
|
3
|
+
*
|
|
4
|
+
* ue-mcp merges them for the plugin and hands the result over as
|
|
5
|
+
* `this.config.loadouts`: the built-ins from `config.loadouts` in
|
|
6
|
+
* ue-mcp.plugin.yml, deep-merged with the project's
|
|
7
|
+
* `ue-mcp.pluginConfig.tripo.loadouts` in the project's config. Nothing here reads a file.
|
|
8
|
+
*
|
|
9
|
+
* A call resolves in this order, later winning per field: the loadout (after
|
|
10
|
+
* the loadouts it `extends`), then the explicit options of the call. Every
|
|
11
|
+
* resolved field remembers where it came from.
|
|
12
|
+
*/
|
|
13
|
+
/** The generate options a loadout may set. */
|
|
14
|
+
export declare const LOADOUT_FIELDS: readonly ["model", "rig", "rigType", "spec", "animation", "pbr", "format", "segmentHint", "faceLimit", "textureQuality", "params", "then", "kind", "destination", "importMaterials", "importTextures", "importAnimations", "createPhysicsAsset", "nanite", "place", "onConflict", "save"];
|
|
15
|
+
export type LoadoutField = (typeof LOADOUT_FIELDS)[number];
|
|
16
|
+
export interface Loadout {
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Another loadout this one starts from. */
|
|
19
|
+
extends?: string;
|
|
20
|
+
/** Advice for the agent that picks it, returned with results. */
|
|
21
|
+
guidance?: string;
|
|
22
|
+
[field: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export type LoadoutMap = Record<string, Loadout>;
|
|
25
|
+
/** Setting to the place it came from: "loadout:humanoid", "option" or "param:face_limit". */
|
|
26
|
+
export type Sources = Record<string, string>;
|
|
27
|
+
export interface Resolved {
|
|
28
|
+
options: Record<string, unknown>;
|
|
29
|
+
sources: Sources;
|
|
30
|
+
loadout?: string;
|
|
31
|
+
guidance?: string;
|
|
32
|
+
warnings: string[];
|
|
33
|
+
}
|
|
34
|
+
/** The plugin's merged config as ue-mcp hands it to a task (`this.config`), or undefined on an older server. */
|
|
35
|
+
export declare function configOf(task: object): unknown;
|
|
36
|
+
/** The loadouts in a plugin config, without removed (null) entries. */
|
|
37
|
+
export declare function loadoutsFrom(config: unknown): LoadoutMap;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve a call's options: loadout fields first, explicit options over them.
|
|
40
|
+
* faceLimit, textureQuality and params all end up as one `params` list of
|
|
41
|
+
* key=value pairs where the last word on a key wins.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveOptions(explicit: Record<string, unknown>, all: LoadoutMap): Resolved;
|
|
44
|
+
/** What a loadout resolves to on its own, for the loadouts action. */
|
|
45
|
+
export declare function describeLoadout(name: string, all: LoadoutMap): {
|
|
46
|
+
name: string;
|
|
47
|
+
description: string | undefined;
|
|
48
|
+
extends: string | undefined;
|
|
49
|
+
guidance: string | undefined;
|
|
50
|
+
settings: Record<string, unknown>;
|
|
51
|
+
params: {
|
|
52
|
+
[k: string]: string;
|
|
53
|
+
};
|
|
54
|
+
sources: Sources;
|
|
55
|
+
warnings: string[];
|
|
56
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loadouts: named bundles of generate settings.
|
|
3
|
+
*
|
|
4
|
+
* ue-mcp merges them for the plugin and hands the result over as
|
|
5
|
+
* `this.config.loadouts`: the built-ins from `config.loadouts` in
|
|
6
|
+
* ue-mcp.plugin.yml, deep-merged with the project's
|
|
7
|
+
* `ue-mcp.pluginConfig.tripo.loadouts` in the project's config. Nothing here reads a file.
|
|
8
|
+
*
|
|
9
|
+
* A call resolves in this order, later winning per field: the loadout (after
|
|
10
|
+
* the loadouts it `extends`), then the explicit options of the call. Every
|
|
11
|
+
* resolved field remembers where it came from.
|
|
12
|
+
*/
|
|
13
|
+
/** The generate options a loadout may set. */
|
|
14
|
+
export const LOADOUT_FIELDS = [
|
|
15
|
+
"model",
|
|
16
|
+
"rig",
|
|
17
|
+
"rigType",
|
|
18
|
+
"spec",
|
|
19
|
+
"animation",
|
|
20
|
+
"pbr",
|
|
21
|
+
"format",
|
|
22
|
+
"segmentHint",
|
|
23
|
+
"faceLimit",
|
|
24
|
+
"textureQuality",
|
|
25
|
+
"params",
|
|
26
|
+
"then",
|
|
27
|
+
"kind",
|
|
28
|
+
"destination",
|
|
29
|
+
"importMaterials",
|
|
30
|
+
"importTextures",
|
|
31
|
+
"importAnimations",
|
|
32
|
+
"createPhysicsAsset",
|
|
33
|
+
"nanite",
|
|
34
|
+
"place",
|
|
35
|
+
"onConflict",
|
|
36
|
+
"save",
|
|
37
|
+
];
|
|
38
|
+
/** Fields that are about the loadout, not generate settings. */
|
|
39
|
+
const META = ["description", "extends", "guidance"];
|
|
40
|
+
/** The plugin's merged config as ue-mcp hands it to a task (`this.config`), or undefined on an older server. */
|
|
41
|
+
export function configOf(task) {
|
|
42
|
+
return task.config;
|
|
43
|
+
}
|
|
44
|
+
/** The loadouts in a plugin config, without removed (null) entries. */
|
|
45
|
+
export function loadoutsFrom(config) {
|
|
46
|
+
const raw = config?.loadouts;
|
|
47
|
+
const out = {};
|
|
48
|
+
if (!raw || typeof raw !== "object")
|
|
49
|
+
return out;
|
|
50
|
+
for (const [name, v] of Object.entries(raw)) {
|
|
51
|
+
if (v && typeof v === "object" && !Array.isArray(v))
|
|
52
|
+
out[name] = v;
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
/** The chain of loadouts a name resolves through, base first. */
|
|
57
|
+
function chainOf(name, all) {
|
|
58
|
+
const chain = [];
|
|
59
|
+
for (let cur = name; cur; cur = all[cur]?.extends) {
|
|
60
|
+
if (chain.includes(cur))
|
|
61
|
+
throw new Error(`Loadout "${name}" extends itself through ${[...chain, cur].join(" -> ")}.`);
|
|
62
|
+
if (!all[cur]) {
|
|
63
|
+
throw new Error(cur === name
|
|
64
|
+
? `No loadout named "${name}". ${names(all)}`
|
|
65
|
+
: `Loadout "${chain[chain.length - 1]}" extends "${cur}", which does not exist. ${names(all)}`);
|
|
66
|
+
}
|
|
67
|
+
chain.push(cur);
|
|
68
|
+
}
|
|
69
|
+
return chain.reverse();
|
|
70
|
+
}
|
|
71
|
+
function names(all) {
|
|
72
|
+
const list = Object.keys(all);
|
|
73
|
+
return list.length
|
|
74
|
+
? `Available: ${list.join(", ")}.`
|
|
75
|
+
: "No loadouts are configured; they need ue-mcp 1.4.16-beta.12 or later, which passes the plugin its config.";
|
|
76
|
+
}
|
|
77
|
+
const PARAM_OF = { faceLimit: "face_limit", textureQuality: "texture_quality" };
|
|
78
|
+
/**
|
|
79
|
+
* Resolve a call's options: loadout fields first, explicit options over them.
|
|
80
|
+
* faceLimit, textureQuality and params all end up as one `params` list of
|
|
81
|
+
* key=value pairs where the last word on a key wins.
|
|
82
|
+
*/
|
|
83
|
+
export function resolveOptions(explicit, all) {
|
|
84
|
+
const warnings = [];
|
|
85
|
+
const sources = {};
|
|
86
|
+
const merged = {};
|
|
87
|
+
const paramMap = new Map();
|
|
88
|
+
const paramSource = new Map();
|
|
89
|
+
const name = typeof explicit.loadout === "string" && explicit.loadout ? explicit.loadout : undefined;
|
|
90
|
+
const apply = (values, source) => {
|
|
91
|
+
for (const [k, v] of Object.entries(values)) {
|
|
92
|
+
if (v === undefined || v === null)
|
|
93
|
+
continue;
|
|
94
|
+
if (k === "params") {
|
|
95
|
+
for (const p of Array.isArray(v) ? v : [v]) {
|
|
96
|
+
const [key, ...rest] = String(p).split("=");
|
|
97
|
+
paramMap.set(key, rest.join("="));
|
|
98
|
+
paramSource.set(key, source);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (k in PARAM_OF) {
|
|
102
|
+
paramMap.set(PARAM_OF[k], String(v));
|
|
103
|
+
paramSource.set(PARAM_OF[k], source);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
merged[k] = v;
|
|
107
|
+
if (LOADOUT_FIELDS.includes(k))
|
|
108
|
+
sources[k] = source;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
let guidance;
|
|
113
|
+
if (name) {
|
|
114
|
+
for (const link of chainOf(name, all)) {
|
|
115
|
+
const def = all[link];
|
|
116
|
+
const settings = {};
|
|
117
|
+
for (const [k, v] of Object.entries(def)) {
|
|
118
|
+
if (META.includes(k))
|
|
119
|
+
continue;
|
|
120
|
+
if (!LOADOUT_FIELDS.includes(k)) {
|
|
121
|
+
warnings.push(`Loadout "${link}" sets "${k}", which generate does not use; ignored.`);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
settings[k] = v;
|
|
125
|
+
}
|
|
126
|
+
apply(settings, `loadout:${link}`);
|
|
127
|
+
if (def.guidance)
|
|
128
|
+
guidance = def.guidance;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const { loadout: _loadout, ...rest } = explicit;
|
|
132
|
+
apply(rest, "option");
|
|
133
|
+
if (paramMap.size) {
|
|
134
|
+
merged.params = [...paramMap].map(([k, v]) => `${k}=${v}`);
|
|
135
|
+
for (const k of paramMap.keys())
|
|
136
|
+
sources[`param:${k}`] = paramSource.get(k);
|
|
137
|
+
}
|
|
138
|
+
return { options: merged, sources, loadout: name, guidance, warnings };
|
|
139
|
+
}
|
|
140
|
+
/** What a loadout resolves to on its own, for the loadouts action. */
|
|
141
|
+
export function describeLoadout(name, all) {
|
|
142
|
+
const r = resolveOptions({ loadout: name }, all);
|
|
143
|
+
const def = all[name];
|
|
144
|
+
const settings = { ...r.options };
|
|
145
|
+
const params = Array.isArray(settings.params) ? settings.params : [];
|
|
146
|
+
delete settings.params;
|
|
147
|
+
return {
|
|
148
|
+
name,
|
|
149
|
+
description: def.description,
|
|
150
|
+
extends: def.extends,
|
|
151
|
+
guidance: r.guidance,
|
|
152
|
+
settings,
|
|
153
|
+
params: Object.fromEntries(params.map((p) => [p.split("=")[0], p.split("=").slice(1).join("=")])),
|
|
154
|
+
sources: r.sources,
|
|
155
|
+
warnings: r.warnings,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=loadouts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadouts.js","sourceRoot":"","sources":["../../src/shared/loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,KAAK;IACL,SAAS;IACT,MAAM;IACN,WAAW;IACX,KAAK;IACL,QAAQ;IACR,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,QAAQ;IACR,MAAM;IACN,MAAM;IACN,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,MAAM;CACE,CAAC;AAIX,gEAAgE;AAChE,MAAM,IAAI,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AAwB7D,gHAAgH;AAChH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAQ,IAA6B,CAAC,MAAM,CAAC;AAC/C,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,MAAM,GAAG,GAAI,MAA6D,EAAE,QAAQ,CAAC;IACrF,MAAM,GAAG,GAAe,EAAE,CAAC;IAC3B,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAY,CAAC;IAChF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,iEAAiE;AACjE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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACjG,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC;AACJ,CAAC"}
|
package/dist/tasks/Generate.d.ts
CHANGED
|
@@ -48,12 +48,22 @@ interface Options {
|
|
|
48
48
|
};
|
|
49
49
|
onConflict?: string;
|
|
50
50
|
save?: boolean;
|
|
51
|
+
loadout?: string;
|
|
52
|
+
segmentHint?: string;
|
|
53
|
+
faceLimit?: number;
|
|
54
|
+
textureQuality?: string;
|
|
51
55
|
}
|
|
52
56
|
export declare function sanitizeAssetName(raw: string): string;
|
|
53
57
|
/** "walk" -> "preset:walk"; anything already prefixed passes through. */
|
|
54
58
|
export declare function presetName(name: string): string;
|
|
55
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The --then chain for these options, or "" when make needs none. With
|
|
61
|
+
* segmentHint the rig and convert steps wait for the segmentation: they run in
|
|
62
|
+
* a second make on the segmented model (see afterSegmentChain).
|
|
63
|
+
*/
|
|
56
64
|
export declare function chainFor(o: Options): string;
|
|
65
|
+
/** The chain that runs on the segmented model: rig, retarget, then the FBX convert. */
|
|
66
|
+
export declare function afterSegmentChain(o: Options): string;
|
|
57
67
|
/**
|
|
58
68
|
* The full `tripo make` argument list generate runs. `views` replaces the
|
|
59
69
|
* images when a turnaround was prepared, in front, left, back, right order.
|
|
@@ -76,6 +86,13 @@ export default class Generate extends UeMcpTask<Options> {
|
|
|
76
86
|
private resume;
|
|
77
87
|
private pending;
|
|
78
88
|
private finish;
|
|
89
|
+
/**
|
|
90
|
+
* Garment separation. make's --then chain has no smartsegment step, so it runs
|
|
91
|
+
* as its own CLI calls: `mesh smartsegment` on the generated GLB, then a make
|
|
92
|
+
* of the segmented file with the rig chain. Credits are already spent by now,
|
|
93
|
+
* so a failure here returns what exists instead of throwing.
|
|
94
|
+
*/
|
|
95
|
+
private segmentStage;
|
|
79
96
|
/** `tripo task get <id> --download` into dir. Never throws: the run already succeeded. */
|
|
80
97
|
private saveRaw;
|
|
81
98
|
}
|
package/dist/tasks/Generate.js
CHANGED
|
@@ -11,6 +11,7 @@ import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from
|
|
|
11
11
|
import { basename, extname, isAbsolute, join, resolve } from "node:path";
|
|
12
12
|
import { UeMcpTask } from "ue-mcp/task";
|
|
13
13
|
import { isAlive, parseJsonLine, runCli, startDetached, stripAnsi, tail, withAddedFlags, workDir, } from "../shared/cli.js";
|
|
14
|
+
import { configOf, loadoutsFrom, resolveOptions } from "../shared/loadouts.js";
|
|
14
15
|
import { prepareViews, resolveViews, VIEW_KEYS } from "../shared/images.js";
|
|
15
16
|
/**
|
|
16
17
|
* The generation model when the caller names none. H3.1 is the cheapest model
|
|
@@ -54,33 +55,46 @@ function imagesOf(o) {
|
|
|
54
55
|
return [];
|
|
55
56
|
return (Array.isArray(o.images) ? o.images : [o.images]).filter((s) => s !== "");
|
|
56
57
|
}
|
|
57
|
-
/**
|
|
58
|
+
/** PBR is off unless asked for, as in Tripo's own guidance. */
|
|
59
|
+
const pbrOn = (o) => o.pbr === true;
|
|
60
|
+
function rigSteps(o) {
|
|
61
|
+
if (o.rig === false)
|
|
62
|
+
return [];
|
|
63
|
+
const steps = ["rig-check"];
|
|
64
|
+
const rigType = o.rigType ?? "biped";
|
|
65
|
+
// The rig and retarget steps write GLB, the same format the generation
|
|
66
|
+
// step makes, so no conversion sits between the model and the import.
|
|
67
|
+
if (rigType === "auto")
|
|
68
|
+
steps.push("rig:out_format=glb");
|
|
69
|
+
else if (rigType === "biped")
|
|
70
|
+
steps.push(`rig:rig_type=biped,spec=${o.spec ?? "unreal"},out_format=glb`);
|
|
71
|
+
else
|
|
72
|
+
steps.push(`rig:rig_type=${rigType},out_format=glb`);
|
|
73
|
+
if (o.animation)
|
|
74
|
+
steps.push(`retarget:animation=${presetName(o.animation)},out_format=glb`);
|
|
75
|
+
return steps;
|
|
76
|
+
}
|
|
77
|
+
// GLB is the default. The FBX conversion runs last and only when asked for.
|
|
78
|
+
const convertSteps = (o) => (o.format === "fbx" ? ["convert:fbx"] : []);
|
|
79
|
+
/**
|
|
80
|
+
* The --then chain for these options, or "" when make needs none. With
|
|
81
|
+
* segmentHint the rig and convert steps wait for the segmentation: they run in
|
|
82
|
+
* a second make on the segmented model (see afterSegmentChain).
|
|
83
|
+
*/
|
|
58
84
|
export function chainFor(o) {
|
|
59
85
|
if (o.then != null)
|
|
60
86
|
return o.then;
|
|
61
87
|
const steps = [];
|
|
62
|
-
const pbr = o.pbr !== false;
|
|
63
88
|
if (o.retexture)
|
|
64
|
-
steps.push(
|
|
65
|
-
if (o.
|
|
66
|
-
steps.push(
|
|
67
|
-
const rigType = o.rigType ?? "biped";
|
|
68
|
-
// The rig and retarget steps write GLB, the same format the generation
|
|
69
|
-
// step makes, so no conversion sits between the model and the import.
|
|
70
|
-
if (rigType === "auto")
|
|
71
|
-
steps.push("rig:out_format=glb");
|
|
72
|
-
else if (rigType === "biped")
|
|
73
|
-
steps.push(`rig:rig_type=biped,spec=${o.spec ?? "unreal"},out_format=glb`);
|
|
74
|
-
else
|
|
75
|
-
steps.push(`rig:rig_type=${rigType},out_format=glb`);
|
|
76
|
-
if (o.animation)
|
|
77
|
-
steps.push(`retarget:animation=${presetName(o.animation)},out_format=glb`);
|
|
78
|
-
}
|
|
79
|
-
// GLB is the default. The FBX conversion runs last and only when asked for.
|
|
80
|
-
if (o.format === "fbx")
|
|
81
|
-
steps.push("convert:fbx");
|
|
89
|
+
steps.push(pbrOn(o) ? "texture:pbr=true" : "texture");
|
|
90
|
+
if (!o.segmentHint)
|
|
91
|
+
steps.push(...rigSteps(o), ...convertSteps(o));
|
|
82
92
|
return steps.join(",");
|
|
83
93
|
}
|
|
94
|
+
/** The chain that runs on the segmented model: rig, retarget, then the FBX convert. */
|
|
95
|
+
export function afterSegmentChain(o) {
|
|
96
|
+
return [...rigSteps(o), ...convertSteps(o)].join(",");
|
|
97
|
+
}
|
|
84
98
|
/**
|
|
85
99
|
* The full `tripo make` argument list generate runs. `views` replaces the
|
|
86
100
|
* images when a turnaround was prepared, in front, left, back, right order.
|
|
@@ -91,11 +105,11 @@ export function makeArgs(o, outDir, views) {
|
|
|
91
105
|
const chain = chainFor(o);
|
|
92
106
|
// --for anim sets the animation defaults. The other scenarios raise texture
|
|
93
107
|
// quality and are never used; a task ref has no generation step to default.
|
|
94
|
-
if (!o.task && o.rig !== false)
|
|
108
|
+
if (!o.task && o.rig !== false && !o.segmentHint)
|
|
95
109
|
args.push("--for", "anim");
|
|
96
110
|
if (chain)
|
|
97
111
|
args.push("--then", chain);
|
|
98
|
-
args.push("-p", `pbr=${o
|
|
112
|
+
args.push("-p", `pbr=${pbrOn(o)}`);
|
|
99
113
|
if (o.model)
|
|
100
114
|
args.push("--model", o.model);
|
|
101
115
|
else if (!o.task)
|
|
@@ -199,10 +213,15 @@ function planSummary(plan) {
|
|
|
199
213
|
warnings: [...(plan.warnings ?? [])],
|
|
200
214
|
};
|
|
201
215
|
}
|
|
216
|
+
const SEGMENT_TIMEOUT_MS = 15 * 60_000;
|
|
217
|
+
const RIG_TIMEOUT_MS = 20 * 60_000;
|
|
218
|
+
const SEGMENT_COST_NOTE = "segmentHint adds a mesh smartsegment task on the generated GLB: 55 credits at list price, not in the estimate above, plus the rig steps.";
|
|
202
219
|
const ESTIMATE_SCOPE = "The estimate covers the generation step at list price. Rig, retarget, texture and convert steps are billed on top and are not estimated.";
|
|
203
220
|
/** The settings a run uses, exactly as sent: the options that shape it plus the CLI's own request bodies. */
|
|
204
|
-
function settingsOf(o, args, plan) {
|
|
221
|
+
function settingsOf(o, args, plan, from) {
|
|
205
222
|
return {
|
|
223
|
+
loadout: from?.loadout,
|
|
224
|
+
sources: from?.sources,
|
|
206
225
|
model: plan?.model ?? o.model ?? (o.task ? "(set by the task being continued)" : DEFAULT_MODEL),
|
|
207
226
|
modelChoice: o.model ? "explicit" : "default: the cheapest model the CLI can price",
|
|
208
227
|
format: o.format ?? "glb",
|
|
@@ -210,7 +229,8 @@ function settingsOf(o, args, plan) {
|
|
|
210
229
|
rigType: o.rig !== false ? (o.rigType ?? "biped") : undefined,
|
|
211
230
|
spec: o.rig !== false && (o.rigType ?? "biped") === "biped" ? (o.spec ?? "unreal") : undefined,
|
|
212
231
|
animation: o.animation,
|
|
213
|
-
pbr: o
|
|
232
|
+
pbr: pbrOn(o),
|
|
233
|
+
segmentHint: o.segmentHint,
|
|
214
234
|
scenario: args.includes("--for") ? args[args.indexOf("--for") + 1] : undefined,
|
|
215
235
|
chain: args.includes("--then") ? args[args.indexOf("--then") + 1] : undefined,
|
|
216
236
|
params: o.params,
|
|
@@ -251,7 +271,9 @@ function waitForExit(child, pid, ms) {
|
|
|
251
271
|
export default class Generate extends UeMcpTask {
|
|
252
272
|
get taskName() { return "tripo.generate"; }
|
|
253
273
|
async execute() {
|
|
254
|
-
|
|
274
|
+
// A loadout supplies defaults; the call's own options win over it.
|
|
275
|
+
const resolved = resolveOptions(this.options, loadoutsFrom(configOf(this)));
|
|
276
|
+
const o = resolved.options;
|
|
255
277
|
const waitMs = o.wait === false ? 0 : (o.waitSec ?? DEFAULT_WAIT_SEC) * 1000;
|
|
256
278
|
if (o.resume)
|
|
257
279
|
return this.resume(o, waitMs);
|
|
@@ -262,6 +284,9 @@ export default class Generate extends UeMcpTask {
|
|
|
262
284
|
throw new Error("Pass exactly one of prompt, images, views or task.");
|
|
263
285
|
if (images.length > 4)
|
|
264
286
|
throw new Error("images takes one image, or 2 to 4 views of the same object.");
|
|
287
|
+
if (o.segmentHint && (o.task || o.then != null)) {
|
|
288
|
+
throw new Error("segmentHint segments the model this call generates, so it cannot be combined with task or then.");
|
|
289
|
+
}
|
|
265
290
|
if (o.task && !chainFor(o)) {
|
|
266
291
|
throw new Error("A task ref needs at least one step: keep rig=true, set format=fbx, retexture=true, or pass then.");
|
|
267
292
|
}
|
|
@@ -308,7 +333,12 @@ export default class Generate extends UeMcpTask {
|
|
|
308
333
|
const rawPlan = planRun.json;
|
|
309
334
|
const havePlan = !!rawPlan && rawPlan.dry_run === true;
|
|
310
335
|
const plan = havePlan ? planSummary(rawPlan) : undefined;
|
|
311
|
-
|
|
336
|
+
if (plan && o.segmentHint)
|
|
337
|
+
plan.notes.push(SEGMENT_COST_NOTE);
|
|
338
|
+
warnings.push(...resolved.warnings);
|
|
339
|
+
const settings = settingsOf(o, args, plan, { loadout: resolved.loadout, sources: resolved.sources });
|
|
340
|
+
if (resolved.guidance)
|
|
341
|
+
settings.loadoutGuidance = resolved.guidance;
|
|
312
342
|
const estimate = {
|
|
313
343
|
credits: plan?.creditEstimate ?? null,
|
|
314
344
|
notes: plan?.notes ?? [],
|
|
@@ -344,6 +374,7 @@ export default class Generate extends UeMcpTask {
|
|
|
344
374
|
const job = {
|
|
345
375
|
name, args, cwd: base, pid: child.pid, startedAt: new Date().toISOString(), import: importOptions(o, name),
|
|
346
376
|
plan, settings, prepared, warnings,
|
|
377
|
+
segment: o.segmentHint ? { hint: o.segmentHint, chain: afterSegmentChain(o), rig: o.rig !== false } : undefined,
|
|
347
378
|
};
|
|
348
379
|
writeFileSync(join(jobDir, "job.json"), JSON.stringify(job, null, 2));
|
|
349
380
|
this.logger?.info?.(`tripo make started (pid ${child.pid}) into ${jobDir}`);
|
|
@@ -431,6 +462,24 @@ export default class Generate extends UeMcpTask {
|
|
|
431
462
|
// anything else, independent of any conversion the chain ran.
|
|
432
463
|
const raw = await this.saveRaw(String(taskIds[0] ?? result.task_id), taskIds.length > 1 ? join(jobDir, "source") : jobDir, job.cwd, warnings);
|
|
433
464
|
const previewFile = raw.preview ?? (result.preview ? resolve(job.cwd, String(result.preview)) : undefined);
|
|
465
|
+
let credits = result.credits_consumed;
|
|
466
|
+
let creditsBreakdown = result.credits_breakdown;
|
|
467
|
+
let segmentation;
|
|
468
|
+
if (job.segment) {
|
|
469
|
+
const glb = raw.glb ?? (extname(modelFile).toLowerCase() === ".glb" ? modelFile : undefined);
|
|
470
|
+
const seg = await this.segmentStage(job.segment, glb, jobDir, job.cwd, warnings);
|
|
471
|
+
segmentation = seg.segmentation;
|
|
472
|
+
if (seg.modelFile) {
|
|
473
|
+
modelFile = seg.modelFile;
|
|
474
|
+
params.filePath = modelFile;
|
|
475
|
+
if (!seg.rigged && job.segment.rig)
|
|
476
|
+
params.kind = "static";
|
|
477
|
+
}
|
|
478
|
+
if (seg.credits) {
|
|
479
|
+
credits = (credits ?? 0) + seg.credits;
|
|
480
|
+
creditsBreakdown = [...(creditsBreakdown ?? []), ...seg.breakdown];
|
|
481
|
+
}
|
|
482
|
+
}
|
|
434
483
|
const files = { glb: raw.glb, preview: previewFile, modelFile, jobDir };
|
|
435
484
|
const summary = {
|
|
436
485
|
name: job.name,
|
|
@@ -449,8 +498,9 @@ export default class Generate extends UeMcpTask {
|
|
|
449
498
|
: undefined,
|
|
450
499
|
taskId: result.task_id,
|
|
451
500
|
taskIds,
|
|
452
|
-
credits
|
|
453
|
-
creditsBreakdown
|
|
501
|
+
credits,
|
|
502
|
+
creditsBreakdown,
|
|
503
|
+
segmentation,
|
|
454
504
|
settings: job.settings,
|
|
455
505
|
creditEstimate: job.plan ? { credits: job.plan.creditEstimate, notes: job.plan.notes, scope: ESTIMATE_SCOPE } : undefined,
|
|
456
506
|
preparedImages: job.prepared,
|
|
@@ -489,6 +539,69 @@ export default class Generate extends UeMcpTask {
|
|
|
489
539
|
warnings.push(...imported.warnings.map(String));
|
|
490
540
|
return { success: true, data: { status: "imported", ...summary, import: imported, warnings } };
|
|
491
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* Garment separation. make's --then chain has no smartsegment step, so it runs
|
|
544
|
+
* as its own CLI calls: `mesh smartsegment` on the generated GLB, then a make
|
|
545
|
+
* of the segmented file with the rig chain. Credits are already spent by now,
|
|
546
|
+
* so a failure here returns what exists instead of throwing.
|
|
547
|
+
*/
|
|
548
|
+
async segmentStage(seg, glb, jobDir, cwd, warnings) {
|
|
549
|
+
const none = { rigged: false, credits: 0, breakdown: [] };
|
|
550
|
+
if (!glb) {
|
|
551
|
+
warnings.push("segmentHint did not run: the generation produced no GLB to segment.");
|
|
552
|
+
return { ...none, segmentation: { status: "skipped", hint: seg.hint } };
|
|
553
|
+
}
|
|
554
|
+
const segDir = join(jobDir, "segment");
|
|
555
|
+
const r = await runCli(withAddedFlags(["mesh", "smartsegment", glb, "--seg-type", "model", "--hint", seg.hint, "-o", segDir]), { cwd, timeoutMs: SEGMENT_TIMEOUT_MS }).catch((e) => ({ exitCode: -1, stdout: "", stderr: e.message, json: undefined, timedOut: false }));
|
|
556
|
+
const sj = r.json;
|
|
557
|
+
if (r.exitCode !== 0 || !sj || sj.error) {
|
|
558
|
+
const why = sj?.error ?? (tail(r.stderr) || `exit ${r.exitCode}`);
|
|
559
|
+
warnings.push(`mesh smartsegment failed (${why}). The unsegmented model is imported and the rig steps did not run; ` +
|
|
560
|
+
`tripo(action="cli", args=["mesh","smartsegment","${glb}","--seg-type","model","--hint",${JSON.stringify(seg.hint)}]) retries it.`);
|
|
561
|
+
return { ...none, segmentation: { status: "failed", hint: seg.hint, error: String(why) }, modelFile: glb };
|
|
562
|
+
}
|
|
563
|
+
const outDir = resolve(cwd, String(sj.output_dir ?? segDir));
|
|
564
|
+
const segFiles = (sj.files ?? []).map((f) => resolve(outDir, f));
|
|
565
|
+
const segGlb = segFiles.find((f) => extname(f).toLowerCase() === ".glb") ??
|
|
566
|
+
(sj.model_file ? resolve(cwd, String(sj.model_file)) : undefined);
|
|
567
|
+
const segCredits = Number(sj.credits_consumed ?? 0);
|
|
568
|
+
const breakdown = [{ task_id: sj.task_id, type: sj.type ?? "smartsegment_model", credits_consumed: segCredits }];
|
|
569
|
+
const segmentation = {
|
|
570
|
+
status: "segmented", hint: seg.hint, taskId: sj.task_id, credits: segCredits, file: segGlb, prompt: sj.prompt,
|
|
571
|
+
};
|
|
572
|
+
if (!segGlb) {
|
|
573
|
+
warnings.push("mesh smartsegment succeeded but returned no GLB, so the unsegmented model is imported and the rig steps did not run.");
|
|
574
|
+
return { rigged: false, credits: segCredits, breakdown, segmentation, modelFile: glb };
|
|
575
|
+
}
|
|
576
|
+
if (!seg.chain)
|
|
577
|
+
return { rigged: false, credits: segCredits, breakdown, segmentation, modelFile: segGlb };
|
|
578
|
+
const rigDir = join(jobDir, "rigged");
|
|
579
|
+
const m = await runCli(withAddedFlags(["make", segGlb, "--then", seg.chain, "-o", rigDir]), { cwd, timeoutMs: RIG_TIMEOUT_MS })
|
|
580
|
+
.catch((e) => ({ exitCode: -1, stdout: "", stderr: e.message, json: undefined, timedOut: false }));
|
|
581
|
+
const mj = m.json;
|
|
582
|
+
if (m.exitCode !== 0 || !mj || mj.error || !mj.model_file) {
|
|
583
|
+
const why = mj?.error ?? (tail(m.stderr) || `exit ${m.exitCode}`);
|
|
584
|
+
warnings.push(`Rigging the segmented model failed (${why}). The segmented GLB is imported as a static mesh; ` +
|
|
585
|
+
`tripo(action="cli", args=["make","${segGlb}","--then","${seg.chain}"]) retries the rig.`);
|
|
586
|
+
segmentation.rigError = String(why);
|
|
587
|
+
return { rigged: false, credits: segCredits + Number(mj?.credits_consumed ?? 0), breakdown, segmentation, modelFile: segGlb };
|
|
588
|
+
}
|
|
589
|
+
const rigCredits = Number(mj.credits_consumed ?? 0);
|
|
590
|
+
breakdown.push(...(mj.credits_breakdown ?? [{ task_id: mj.task_id, type: mj.type, credits_consumed: rigCredits }]));
|
|
591
|
+
if (typeof mj.normalize_scale === "number") {
|
|
592
|
+
segmentation.normalizeScale = mj.normalize_scale;
|
|
593
|
+
if (mj.normalize_scale !== 1) {
|
|
594
|
+
warnings.push(`Tripo re-imported the segmented file for rigging and rescaled it by ${mj.normalize_scale} (final size = original size x ${mj.normalize_scale}). Check the scale after import.`);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
rigged: seg.rig,
|
|
599
|
+
credits: segCredits + rigCredits,
|
|
600
|
+
breakdown,
|
|
601
|
+
segmentation: { ...segmentation, rigCredits },
|
|
602
|
+
modelFile: resolve(cwd, String(mj.model_file)),
|
|
603
|
+
};
|
|
604
|
+
}
|
|
492
605
|
/** `tripo task get <id> --download` into dir. Never throws: the run already succeeded. */
|
|
493
606
|
async saveRaw(taskId, dir, cwd, warnings) {
|
|
494
607
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Generate.js","sourceRoot":"","sources":["../../src/tasks/Generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,OAAO,EACP,aAAa,EACb,MAAM,EACN,aAAa,EACb,SAAS,EACT,IAAI,EACJ,cAAc,EACd,OAAO,GACR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAsB,MAAM,qBAAqB,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AAEpC,2EAA2E;AAC3E,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAI9C,8DAA8D;AAC9D,MAAM,WAAW,GAAG;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,QAAQ;IACR,OAAO;IACP,UAAU;IACV,UAAU;IACV,YAAY;IACZ,MAAM;CACE,CAAC;AAoEX,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,MA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4
|
+
import { UeMcpTask, type TaskResult } from "ue-mcp/task";
|
|
5
|
+
interface Options {
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
export default class Loadouts extends UeMcpTask<Options> {
|
|
9
|
+
get taskName(): string;
|
|
10
|
+
execute(): Promise<TaskResult>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tripo.loadouts - the built-in and project loadouts with their resolved settings. Free.
|
|
3
|
+
*/
|
|
4
|
+
import { UeMcpTask } from "ue-mcp/task";
|
|
5
|
+
import { configOf, describeLoadout, loadoutsFrom } from "../shared/loadouts.js";
|
|
6
|
+
export default class Loadouts extends UeMcpTask {
|
|
7
|
+
get taskName() { return "tripo.loadouts"; }
|
|
8
|
+
async execute() {
|
|
9
|
+
const all = loadoutsFrom(configOf(this));
|
|
10
|
+
const wanted = this.options.name;
|
|
11
|
+
if (wanted && !all[wanted]) {
|
|
12
|
+
throw new Error(`No loadout named "${wanted}". Available: ${Object.keys(all).join(", ") || "none"}.`);
|
|
13
|
+
}
|
|
14
|
+
const names = wanted ? [wanted] : Object.keys(all);
|
|
15
|
+
return {
|
|
16
|
+
success: true,
|
|
17
|
+
data: {
|
|
18
|
+
loadouts: names.map((n) => describeLoadout(n, all)),
|
|
19
|
+
message: names.length
|
|
20
|
+
? 'Pass one as tripo(action="generate", loadout="<name>", ...). Options in the call override the loadout field by field.'
|
|
21
|
+
: "No loadouts are configured. They need ue-mcp 1.4.16-beta.12 or later, which passes the plugin its config.",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Loadouts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loadouts.js","sourceRoot":"","sources":["../../src/tasks/Loadouts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMhF,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAkB;IACtD,IAAI,QAAQ,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IAEnD,KAAK,CAAC,OAAO;QACX,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QACjC,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,qBAAqB,MAAM,iBAAiB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;QACxG,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBACnD,OAAO,EAAE,KAAK,CAAC,MAAM;oBACnB,CAAC,CAAC,uHAAuH;oBACzH,CAAC,CAAC,2GAA2G;aAChH;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/ui/settings.html
CHANGED
|
@@ -174,7 +174,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
174
174
|
- omitted: host decides border`)}),Fb=u.object({method:u.literal("ui/request-display-mode"),params:u.object({mode:Gt.describe("The display mode being requested.")})}),cb=u.object({mode:Gt.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),mb=u.union([u.literal("model"),u.literal("app")]).describe("Tool visibility scope - who can access the tool."),Wb=u.object({resourceUri:u.string().optional(),visibility:u.array(mb).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
175
175
|
- "model": Tool visible to and callable by the agent
|
|
176
176
|
- "app": Tool callable by the app from this server only`),csp:u.never().optional(),permissions:u.never().optional()}),Kb=u.object({mimeTypes:u.array(u.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Vb=u.object({method:u.literal("ui/download-file"),params:u.object({contents:u.array(u.union([tp,ip])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Bb=u.object({method:u.literal("ui/message"),params:u.object({role:u.literal("user").describe('Message role, currently only "user" is supported.'),content:u.array(ln).describe("Message content blocks (text, image, etc.).")})}),Gb=u.object({method:u.literal("ui/notifications/sandbox-resource-ready"),params:u.object({html:u.string().describe("HTML content to load into the inner iframe."),sandbox:u.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:vl.optional().describe("CSP configuration from resource metadata."),permissions:hl.optional().describe("Sandbox permissions from resource metadata.")})}),pb=u.object({method:u.literal("ui/notifications/tool-result"),params:qr.describe("Standard MCP tool execution result.")}),up=u.object({toolInfo:u.object({id:nn.optional().describe("JSON-RPC id of the tools/call request."),tool:gl.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:X$.optional().describe("Current color theme preference."),styles:sb.optional().describe("Style configuration for theming the app."),displayMode:Gt.optional().describe("How the UI is currently displayed."),availableDisplayModes:u.array(Gt).optional().describe("Display modes the host supports."),containerDimensions:u.union([u.object({height:u.number().describe("Fixed container height in pixels.")}),u.object({maxHeight:u.union([u.number(),u.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(u.union([u.object({width:u.number().describe("Fixed container width in pixels.")}),u.object({maxWidth:u.union([u.number(),u.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
177
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:u.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:u.string().optional().describe("User's timezone in IANA format."),userAgent:u.string().optional().describe("Host application identifier."),platform:u.union([u.literal("web"),u.literal("desktop"),u.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:u.object({touch:u.boolean().optional().describe("Whether the device supports touch input."),hover:u.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:u.object({top:u.number().describe("Top safe area inset in pixels."),right:u.number().describe("Right safe area inset in pixels."),bottom:u.number().describe("Bottom safe area inset in pixels."),left:u.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),fb=u.object({method:u.literal("ui/notifications/host-context-changed"),params:up.describe("Partial context update containing only changed fields.")}),Xb=u.object({method:u.literal("ui/update-model-context"),params:u.object({content:u.array(ln).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:u.record(u.string(),u.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Yb=u.object({method:u.literal("ui/initialize"),params:u.object({appInfo:Mr.describe("App identification (name and version)."),appCapabilities:db.describe("Features and capabilities this app provides."),protocolVersion:u.string().describe("Protocol version this app supports.")})}),gb=u.object({protocolVersion:u.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Mr.describe("Host application identification and version."),hostCapabilities:lb.describe("Features and capabilities provided by the host."),hostContext:up.describe("Rich context about the host environment.")}).passthrough(),vb={target:"draft-2020-12"};async function Bl(e,i){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[i](vb);if(n.vendor==="zod"){let{z:a}=await Promise.resolve().then(()=>(Rr(),qm));return a.toJSONSchema(e,{io:i})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Gl(e,i,n=""){let a=await e["~standard"].validate(i);if(a.issues){let t=a.issues.map(r=>{let o=r.path?.map(s=>typeof s=="object"?s.key:s).join(".");return o?`${o}: ${r.message}`:r.message}).join("; ");throw Error(n+t)}return a.value}Rr();function lp(e){let i=document.documentElement;i.setAttribute("data-theme",e),i.style.colorScheme=e}function dp(e,i=document.documentElement){for(let[n,a]of Object.entries(e))a!==void 0&&i.style.setProperty(n,a)}function cp(e){if(document.getElementById("__mcp-host-fonts"))return;let i=document.createElement("style");i.id="__mcp-host-fonts",i.textContent=e,document.head.appendChild(i)}var Cn=class Cn extends ta{constructor(n,a={},t={autoResize:!0}){super(t);D(this,"_appInfo");D(this,"_capabilities");D(this,"options");D(this,"_hostCapabilities");D(this,"_hostInfo");D(this,"_hostContext");D(this,"_registeredTools",{});D(this,"_initializedSent",!1);D(this,"eventSchemas",{toolinput:nb,toolinputpartial:rb,toolresult:pb,toolcancelled:ab,hostcontextchanged:fb});D(this,"_everHadListener",new Set);D(this,"_toolHandlersInitialized",!1);D(this,"_onteardown");D(this,"_oncalltool");D(this,"_onlisttools");D(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=a,this.options=t,t.allowUnsafeEval||u.config({jitless:!0}),this.setRequestHandler(Lr,r=>(console.log("Received ping:",r.params),{})),this.setEventHandler("hostcontextchanged",void 0)}_assertInitialized(n){if(this._initializedSent)return;let a=`[ext-apps] App.${n}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(a);console.warn(`${a}. This will throw in a future release.`)}_assertHandlerTiming(n){if(!Cn.ONE_SHOT_EVENTS.has(n)||this._everHadListener.has(n)||(this._everHadListener.add(n),!this._initializedSent))return;let a=`[ext-apps] "${String(n)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(a);console.warn(a)}setEventHandler(n,a){a&&this._assertHandlerTiming(n),super.setEventHandler(n,a)}addEventListener(n,a){this._assertHandlerTiming(n),super.addEventListener(n,a)}onEventDispatch(n,a){n==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...a})}registerCapabilities(n){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=V$(this._capabilities,n)}registerTool(n,a,t){if(this._registeredTools[n])throw Error(`Tool ${n} is already registered`);let r=this,o=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},s=a.inputSchema!==void 0,l={title:a.title,description:a.description,inputSchema:a.inputSchema,outputSchema:a.outputSchema,annotations:a.annotations,_meta:a._meta,enabled:!0,enable(){this.enabled=!0,o()},disable(){this.enabled=!1,o()},update(d){Object.assign(this,d),o()},remove(){r._registeredTools[n]===l&&(delete r._registeredTools[n],o())},handler:async(d,c)=>{if(!l.enabled)throw Error(`Tool ${n} is disabled`);let f;if(s){let g=l.inputSchema,_=g?await Gl(g,d??{},`Invalid input for tool ${n}: `):d??{};f=await t(_,c)}else f=await t(c);return l.outputSchema&&!f.isError&&(f.structuredContent=await Gl(l.outputSchema,f.structuredContent,`Invalid output for tool ${n}: `)),f}};return this._registeredTools[n]=l,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),o(),l}ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(n,a)=>{let t=this._registeredTools[n.name];if(!t)throw Error(`Tool ${n.name} not found`);return t.handler(n.arguments,a)},this.onlisttools=async(n,a)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([t,r])=>r.enabled).map(async([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:r.inputSchema?await Bl(r.inputSchema,"input"):{type:"object",properties:{}}};return r.outputSchema&&(o.outputSchema=await Bl(r.outputSchema,"output")),r.annotations&&(o.annotations=r.annotations),r._meta&&(o._meta=r._meta),o}))}))}async sendToolListChanged(n={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:n})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(n){this.setEventHandler("toolinput",n)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(n){this.setEventHandler("toolinputpartial",n)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(n){this.setEventHandler("toolresult",n)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(n){this.setEventHandler("toolcancelled",n)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(n){this.setEventHandler("hostcontextchanged",n)}get onteardown(){return this._onteardown}set onteardown(n){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,n),this._onteardown=n,this.replaceRequestHandler(ub,(a,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(a.params,t)})}get oncalltool(){return this._oncalltool}set oncalltool(n){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,n),this._oncalltool=n,this.replaceRequestHandler(rp,(a,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(a.params,t)})}get onlisttools(){return this._onlisttools}set onlisttools(n){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,n),this._onlisttools=n,this.replaceRequestHandler(np,(a,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(a.params,t)})}assertCapabilityForMethod(n){switch(n){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${n})`);break}}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,a){if(this._assertInitialized("callServerTool"),typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},qr,{onprogress:()=>{},resetTimeoutOnProgress:!0,...a})}async readServerResource(n,a){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:n},ep,a)}async listServerResources(n,a){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:n},Qm,a)}async createSamplingMessage(n,a){this._assertInitialized("createSamplingMessage");let t=n.tools?sp:op;return await this.request({method:"sampling/createMessage",params:n},t,a)}sendMessage(n,a){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:n},ib,a)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,a){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:n},el,a)}openLink(n,a){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:n},eb,a)}downloadFile(n,a){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:n},tb,a)}requestTeardown(n={}){return this.notification({method:"ui/notifications/request-teardown",params:n})}requestDisplayMode(n,a){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:n},cb,a)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,a=0,t=0,r=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let s=document.documentElement,l=s.style.height;s.style.height="max-content";let d=Math.ceil(s.getBoundingClientRect().height);s.style.height=l;let c=Math.ceil(window.innerWidth);(c!==a||d!==t)&&(a=c,t=d,this.sendSizeChanged({width:c,height:d}))}))};r();let o=new ResizeObserver(r);return o.observe(document.documentElement),o.observe(document.body),()=>o.disconnect()}async connect(n=new ia(window.parent,window.parent),a){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(n);try{let t=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:B$}},gb,a);if(t===void 0)throw Error(`Server sent invalid initialize result: ${t}`);this._hostCapabilities=t.hostCapabilities,this._hostInfo=t.hostInfo,this._hostContext=t.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(t){throw this.close(),t}}};D(Cn,"ONE_SHOT_EVENTS",new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]));var Rn=Cn;var hb="https://developers.tripo3d.ai/en/keys",$b="https://developers.tripo3d.com/zh/keys",K=e=>document.getElementById(e),Se=new Rn({name:"Tripo settings",version:"0.2.3"},{});async function dn(e,i={}){let n=await Se.callServerTool({name:`tripo_${e}`,arguments:i}),a=(n.content??[]).find(t=>t.type==="text")?.text??"";if(n.isError)throw new Error(a.replace(/^Error \[[A-Z_]+\]:\s*/,"")||"The call failed.");try{return JSON.parse(a)}catch{throw new Error(a||"The call returned nothing.")}}function Ee(e){for(let i of["save","clear","signin","region"])K(i).disabled=e;e||(K("clear").disabled=!$l||$l.key.source!=="store")}function he(e){let i=K("error");i.textContent=e??"",i.hidden=!e}var $l=null;function _l(e){$l=e;let i=K("account");if(e.signedIn){let n=[e.account??"Signed in"];e.region&&n.push(e.region==="cn"?"China mainland":"International"),typeof e.balance=="number"&&n.push(`${e.balance.toLocaleString()} credits`),i.textContent=n.join(" \xB7 "),i.dataset.state="ok"}else i.textContent="Not signed in. Save an API key or sign in with Tripo.",i.dataset.state="off";K("keystate").textContent=e.key.source==="env"?"Set by the TRIPO_API_KEY environment variable, which takes precedence over a saved key.":e.key.source==="store"?"A key is saved.":"No key is saved.",K("clear").disabled=e.key.source!=="store"}async function bl(){he(null);try{_l(await dn("auth_status"))}catch(e){he(e.message)}}async function bb(e){e.preventDefault();let i=K("apikey"),n=i.value.trim();if(!n){he("Enter an API key first.");return}Ee(!0),he(null);try{_l(await dn("set_key",{apiKey:n})),i.value=""}catch(a){he(a.message)}finally{Ee(!1)}}async function _b(){Ee(!0),he(null);try{_l(await dn("clear_key"))}catch(e){he(e.message)}finally{Ee(!1)}}var At=null;function mp(){At&&clearTimeout(At),At=null}async function yb(){mp(),Ee(!0),he(null);let e=K("region").value;try{let i=await dn("login_start",{region:e});if(!i.url){K("device").hidden=!0,await bl(),Ee(!1);return}K("code").textContent=i.code??"",K("open").onclick=()=>void Se.openLink({url:i.url}),K("device").hidden=!1,K("pollstate").textContent="Waiting for you to approve the code in your browser.",Se.openLink({url:i.url});let n=async()=>{let a;try{a=await dn("login_poll")}catch(t){a={state:"error",message:t.message}}if(a.state==="pending"){At=setTimeout(()=>void n(),i.pollAfterMs||5e3);return}At=null,Ee(!1),a.state==="done"?(K("device").hidden=!0,await bl()):(K("pollstate").textContent=a.state==="expired"?"The code expired. Sign in again for a new one.":"",a.state==="error"&&he(a.message??"Sign-in failed."))};At=setTimeout(()=>void n(),i.pollAfterMs||5e3)}catch(i){he(i.message),Ee(!1)}}function pp(e){e&&(e.theme&&lp(e.theme),e.styles?.variables&&dp(e.styles.variables),e.styles?.css?.fonts&&cp(e.styles.css.fonts))}Se.onhostcontextchanged=e=>pp({...Se.getHostContext(),...e});Se.onteardown=async()=>(mp(),{});K("keyform").addEventListener("submit",e=>void bb(e));K("clear").addEventListener("click",()=>void _b());K("signin").addEventListener("click",()=>void yb());K("getkey").addEventListener("click",e=>{e.preventDefault(),Se.openLink({url:K("region").value==="cn"?$b:hb})});Se.connect().then(()=>{pp(Se.getHostContext()),bl()}).catch(e=>he(`Could not reach the host: ${e.message}`));})();
|
|
177
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:u.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:u.string().optional().describe("User's timezone in IANA format."),userAgent:u.string().optional().describe("Host application identifier."),platform:u.union([u.literal("web"),u.literal("desktop"),u.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:u.object({touch:u.boolean().optional().describe("Whether the device supports touch input."),hover:u.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:u.object({top:u.number().describe("Top safe area inset in pixels."),right:u.number().describe("Right safe area inset in pixels."),bottom:u.number().describe("Bottom safe area inset in pixels."),left:u.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),fb=u.object({method:u.literal("ui/notifications/host-context-changed"),params:up.describe("Partial context update containing only changed fields.")}),Xb=u.object({method:u.literal("ui/update-model-context"),params:u.object({content:u.array(ln).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:u.record(u.string(),u.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Yb=u.object({method:u.literal("ui/initialize"),params:u.object({appInfo:Mr.describe("App identification (name and version)."),appCapabilities:db.describe("Features and capabilities this app provides."),protocolVersion:u.string().describe("Protocol version this app supports.")})}),gb=u.object({protocolVersion:u.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Mr.describe("Host application identification and version."),hostCapabilities:lb.describe("Features and capabilities provided by the host."),hostContext:up.describe("Rich context about the host environment.")}).passthrough(),vb={target:"draft-2020-12"};async function Bl(e,i){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[i](vb);if(n.vendor==="zod"){let{z:a}=await Promise.resolve().then(()=>(Rr(),qm));return a.toJSONSchema(e,{io:i})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Gl(e,i,n=""){let a=await e["~standard"].validate(i);if(a.issues){let t=a.issues.map(r=>{let o=r.path?.map(s=>typeof s=="object"?s.key:s).join(".");return o?`${o}: ${r.message}`:r.message}).join("; ");throw Error(n+t)}return a.value}Rr();function lp(e){let i=document.documentElement;i.setAttribute("data-theme",e),i.style.colorScheme=e}function dp(e,i=document.documentElement){for(let[n,a]of Object.entries(e))a!==void 0&&i.style.setProperty(n,a)}function cp(e){if(document.getElementById("__mcp-host-fonts"))return;let i=document.createElement("style");i.id="__mcp-host-fonts",i.textContent=e,document.head.appendChild(i)}var Cn=class Cn extends ta{constructor(n,a={},t={autoResize:!0}){super(t);D(this,"_appInfo");D(this,"_capabilities");D(this,"options");D(this,"_hostCapabilities");D(this,"_hostInfo");D(this,"_hostContext");D(this,"_registeredTools",{});D(this,"_initializedSent",!1);D(this,"eventSchemas",{toolinput:nb,toolinputpartial:rb,toolresult:pb,toolcancelled:ab,hostcontextchanged:fb});D(this,"_everHadListener",new Set);D(this,"_toolHandlersInitialized",!1);D(this,"_onteardown");D(this,"_oncalltool");D(this,"_onlisttools");D(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=a,this.options=t,t.allowUnsafeEval||u.config({jitless:!0}),this.setRequestHandler(Lr,r=>(console.log("Received ping:",r.params),{})),this.setEventHandler("hostcontextchanged",void 0)}_assertInitialized(n){if(this._initializedSent)return;let a=`[ext-apps] App.${n}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(a);console.warn(`${a}. This will throw in a future release.`)}_assertHandlerTiming(n){if(!Cn.ONE_SHOT_EVENTS.has(n)||this._everHadListener.has(n)||(this._everHadListener.add(n),!this._initializedSent))return;let a=`[ext-apps] "${String(n)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(a);console.warn(a)}setEventHandler(n,a){a&&this._assertHandlerTiming(n),super.setEventHandler(n,a)}addEventListener(n,a){this._assertHandlerTiming(n),super.addEventListener(n,a)}onEventDispatch(n,a){n==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...a})}registerCapabilities(n){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=V$(this._capabilities,n)}registerTool(n,a,t){if(this._registeredTools[n])throw Error(`Tool ${n} is already registered`);let r=this,o=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},s=a.inputSchema!==void 0,l={title:a.title,description:a.description,inputSchema:a.inputSchema,outputSchema:a.outputSchema,annotations:a.annotations,_meta:a._meta,enabled:!0,enable(){this.enabled=!0,o()},disable(){this.enabled=!1,o()},update(d){Object.assign(this,d),o()},remove(){r._registeredTools[n]===l&&(delete r._registeredTools[n],o())},handler:async(d,c)=>{if(!l.enabled)throw Error(`Tool ${n} is disabled`);let f;if(s){let g=l.inputSchema,_=g?await Gl(g,d??{},`Invalid input for tool ${n}: `):d??{};f=await t(_,c)}else f=await t(c);return l.outputSchema&&!f.isError&&(f.structuredContent=await Gl(l.outputSchema,f.structuredContent,`Invalid output for tool ${n}: `)),f}};return this._registeredTools[n]=l,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),o(),l}ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(n,a)=>{let t=this._registeredTools[n.name];if(!t)throw Error(`Tool ${n.name} not found`);return t.handler(n.arguments,a)},this.onlisttools=async(n,a)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([t,r])=>r.enabled).map(async([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:r.inputSchema?await Bl(r.inputSchema,"input"):{type:"object",properties:{}}};return r.outputSchema&&(o.outputSchema=await Bl(r.outputSchema,"output")),r.annotations&&(o.annotations=r.annotations),r._meta&&(o._meta=r._meta),o}))}))}async sendToolListChanged(n={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:n})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(n){this.setEventHandler("toolinput",n)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(n){this.setEventHandler("toolinputpartial",n)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(n){this.setEventHandler("toolresult",n)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(n){this.setEventHandler("toolcancelled",n)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(n){this.setEventHandler("hostcontextchanged",n)}get onteardown(){return this._onteardown}set onteardown(n){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,n),this._onteardown=n,this.replaceRequestHandler(ub,(a,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(a.params,t)})}get oncalltool(){return this._oncalltool}set oncalltool(n){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,n),this._oncalltool=n,this.replaceRequestHandler(rp,(a,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(a.params,t)})}get onlisttools(){return this._onlisttools}set onlisttools(n){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,n),this._onlisttools=n,this.replaceRequestHandler(np,(a,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(a.params,t)})}assertCapabilityForMethod(n){switch(n){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${n})`);break}}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,a){if(this._assertInitialized("callServerTool"),typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},qr,{onprogress:()=>{},resetTimeoutOnProgress:!0,...a})}async readServerResource(n,a){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:n},ep,a)}async listServerResources(n,a){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:n},Qm,a)}async createSamplingMessage(n,a){this._assertInitialized("createSamplingMessage");let t=n.tools?sp:op;return await this.request({method:"sampling/createMessage",params:n},t,a)}sendMessage(n,a){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:n},ib,a)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,a){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:n},el,a)}openLink(n,a){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:n},eb,a)}downloadFile(n,a){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:n},tb,a)}requestTeardown(n={}){return this.notification({method:"ui/notifications/request-teardown",params:n})}requestDisplayMode(n,a){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:n},cb,a)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,a=0,t=0,r=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let s=document.documentElement,l=s.style.height;s.style.height="max-content";let d=Math.ceil(s.getBoundingClientRect().height);s.style.height=l;let c=Math.ceil(window.innerWidth);(c!==a||d!==t)&&(a=c,t=d,this.sendSizeChanged({width:c,height:d}))}))};r();let o=new ResizeObserver(r);return o.observe(document.documentElement),o.observe(document.body),()=>o.disconnect()}async connect(n=new ia(window.parent,window.parent),a){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(n);try{let t=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:B$}},gb,a);if(t===void 0)throw Error(`Server sent invalid initialize result: ${t}`);this._hostCapabilities=t.hostCapabilities,this._hostInfo=t.hostInfo,this._hostContext=t.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(t){throw this.close(),t}}};D(Cn,"ONE_SHOT_EVENTS",new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]));var Rn=Cn;var hb="https://developers.tripo3d.ai/en/keys",$b="https://developers.tripo3d.com/zh/keys",K=e=>document.getElementById(e),Se=new Rn({name:"Tripo settings",version:"0.2.5"},{});async function dn(e,i={}){let n=await Se.callServerTool({name:`tripo_${e}`,arguments:i}),a=(n.content??[]).find(t=>t.type==="text")?.text??"";if(n.isError)throw new Error(a.replace(/^Error \[[A-Z_]+\]:\s*/,"")||"The call failed.");try{return JSON.parse(a)}catch{throw new Error(a||"The call returned nothing.")}}function Ee(e){for(let i of["save","clear","signin","region"])K(i).disabled=e;e||(K("clear").disabled=!$l||$l.key.source!=="store")}function he(e){let i=K("error");i.textContent=e??"",i.hidden=!e}var $l=null;function _l(e){$l=e;let i=K("account");if(e.signedIn){let n=[e.account??"Signed in"];e.region&&n.push(e.region==="cn"?"China mainland":"International"),typeof e.balance=="number"&&n.push(`${e.balance.toLocaleString()} credits`),i.textContent=n.join(" \xB7 "),i.dataset.state="ok"}else i.textContent="Not signed in. Save an API key or sign in with Tripo.",i.dataset.state="off";K("keystate").textContent=e.key.source==="env"?"Set by the TRIPO_API_KEY environment variable, which takes precedence over a saved key.":e.key.source==="store"?"A key is saved.":"No key is saved.",K("clear").disabled=e.key.source!=="store"}async function bl(){he(null);try{_l(await dn("auth_status"))}catch(e){he(e.message)}}async function bb(e){e.preventDefault();let i=K("apikey"),n=i.value.trim();if(!n){he("Enter an API key first.");return}Ee(!0),he(null);try{_l(await dn("set_key",{apiKey:n})),i.value=""}catch(a){he(a.message)}finally{Ee(!1)}}async function _b(){Ee(!0),he(null);try{_l(await dn("clear_key"))}catch(e){he(e.message)}finally{Ee(!1)}}var At=null;function mp(){At&&clearTimeout(At),At=null}async function yb(){mp(),Ee(!0),he(null);let e=K("region").value;try{let i=await dn("login_start",{region:e});if(!i.url){K("device").hidden=!0,await bl(),Ee(!1);return}K("code").textContent=i.code??"",K("open").onclick=()=>void Se.openLink({url:i.url}),K("device").hidden=!1,K("pollstate").textContent="Waiting for you to approve the code in your browser.",Se.openLink({url:i.url});let n=async()=>{let a;try{a=await dn("login_poll")}catch(t){a={state:"error",message:t.message}}if(a.state==="pending"){At=setTimeout(()=>void n(),i.pollAfterMs||5e3);return}At=null,Ee(!1),a.state==="done"?(K("device").hidden=!0,await bl()):(K("pollstate").textContent=a.state==="expired"?"The code expired. Sign in again for a new one.":"",a.state==="error"&&he(a.message??"Sign-in failed."))};At=setTimeout(()=>void n(),i.pollAfterMs||5e3)}catch(i){he(i.message),Ee(!1)}}function pp(e){e&&(e.theme&&lp(e.theme),e.styles?.variables&&dp(e.styles.variables),e.styles?.css?.fonts&&cp(e.styles.css.fonts))}Se.onhostcontextchanged=e=>pp({...Se.getHostContext(),...e});Se.onteardown=async()=>(mp(),{});K("keyform").addEventListener("submit",e=>void bb(e));K("clear").addEventListener("click",()=>void _b());K("signin").addEventListener("click",()=>void yb());K("getkey").addEventListener("click",e=>{e.preventDefault(),Se.openLink({url:K("region").value==="cn"?$b:hb})});Se.connect().then(()=>{pp(Se.getHostContext()),bl()}).catch(e=>he(`Could not reach the host: ${e.message}`));})();
|
|
178
178
|
</script>
|
|
179
179
|
</body>
|
|
180
180
|
</html>
|
package/knowledge/tripo.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
This plugin runs tripo-cli 0.11.2, pinned in its package, so nothing needs installing. Every `tripo ...` command in the guide below is a call to `tripo(action="cli", args=[...])` with the words after `tripo` as the array: `tripo balance` is `tripo(action="cli", args=["balance"])`, and `tripo task get <id>` is `tripo(action="cli", args=["task","get","<id>"])`. The plugin adds `--json`, `--yes` and `--no-open` to every command and returns the parsed JSON result. Relative paths resolve against `<project>/Saved/Tripo`, so pass absolute paths.
|
|
4
4
|
|
|
5
5
|
- Sign in with `tripo(action="cli", args=["login","--region","ov","--no-wait"])` (`cn` for the China site), or set `TRIPO_API_KEY` in the ue-mcp server environment. Then check with `tripo(action="cli", args=["doctor"])`.
|
|
6
|
-
- To get a model into Unreal, use `tripo(action="generate", prompt="...")`. It spends credits, so call it with `dryRun=true` first: the dry run returns the exact settings and the credit estimate for nothing, and the same call without `dryRun` generates. Without options it runs `tripo make` with `--model H3.1` (the cheapest model the CLI can price), GLB output, `-p pbr=
|
|
6
|
+
- To get a model into Unreal, use `tripo(action="generate", prompt="...")`. It spends credits, so call it with `dryRun=true` first: the dry run returns the exact settings and the credit estimate for nothing, and the same call without `dryRun` generates. Without options it runs `tripo make` with `--model H3.1` (the cheapest model the CLI can price), GLB output, `-p pbr=false`, `--for anim` and a rig (`rig-check`, then `rig` with `spec=unreal` and `out_format=glb`); there is no convert step. It never picks a premium model, `texture_quality=detailed` or `geometry_quality=detailed`; pass `model` or `params` for those, only when the user asks. `format="fbx"` adds `convert:fbx` as the last step, but the conversion has produced tiny scale and cracked meshes that the same task as GLB did not, so leave it off unless FBX is required. The raw GLB and `preview.png` are saved under the job folder, and the result lists their paths, the settings used, the credits and when Tripo's download links expire (about 8 days). The result imports the model with `asset(action="import_model")`; when that cannot run it still returns success with `status="generated"` and the `importCall` to make next. A pending result names the `generate(resume=...)` call that finishes the import.
|
|
7
|
+
- Prefer a loadout when the subject is known: `generate(loadout="humanoid" | "creature" | "prop" | "hero-prop" | "environment", ...)` applies a bundle of model, face limit, rig and import settings, and options in the call override it field by field. `tripo(action="loadouts")` lists them for free with their resolved settings, including any the project defines under `ue-mcp.pluginConfig.tripo.loadouts` in the project's config. The dry run and every result say which loadout or option each setting came from. Built-ins use the cheapest model and standard texture quality, so a premium setting still needs an explicit option.
|
|
8
|
+
- **This overrides rule 7 of the Tripo guide below ("default to P2").** Through this plugin, generate defaults to H3.1 and the cheap settings (no PBR, standard texture quality, no `geometry_quality`). Use P2 only when the user asks for it, with `model="P2"`. Do not pass `--model P2` to `tripo(action="cli")` or switch generate to P2 on your own.
|
|
9
|
+
- `segmentHint="poncho, body"` separates garments after generation: it runs `mesh smartsegment` (55 credits at list price, on top of the estimate) on the raw GLB, then rigs the segmented model. Plain `mesh segment` fused a poncho that smartsegment separated. It is off by default and cannot be combined with `task` or `then`.
|
|
7
10
|
- The estimate covers the generation step only. Rig, retarget, texture and convert steps are billed on top.
|
|
8
11
|
- A model file already on disk goes straight to `asset(action="import_model", filePath=..., kind="skeletal")`.
|
|
9
12
|
- The cli action stops a command after `timeoutSec` (default 300). For long jobs pass `--no-wait`, then `["task","watch","<id>","--download"]`. `tripo mcp` and `tripo update` are not available through the plugin.
|
|
@@ -24,6 +27,31 @@ Marked (Tripo) are Tripo's own guidance; the rest is what the preparation step d
|
|
|
24
27
|
- Style: a stylized reference gives stylized output, but expect the texture to come back smoother.
|
|
25
28
|
- Checking results: inspect the raw GLB (the result's `glb` path) before any conversion. Change one variable at a time, and pass a fixed seed (`params=["model_seed=123"]`) to compare runs.
|
|
26
29
|
|
|
30
|
+
## After import
|
|
31
|
+
|
|
32
|
+
These come from a project's character and cloth work, observed in its editor and files unless marked unverified.
|
|
33
|
+
|
|
34
|
+
- Inspect the raw GLB (scale in cm, part count, cracks, one fused shell or separate parts) before any conversion. Tripo's FBX convert caused tiny scale and cracks that the same task as GLB did not have.
|
|
35
|
+
- Tripo's auto-skin puts garment weight on arm bones (one poncho had 48% on them). Cloth input follows the skinned pose, so a garment that hangs from the shoulders balloons or spikes when the arms move, even with simulation off. Reweight such garments to the clavicles, spine and neck, and check that the share on arm bones is 0, before any clothing data is made.
|
|
36
|
+
- Tripo's auto physics asset had 12 bodies with no clavicle, neck or lower-arm bodies. Its radii looked large for a 100 cm character (unverified: the capsules were not visualized). Look at them before tuning cloth.
|
|
37
|
+
- The Unreal section index is not the Tripo part number. Read the material of each section: one poncho was section 4 and section 3 was the head, and binding to the wrong section is silent.
|
|
38
|
+
- Garments need to be their own part and their own material section to simulate, so use `segmentHint` when generation fuses them. A double-walled garment balloons and clips when simulated as it is; the route below simulates a single-layer sheet in its place.
|
|
39
|
+
|
|
40
|
+
## Garments as cloth
|
|
41
|
+
|
|
42
|
+
Generated garments are often double-walled: two sheets a short way apart that simulate separately. Simulate a single-layer sheet built from the garment and let it drive the thick garment you render. Needs ue-mcp 1.4.16-beta.13 or later. Every call below is a core ue-mcp action on the imported SkeletalMesh; each action's schema names its mesh parameter.
|
|
43
|
+
|
|
44
|
+
1. Generate with `segmentHint` (for example `"poncho, body"`) so each garment comes out as its own part and its own section. Find the garment's section by its material, not by the Tripo part number.
|
|
45
|
+
2. Check the skin weights: `asset(action="read_skeletal_mesh_weight_report", sectionIndex=<garment>, boneGroups=...)` gives each bone's share of the garment's weight. If the arms carry any of it, move it to the clavicles, spine and neck with `asset(action="restrict_skeletal_mesh_influences", sectionIndex=<garment>, allowedBones=[...], includeChildBones=...)`; `restore_skeletal_mesh_snapshot` undoes it.
|
|
46
|
+
3. Check penetration: `asset(action="measure_section_penetration", garmentSection=<garment>, bodySections=[...])`, and push the garment out with `asset(action="offset_section_outward", ...)` when vertices are inside the body.
|
|
47
|
+
4. Check the collision bodies: `animation(action="check_physics_asset_fit", garmentSection=<garment>)` lists bodies that are too large or too small and the bones that carry garment weight with no body, each with a capsule for `animation(action="add_physics_asset_body")`. `animation(action="capture_physics_asset_bodies")` renders them over the mesh.
|
|
48
|
+
5. Measure the double walls: `asset(action="measure_section_layers", garmentSection=<garment>)` returns `doubleWalledShare` and `doubleWalledAreaShare`.
|
|
49
|
+
6. Build the sheet: `asset(action="build_garment_proxy_section", garmentSection=<garment>, bodySections=[...])`. Run it with `dryRun=true` first. A sheet that misses a quality threshold is refused, nothing is written, and the result carries its report under `quality`, with `quality.checks` saying which check failed and the `max*`/`min*` parameter that loosens it. A passing sheet becomes a new render section; `remove_skeletal_mesh_section` removes it.
|
|
50
|
+
7. Create clothing from the sheet: `asset(action="create_clothing_from_section", lodIndex=0, sectionIndex=<sheet>, removeFromMesh=true, physicsAssetPath=...)`. The sheet stops rendering and becomes the simulated proxy.
|
|
51
|
+
8. Proxy-drive the render garment: `asset(action="bind_cloth_to_section", lodIndex=0, sectionIndex=<garment>, clothingAsset=<the new asset's name>)`. The result's `clothMappingVertexCount` is how many render vertices the proxy drives; it should match the garment section's vertex count.
|
|
52
|
+
|
|
53
|
+
Paint the sheet's max distance with `asset(action="set_cloth_weight_map")` and read it back with `read_cloth_weight_map`. `remove_clothing_asset` undoes step 7.
|
|
54
|
+
|
|
27
55
|
---
|
|
28
56
|
|
|
29
57
|
# Tripo CLI Skill
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ue-mcp-tripo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Tripo plugin for ue-mcp. Runs Tripo's own CLI to turn a prompt or image into a rigged, textured Unreal Engine 5 character imported through ue-mcp core, and exposes every other CLI command through a passthrough.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
"@types/node": "^22.20.5",
|
|
37
37
|
"esbuild": "0.25.12",
|
|
38
38
|
"typescript": "^5.7.0",
|
|
39
|
-
"ue-mcp": "1.4.16-beta.
|
|
40
|
-
"vitest": "^3.2.4"
|
|
39
|
+
"ue-mcp": "1.4.16-beta.12",
|
|
40
|
+
"vitest": "^3.2.4",
|
|
41
|
+
"yaml": "^2.9.1"
|
|
41
42
|
},
|
|
42
43
|
"scripts": {
|
|
43
44
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
package/skills/cli/SKILL.md
CHANGED
|
@@ -8,7 +8,10 @@ description: Generate, rig, animate, convert and import 3D models with Tripo thr
|
|
|
8
8
|
This plugin runs tripo-cli 0.11.2, pinned in its package, so nothing needs installing. Every `tripo ...` command in the guide below is a call to `tripo(action="cli", args=[...])` with the words after `tripo` as the array: `tripo balance` is `tripo(action="cli", args=["balance"])`, and `tripo task get <id>` is `tripo(action="cli", args=["task","get","<id>"])`. The plugin adds `--json`, `--yes` and `--no-open` to every command and returns the parsed JSON result. Relative paths resolve against `<project>/Saved/Tripo`, so pass absolute paths.
|
|
9
9
|
|
|
10
10
|
- Sign in with `tripo(action="cli", args=["login","--region","ov","--no-wait"])` (`cn` for the China site), or set `TRIPO_API_KEY` in the ue-mcp server environment. Then check with `tripo(action="cli", args=["doctor"])`.
|
|
11
|
-
- To get a model into Unreal, use `tripo(action="generate", prompt="...")`. It spends credits, so call it with `dryRun=true` first: the dry run returns the exact settings and the credit estimate for nothing, and the same call without `dryRun` generates. Without options it runs `tripo make` with `--model H3.1` (the cheapest model the CLI can price), GLB output, `-p pbr=
|
|
11
|
+
- To get a model into Unreal, use `tripo(action="generate", prompt="...")`. It spends credits, so call it with `dryRun=true` first: the dry run returns the exact settings and the credit estimate for nothing, and the same call without `dryRun` generates. Without options it runs `tripo make` with `--model H3.1` (the cheapest model the CLI can price), GLB output, `-p pbr=false`, `--for anim` and a rig (`rig-check`, then `rig` with `spec=unreal` and `out_format=glb`); there is no convert step. It never picks a premium model, `texture_quality=detailed` or `geometry_quality=detailed`; pass `model` or `params` for those, only when the user asks. `format="fbx"` adds `convert:fbx` as the last step, but the conversion has produced tiny scale and cracked meshes that the same task as GLB did not, so leave it off unless FBX is required. The raw GLB and `preview.png` are saved under the job folder, and the result lists their paths, the settings used, the credits and when Tripo's download links expire (about 8 days). The result imports the model with `asset(action="import_model")`; when that cannot run it still returns success with `status="generated"` and the `importCall` to make next. A pending result names the `generate(resume=...)` call that finishes the import.
|
|
12
|
+
- Prefer a loadout when the subject is known: `generate(loadout="humanoid" | "creature" | "prop" | "hero-prop" | "environment", ...)` applies a bundle of model, face limit, rig and import settings, and options in the call override it field by field. `tripo(action="loadouts")` lists them for free with their resolved settings, including any the project defines under `ue-mcp.pluginConfig.tripo.loadouts` in the project's config. The dry run and every result say which loadout or option each setting came from. Built-ins use the cheapest model and standard texture quality, so a premium setting still needs an explicit option.
|
|
13
|
+
- **This overrides rule 7 of the Tripo guide below ("default to P2").** Through this plugin, generate defaults to H3.1 and the cheap settings (no PBR, standard texture quality, no `geometry_quality`). Use P2 only when the user asks for it, with `model="P2"`. Do not pass `--model P2` to `tripo(action="cli")` or switch generate to P2 on your own.
|
|
14
|
+
- `segmentHint="poncho, body"` separates garments after generation: it runs `mesh smartsegment` (55 credits at list price, on top of the estimate) on the raw GLB, then rigs the segmented model. Plain `mesh segment` fused a poncho that smartsegment separated. It is off by default and cannot be combined with `task` or `then`.
|
|
12
15
|
- The estimate covers the generation step only. Rig, retarget, texture and convert steps are billed on top.
|
|
13
16
|
- A model file already on disk goes straight to `asset(action="import_model", filePath=..., kind="skeletal")`.
|
|
14
17
|
- The cli action stops a command after `timeoutSec` (default 300). For long jobs pass `--no-wait`, then `["task","watch","<id>","--download"]`. `tripo mcp` and `tripo update` are not available through the plugin.
|
|
@@ -29,6 +32,31 @@ Marked (Tripo) are Tripo's own guidance; the rest is what the preparation step d
|
|
|
29
32
|
- Style: a stylized reference gives stylized output, but expect the texture to come back smoother.
|
|
30
33
|
- Checking results: inspect the raw GLB (the result's `glb` path) before any conversion. Change one variable at a time, and pass a fixed seed (`params=["model_seed=123"]`) to compare runs.
|
|
31
34
|
|
|
35
|
+
## After import
|
|
36
|
+
|
|
37
|
+
These come from a project's character and cloth work, observed in its editor and files unless marked unverified.
|
|
38
|
+
|
|
39
|
+
- Inspect the raw GLB (scale in cm, part count, cracks, one fused shell or separate parts) before any conversion. Tripo's FBX convert caused tiny scale and cracks that the same task as GLB did not have.
|
|
40
|
+
- Tripo's auto-skin puts garment weight on arm bones (one poncho had 48% on them). Cloth input follows the skinned pose, so a garment that hangs from the shoulders balloons or spikes when the arms move, even with simulation off. Reweight such garments to the clavicles, spine and neck, and check that the share on arm bones is 0, before any clothing data is made.
|
|
41
|
+
- Tripo's auto physics asset had 12 bodies with no clavicle, neck or lower-arm bodies. Its radii looked large for a 100 cm character (unverified: the capsules were not visualized). Look at them before tuning cloth.
|
|
42
|
+
- The Unreal section index is not the Tripo part number. Read the material of each section: one poncho was section 4 and section 3 was the head, and binding to the wrong section is silent.
|
|
43
|
+
- Garments need to be their own part and their own material section to simulate, so use `segmentHint` when generation fuses them. A double-walled garment balloons and clips when simulated as it is; the route below simulates a single-layer sheet in its place.
|
|
44
|
+
|
|
45
|
+
## Garments as cloth
|
|
46
|
+
|
|
47
|
+
Generated garments are often double-walled: two sheets a short way apart that simulate separately. Simulate a single-layer sheet built from the garment and let it drive the thick garment you render. Needs ue-mcp 1.4.16-beta.13 or later. Every call below is a core ue-mcp action on the imported SkeletalMesh; each action's schema names its mesh parameter.
|
|
48
|
+
|
|
49
|
+
1. Generate with `segmentHint` (for example `"poncho, body"`) so each garment comes out as its own part and its own section. Find the garment's section by its material, not by the Tripo part number.
|
|
50
|
+
2. Check the skin weights: `asset(action="read_skeletal_mesh_weight_report", sectionIndex=<garment>, boneGroups=...)` gives each bone's share of the garment's weight. If the arms carry any of it, move it to the clavicles, spine and neck with `asset(action="restrict_skeletal_mesh_influences", sectionIndex=<garment>, allowedBones=[...], includeChildBones=...)`; `restore_skeletal_mesh_snapshot` undoes it.
|
|
51
|
+
3. Check penetration: `asset(action="measure_section_penetration", garmentSection=<garment>, bodySections=[...])`, and push the garment out with `asset(action="offset_section_outward", ...)` when vertices are inside the body.
|
|
52
|
+
4. Check the collision bodies: `animation(action="check_physics_asset_fit", garmentSection=<garment>)` lists bodies that are too large or too small and the bones that carry garment weight with no body, each with a capsule for `animation(action="add_physics_asset_body")`. `animation(action="capture_physics_asset_bodies")` renders them over the mesh.
|
|
53
|
+
5. Measure the double walls: `asset(action="measure_section_layers", garmentSection=<garment>)` returns `doubleWalledShare` and `doubleWalledAreaShare`.
|
|
54
|
+
6. Build the sheet: `asset(action="build_garment_proxy_section", garmentSection=<garment>, bodySections=[...])`. Run it with `dryRun=true` first. A sheet that misses a quality threshold is refused, nothing is written, and the result carries its report under `quality`, with `quality.checks` saying which check failed and the `max*`/`min*` parameter that loosens it. A passing sheet becomes a new render section; `remove_skeletal_mesh_section` removes it.
|
|
55
|
+
7. Create clothing from the sheet: `asset(action="create_clothing_from_section", lodIndex=0, sectionIndex=<sheet>, removeFromMesh=true, physicsAssetPath=...)`. The sheet stops rendering and becomes the simulated proxy.
|
|
56
|
+
8. Proxy-drive the render garment: `asset(action="bind_cloth_to_section", lodIndex=0, sectionIndex=<garment>, clothingAsset=<the new asset's name>)`. The result's `clothMappingVertexCount` is how many render vertices the proxy drives; it should match the garment section's vertex count.
|
|
57
|
+
|
|
58
|
+
Paint the sheet's max distance with `asset(action="set_cloth_weight_map")` and read it back with `read_cloth_weight_map`. `remove_clothing_asset` undoes step 7.
|
|
59
|
+
|
|
32
60
|
---
|
|
33
61
|
|
|
34
62
|
# Tripo CLI Skill
|
package/ue-mcp.plugin.yml
CHANGED
|
@@ -2,7 +2,71 @@ actionPrefix: tripo
|
|
|
2
2
|
displayName: Tripo Connector
|
|
3
3
|
# Plugin views, row buttons, app-only actions and the secret store ship in
|
|
4
4
|
# 1.4.16-beta.11 (asset(import_model), which generate imports through, in beta.10).
|
|
5
|
-
|
|
5
|
+
# The garment cloth route in the guidance uses actions added in 1.4.16-beta.13.
|
|
6
|
+
minServerVersion: 1.4.16-beta.13
|
|
7
|
+
|
|
8
|
+
# Loadouts: named bundles of generate settings, read by the plugin as
|
|
9
|
+
# this.config.loadouts. A project adds or overrides them under
|
|
10
|
+
# ue-mcp.pluginConfig.tripo.loadouts in the project's config: an override replaces
|
|
11
|
+
# only the fields it names, a new name adds a loadout, and null removes one.
|
|
12
|
+
# Every built-in uses model H3.1, the cheapest the CLI can price, and standard
|
|
13
|
+
# texture quality; a premium option is never part of a built-in.
|
|
14
|
+
config:
|
|
15
|
+
loadouts:
|
|
16
|
+
humanoid:
|
|
17
|
+
description: A rigged biped for Unreal, imported as a skeletal mesh
|
|
18
|
+
guidance: >-
|
|
19
|
+
Prompt or draw a T-pose with the limbs apart from the torso; use an
|
|
20
|
+
A-pose for cloth. For a turnaround, pass views.
|
|
21
|
+
rig: true
|
|
22
|
+
rigType: biped
|
|
23
|
+
spec: unreal
|
|
24
|
+
format: glb
|
|
25
|
+
faceLimit: 8000
|
|
26
|
+
textureQuality: standard
|
|
27
|
+
pbr: false
|
|
28
|
+
params:
|
|
29
|
+
- smart_low_poly=true
|
|
30
|
+
- delight=true
|
|
31
|
+
- texture_alignment=original_image
|
|
32
|
+
- orientation=align_image
|
|
33
|
+
kind: skeletal
|
|
34
|
+
createPhysicsAsset: true
|
|
35
|
+
creature:
|
|
36
|
+
description: A rigged quadruped, imported as a skeletal mesh
|
|
37
|
+
rig: true
|
|
38
|
+
rigType: quadruped
|
|
39
|
+
format: glb
|
|
40
|
+
faceLimit: 20000
|
|
41
|
+
textureQuality: standard
|
|
42
|
+
pbr: false
|
|
43
|
+
kind: skeletal
|
|
44
|
+
createPhysicsAsset: true
|
|
45
|
+
prop:
|
|
46
|
+
description: A low-poly static mesh with no rig
|
|
47
|
+
rig: false
|
|
48
|
+
format: glb
|
|
49
|
+
faceLimit: 5000
|
|
50
|
+
textureQuality: standard
|
|
51
|
+
pbr: false
|
|
52
|
+
kind: static
|
|
53
|
+
hero-prop:
|
|
54
|
+
description: A higher-detail static mesh with no rig
|
|
55
|
+
rig: false
|
|
56
|
+
format: glb
|
|
57
|
+
faceLimit: 30000
|
|
58
|
+
textureQuality: standard
|
|
59
|
+
pbr: true
|
|
60
|
+
kind: static
|
|
61
|
+
environment:
|
|
62
|
+
description: A static mesh with Nanite on, for large or dense pieces
|
|
63
|
+
rig: false
|
|
64
|
+
format: glb
|
|
65
|
+
faceLimit: 50000
|
|
66
|
+
textureQuality: standard
|
|
67
|
+
pbr: true
|
|
68
|
+
kind: static
|
|
69
|
+
nanite: true
|
|
6
70
|
|
|
7
71
|
# Tripo owns a domain (AI 3D generation, rigging and animation) that fits no
|
|
8
72
|
# built-in category, so the plugin provides its own `tripo` tool. Every Tripo
|
|
@@ -34,8 +98,11 @@ registry:
|
|
|
34
98
|
Runs Tripo's own CLI from ue-mcp: one call generates a model, rigs it with
|
|
35
99
|
Unreal Mannequin bone names, optionally adds a preset animation and
|
|
36
100
|
imports it as a skeletal mesh, with a credit estimate before anything is
|
|
37
|
-
spent.
|
|
38
|
-
|
|
101
|
+
spent. Loadouts bundle settings by subject (humanoid, creature, prop,
|
|
102
|
+
hero-prop, environment), and a project can override them or add its own.
|
|
103
|
+
Turnaround images are prepared for multiview, and garments can be split
|
|
104
|
+
from the body before rigging. Every other CLI command is available
|
|
105
|
+
through a passthrough.
|
|
39
106
|
category: asset
|
|
40
107
|
tags: [tripo, ai-3d, text-to-3d, image-to-3d, rigging, skeletal-mesh]
|
|
41
108
|
|
|
@@ -57,11 +124,15 @@ provides:
|
|
|
57
124
|
visibility: [model] # the agent's; the settings view never spends credits
|
|
58
125
|
description: >-
|
|
59
126
|
Spends Tripo credits. Call it with dryRun=true first: that returns
|
|
60
|
-
the exact settings and the credit estimate for
|
|
61
|
-
call without dryRun then generates.
|
|
127
|
+
the exact settings, where each came from, and the credit estimate for
|
|
128
|
+
nothing, and the same call without dryRun then generates. loadout
|
|
129
|
+
picks a named bundle of settings (humanoid, creature, prop,
|
|
130
|
+
hero-prop, environment, or a project's own; list them with the
|
|
131
|
+
loadouts action) and options in the call override it. Prompt, image(s), turnaround views
|
|
62
132
|
or task ref to an imported Unreal asset. Runs one `tripo make` with
|
|
63
|
-
the cheapest priced model (H3.1) unless model is passed
|
|
64
|
-
|
|
133
|
+
the cheapest priced model (H3.1) unless model is passed (not P2, even
|
|
134
|
+
though Tripo's own guide defaults to it), GLB output, and no PBR
|
|
135
|
+
unless pbr=true, plus --for anim (rig=true, default) and a --then chain of
|
|
65
136
|
rig-check, rig (biped with spec=unreal) and an optional retarget
|
|
66
137
|
preset; convert:fbx runs last only for format=fbx. Output goes to
|
|
67
138
|
<project>/Saved/Tripo/<name>, with the raw GLB and preview.png saved
|
|
@@ -78,13 +149,17 @@ provides:
|
|
|
78
149
|
images: { type: array, description: "Absolute image path(s) or URLs: one image, or 2 to 4 views named front, left, back, right in the file name" }
|
|
79
150
|
views: { type: object, description: "Turnaround as a map of view to image path, e.g. {front: ..., left: ..., back: ...}. Front plus at least one other. Prepared before upload." }
|
|
80
151
|
prepareImages: { type: boolean, description: "Prepare multiview images before upload (default true); false sends the originals" }
|
|
152
|
+
loadout: { type: string, description: "A named bundle of settings (see the loadouts action): humanoid, creature, prop, hero-prop, environment, or one the project defines. Options in this call override it field by field" }
|
|
153
|
+
faceLimit: { type: number, description: "Face limit, passed as -p face_limit (overrides the loadout)" }
|
|
154
|
+
textureQuality: { type: string, description: "standard | detailed, passed as -p texture_quality. detailed costs more; use it only when asked" }
|
|
81
155
|
task: { type: string, description: "An existing Tripo task id (or @last / @name) to continue from" }
|
|
82
156
|
rig: { type: boolean, description: "Rig and import as a skeletal mesh (default true)" }
|
|
83
157
|
rigType: { type: string, description: "biped (default) | quadruped | hexapod | octopod | avian | serpentine | aquatic | others | auto (rig-check decides)" }
|
|
84
158
|
spec: { type: string, description: "Biped bone naming (default unreal): unreal | tripo | mixamo | actorcore | unity | vrm" }
|
|
85
159
|
animation: { type: string, description: "One preset animation, e.g. walk or preset:quadruped:walk" }
|
|
86
160
|
retexture: { type: boolean, description: "Add a texture step first (for an untextured task ref)" }
|
|
87
|
-
pbr: { type: boolean, description: "PBR textures (default
|
|
161
|
+
pbr: { type: boolean, description: "PBR textures (default false, as in Tripo's guidance)" }
|
|
162
|
+
segmentHint: { type: string, description: "Separate garments or parts: after generating, runs mesh smartsegment on the GLB with this hint (e.g. \"poncho, body\"), then rigs the segmented model. Adds 55 credits at list price; off by default. Not with task or then" }
|
|
88
163
|
format: { type: string, description: "glb (default) | fbx (adds convert:fbx as the last step)" }
|
|
89
164
|
model: { type: string, description: "Generation model, passed as --model. Default H3.1, the cheapest the CLI can price; P2 and P1 only when asked" }
|
|
90
165
|
params: { type: array, description: "Extra make -p key=value pairs, e.g. [\"face_limit=20000\"]. Premium options such as texture_quality=detailed go here, only when asked" }
|
|
@@ -107,6 +182,19 @@ provides:
|
|
|
107
182
|
onConflict: { type: string }
|
|
108
183
|
save: { type: boolean }
|
|
109
184
|
|
|
185
|
+
loadouts:
|
|
186
|
+
task: tripo.loadouts
|
|
187
|
+
effect: read
|
|
188
|
+
visibility: [model]
|
|
189
|
+
description: >-
|
|
190
|
+
Free. Lists the built-in and project loadouts with their resolved
|
|
191
|
+
settings, where each setting comes from, and the guidance each
|
|
192
|
+
carries. Pick one with generate(loadout="<name>"). A project defines
|
|
193
|
+
its own, or changes a built-in, under
|
|
194
|
+
ue-mcp.pluginConfig.tripo.loadouts in the project's config.
|
|
195
|
+
schema:
|
|
196
|
+
name: { type: string, description: "Show one loadout" }
|
|
197
|
+
|
|
110
198
|
prepare_images:
|
|
111
199
|
task: tripo.prepare_images
|
|
112
200
|
effect: mutate
|
|
@@ -197,6 +285,9 @@ tasks:
|
|
|
197
285
|
tripo.generate:
|
|
198
286
|
class_path: tasks/Generate
|
|
199
287
|
description: "Prompt, image or task to an asset imported through core"
|
|
288
|
+
tripo.loadouts:
|
|
289
|
+
class_path: tasks/Loadouts
|
|
290
|
+
description: "List the loadouts and their resolved settings"
|
|
200
291
|
tripo.prepare_images:
|
|
201
292
|
class_path: tasks/PrepareImages
|
|
202
293
|
description: "Prepare turnaround views for multiview generation"
|