Introduction¶
When browsing workspace files in DeepSeek Harness (DSH), binary assets like .blend often display only a “unable to preview” placeholder state. If you need to verify model scale, triangle counts, or material base colors locally, you usually have to launch Blender separately, interrupting the flow of reviewing files within the Harness. This article introduces the community plugin dsh-blend-preview: it converts the scene into an interactive 3D viewport within the right sidebar document preview, accompanied by scene statistics commonly used in CAD and 3D printing.
What is this¶
dsh-blend-preview (GitHub: 439436269-ctrl/dsh-blend-preview, the npm package name matches the plugin id) is released by the maintainer 439436269-ctrl and is classified as a client-side plugin. It registers a document preview renderer for .blend files: clicking a .blend file in the workspace file list no longer shows the built-in empty preview in the right sidebar. Instead, it uses a custom WebGL viewer—with no external CDN dependency and no reliance on three.js—to render the exported GLB and provides a scene information panel.
The conversion is performed locally: the Host side calls blender --background once for each file version to export the GLB and scene JSON. The results are cached in ~/.dsh/cache/blend-preview, allowing millisecond-level cache hits for subsequent opens.
Core Features¶
Document Preview and Interactive Viewport¶
- Registers a preview renderer for
.blend(and other extensions configured), opening instantly in the right sidebar upon clicking. - The viewer supports orbit rotation, panning, wheel zoom, double-click reset, wireframe mode, auto-rotation, soft contact shadows, and axis indicators; it does not load CDN resources and introduces no additional rendering library dependencies at runtime.
Headless Export and Caching¶
- Executes a background Blender instance once for each file version to produce GLB and scene JSON (metadata including objects, triangle counts, materials, millimeter-level real dimensions, units, cameras, lights, and collections).
- The cache directory defaults to
~/.dsh/cache/blend-preview; the cache key is based on the real path, size, mtime, recipe, and modifier settings. According to official documentation, cold conversion for small scenes takes about 2–10 seconds (dominated by Blender startup), while warm starts open in a few milliseconds; rotating or zooming does not trigger another Blender launch.
Scene Statistics Panel¶
Designed for engineering verification: per-object triangle counts, bounding box dimensions (mm), material color swatches, scene units, etc., facilitating cross-referencing with CAD / 3D printing workflows. Materials are displayed as sRGB color blocks converted from Principled base colors within the viewport; textures are not displayed; for full rendering, rely on the output from the Blender side.
Security and Scope¶
- The conversion route defaults to
/api/blend-previewand must remain under/apito allow the connection service to perform Host/Origin and session validation, preventing unauthorized exposure of arbitrary local files. - The export is a static scene: a hand-written glTF 2.0 subset renderer that does not support textures, skinning, or animation;
lib/scene.pyexports using conventions such as Y-up,export_apply, and visible objects.
Environment Requirements¶
- DeepSeek Harness 0.2.x (
package.jsondeclares compatibility with0.2.0-rc.2and0.2.1-rc.2). - Blender 3.6 / 4.x / 5.x installed. The plugin attempts to find
blenderviaDSH_BLENDER,BLENDER_PATH,blenderinPATH, Steam libraries, and default Windows installation paths; if the installation location is unique, setblenderPathin the configuration. - The browser or DSH desktop client must support WebGL (built-in for desktop apps).
- Node >= 22 (required by the plugin package’s
engines; satisfied by your DSH environment when running the DSH Host).
Installation and Activation¶
For normal (non-desktop) profiles, install via CLI:
# into a normal (non-desktop) profile
dsh plugin --profile <profile> add dsh-blend-preview
Desktop profiles are held by the Electron application and must be added via the plugin management UI, or manually synthesized into the configuration followed by an application restart. The package includes cordis.patch.yml, which automatically writes the plugin line after installation. A DSH restart is required after installation.
The plugin runs with the permissions of the current DSH process; before installation, it is recommended to read the source code and the MIT license on GitHub to confirm that the local Blender invocation and cache paths comply with your security policy.
Configuration¶
Adjust settings in Settings → Plugins → Blender preview (namespace blend-preview):
| Key | Default | Description |
|---|---|---|
enabled |
true |
Whether to register the renderer and conversion route. |
routePath |
/api/blend-preview |
The authenticated conversion route; must be under /api, otherwise the authentication fence is invalid and it falls back to the default path. |
extensions |
["blend"] |
File extensions using the 3D preview. |
blenderPath |
"" (auto) |
Absolute path to blender / blender.exe. |
cacheDir |
"" → ~/.dsh/cache/blend-preview |
Cache directory for GLB and scene JSON. |
timeoutMs |
180000 |
Maximum wait time (in milliseconds) for a single cold conversion. |
maxBytes |
1073741824 |
Maximum size of the .blend file allowed for conversion (1 GiB). |
applyModifiers |
true |
Apply modifiers during export so the preview is closer to Blender’s rendering results. |
cacheEntries |
24 |
Number of cached conversions to retain on disk; oldest items are evicted when exceeded. |
Typical Usage¶
- Install the plugin and restart DSH. Confirm that local Blender is automatically discovered, or fill in the path in
blenderPath. - Click a
.blendfile in the workspace file tree. - The first open in the right sidebar triggers a Host conversion; wait for the GLB and JSON to be ready, then rotate, zoom, switch to wireframe or auto-rotation in the viewport, and view object face counts and millimeter-level bounding boxes in the scene information panel.
- Opening the same file version again should read the cache directly; after modifying and saving the
.blendfile, re-conversion will occur due to changes in mtime/size.
Data flow (consistent with the README): Client preview body requests GET /api/blend-preview?path=…&kind=info and kind=glb → Host checks cache or spawns blender --background --python lib/scene.py → writes model.glb, scene.json, etc., to the cache directory. No cloud upload: Both Blender and GLB remain on the local machine.
Use Cases and Cautions¶
Suitable for: Quickly browsing Blender assets within the DSH workspace, verifying printing/mechanical dimensions and face counts, and avoiding frequent application switching just to glance at a model.
Limitations (subject to the official README):
- Exporting large scenes (millions of triangles) is slow and may hit
timeoutMs. - The viewport does not display textures, only base colors; animations and skinning are not within the export scope.
- Cold conversion depends on local Blender performance and scene complexity.
The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community collection site and has no official affiliation with DeepSeek / High-Flyer.
Links¶
- Directory Page: https://www.skillhub.cn/plugins/439436269-ctrl/dsh-blend-preview
- Source Code and Docs: https://github.com/439436269-ctrl/dsh-blend-preview
Current npm version is 0.1.0; if behavior is inconsistent with the documentation, refer to the repository README and CHANGELOG.md.