SceneItemInfo¶
| Property | Type | Description |
|---|---|---|
| id | string | Scene Item Id. This is set by the API and is ignored when specified by the caller unless updating an existing Scene Item. The value is not globally unique and may change between OBS sessions. API 1.21+ |
| videoCompositionId | string | Optional. ID of the video composition to which the scene item’s scene belongs. API 6.0+ |
| sceneId | string | Optional. Write-only until API 6.0. Used by addSceneItemXXXSource() methods to determine which Scene to add a Scene Item (source / group) to. Default: current active scene. API 1.26+ |
| parentId | string | Id of a Scene Item Group to which we are adding this Scene Item. API 1.21+ |
| name | string | Scene item name, as seen in “Sources” OBS widget. |
| class | string | OBS source class ID Useful source classes: ‘game_capture’ – game capture source ‘browser_source’ – browser source ‘dshow_input’ – DirectShow video capture ‘group’ – Group of scene items Ignored when adding a specific scene item type. |
| visible | bool | True if scene item is visible, otherwise false API 1.21+ |
| selected | bool | True if scene item is selected, otherwise false API 1.21+ |
| locked | bool | True if scene item is locked, otherwise false API 1.21+ |
| preferExistingSourceReference | bool | If true, prefer an existing source of the same class to be referenced instead of creating a new one. Defaults to false. Useful when adding a video capture source or any other singleton exclusive source type. API 1.21+ |
| existingSourceId | string | Optional. If exists, and matches a source id returned by getAllExistingVideoInputSources, the matching existing source will be referenced instead of creating a new one. Useful when adding a video capture source or any other source without duplicating it. API 6.0+ |
| order | int | Indicates scene item composition (layering) order when enumerating scene items or setting scene item properties. 0 = the most bottom layer 0+N = upper layers API 1.21+ |
| items | SceneItemInfo[] | Group items when ‘class’ = ‘group’ API 1.21+ |
| settings | object | OBS source settings, may vary from source to source. See addCurrentSceneItemXXXSource() methods for more details. |
| auxiliaryData | any | Optional. Auxiliary application data to associate with this SceneItem. API 1.24+ |
| icon | IconInfo | The icon associated with this Scene Item. API 1.24+ Removed in API 4.0+ |
| defaultAction | ActionInfo | Default action associated with this Scene Item to invoke when user double-clicks with their mouse on the scene item. API 1.24+ Removed in API 4.0+ |
| contextMenu | MenuItemInfo[] | Context menu associated with this Scene Item to invoke when user right-clicks with their mouse on the scene item. API 1.24+ Removed in API 4.0+ |
| actions | ActionInfo[] | Actions associated with this Scene Item. API 1.24+ Removed in API 4.0+ Actions will be displayed in OBS Sources list. |
| uiSettings | object | Scene item UI behavior settings: ‘enabled’ – true/false, if false – scene item is disabled & unselectable. Default: true. ‘opacity’ – 0.0 – 1.0. scene item opacity in scene items (sources) list. Default: 1.0. API 1.32+ Removed in API 4.0+ ‘color’ – HEX color or color name (“#RRGGBB” or “red”) of the source name color. API 2.1+ Removed in API 4.0+ |
| composition | object | OBS scene item composition info: ‘srcWidth’ – source native width, ignored when settings props. ‘srcHeight’ – source native height, ignored when setting props. ‘position’ – object { ‘x’ – x coordinate ‘y’ – y coordinate } ‘alignment’ – ‘top_left’, ‘bottom_right’, ‘top_center’, ‘center_right’, ‘center’, etc. API 1.21+ ‘scale’ – object { ‘x’ – width scale factor ‘y’ – height scale factor } ‘rotationDegrees’ – rotation degrees ‘crop’ – object { ‘left’ – left cropping (pixels) ‘top’– top cropping (pixels) ‘right’ – right cropping (pixels) ‘bottom’ – bottom cropping (pixels) } ‘boundsType’ – ‘none’, ‘stretch’, ‘scale_to_inner_rect’, ‘scale_to_outer_rect’, ‘scale_to_width’, ‘scale_to_height’, ‘max_size_only’. API 1.21+ ‘bounds’ – object { ‘x’, ‘y’ } – size of bounding box. Valid when ‘boundsType’ != ‘none’. API 1.21+ ‘boundsAlignment’ – alignment within bounding box. Valid when ‘boundsType’ != ‘none’. API 1.21+ srcWidth * scaleX = actualWidth srcHeight * scaleY = actualHeight Ignored when adding a scene item. |
| hasAudio | bool | Read-only. Indicates whether the source has audio output. |
| hasVideo | bool | Read-only. Indicates whether the source has video output. |
| isVideoCaptureDevice | bool | Read-only. Indicates whether the source is a video capture device. |
| isGameCaptureDevice | bool | Read-only. Indicates whether the source is a game capture source. |
| isBrowserSource | bool | Read-only. Indicates whether the source is a browser source. |
| isFilterSource | bool | Read-only. Indicates whether the source is a filter. API 6.0+ |
| isInputSource | bool | Read-only. Indicates whether the source is an input source. API 6.0+ |
| isTransitionSource | bool | Read-only. Indicates whether the source is a transition. API 6.0+ |
| isSceneSource | bool | Read-only. Indicates whether the source is a scene. API 6.0+ |
| filters | InputSourceTypeInfo[] | List of Filters which are applied to the scene item’s source. Note: modifying this list on a Scene Item, will effectively modify it on the OBS source which is referenced by the item: i.e. may cause side effects on other scene items. API 6.0+ |