viewport_light
Read or set the viewport's lighting mode without changing the scene, then fix black captures or lighting warnings by choosing stage, camera, off, or a light rig.
Instructions
Read or set the viewport's lighting mode, which decides how the viewport and its captures are lit, without changing the scene.
Use it when a capture comes back black, or warns that the lighting lights nothing (mode off, or stage with no scene lights, though Kit's grid shows), then capture again. "get" (the default) answers the mode, the modes on offer, and the stage's own lights with their intensity, inside instances too, the first 20 listed; a light rig's lights are the viewport's, not the stage's, and aren't among them. "set" takes a mode "get" lists: "stage" (the stage's own lights), "camera" (a light that follows the camera), "off", or a light rig such as "Default", "Colored Lights" or "Grey Studio"; rigs need Kit's lighting menu, omni.kit.viewport.menubar.lighting, and a mode not on offer is an error. "set_camera_light" is the older switch, turning the camera light on or off with enabled. To add a light to the stage itself, use create_prim (DistantLight, DomeLight), then set_prim_attribute for its intensity: a DistantLight comes at 50,000, which washes a capture out.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "viewport_light"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | For "set": "off", "camera", "stage", or a light rig "get" lists, e.g. "Default" | |
| action | No | "get" the mode, "set" one, or the legacy "set_camera_light" | get |
| enabled | No | For "set_camera_light": turn the camera light on or off |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |