obs_scene_item_lock
Lock or unlock an OBS scene item to prevent accidental drags, resizes, or transforms. Read the current lock state by omitting the locked flag.
Instructions
Lock or unlock a scene item. A locked item cannot be dragged or resized in the OBS window by a human, and cannot be transformed over the websocket either - SetSceneItemTransform on a locked item fails rather than silently doing nothing.
Worth using on the pieces that must not drift: a HUD layer or a background that someone might grab by accident while adjusting a camera on top of it. Locking changes nothing about what viewers see - it affects editing only, not visibility and not audio. If a transform keeps being rejected, read the lock state before assuming the coordinates were wrong.
Omit locked to read the current state without changing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locked | No | true = lock, false = unlock. Omit to just read. | |
| sceneName | Yes | Scene holding the item. | |
| sceneItemId | Yes | Item id from obs_list_sources_in_scene. Unique within this scene only. |