Repository navigation
Conversation
SetSceneItemTransform validation didn't allow a scene item's bounds to be equal to zero, not even when the bounds type was equal to OBS_BOUNDS_NONE. This wouldn't allow the valid response of GetSceneItemTransform, when it contained an item whose bounds have not been modified, to be directly sent to SetSceneItemTransform without returning an error.
fcolona
force-pushed
the
fix-bounds-validation
branch
from
November 11, 2026 20:27
17a34c0 to
a29f637
Compare
This branch has not been deployed
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
In
SetSceneItemTransform, I modified the value passed to theminValueparameter ofValidateOptionalNumberin the calls related toboundsWidthandboundsHeight. The minimum value is initialized with the same value as before, 1.0, but now there's a check that decreases the value to 0.0 if either the existingboundsTypeor the newly set is equal toOBS_BOUNDS_NONE.Motivation and Context
Currently,
GetSceneItemTransformreturnsboundsWidth: 0andboundsHeight: 0whenboundsTypeis set toOBS_BOUNDS_NONE.However, the validator inSetSceneItemTransformfor the bounds dimensions hardcodes a minimum value of 1.0 for these fields. Because of this, feeding the exact output of the Get request back into the Set request unexpectedly fails with error 402. Fixes obsproject/obs-studio#13124.How Has This Been Tested?
I manually tested four SetSceneItemTransform request scenarios, each scenario combined with partial and complete updates:
boundsTypedifferent fromOBS_BOUNDS_NONEand bounds dimensions greater than 0 (valid)boundsTypedifferent fromOBS_BOUNDS_NONEand bounds dimensions equal to zero (invalid)boundsTypeequal toOBS_BOUNDS_NONEand bounds dimensions greater than zero (valid)boundsTypeequal toOBS_BOUNDS_NONEand bounds dimensions equal to zero (now valid)Tested OS(s): Arch Linux (Wayland, Kernel 7.1.5-arch1-2)
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
masteror arelease/*branch.