@meshy-ai/cli 0.4.3 → 0.4.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/dist/cmd/analyze-printability.js +1 -1
- package/dist/cmd/analyze-printability.js.map +1 -1
- package/dist/cmd/image-to-3d.d.ts +1 -1
- package/dist/cmd/image-to-3d.d.ts.map +1 -1
- package/dist/cmd/image-to-3d.js +8 -10
- package/dist/cmd/image-to-3d.js.map +1 -1
- package/dist/cmd/repair-printability.js +1 -1
- package/dist/cmd/repair-printability.js.map +1 -1
- package/dist/cmd/rigging.d.ts.map +1 -1
- package/dist/cmd/rigging.js +3 -1
- package/dist/cmd/rigging.js.map +1 -1
- package/dist/cmd/text-to-3d.d.ts +1 -1
- package/dist/cmd/text-to-3d.d.ts.map +1 -1
- package/dist/cmd/text-to-3d.js +7 -8
- package/dist/cmd/text-to-3d.js.map +1 -1
- package/dist/internal/smart-topology.d.ts +5 -9
- package/dist/internal/smart-topology.d.ts.map +1 -1
- package/dist/internal/smart-topology.js +13 -12
- package/dist/internal/smart-topology.js.map +1 -1
- package/package.json +1 -1
- package/skills/meshy-cli/SKILL.md +4 -2
|
@@ -47,7 +47,7 @@ const spec = {
|
|
|
47
47
|
configure(cmd) {
|
|
48
48
|
cmd
|
|
49
49
|
.option("--input-task-id <id>", "source SUCCEEDED task: image-to-3d, multi-image-to-3d, text-to-3d, remesh or retexture (Meshy 6 or newer), or repair-printability")
|
|
50
|
-
.option("--model-url <src>", "3D model: an http(s) URL (.glb/.gltf/.obj/.fbx/.stl, max
|
|
50
|
+
.option("--model-url <src>", "3D model: an http(s) URL (.glb/.gltf/.obj/.fbx/.stl, max 400MB) or a local .glb/.gltf file (max 100MB) — the API takes inline uploads as glTF only, so host .stl/.obj/.fbx at a URL");
|
|
51
51
|
return printSizeOptions(cmd, "check");
|
|
52
52
|
},
|
|
53
53
|
toPayload(opts) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI;YAAE,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IACxH,CAAC;AACH,CAAC;AAED,MAAM,IAAI,GAAwB;IAChC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,wEAAwE;QACxE,mFAAmF;QACnF,wFAAwF;QACxF,2DAA2D;IAC7D,MAAM,EAAE;QACN,WAAW,EAAE,qCAAqC;QAClD,SAAS,CAAC,GAAG;YACX,GAAG;iBACA,MAAM,CACL,sBAAsB,EACtB,mIAAmI,CACpI;iBACA,MAAM,CACL,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"analyze-printability.js","sourceRoot":"","sources":["../../src/cmd/analyze-printability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAE7F,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,GAAY,EAAE,IAAY;IACzD,OAAO,GAAG;SACP,SAAS,CACR,IAAI,MAAM,CACR,uBAAuB,EACvB,GAAG,IAAI,yHAAyH,CACjI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CACxC;SACA,MAAM,CAAC,iCAAiC,EAAE,mGAAmG,EAAE,WAAW,CAAC;SAC3J,MAAM,CAAC,uCAAuC,EAAE,oDAAoD,EAAE,WAAW,CAAC,CAAC;AACxH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IAC5D,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,WAAW;QAC9B,wBA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L,aAAa,EAAE,IAAI,CAAC,WAAW;gBAC/B,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,GAAG,gBAAgB,CAAC,IAAI,CAAC;aAC1B,CAAC;QACJ,CAAC;QACD,eAAe,EAAE,iBAAiB;KACnC;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The mode picks the model:
|
|
5
5
|
* - standard → meshy-7.1 (server default "latest") — full-detail
|
|
6
6
|
* generation; polycount is remesh's job afterwards.
|
|
7
|
-
* - smart-topology → meshy-t2 (
|
|
7
|
+
* - smart-topology → meshy-t2.5 (CLI default), or meshy-t2 with
|
|
8
8
|
* --ai-model — component-aware low-poly with a native
|
|
9
9
|
* --target-polycount; the budget pick for game-ready geometry.
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgLH,eAAO,MAAM,gBAAgB,6BAA6B,CAAC"}
|
package/dist/cmd/image-to-3d.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The mode picks the model:
|
|
5
5
|
* - standard → meshy-7.1 (server default "latest") — full-detail
|
|
6
6
|
* generation; polycount is remesh's job afterwards.
|
|
7
|
-
* - smart-topology → meshy-t2 (
|
|
7
|
+
* - smart-topology → meshy-t2.5 (CLI default), or meshy-t2 with
|
|
8
8
|
* --ai-model — component-aware low-poly with a native
|
|
9
9
|
* --target-polycount; the budget pick for game-ready geometry.
|
|
10
10
|
*
|
|
@@ -16,7 +16,7 @@ import { Option } from "commander";
|
|
|
16
16
|
import { parseBool, parseCsv, parseInt10 } from "../internal/flags.js";
|
|
17
17
|
import { UsageError } from "../internal/errors.js";
|
|
18
18
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
19
|
-
import {
|
|
19
|
+
import { prepareSmartTopologyPayload, SMART_TOPOLOGY_MODELS } from "../internal/smart-topology.js";
|
|
20
20
|
const spec = {
|
|
21
21
|
name: "image-to-3d",
|
|
22
22
|
description: "Generate a 3D model from a single reference image (clean backgrounds and clear edges " +
|
|
@@ -30,8 +30,8 @@ const spec = {
|
|
|
30
30
|
return cmd
|
|
31
31
|
.option("--image-url <src>", "reference image; http(s) URL or local file path")
|
|
32
32
|
.option("--input-task-id <id>", "alternative to --image-url: a SUCCEEDED text-to-image or image-to-image task whose output becomes the source image")
|
|
33
|
-
.addOption(new Option("--model-type <kind>", "standard (default; meshy-7.1 full-detail generation) | smart-topology (component-aware low-poly: clean topology, separated parts; meshy-t2
|
|
34
|
-
.addOption(new Option("--ai-model <model>", "smart-topology only: meshy-t2 (
|
|
33
|
+
.addOption(new Option("--model-type <kind>", "standard (default; meshy-7.1 full-detail generation) | smart-topology (component-aware low-poly: clean topology, separated parts; meshy-t2.5 by default)").choices(["standard", "smart-topology"]))
|
|
34
|
+
.addOption(new Option("--ai-model <model>", "smart-topology only: meshy-t2.5 (default; polycount up to 30000) | meshy-t2").choices([...SMART_TOPOLOGY_MODELS]))
|
|
35
35
|
.option("--target-polycount <n>", "smart-topology only: target triangle count — meshy-t2 100-15000 (default: 10000), meshy-t2.5 100-30000 (default: the API's 15000). For standard outputs use remesh", parseInt10)
|
|
36
36
|
.addOption(new Option("--geometry-resolution <res>", "standard mode only: standard (default) | 2k | 4k — the Ultra geometry pass at 2048³ / 4096³ for finer surface detail (needs meshy-7.1 / latest, the default; billed on top of the mesh)").choices(["standard", "2k", "4k"]))
|
|
37
37
|
.option("--ultra-mode <bool>", "deprecated: use --geometry-resolution 2k (true is the same pass)", parseBool)
|
|
@@ -98,10 +98,9 @@ const spec = {
|
|
|
98
98
|
// texturing is its own step, and the API rejects texture knobs on
|
|
99
99
|
// untextured runs, so they ride only when texturing is on — then the
|
|
100
100
|
// game-ready defaults apply: full PBR map set, 4k base color. The
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
// the API's 15k (D-078). The Ultra pass stays off
|
|
101
|
+
// standard follows the server's meshy-7.1 default. Smart Topology's
|
|
102
|
+
// model and polycount defaults are applied after payload merging.
|
|
103
|
+
// The Ultra pass stays off
|
|
105
104
|
// unless asked for: it bills extra. GLB-only output — omitting target_formats
|
|
106
105
|
// makes the API produce every format.
|
|
107
106
|
const texturing = opts.shouldTexture === true;
|
|
@@ -109,12 +108,11 @@ const spec = {
|
|
|
109
108
|
should_texture: false,
|
|
110
109
|
enable_pbr: texturing ? true : undefined,
|
|
111
110
|
texture_resolution: texturing ? "4k" : undefined,
|
|
112
|
-
target_polycount: defaultPolycount(opts),
|
|
113
111
|
target_formats: ["glb"],
|
|
114
112
|
};
|
|
115
113
|
},
|
|
116
114
|
validatePayload(payload) {
|
|
117
|
-
|
|
115
|
+
prepareSmartTopologyPayload(payload);
|
|
118
116
|
// Smart topology has neither knob; v1 answers 400 for either (it does not ignore them).
|
|
119
117
|
if (payload.model_type === "smart-topology") {
|
|
120
118
|
for (const [flag, key] of [["--remove-lighting", "remove_lighting"], ["--image-enhancement", "image_enhancement"]]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-to-3d.js","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,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;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ const spec = {
|
|
|
18
18
|
configure(cmd) {
|
|
19
19
|
cmd
|
|
20
20
|
.option("--input-task-id <id>", "source SUCCEEDED task: image-to-3d, multi-image-to-3d, text-to-3d, remesh, retexture or analyze-printability — takes priority over --model-url")
|
|
21
|
-
.option("--model-url <src>", "3D model: an http(s) URL (.glb/.gltf/.obj/.fbx/.stl, max
|
|
21
|
+
.option("--model-url <src>", "3D model: an http(s) URL (.glb/.gltf/.obj/.fbx/.stl, max 400MB; the output keeps the input format) or a local .glb/.gltf file (max 100MB) — the API takes inline uploads as glTF only, so host .stl/.obj/.fbx at a URL")
|
|
22
22
|
.option("--alpha-thumbnail <bool>", "also render a transparent-background preview (alpha_thumbnail_url; default: false)", parseBool);
|
|
23
23
|
return printSizeOptions(cmd, "thicken");
|
|
24
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repair-printability.js","sourceRoot":"","sources":["../../src/cmd/repair-printability.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAElG,MAAM,IAAI,GAAwB;IAChC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,wFAAwF;QACxF,8FAA8F;QAC9F,8DAA8D;IAChE,MAAM,EAAE;QACN,WAAW,EAAE,mCAAmC;QAChD,SAAS,CAAC,GAAG;YACX,GAAG;iBACA,MAAM,CACL,sBAAsB,EACtB,gJAAgJ,CACjJ;iBACA,MAAM,CACL,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"repair-printability.js","sourceRoot":"","sources":["../../src/cmd/repair-printability.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAElG,MAAM,IAAI,GAAwB;IAChC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,wFAAwF;QACxF,8FAA8F;QAC9F,8DAA8D;IAChE,MAAM,EAAE;QACN,WAAW,EAAE,mCAAmC;QAChD,SAAS,CAAC,GAAG;YACX,GAAG;iBACA,MAAM,CACL,sBAAsB,EACtB,gJAAgJ,CACjJ;iBACA,MAAM,CACL,mBAAmB,EACnB,wNAAwN,CACzN;iBACA,MAAM,CAAC,0BAA0B,EAAE,oFAAoF,EAAE,SAAS,CAAC,CAAC;YACvI,OAAO,gBAAgB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;QACD,SAAS,CAAC,IAAI;YACZ,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtD,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;YACjE,CAAC;YACD,OAAO;gBACL,aAAa,EAAE,IAAI,CAAC,WAAW;gBAC/B,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,eAAe,EAAE,IAAI,CAAC,cAAc;gBACpC,GAAG,gBAAgB,CAAC,IAAI,CAAC;aAC1B,CAAC;QACJ,CAAC;QACD,eAAe,EAAE,iBAAiB;KACnC;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rigging.d.ts","sourceRoot":"","sources":["../../src/cmd/rigging.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"rigging.d.ts","sourceRoot":"","sources":["../../src/cmd/rigging.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiDH,eAAO,MAAM,cAAc,6BAA6B,CAAC"}
|
package/dist/cmd/rigging.js
CHANGED
|
@@ -16,7 +16,9 @@ const spec = {
|
|
|
16
16
|
return cmd
|
|
17
17
|
.option("--input-task-id <id>", "source Meshy task id (takes priority over --model-url)")
|
|
18
18
|
.option("--model-url <src>", "textured humanoid .glb as http(s) URL or local file path")
|
|
19
|
-
.option("--texture-image-url <src>", "
|
|
19
|
+
.option("--texture-image-url <src>", "deprecated; leave it out when the model has its own textures, which the rig keeps. " +
|
|
20
|
+
"Sending it makes this image the only texture and drops the PBR maps. " +
|
|
21
|
+
"Only for a --model-url .glb without textures: its UV-unwrapped base color (.png; URL or local file)")
|
|
20
22
|
.option("--height-meters <m>", "approximate character height in meters (default: 1.7) — drives bone proportions", parseNumber);
|
|
21
23
|
},
|
|
22
24
|
toPayload(opts) {
|
package/dist/cmd/rigging.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rigging.js","sourceRoot":"","sources":["../../src/cmd/rigging.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAE7F,MAAM,IAAI,GAAwB;IA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IAAI,CAAC,WAAW;gBAC/B,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,iBAAiB,EAAE,IAAI,CAAC,eAAe;gBACvC,aAAa,EAAE,IAAI,CAAC,YAAY;aACjC,CAAC;QACJ,CAAC;QACD,UAAU;YACR,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC;QAChC,CAAC;KACF;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/cmd/text-to-3d.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
9
|
* resize's job, deprecated parameters (symmetry_mode, lowpoly, ultra_mode)
|
|
10
10
|
* are gone, and the mode picks the model: standard runs the server default
|
|
11
|
-
* "latest" (Meshy 7.1), smart-topology runs meshy-t2, or meshy-t2
|
|
11
|
+
* "latest" (Meshy 7.1), smart-topology runs meshy-t2.5, or meshy-t2 with
|
|
12
12
|
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
|
13
13
|
*/
|
|
14
14
|
export declare const textTo3dCommand: import("commander").Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"text-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqIH,eAAO,MAAM,eAAe,6BAA6B,CAAC"}
|
package/dist/cmd/text-to-3d.js
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
9
|
* resize's job, deprecated parameters (symmetry_mode, lowpoly, ultra_mode)
|
|
10
10
|
* are gone, and the mode picks the model: standard runs the server default
|
|
11
|
-
* "latest" (Meshy 7.1), smart-topology runs meshy-t2, or meshy-t2
|
|
11
|
+
* "latest" (Meshy 7.1), smart-topology runs meshy-t2.5, or meshy-t2 with
|
|
12
12
|
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
|
13
13
|
*/
|
|
14
14
|
import { Option } from "commander";
|
|
15
15
|
import { parseBool, parseCsv, parseInt10 } from "../internal/flags.js";
|
|
16
16
|
import { UsageError } from "../internal/errors.js";
|
|
17
17
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
18
|
-
import {
|
|
18
|
+
import { prepareSmartTopologyPayload, SMART_TOPOLOGY_MODELS } from "../internal/smart-topology.js";
|
|
19
19
|
const spec = {
|
|
20
20
|
name: "text-to-3d",
|
|
21
21
|
description: "Generate 3D models from text prompts (two-stage: preview → refine). " +
|
|
@@ -31,8 +31,8 @@ const spec = {
|
|
|
31
31
|
"consumes the preview's latents, so uploaded models or image-to-3d/remesh outputs " +
|
|
32
32
|
"cannot be refined (use retexture for those)")
|
|
33
33
|
.addOption(new Option("--pose-mode <pose>", "preview only. a-pose | t-pose pre-pose characters for rigging; auto (default) lets the model decide").choices(["a-pose", "t-pose", "auto"]))
|
|
34
|
-
.addOption(new Option("--model-type <kind>", "preview only. standard (default; full-detail generation) | smart-topology (clean triangle topology, separated parts, native --target-polycount; meshy-t2
|
|
35
|
-
.addOption(new Option("--ai-model <model>", "preview, smart-topology only: meshy-t2 (
|
|
34
|
+
.addOption(new Option("--model-type <kind>", "preview only. standard (default; full-detail generation) | smart-topology (clean triangle topology, separated parts, native --target-polycount; meshy-t2.5 by default)").choices(["standard", "smart-topology"]))
|
|
35
|
+
.addOption(new Option("--ai-model <model>", "preview, smart-topology only: meshy-t2.5 (default; polycount up to 30000) | meshy-t2").choices([...SMART_TOPOLOGY_MODELS]))
|
|
36
36
|
.option("--target-polycount <n>", "preview, smart-topology only: target face count — meshy-t2 100-15000 (default: 10000), meshy-t2.5 100-30000 (default: the API's 15000)", parseInt10)
|
|
37
37
|
.addOption(new Option("--geometry-resolution <res>", "preview, standard only: standard (default) | 2k | 4k — the Ultra geometry pass at 2048³ / 4096³ (needs meshy-7.1 / latest, the default; billed on top)").choices(["standard", "2k", "4k"]))
|
|
38
38
|
.option("--enable-pbr <bool>", "refine only. Generate normal/metallic/roughness maps, plus an emission map on meshy-6 below 8k (default: true, so game-engine imports carry the full map set)", parseBool)
|
|
@@ -88,16 +88,15 @@ const spec = {
|
|
|
88
88
|
// removed on meshy-6/7) apply otherwise. `make` still asks for 4k: it
|
|
89
89
|
// made the preview itself, on latest.
|
|
90
90
|
// GLB-only output — omitting target_formats makes the API produce
|
|
91
|
-
// every format. Smart
|
|
92
|
-
//
|
|
91
|
+
// every format. Smart Topology's model and polycount defaults are
|
|
92
|
+
// applied after payload merging, as on image-to-3d.
|
|
93
93
|
const refine = opts.mode === "refine";
|
|
94
94
|
return {
|
|
95
95
|
enable_pbr: refine ? true : undefined,
|
|
96
|
-
target_polycount: defaultPolycount(opts),
|
|
97
96
|
target_formats: ["glb"],
|
|
98
97
|
};
|
|
99
98
|
},
|
|
100
|
-
validatePayload:
|
|
99
|
+
validatePayload: prepareSmartTopologyPayload,
|
|
101
100
|
},
|
|
102
101
|
endpointOf: (c) => c.textTo3d,
|
|
103
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-3d.js","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,
|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AAkE;YAClE,kEAAkE;YAClE,oDAAoD;YACpD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;YACtC,OAAO;gBACL,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBACrC,cAAc,EAAE,CAAC,KAAK,CAAC;aACxB,CAAC;QACJ,CAAC;QACD,eAAe,EAAE,2BAA2B;KAC7C;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
* Smart Topology models, shared by image-to-3d and text-to-3d preview so the
|
|
3
3
|
* two commands cannot drift apart.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* meshy-t2.
|
|
5
|
+
* The CLI pins meshy-t2.5 when Smart Topology has no explicit ai_model.
|
|
6
|
+
* meshy-t2.5 takes a polycount up to 30,000 (meshy-t2: 15,000).
|
|
7
7
|
* Both need model_type "smart-topology", and both output triangles only.
|
|
8
8
|
*/
|
|
9
9
|
export declare const SMART_TOPOLOGY_MODELS: readonly ["meshy-t2", "meshy-t2.5"];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
export declare function defaultPolycount(opts: Record<string, unknown>): number | undefined;
|
|
15
|
-
/** Checks the merged payload, so values sent through --data meet the same rules. */
|
|
16
|
-
export declare function checkSmartTopology(payload: Record<string, unknown>): void;
|
|
10
|
+
export declare const DEFAULT_SMART_TOPOLOGY_MODEL = "meshy-t2.5";
|
|
11
|
+
/** Applies conditional defaults and validates after --data and flags have merged. */
|
|
12
|
+
export declare function prepareSmartTopologyPayload(payload: Record<string, unknown>): void;
|
|
17
13
|
//# sourceMappingURL=smart-topology.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-topology.d.ts","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,qBAAqB,YAAI,UAAU,EAAE,YAAY,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"smart-topology.d.ts","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,qBAAqB,YAAI,UAAU,EAAE,YAAY,CAAU,CAAC;AACzE,eAAO,MAAM,4BAA4B,eAAe,CAAC;AAIzD,qFAAqF;AACrF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAyBlF"}
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
* Smart Topology models, shared by image-to-3d and text-to-3d preview so the
|
|
3
3
|
* two commands cannot drift apart.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* meshy-t2.
|
|
5
|
+
* The CLI pins meshy-t2.5 when Smart Topology has no explicit ai_model.
|
|
6
|
+
* meshy-t2.5 takes a polycount up to 30,000 (meshy-t2: 15,000).
|
|
7
7
|
* Both need model_type "smart-topology", and both output triangles only.
|
|
8
8
|
*/
|
|
9
9
|
import { UsageError } from "./errors.js";
|
|
10
10
|
export const SMART_TOPOLOGY_MODELS = ["meshy-t2", "meshy-t2.5"];
|
|
11
|
+
export const DEFAULT_SMART_TOPOLOGY_MODEL = "meshy-t2.5";
|
|
11
12
|
const MAX_POLYCOUNT = { "meshy-t2": 15_000, "meshy-t2.5": 30_000 };
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* is left to the API's own 15,000. Follows --ai-model only.
|
|
15
|
-
*/
|
|
16
|
-
export function defaultPolycount(opts) {
|
|
17
|
-
return opts.modelType === "smart-topology" && opts.aiModel !== "meshy-t2.5" ? 10_000 : undefined;
|
|
18
|
-
}
|
|
19
|
-
/** Checks the merged payload, so values sent through --data meet the same rules. */
|
|
20
|
-
export function checkSmartTopology(payload) {
|
|
21
|
-
const model = typeof payload.ai_model === "string" ? payload.ai_model : undefined;
|
|
13
|
+
/** Applies conditional defaults and validates after --data and flags have merged. */
|
|
14
|
+
export function prepareSmartTopologyPayload(payload) {
|
|
22
15
|
const smart = payload.model_type === "smart-topology";
|
|
16
|
+
if (smart) {
|
|
17
|
+
payload.ai_model ??= DEFAULT_SMART_TOPOLOGY_MODEL;
|
|
18
|
+
// Keep the explicit T2 option's rigging-friendly 10k default; T2.5 uses
|
|
19
|
+
// the API's own 15k. Resolve this after merging so --data works like flags.
|
|
20
|
+
if (payload.ai_model === "meshy-t2")
|
|
21
|
+
payload.target_polycount ??= 10_000;
|
|
22
|
+
}
|
|
23
|
+
const model = typeof payload.ai_model === "string" ? payload.ai_model : undefined;
|
|
23
24
|
if (model && model in MAX_POLYCOUNT && !smart) {
|
|
24
25
|
throw new UsageError(`${model} is a Smart Topology model: pass --model-type smart-topology`);
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-topology.js","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,UAAU,EAAE,YAAY,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"smart-topology.js","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,UAAU,EAAE,YAAY,CAAU,CAAC;AACzE,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CAAC;AAEzD,MAAM,aAAa,GAAqC,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,E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
{
|
|
2
2
|
"name": "@meshy-ai/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Official command-line interface for the Meshy AI API — text-to-3D, image-to-3D, text-to-motion, remesh, UV unwrap, rigging, animate, retexture, 2D images, printability, auto split, multi-color print, Creative Lab, balance and usage — plus selective downloads, project folders, face checks, OBJ print preparation and slicer launch.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -142,6 +142,8 @@ These are API rules, not preferences — ignoring them produces failed tasks:
|
|
|
142
142
|
not props, quadrupeds or untextured drafts. Too dense? `remesh` first. A
|
|
143
143
|
successful rigging task already bundles walking and running clips
|
|
144
144
|
(`result.basic_animations.*`), so check its result before calling `animate`.
|
|
145
|
+
Leave out `--texture-image-url`: the rig keeps the model's own textures, and
|
|
146
|
+
the flag replaces them with one image and drops the PBR maps.
|
|
145
147
|
- **`animate` takes a rigging task id**, not a model task id, plus exactly one
|
|
146
148
|
of: an integer `--action-id` from the catalog, `--action-ids` (up to 10, one
|
|
147
149
|
file with one clip each, billed per action) or a text-to-motion
|
|
@@ -166,8 +168,8 @@ These are API rules, not preferences — ignoring them produces failed tasks:
|
|
|
166
168
|
text-to-3d: preview only; multi-image: `2k` only; not with smart-topology);
|
|
167
169
|
`--ultra-mode` on image-to-3d is its deprecated spelling of `2k`.
|
|
168
170
|
`--model-type smart-topology` (text-to-3d and image-to-3d) has a native
|
|
169
|
-
`--target-polycount`: meshy-t2 100-
|
|
170
|
-
meshy-t2
|
|
171
|
+
`--target-polycount`: meshy-t2.5 is the CLI default, 100-30000 (default
|
|
172
|
+
15000); `--ai-model meshy-t2` selects T2, 100-15000 (default 10000). `retexture`'s
|
|
171
173
|
`--multiview-image-urls` needs Meshy 7 — it takes 1-4 views of **the same
|
|
172
174
|
object**, not style references.
|
|
173
175
|
- Printing: `analyze-`/`repair-printability` take `--printer-type
|