@volter/editor-blender 0.1.70 → 0.1.72

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.
@@ -51,6 +51,8 @@ const verb = (derivedRefresh: CommandDerivedRefresh, timeoutMs?: number): Comman
51
51
  });
52
52
 
53
53
  export const commands: CommandContribution['commands'] = {
54
+ // Presentation-only comparison, no engine mutation or derived frame refresh.
55
+ 'blender-draw-batching': verb('none'),
54
56
  'blender-start': verb('none', 120_000),
55
57
  // Stop drains accepted modeling work and persists it before teardown.
56
58
  'blender-stop': verb('none', 30 * 60_000),
@@ -732,6 +732,7 @@ interface RuntimeView {
732
732
  applyFrame(frame: unknown): unknown;
733
733
  snapshot(): ReturnType<BlenderRuntimeView['snapshot']>;
734
734
  drawStatistics(): ReturnType<BlenderRuntimeView['drawStatistics']>;
735
+ setDrawBatching(enabled: boolean): void;
735
736
  /** Own a detached revision for render lighting, never the interactive view. */
736
737
  captureSnapshot(): ReturnType<BlenderRuntimeView['captureSnapshot']>;
737
738
  /** Keep the description of the frame just applied, and the two poses of every
@@ -1147,6 +1148,13 @@ export async function handleBlenderCommand(cmd: {
1147
1148
  [key: string]: unknown;
1148
1149
  }): Promise<EditorCommandResult> {
1149
1150
  const host = editorHost();
1151
+ if (cmd.type === 'blender-draw-batching') {
1152
+ if (typeof cmd['enabled'] !== 'boolean') return {ok: false, error: 'blender-draw-batching requires boolean enabled'};
1153
+ if (!runtime?.project || !host.session.open()) return {ok: false, error: 'Open a Blender document before changing draw batching'};
1154
+ const view = await runtimeView();
1155
+ view.setDrawBatching(cmd['enabled']);
1156
+ return {ok: true, data: {instancing: view.drawStatistics()}};
1157
+ }
1150
1158
  // A read of this tab, answered ABOVE `blenderRuntime()` because that call
1151
1159
  // spawns the worker: this is the one Blender command that must not create
1152
1160
  // the session it is asked about. A caller uses it to find out whether the
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.70",
5
+ "version": "0.1.72",
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.68",
74
- "@volter/editor-threejs": "0.5.130",
73
+ "@volter/blender-engine": "0.1.70",
74
+ "@volter/editor-threejs": "0.5.132",
75
75
  "zod": "^4.3.6"
76
76
  },
77
77
  "peerDependencies": {
78
- "@volter/editor-live": "0.5.130",
79
- "@volter/editor-project": "0.5.130",
80
- "@volter/editor-sdk": "0.5.130",
78
+ "@volter/editor-live": "0.5.132",
79
+ "@volter/editor-project": "0.5.132",
80
+ "@volter/editor-sdk": "0.5.132",
81
81
  "react": "^19.0.0",
82
82
  "react-dom": "^19.0.0",
83
83
  "three": "^0.180.0",