Brokkr/surfaces/blender/docs/install.md

73 lines
2.9 KiB
Markdown
Raw Normal View History

2026-06-13 19:55:59 +01:00
# Brokkr Blender Adapter
2026-06-12 11:57:33 +01:00
Install `surfaces/blender/brokkr_bridge` as a Blender add-on directory during
local development.
2026-06-13 19:55:59 +01:00
The add-on adds a Brokkr panel to the 3D View sidebar and exposes a Blender
target surface for host snapshots, admitted command intents, and command
receipts.
2026-06-12 11:57:33 +01:00
2026-06-14 13:12:09 +01:00
The adapter writes its mirror documents through CultLib's Python CultMesh node.
If `cultcache-py`, `cultnet-py` and `cultmesh-py` are not installed into
Blender's Python, point `CultLib Python Source` at the CultLib packages
directory; the add-on puts each package's `src` on `sys.path`:
2026-06-14 12:36:09 +01:00
```text
F:/Projects/CultLib/packages
2026-06-14 12:36:09 +01:00
```
2026-06-14 13:12:09 +01:00
The default node cache is:
2026-06-14 12:36:09 +01:00
```text
2026-06-14 13:12:09 +01:00
.brokkr/blender-editor.ccmp
2026-06-14 12:36:09 +01:00
```
2026-06-14 15:00:48 +01:00
The panel can also serve that node through CultMesh Python. Leave `Serve Port`
at `0` to bind a free local port, or set a fixed port when another runtime needs
a stable endpoint. The panel reports the active `cultnet://host:port` endpoint
after `Start Server`.
2026-06-14 12:36:09 +01:00
`Debug Export Root` may still emit readable JSON probe files under
`.brokkr/blender-editor-debug`, but those files are debug/import glue. CultMesh
2026-06-14 12:36:09 +01:00
owns the mirror state.
2026-06-13 19:55:59 +01:00
## Local Smoke
1. Install and enable `brokkr_bridge`.
2. Open `View3D > Sidebar > Brokkr`.
3. Click `Capture Snapshot`.
2026-06-14 13:12:09 +01:00
4. Inspect `.brokkr/blender-editor.ccmp`.
2026-06-13 19:55:59 +01:00
5. Drop a command intent JSON file into
2026-06-14 12:36:09 +01:00
`.brokkr/blender-editor-debug/blender/commands/{commandId}.json`.
2026-06-15 03:27:21 +01:00
6. Click `Drain Commands`, or enable `Auto Drain Commands` to poll command
intents once per second while the add-on is loaded.
2026-06-14 13:12:09 +01:00
7. Inspect `.brokkr/blender-editor.ccmp` or the optional debug export
2026-06-14 12:36:09 +01:00
at `.brokkr/blender-editor-debug/blender/receipts/{commandId}.json`.
2026-06-14 15:00:48 +01:00
8. Click `Start Server`.
9. Use the reported `cultnet://host:port` endpoint from a CultMesh/CultNet
client to read snapshots or write command intents.
10. In the `Object Sync` section, set the Unity object id/path and lane toggles,
select a Blender object, then click `Object Sync` to publish a
2026-06-15 03:20:28 +01:00
`brokkr.sync.object_binding.v0` plus per-lane `brokkr.sync.var.v0` records
for transform, parent, visibility, material, and custom property sync.
11. In the `Timeline / Cinemachine` section, set the Unity Timeline and
Cinemachine targets, then click `Timeline Sync` to publish a
`brokkr.sync.timeline_binding.v0` for Blender frame/action data and Unity
Timeline/Cinemachine lanes.
12. After running `brokkr-daemon sync-once` or `sync-loop`, click
`Refresh Sync Receipt` to show the latest daemon sync pass observed in the
2026-06-15 03:27:21 +01:00
Blender mirror. Keep `Auto Drain Commands` enabled while `sync-loop` is
running if Blender should continuously consume daemon command intents.
2026-06-15 02:37:03 +01:00
13. To publish an ad hoc sync variable, fill the `Ad Hoc Sync Var` fields in
the sidebar or add-on preferences and click `Publish Sync Var`.
2026-06-13 19:55:59 +01:00
Admitted command actions:
- `createObject`
- `deleteObject`
- `setObjectTransform`
- `setObjectVisibility`
2026-06-15 03:06:55 +01:00
- `setObjectParent`
2026-06-15 01:40:51 +01:00
- `setObjectCustomProperty`
2026-06-13 19:55:59 +01:00
- `selectObject`
- `assignMaterial`