@deepblend/dsh-blender-bundle 0.8.0 → 0.8.1
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 +12 -1
- package/README.zh.md +12 -1
- package/examples/charge-study/ATTRIBUTION.txt +6 -0
- package/examples/charge-study/README.md +54 -0
- package/examples/charge-study/agent-prompt.zh.txt +21 -0
- package/examples/charge-study/industrial-stage.json +4320 -0
- package/examples/charge-study/replay-dsh-case.mjs +33 -0
- package/package.json +9 -8
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Submit the packaged SceneSpec to the installed plugin in an existing DSH web runtime.
|
|
3
|
+
// This helper imports no DeepBlend implementation and runs no Blender or scene scripts.
|
|
4
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
5
|
+
import { resolve, dirname } from 'node:path'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
|
|
8
|
+
const args = process.argv.slice(2)
|
|
9
|
+
if (args.includes('--help') || !args.length) {
|
|
10
|
+
console.log('Usage: node replay-dsh-case.mjs http://127.0.0.1:PORT [project-id]\nStart dsh web with deep-blend 0.5.0 installed first. This creates only the stage; continue with agent-prompt.zh.txt in DeepBlend Studio.')
|
|
11
|
+
process.exit(0)
|
|
12
|
+
}
|
|
13
|
+
const url = new URL(args[0])
|
|
14
|
+
if (!['http:', 'https:'].includes(url.protocol) || !['localhost', '127.0.0.1', '[::1]'].includes(url.hostname)) throw Error('Use the local DSH web address')
|
|
15
|
+
const projectId = args[1] ?? 'charge-night-shift'
|
|
16
|
+
if (!/^[a-zA-Z][a-zA-Z0-9._-]{0,63}$/.test(projectId)) throw Error('Invalid project id')
|
|
17
|
+
const directory = dirname(fileURLToPath(import.meta.url))
|
|
18
|
+
const sceneSpec = JSON.parse(readFileSync(resolve(directory, 'industrial-stage.json'), 'utf8'))
|
|
19
|
+
sceneSpec.project.id = projectId
|
|
20
|
+
const request = {
|
|
21
|
+
projectId, title: sceneSpec.project.title, goal: sceneSpec.project.goal,
|
|
22
|
+
sceneSpec, creationKey: `charge-stage-050-${projectId}`, renderPreview: false,
|
|
23
|
+
}
|
|
24
|
+
const response = await fetch(new URL('/deepblend/projects', url.origin), {
|
|
25
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
26
|
+
body: JSON.stringify(request), signal: AbortSignal.timeout(600000),
|
|
27
|
+
})
|
|
28
|
+
const result = await response.json()
|
|
29
|
+
const receipt = resolve(directory, `stage-receipt-${projectId}.json`)
|
|
30
|
+
writeFileSync(receipt, JSON.stringify({ method: 'POST', path: '/deepblend/projects', status: response.status, request, result }, null, 2) + '\n')
|
|
31
|
+
if (!response.ok || !result.ok) throw Error(`The DSH plugin refused the request. See ${receipt}`)
|
|
32
|
+
console.log(`DSH plugin created ${result.project.projectId} / ${result.project.revision?.revision ?? result.project.revision?.id ?? result.project.currentRevision}. Receipt: ${receipt}`)
|
|
33
|
+
console.log('Continue in the DeepBlend Studio session using agent-prompt.zh.txt; replace its project id and local asset path if needed.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepblend/dsh-blender-bundle",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Create Blender product scenes in DSH with editable recipes, model imports, previews and PNG/MP4 delivery; includes workbench and agent configuration.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"cordis.patch.yml",
|
|
33
33
|
"screenshots.json",
|
|
34
34
|
"README.zh.md",
|
|
35
|
-
"assets"
|
|
35
|
+
"assets",
|
|
36
|
+
"examples"
|
|
36
37
|
],
|
|
37
38
|
"dsh": {
|
|
38
39
|
"bundle": {
|
|
@@ -43,12 +44,12 @@
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@deepblend/dsh-blender-contracts": "0.8.
|
|
47
|
-
"@deepblend/dsh-blender-host": "0.8.
|
|
48
|
-
"@deepblend/dsh-blender-preset": "0.8.
|
|
49
|
-
"@deepblend/dsh-blender-provider-local": "0.8.
|
|
50
|
-
"@deepblend/dsh-blender-tool": "0.8.
|
|
51
|
-
"@deepblend/dsh-blender-ui": "0.8.
|
|
47
|
+
"@deepblend/dsh-blender-contracts": "0.8.1",
|
|
48
|
+
"@deepblend/dsh-blender-host": "0.8.1",
|
|
49
|
+
"@deepblend/dsh-blender-preset": "0.8.1",
|
|
50
|
+
"@deepblend/dsh-blender-provider-local": "0.8.1",
|
|
51
|
+
"@deepblend/dsh-blender-tool": "0.8.1",
|
|
52
|
+
"@deepblend/dsh-blender-ui": "0.8.1"
|
|
52
53
|
},
|
|
53
54
|
"type": "module",
|
|
54
55
|
"license": "MIT",
|