@volter/editor-blender 0.1.0

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.
Files changed (58) hide show
  1. package/LICENSE +1409 -0
  2. package/README.md +17 -0
  3. package/contributions/blender-header-menus.tsx +483 -0
  4. package/contributions/blender-icon-trace.mjs +403 -0
  5. package/contributions/blender-icons.source.mjs +2925 -0
  6. package/contributions/blender-node-editor.document.tsx +1402 -0
  7. package/contributions/blender-node-geometry.ts +1138 -0
  8. package/contributions/blender-node-panels.source.mjs +485 -0
  9. package/contributions/blender-outliner-authoring.ts +1729 -0
  10. package/contributions/blender-outliner-model.ts +389 -0
  11. package/contributions/blender-palette.source.mjs +319 -0
  12. package/contributions/blender-properties-model.ts +351 -0
  13. package/contributions/blender-properties-tab.tsx +100 -0
  14. package/contributions/blender-properties-view.tsx +1191 -0
  15. package/contributions/blender-runtime-skin.ts +619 -0
  16. package/contributions/blender-runtime.document.tsx +232 -0
  17. package/contributions/blender-timeline-geometry.ts +323 -0
  18. package/contributions/blender-timeline.document.tsx +1056 -0
  19. package/contributions/blender-uv-editor.document.tsx +483 -0
  20. package/contributions/blender-uv-geometry.ts +305 -0
  21. package/contributions/blender-version.status.tsx +93 -0
  22. package/contributions/blender.command.ts +102 -0
  23. package/contributions/blender.icons.json +1247 -0
  24. package/contributions/blender.icons.traced.json +1561 -0
  25. package/contributions/blender.keymap.ts +39 -0
  26. package/contributions/blender.node-panels.json +2436 -0
  27. package/contributions/blender.palette.json +93 -0
  28. package/contributions/blender.status.tsx +263 -0
  29. package/contributions/blender.style.ts +271 -0
  30. package/contributions/model.layout.ts +53 -0
  31. package/contributions/models.finder.ts +59 -0
  32. package/contributions/properties-bone-constraints.inspector.tsx +50 -0
  33. package/contributions/properties-bone.inspector.tsx +184 -0
  34. package/contributions/properties-collection.inspector.tsx +96 -0
  35. package/contributions/properties-constraints.inspector.tsx +69 -0
  36. package/contributions/properties-data.inspector.tsx +229 -0
  37. package/contributions/properties-material.inspector.tsx +121 -0
  38. package/contributions/properties-modifiers.inspector.tsx +74 -0
  39. package/contributions/properties-object.inspector.tsx +215 -0
  40. package/contributions/properties-output.inspector.tsx +210 -0
  41. package/contributions/properties-particles.inspector.tsx +494 -0
  42. package/contributions/properties-physics.inspector.tsx +614 -0
  43. package/contributions/properties-render.inspector.tsx +446 -0
  44. package/contributions/properties-scene.inspector.tsx +174 -0
  45. package/contributions/properties-texture.inspector.tsx +300 -0
  46. package/contributions/properties-view-layer.inspector.tsx +145 -0
  47. package/contributions/properties-world.inspector.tsx +130 -0
  48. package/contributions/sculpt.layout.ts +25 -0
  49. package/contributions/shading.layout.ts +99 -0
  50. package/contributions/texture.layout.ts +16 -0
  51. package/contributions/uv-editing.layout.ts +93 -0
  52. package/host/blender-runtime-host.ts +1256 -0
  53. package/package.json +77 -0
  54. package/src/layouts.tsx +48 -0
  55. package/src/looks.ts +14 -0
  56. package/src/node-view-state.ts +125 -0
  57. package/src/timeline-view-state.ts +154 -0
  58. package/src/uv-view-state.ts +125 -0
