requesthandler: Add scene item blend method requests - #1352
Open
Agash wants to merge 3 commits into
Open
Conversation
Adds the following requests: - `GetSceneItemBlendMethod` - `SetSceneItemBlendMethod` Browser sources used as overlays need their blending method set to sRGB Off for transparency to composite correctly. That was previously only reachable through the UI, leaving a manual step in otherwise automated overlay setup. Closes obsproject#1341
Mirrors the existing `sceneItemBlendMode` field, so the blending method of a scene item can be read without a request per item.
Agash
marked this pull request as ready for review
August 11, 2026 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
GetSceneItemBlendMethodandSetSceneItemBlendMethod, mirroring the existingGetSceneItemBlendMode/SetSceneItemBlendModepair, and adds asceneItemBlendMethodfield to the scene item list array next to the existingsceneItemBlendMode.Valid values are
OBS_BLEND_METHOD_DEFAULTandOBS_BLEND_METHOD_SRGB_OFF, converted via a newnlohmanntype converter forobs_blending_method.Motivation and Context
Closes #1341.
Browser sources used as overlays need their blending method set to sRGB Off for transparency to composite correctly, otherwise semi-transparent pixels show colour fringing and broken blending.
SetSceneItemBlendModeonly covers the blending mode, so this was the one step of overlay setup that could not be automated and had to be done by hand in the UI.How Has This Been Tested?
Built OBS Studio from source with this branch as the
plugins/obs-websocketsubmodule, then drove the requests over the protocol against the running instance:GetSceneItemBlendMethodreturnsOBS_BLEND_METHOD_DEFAULTon a fresh scene itemSetSceneItemBlendMethodtoOBS_BLEND_METHOD_SRGB_OFFand back toOBS_BLEND_METHOD_DEFAULT, each confirmed by a readback400 InvalidRequestField, a non-string with401, a missing field with300, and an unknownsceneItemIdwith600GetSceneItemListreports the updatedsceneItemBlendMethodblend_method: srgb_offfor the itemTested OS(s): Windows 11
Types of changes
Checklist:
masteror arelease/*branch.