@volter/editor-blender 0.1.1 → 0.1.2
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.
|
@@ -52,7 +52,8 @@ const verb = (derivedRefresh: CommandDerivedRefresh, timeoutMs?: number): Comman
|
|
|
52
52
|
|
|
53
53
|
export const commands: CommandContribution['commands'] = {
|
|
54
54
|
'blender-start': verb('none', 120_000),
|
|
55
|
-
|
|
55
|
+
// Stop drains accepted modeling work and persists it before teardown.
|
|
56
|
+
'blender-stop': verb('none', 30 * 60_000),
|
|
56
57
|
'blender-execute': verb('always', 30 * 60_000),
|
|
57
58
|
'blender-scene-info': verb('none', 60_000),
|
|
58
59
|
'blender-object-info': verb('none', 60_000),
|
|
@@ -670,6 +670,10 @@ function terminateBlenderRuntime(): void {
|
|
|
670
670
|
function watchSessionEnd(): void {
|
|
671
671
|
if (watchingSessionEnd) return;
|
|
672
672
|
watchingSessionEnd = true;
|
|
673
|
+
editorHost().session.onBeforeClose(async () => {
|
|
674
|
+
await runtime?.stop();
|
|
675
|
+
terminateBlenderRuntime();
|
|
676
|
+
});
|
|
673
677
|
editorHost().session.onEnded(terminateBlenderRuntime);
|
|
674
678
|
}
|
|
675
679
|
let lastCapture: CaptureRequest | null = null;
|
|
@@ -1042,6 +1046,8 @@ export async function handleBlenderCommand(cmd: {
|
|
|
1042
1046
|
try {
|
|
1043
1047
|
const project = cmd.type === 'blender-start' ? string(cmd, 'project') : null;
|
|
1044
1048
|
if (cmd.type === 'blender-stop' || (cmd.type === 'blender-start' && cmd['fresh'] === true)) {
|
|
1049
|
+
// Do not invalidate history or discard the worker if persistence fails.
|
|
1050
|
+
await runtime?.stop();
|
|
1045
1051
|
terminateBlenderRuntime();
|
|
1046
1052
|
if (cmd.type === 'blender-stop') return { ok: true, data: { stopped: true } };
|
|
1047
1053
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@volter/editor-blender",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "AGPL-3.0-only AND GPL-3.0-or-later",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.2",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@volter/blender-engine": "0.1.
|
|
65
|
-
"@volter/editor-threejs": "0.5.
|
|
64
|
+
"@volter/blender-engine": "0.1.2",
|
|
65
|
+
"@volter/editor-threejs": "0.5.59",
|
|
66
66
|
"zod": "^4.3.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|