@@ -0,0 +1,99 @@
1
+ /**
2
+ * The SHADING workspace — Blender's own: the 3D viewport over the Shader
3
+ * Editor, with the Outliner above the Properties editor on the right.
4
+ *
5
+ * THE PROPORTIONS ARE BLENDER'S, MEASURED THROUGH bpy on the engine in the
6
+ * tab (2026-09-19), not eyeballed from a screenshot:
7
+ * `bpy.data.workspaces['Shading'].screens[0].areas` answers, in a 1920-wide
8
+ * window, PROPERTIES `x1579 y23 w339 h839`, OUTLINER `x1579 y865 w339 h189`,
9
+ * VIEW_3D `x294 y540 w1282 h514`, NODE_EDITOR `x294 y23 w1282 h514`,
10
+ * FILE_BROWSER `x2 y540 w289 h514` and IMAGE_EDITOR `x2 y23 w289 h514`.
11
+ *
12
+ * AND THE ARRANGEMENT IS A LIVE CAPTURE, not a hand-derived one
13
+ * (`workspace-preset-layouts.ts`: "Shipped defaults are authored by arranging
14
+ * live and snapshotting `toJSON`" — never hand-written JSON). Hand-deriving it
15
+ * from Model's cost exactly what that rule exists to prevent: sizes authored
16
+ * against Model's 928-px grid were applied to an 824-px container, the dock
17
+ * measured `grid 1920×802 in a 1920×824 container` and warned that it was
18
+ * "forcing one relayout" (measured live, 2026-09-19 — and measured again on
19
+ * three Model/Sculpt switches with no Shading in them, which raised nothing,
20
+ * so the warning was this arrangement's own). What ships is the settled grid,
21
+ * with two sizes set back to the measurement: the vertical split to an exact
22
+ * 50/50 of the grid's own height, and the right column to Model's 306/173/755,
23
+ * which is the same column and already carries Blender's 0.177/0.184.
24
+ *
25
+ * Two readings out of that, and both are in `shading-arrangement.json`:
26
+ * the right column is 339/1920 = 0.177 of the window with the Outliner taking
27
+ * 189/1028 = 0.184 of it — the SAME column the Modeling workspace has, which
28
+ * is why this arrangement is Model's with one change; and the centre column is
29
+ * split EXACTLY 50/50, 514 over 514 of the 1031 px between the top bar and the
30
+ * status bar. On the captured 928-px grid that is 464/464, which is the size
31
+ * `vgai:bottom-center` was already carrying at `"visible": false`.
32
+ *
33
+ * WHICH AREA THE SHADER EDITOR IS, AND WHAT IT IS MADE OF. Blender's node
34
+ * editor is the area BELOW the viewport — and an AREA IS AN EDITOR GROUP
35
+ * (orchestrator ruling 2026-09-19), not the bottom utility drawer. So Shading
36
+ * declares it as an `areas` entry holding the `blender-node-editor.document`
37
+ * contribution, the dock puts it in `vgai:area:shader` below the centre at
38
+ * Blender's own 50/50, and the frame's layout host puts the same document in
39
+ * a second VS Code editor group. The drawer is `hidden` here, as it is in
40
+ * Model: Blender's Shading screen has no utility strip.
41
+ *
42
+ * WHAT IS NOT REPRODUCED, named rather than silently dropped: Blender's
43
+ * Shading workspace also carries a File Browser over an Image Editor in a
44
+ * 289-px LEFT column (15.0 % of the window). Neither editor exists here yet —
45
+ * the image/texture view is I5's Texture Paint unit and the asset browser is
46
+ * a different surface — and §Editor chrome's rule is that a reserved panel
47
+ * ships WITH its capability, never as empty chrome. The column arrives with
48
+ * the editors that fill it.
49
+ *
50
+ * THE STRIP GROWS ONLY AS A VIEW LANDS (§Editor chrome; WORK.md I5). Shading
51
+ * appears in the workspace strip because this contribution exists, and this
52
+ * contribution exists because the node view does.
53
+ */
54
+
55
+ import type { WorkspaceLayoutContribution } from '@volter/editor-sdk/looks';
56
+
57
+ export const point = 'workspace.layout';
58
+ export const layout: WorkspaceLayoutContribution = {
59
+ id: 'shading',
60
+ title: 'Shading',
61
+ description: "Blender-shaped shading: the viewport over the material's node tree, read-only.",
62
+ requires: { documentKind: 'model' },
63
+ // `tabs` unstated, for the reason `model.layout.ts` records: the workspace
64
+ // layer wins over the style bundle, so restating the host default would
65
+ // silently shadow `blender.style.ts`'s `tabs: 'hidden'` and paint a tab row
66
+ // Blender does not have.
67
+ regions: {
68
+ header: 'shown',
69
+ shelf: 'shown',
70
+ inspector: 'properties',
71
+ // THE SAME AS MODEL: no drawer. Blender's Shading screen has no fourth
72
+ // area beyond the viewport, the node editor and the right column, and the
73
+ // node editor is not a drawer utility — it is an AREA, which is an EDITOR
74
+ // GROUP (the ruling below). Leaving the drawer `shown` would paint an
75
+ // empty utility strip Blender's own screen does not have.
76
+ drawer: 'hidden',
77
+ },
78
+ // THE NODE EDITOR IS AN EDITOR GROUP BELOW THE MODEL DOCUMENT.
79
+ //
80
+ // RULED 2026-09-19 (orchestrator): "A Blender editor AREA is an editor
81
+ // group; the drawer holds utilities." Blender's Shading screen splits the
82
+ // centre TOP AND BOTTOM — VIEW_3D `x294 y540 w1282 h514` over NODE_EDITOR
83
+ // `x294 y23 w1282 h514`, measured through bpy on the engine — and both the
84
+ // dock and the Code-OSS frame have exactly that shape in editor groups. So
85
+ // the Shader Editor is a `workspace.document` this workspace opens into
86
+ // `vgai:area:shader`, not a `workspace.utility` in the drawer.
87
+ //
88
+ // AND THAT IS WHAT RETIRED THE DRAWER RACE BY CONSTRUCTION. Switching to UV
89
+ // Editing kept opening the Shader Editor — and the cause was NOT the dock
90
+ // ordering the previous landing named: `uv-editing-arrangement.json`'s
91
+ // mechanical substitution had missed two of the seven occurrences (the
92
+ // panel record's `params.utilityId` and its `title`), so the leaf carrying
93
+ // the UV panel's id rendered the NODE editor and called itself "Shader
94
+ // Editor". A view that is not in the drawer cannot have that defect at all.
95
+ //
96
+ // THE RATIO IS BLENDER'S OWN: 514 of the 1028 px the centre column spans,
97
+ // an exact 0.5 to within the 1-px splitter.
98
+ areas: [{ id: 'shader', document: 'blender-node-editor.document', place: 'below', ratio: 0.5 }],
99
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The TEXTURE workspace — Substance-Painter-shaped texturing over a `model`
3
+ * document. Borrows Model's arrangement until the texture program ships its
4
+ * layer stack (see `sculpt.layout.ts` for why).
5
+ */
6
+
7
+ import type { WorkspaceLayoutContribution } from '@volter/editor-sdk/looks';
8
+
9
+ export const point = 'workspace.layout';
10
+ export const layout: WorkspaceLayoutContribution = {
11
+ id: 'texture',
12
+ title: 'Texture',
13
+ description:
14
+ "Substance-Painter-shaped texturing. Uses Model's arrangement until the texture program ships its layer stack.",
15
+ requires: { documentKind: 'model' },
16
+ };
@@ -0,0 +1,93 @@
1
+ /**
2
+ * The UV EDITING workspace — Blender's own: the UV editor BESIDE the 3D
3
+ * viewport, with the Outliner over the Properties editor on the right.
4
+ *
5
+ * THE PROPORTIONS ARE BLENDER'S, MEASURED THROUGH bpy on the engine in the tab
6
+ * (2026-09-19), not eyeballed from a screenshot:
7
+ * `bpy.data.workspaces['UV Editing'].screens[0].areas` answers, in a 1920-wide
8
+ * window, PROPERTIES `x1579 y23 w339 h839`, OUTLINER `x1579 y865 w339 h189`,
9
+ * IMAGE_EDITOR `x2 y23 w786 h1031` with `SpaceImage.mode == 'UV'`, and VIEW_3D
10
+ * `x791 y23 w785 h1031`.
11
+ *
12
+ * Three readings out of that:
13
+ * - the right column is the SAME column Modeling and Shading have — 339/1920
14
+ * = 0.177 of the window, the Outliner taking 189/1028 = 0.184 of it — which
15
+ * is why this arrangement is Model's with one change;
16
+ * - the centre is split SIDE BY SIDE, not top-and-bottom: 786 and 785 of the
17
+ * 1571 px left of the right column, an exact 50/50 to within the 1-px
18
+ * splitter. This is the FIRST I5 workspace whose editor is not Blender's
19
+ * bottom area — Shading's node editor is (`workspace-regions.ts` says so
20
+ * where it explains why Model hides the bottom strip), and the UV editor is
21
+ * a left half of the centre;
22
+ * - the UV editor opens in UV mode, which is what makes its title "UV Editor"
23
+ * rather than "Image Editor".
24
+ *
25
+ * WHICH REGION THE UV EDITOR IS — and the deviation this file used to record
26
+ * is GONE, because the ruling removed its cause. It said: this host has ONE
27
+ * utility region, the bottom area, so a utility could not claim a leaf beside
28
+ * the centre and the UV editor took the bottom at the height Blender gives
29
+ * its width. **RULED 2026-09-19 (orchestrator): a Blender editor AREA is an
30
+ * editor group; the drawer holds utilities.** The UV editor is not a utility
31
+ * at all now — it is a `workspace.document` this workspace opens into
32
+ * `vgai:area:uv`, LEFT of the model document at Blender's own 786/1571, and
33
+ * under the frame the layout host puts the same document in a second VS Code
34
+ * editor group. Nothing is deviating and nothing is owed to U10 here.
35
+ *
36
+ * WHAT IS NOT REPRODUCED, also named: Blender's UV editor shows the IMAGE
37
+ * behind the tile. Measured on both probe files — `arena-weapons.blend` has
38
+ * four materials, all `use_nodes`, and NOT ONE image texture node; the whole
39
+ * file has zero images, as does `arena-vanguard.blend` — so there is nothing
40
+ * for a backdrop to show and the view says so in its own warning rather than
41
+ * implying an empty tile is a drawn one.
42
+ *
43
+ * THE STRIP GROWS ONLY AS A VIEW LANDS (§Editor chrome; WORK.md I5). UV
44
+ * Editing appears in the workspace strip because this contribution exists, and
45
+ * this contribution exists because the UV view does.
46
+ */
47
+
48
+ import type { WorkspaceLayoutContribution } from '@volter/editor-sdk/looks';
49
+
50
+ export const point = 'workspace.layout';
51
+ export const layout: WorkspaceLayoutContribution = {
52
+ id: 'uv-editing',
53
+ title: 'UV Editing',
54
+ description: "Blender-shaped UV editing: the viewport beside the mesh's UV layout, read-only.",
55
+ requires: { documentKind: 'model' },
56
+ // `tabs` unstated, for the reason `model.layout.ts` records: the workspace
57
+ // layer wins over the style bundle, so restating the host default would
58
+ // silently shadow `blender.style.ts`'s `tabs: 'hidden'` and paint a tab row
59
+ // Blender does not have.
60
+ regions: {
61
+ header: 'shown',
62
+ shelf: 'shown',
63
+ inspector: 'properties',
64
+ // No drawer: Blender's UV Editing screen is four areas and none of them
65
+ // is a utility strip. The UV editor is an AREA — an editor GROUP — below.
66
+ drawer: 'hidden',
67
+ },
68
+ // THE UV EDITOR IS AN EDITOR GROUP TO THE LEFT OF THE MODEL DOCUMENT.
69
+ //
70
+ // RULED 2026-09-19 (orchestrator): "A Blender editor AREA is an editor
71
+ // group; the drawer holds utilities." Blender's UV Editing screen splits the
72
+ // centre SIDE BY SIDE, with the image editor on the LEFT: IMAGE_EDITOR
73
+ // `x2 y23 w786 h1031` (mode `UV`) and VIEW_3D `x791 y23 w785 h1031`,
74
+ // measured through bpy on the engine in a 1920-wide window.
75
+ //
76
+ // THE RATIO IS 786 of the 1571 px left of the 339-px right column — 0.5003,
77
+ // an exact half to within the 1-px splitter. It is stated to four places
78
+ // because it is a measurement, not a preference; the dock uses it once, to
79
+ // size the group the first time this workspace stands up, and a capture of
80
+ // the settled grid wins afterwards.
81
+ areas: [{ id: 'uv', document: 'blender-uv-editor.document', place: 'left', ratio: 0.5003 }],
82
+ // THE ARRANGEMENT IS A LIVE CAPTURE, re-taken 2026-09-19 after the areas
83
+ // ruling. The one it replaced was Shading's capture with the node view's
84
+ // utility id substituted by hand — and that substitution MISSED TWO of the
85
+ // seven occurrences: the panel record's `params.utilityId` and its `title`
86
+ // both still said `blender-node-editor.utility` / "Shader Editor", so the
87
+ // leaf keyed by the UV panel's id rendered the NODE editor. That is the
88
+ // whole of the "switching to UV Editing opens the Shader Editor" defect the
89
+ // previous landing recorded as a dock ordering race; it was a bad derived
90
+ // blob, which is exactly what `workspace-preset-layouts.ts` forbids
91
+ // ("shipped defaults are authored by arranging live and snapshotting
92
+ // `toJSON` — never hand-written JSON"). This one is captured.
93
+ };