You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: libobs: a scene item bounds type outside the enum is kept and draws as an unknown box #2281
Found while planning the Rust port of the scene item transform.
Bug
A scene item's bounds type outside OBS_BOUNDS_NONE..OBS_BOUNDS_MAX_ONLY is stored as-is.
Where it comes in:
scene_load_item casts bounds_type from int64 (libobs/obs-scene.c.h around line 1067).
load_transform_states does the same with frontend undo data (around 2401).
The setters obs_sceneitem_set_bounds_type (around 2644-2648) and obs_sceneitem_set_info2 (around 2781) take any value.
What happens next:compute_item_transform treats any value other than OBS_BOUNDS_NONE as bounded. obs_bounds_fit_scale leaves the scale alone for an unknown type, so the item keeps its own scale inside a box the size of bounds, offset by that box's alignment.
What the user sees: the transform dialog shows no bounds type.
obs-websocket maps bounds types by name and falls back to NONE. Scene collections and plugins don't.
Plan
RED: real-libobs tests for each entry point:
load a scene collection with bounds_type 99 and -1;
call the setter and set_info2 with an out-of-range value;
load undo transform data.
Each must read back as OBS_BOUNDS_NONE and draw like an unbounded item. Every valid value must stay unchanged.
GREEN: map an out-of-range bounds type to OBS_BOUNDS_NONE on load and in the setters.
Only a hand-edited or foreign scene file changes: its item draws at its own scale, without a phantom box.
Activity
rdoupe commentedon Oct 25, 2026
Claiming: #2281.
test: Cover out-of-range scene item bounds types
libobs: Treat unknown bounds types as no bounds
libobs: Treat an unknown bounds type as no bounds (obs-rust#2307)
obs-scene: Port the scene item transform steps (obs-rust#2392)