From lens-studio-core
Resets Lens Studio preview to clean state by repositioning camera, disabling extra objects via screenshot analysis (up to 5 iterations), and capturing baseline logs. Use before scene generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lens-studio-core:reset-preview-environmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Prepare a clean Lens Studio scene state before any generation task. All scene manipulation is done via `ExecuteEditorCode` through the `editor-api-agent` agent.
Prepare a clean Lens Studio scene state before any generation task. All scene manipulation is done via ExecuteEditorCode through the editor-api-agent agent.
Delegate to the editor-api-agent agent to survey the scene and reset the camera in a single call:
try {
const results: string[] = [];
// Find and reset camera
let camera = scene.sceneObjects.find(
(o: Editor.Model.SceneObject) => o.name === 'Camera'
);
if (!camera) {
camera = scene.sceneObjects.find(
(o: Editor.Model.SceneObject) => o.name === 'Main Camera'
);
}
if (camera) {
camera.localTransform.position = new vec3(0, 0, 0);
camera.localTransform.rotation = new vec3(0, 0, 0);
results.push(`Reset camera: ${camera.name}`);
} else {
results.push('Warning: No Camera found');
}
// List all root objects for cleanup analysis
const rootNames = scene.rootSceneObjects.map(
(o: Editor.Model.SceneObject) => ({
name: o.name,
id: o.id.toString(),
enabled: o.enabled
})
);
return JSON.stringify({ camera: results, rootObjects: rootNames });
} catch (e: any) {
return `Failed: ${e.message}`;
}
Take a screenshot and visually confirm nothing but the virtual environment is visible.
Loop:
CapturePanelScreenshotTool with pluginId: "Snap.Plugin.Gui.PreviewPanel".editor-api-agent agent to disable the responsible objects:try {
const toDisable = ['<object-name-1>', '<object-name-2>'];
const disabled: string[] = [];
for (const name of toDisable) {
const obj = scene.sceneObjects.find(
(o: Editor.Model.SceneObject) => o.name === name
);
if (obj) {
obj.enabled = false;
disabled.push(name);
}
}
return JSON.stringify({ disabled });
} catch (e: any) {
return `Failed: ${e.message}`;
}
Delegate to the editor-api-agent to get the log file path via ExecuteEditorCode:
const FS = await import("LensStudio:FileSystem");
return FS.getLogFile().toString();
Use Read on the returned path to note the current file length — this offset filters for only new entries generated during the build.
Report:
ExecuteEditorCode via the editor-api-agent agent — never use individual MCP scene tools (SetLensStudioProperty, etc.) directly.npx claudepluginhub snapchat/lens-studio-plugins --plugin lens-studio-coreSets up Blender scenes programmatically via Python (bpy) with objects, materials, lighting, camera, and environment configuration. For reproducible 3D visualization, automated product rendering, batch workflows, or data pipeline integration.
Controls the Unity Editor from the terminal via the `ucp` CLI. Automates scenes, GameObjects, assets, builds, tests, packages, and profiling over a WebSocket/JSON-RPC bridge.
Provides persistent godot-mcp and AI Bridge workflows for Godot 4.x projects, handling .tscn/.gd/.gdshader/.tres files and live editor tasks like scene inspection, node edits, refresh/run/test loops, runtime diagnostics, hybrid validation.