@volter/editor-blender 0.1.1 → 0.1.3
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),
|
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
import { fitClipPlanes } from '@volter/editor-threejs/viewport/clip-planes';
|
|
61
61
|
import { contentWorldBounds } from '@volter/editor-threejs/viewport/content-bounds';
|
|
62
62
|
import * as THREE from 'three';
|
|
63
|
+
import { blenderEngineSelection, refreshBlenderOutliner } from '../contributions/blender-outliner-model';
|
|
63
64
|
import {
|
|
64
65
|
type NodeViewState,
|
|
65
66
|
nodeViewState,
|
|
@@ -670,6 +671,10 @@ function terminateBlenderRuntime(): void {
|
|
|
670
671
|
function watchSessionEnd(): void {
|
|
671
672
|
if (watchingSessionEnd) return;
|
|
672
673
|
watchingSessionEnd = true;
|
|
674
|
+
editorHost().session.onBeforeClose(async () => {
|
|
675
|
+
await runtime?.stop();
|
|
676
|
+
terminateBlenderRuntime();
|
|
677
|
+
});
|
|
673
678
|
editorHost().session.onEnded(terminateBlenderRuntime);
|
|
674
679
|
}
|
|
675
680
|
let lastCapture: CaptureRequest | null = null;
|
|
@@ -716,6 +721,10 @@ export function blenderRuntime(): BlenderRuntime {
|
|
|
716
721
|
if (runtime !== owner) throw new Error('This Blender history belongs to a closed worker');
|
|
717
722
|
const moved = await owner.historyStep(entry.id, direction);
|
|
718
723
|
noteBlenderRnaChanged();
|
|
724
|
+
// The restored frame arrives before the Outliner's scheduled read.
|
|
725
|
+
// A following structural edit resolves its targets through that index:
|
|
726
|
+
// redo-duplicate -> delete must not see the tree from before redo.
|
|
727
|
+
await refreshBlenderOutliner(blenderEngineSelection().selected);
|
|
719
728
|
return moved;
|
|
720
729
|
};
|
|
721
730
|
editorHost().history.record({
|
|
@@ -1042,6 +1051,8 @@ export async function handleBlenderCommand(cmd: {
|
|
|
1042
1051
|
try {
|
|
1043
1052
|
const project = cmd.type === 'blender-start' ? string(cmd, 'project') : null;
|
|
1044
1053
|
if (cmd.type === 'blender-stop' || (cmd.type === 'blender-start' && cmd['fresh'] === true)) {
|
|
1054
|
+
// Do not invalidate history or discard the worker if persistence fails.
|
|
1055
|
+
await runtime?.stop();
|
|
1045
1056
|
terminateBlenderRuntime();
|
|
1046
1057
|
if (cmd.type === 'blender-stop') return { ok: true, data: { stopped: true } };
|
|
1047
1058
|
}
|
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.3",
|
|
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.3",
|
|
65
|
+
"@volter/editor-threejs": "0.5.60",
|
|
66
66
|
"zod": "^4.3.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|