Repository navigation
frontend: Apply Show/Hide Transition to every selected source - #758
Merged
Merged
Conversation
…ources With several sources selected in the Sources list, picking a Show Transition or Hide Transition (or its duration) in the context menu changes one of them only. OBSBasic::CreateVisibilityTransitionMenu() (frontend/widgets/OBSBasic_Transitions.cpp) changes GetCurrentSceneItem(), the current item, and ignores the rest of the selection, although Paste in the same submenu, Paste Filters and Paste Transform act on every selected item. visibility_transition_set(), visibility_transition_restore() and visibility_transition_set_duration() in frontend/utility/visibility-transition.c are the Qt-free menu actions and undo/redo the frontend will call. The stub has the current logic: it changes the item the menu is for only. The test builds a scene of real libobs sources and a group, registers two minimal transition types, selects items and applies the menu choice: three items, Show Transition: 1 of 3 changed three items, Hide Transition: 1 of 3 changed an item and an item inside a group: the group child unchanged three items, another type, then None: 1 of 3 changed three items, undo and redo: redo covers 1 of 3 three items, duration: 1 of 3 changed 6 of 8 cases fail. The controls pass: one selected item gets the transition (named after its source, with the default duration), and an item that already has a transition of the picked type keeps it. Refs obs-rust#757. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With several sources selected in the Sources list, picking a Show
Transition or Hide Transition in the context menu, or changing its
duration there, changed only the current item. The other selected items
kept their old transition, while the menu, opened again on the same
selection, showed the new one as picked.
The menu now goes through visibility_transition_set() and
visibility_transition_set_duration(), which apply the choice to the
current item and to every other selected item, including selected items
inside groups, like Paste in the same submenu already does. Each item
gets its own private transition named after its source, and an item
that already has a transition of the picked type keeps it and its
settings. One undo entry covers every changed item ("Show Transition on
3 sources"); with one changed item it reads as before. The properties
window of a configurable transition still opens for the current item
only.
Fixes obs-rust#757.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=95d787886f73ebd85483edbc1a021b2f8554ea49 secs=485 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1792007872,"gate":"rust/all/fmt","host":"linux-x86_64","key":"6bb65c56c40332cbc0ed9d99446faa15d4af0309e30ba7168962d6a0709e596f","lane":"lint","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":53,"stamp":"f5296c81da47c978f1295d27add9fc98","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"6bb65c56c40332cbc0ed9d99446faa15d4af0309e30ba7168962d6a0709e596f","lane":"lint","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":53,"stamp":"7524ac87e3515cab0b62c71da1b72a13","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"2bae233c570194fd1871e99b69104f9ea1aa72653cbdc1fecf4c8302b499ed66","lane":"rust-test","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":122,"stamp":"64c33fcc214c5676520d0d4a06fdd6d2","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"fa2efd1af6183e80d17bca0955f81fc1","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"f1d045b2d4d6278b4aa415d1ad994dbe","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"a94030cefcbd71123afe5d68c733c2d1","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"0d94163e57c5dee14f48d784b3e56a0d","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"7ee283c727f9eeb814db4706e684ad29","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"5fad6e96f034af5febbc712dfd0386d54076941ba71e38add0fc8ddf2be4b8b9","lane":"cross","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":108,"stamp":"ca02a0e30cb088c632fb4c39d5cc1566","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Ci-Attestation: {"at":1792007872,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"bcdb4b4fc8e352e2572d86a5e0f9489b27ea6ecb5bb1e6092cecaba54759903f","lane":"tier2-linux","parents":["30c6cf5ebbd2fe2ba0851c9afdf9aa56a251dd0d"],"secs":202,"stamp":"6e49715186b9322dae049d7514814aec","tree":"95d787886f73ebd85483edbc1a021b2f8554ea49","v":1,"via":"run"}
Member
|
Rebased onto master, set
|
zackees
force-pushed
the
fix/show-transition-multi
branch
from
October 14, 2026 19:57
3fe5901 to
83adfea
Compare
zackees
enabled auto-merge
October 14, 2026 20:13
zackees
approved these changes
Oct 14, 2026
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
With several sources selected in the Sources list, picking a Show Transition or Hide Transition in the context menu, or changing its duration there, now applies to every selected source, not only the current one.
CreateVisibilityTransitionMenu()(frontend/widgets/OBSBasic_Transitions.cppline 1041) changedGetCurrentSceneItem(), the current (top selected) item, in both the transition action (line 1063) and the duration box (line 1114). The other selected sources kept their old transition, while the menu, opened again on the same selection, showed the new one as picked. Paste in the same submenu (line 1171), Paste Filters and Paste Transform already act on every selected item.visibility_transition_set()andvisibility_transition_set_duration()(new, Qt-free,frontend/utility/visibility-transition.c). They apply the choice to the current item and to every other selected item of the scene, including selected items inside groups. Each item gets its own private transition named after its source ("Color 2 Show Transition"), with the default duration when it has none; an item that already has a transition of the picked type keeps it and its settings; None removes the transition and its duration, as before.test/cmocka: Add failing test for Show/Hide Transition with several sources: addstest_visibility_transitionand the helper as a stub with the current logic (the current item only). The test builds a scene of real libobs sources and a group, registers two minimal transition types, selects items and applies the menu choice. 6 of 8 cases fail: three items for Show Transition, Hide Transition, another type then None, undo/redo and the duration (1 of 3 changed each), and an item inside a group (unchanged). The two controls pass: one selected item gets the transition, named after its source, with the default duration; an item that already has a transition of the picked type keeps it.frontend: Apply Show/Hide Transition to every selected source: the fix. 8 of 8 pass.Motivation and Context
Fixes #757 (upstream obsproject/obs-studio#10448, reported by BakaKuma-uwu on OBS 30.1.0, still open). Guffyf confirmed it on the issue, and OBS's Warchamp7 called it a known issue he would very much like fixed. An earlier upstream PR for the same thing by cg2121 (obsproject/obs-studio#6453) was closed as stale in September 2026; this is a separate implementation on the current frontend.
Why this one: a real user report with exact steps, confirmed by a second user and by the OBS UI maintainer, reproduced in our release; the change is contained in the frontend.
How Has This Been Tested?
Reproduced in the current release, AppImage v0.1.0-beta.20261014 (headless: private Xvfb, private HOME,
dbus-run-session,--multi), with a small test module that adds three Color Sources, selects all three in the Sources list, opens the Sources context menu the way a right click does and picks Fade, then presses Undo and Redo. The same module against OBS built from this branch (Rust libobs lane, with the frontend):Automated, on master 0c45921, in both libobs lanes (
ENABLE_RUST_LIBOBSOFF and ON):test_visibility_transition: 6 of 8 fail at the RED commit, 8 of 8 pass at GREEN, in both lanes.ctest -Vshows all 8 cases run under Xvfb. It loads the built OpenGL module (GRAPHICS_MODULE_PATH), because transitions need graphics; without a display all 8 cases skip (obs_startup()fails), like the other transition tests, so it builds but skips in CI.libobs-openglmasked, TMPDIR unset: 213 of 213 (C lane) and 213 of 213 (Rust lane). Every PipeWire and PulseAudio test ran. Skipped cases:open_crashes_without_obs_core(two tests) andtest_startup_shutdown_cycles. These skip on master here as well (the two startup stress tests skip as soon as oneobs_startup()in their loop fails).ci/test_registration.pyare clean.Not tested:
GetCurrentScene()), the same as Paste Filters; not driven end to end here.Types of changes
Checklist:
🤖 Generated with Claude Code