@volter/editor-blender 0.1.56 → 0.1.58
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/host/blender-runtime-host.ts +16 -1
- package/package.json +6 -6
|
@@ -723,6 +723,7 @@ function driveNodeView(cmd: { type: string; [key: string]: unknown }): NodeViewS
|
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
interface RuntimeView {
|
|
726
|
+
stageFrame(part: { session: string; revision: number; abort?: boolean; mesh?: string; image?: string; piece?: unknown }): void;
|
|
726
727
|
applyFrame(frame: unknown): unknown;
|
|
727
728
|
snapshot(): ReturnType<BlenderRuntimeView['snapshot']>;
|
|
728
729
|
/** Own a detached revision for render lighting, never the interactive view. */
|
|
@@ -797,6 +798,7 @@ const isRuntimeView = (value: unknown): value is RuntimeView =>
|
|
|
797
798
|
typeof value === 'object' &&
|
|
798
799
|
value !== null &&
|
|
799
800
|
typeof (value as RuntimeView).applyFrame === 'function' &&
|
|
801
|
+
typeof (value as RuntimeView).stageFrame === 'function' &&
|
|
800
802
|
typeof (value as RuntimeView).snapshot === 'function' &&
|
|
801
803
|
typeof (value as RuntimeView).captureSnapshot === 'function' &&
|
|
802
804
|
typeof (value as RuntimeView).recordPresentation === 'function' &&
|
|
@@ -821,7 +823,7 @@ async function runtimeView(): Promise<RuntimeView> {
|
|
|
821
823
|
}
|
|
822
824
|
throw new Error(
|
|
823
825
|
`The Blender Model document is not open, or the open one is not a Model this engine can present ` +
|
|
824
|
-
`to (it must answer applyFrame, captureSnapshot, recordPresentation and recordPhotograph): nothing ` +
|
|
826
|
+
`to (it must answer stageFrame, applyFrame, captureSnapshot, recordPresentation and recordPhotograph): nothing ` +
|
|
825
827
|
`published a presentable view as ${id} within 15 s (bound model: ${boundModel?.documentId ?? 'none'}). ` +
|
|
826
828
|
'Open the Model document first (`volter blender-mcp` opens it before its first call).',
|
|
827
829
|
);
|
|
@@ -835,6 +837,7 @@ export function blenderRuntime(): BlenderRuntime {
|
|
|
835
837
|
const lifetime = new AbortController();
|
|
836
838
|
captureLifetime = lifetime;
|
|
837
839
|
let photographing = false;
|
|
840
|
+
let streamedView: RuntimeView | null = null;
|
|
838
841
|
runtime = new BlenderRuntime({
|
|
839
842
|
work: beginBlenderWork,
|
|
840
843
|
history: (entries) => {
|
|
@@ -864,6 +867,18 @@ export function blenderRuntime(): BlenderRuntime {
|
|
|
864
867
|
});
|
|
865
868
|
}
|
|
866
869
|
},
|
|
870
|
+
stage: async part => {
|
|
871
|
+
if (part.abort) { streamedView?.stageFrame(part); streamedView = null; return; }
|
|
872
|
+
const conflict = modelDocumentConflict();
|
|
873
|
+
if (conflict) throw new Error(conflict);
|
|
874
|
+
if (boundModel === null) return;
|
|
875
|
+
const documentId = presentationDocumentId();
|
|
876
|
+
const view = await runtimeView();
|
|
877
|
+
lifetime.signal.throwIfAborted();
|
|
878
|
+
if (presentationDocumentId() !== documentId) throw new Error('Blender document changed during frame transfer');
|
|
879
|
+
streamedView = view;
|
|
880
|
+
view.stageFrame(part);
|
|
881
|
+
},
|
|
867
882
|
present: async (frame, description, capture) => {
|
|
868
883
|
const conflict = modelDocumentConflict();
|
|
869
884
|
if (conflict) throw new Error(conflict);
|
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.58",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
73
|
-
"@volter/blender-engine": "0.1.
|
|
74
|
-
"@volter/editor-threejs": "0.5.
|
|
73
|
+
"@volter/blender-engine": "0.1.56",
|
|
74
|
+
"@volter/editor-threejs": "0.5.118",
|
|
75
75
|
"zod": "^4.3.6"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@volter/editor-live": "0.5.
|
|
79
|
-
"@volter/editor-project": "0.5.
|
|
80
|
-
"@volter/editor-sdk": "0.5.
|
|
78
|
+
"@volter/editor-live": "0.5.118",
|
|
79
|
+
"@volter/editor-project": "0.5.118",
|
|
80
|
+
"@volter/editor-sdk": "0.5.118",
|
|
81
81
|
"react": "^19.0.0",
|
|
82
82
|
"react-dom": "^19.0.0",
|
|
83
83
|
"three": "^0.180.0",
|