Skip to content

libobs: Fix duplicated group names - #14149

Merged
Warchamp7 merged 1 commit into
obsproject:masterfrom
Warchamp7:fix-group-duplication-names
Nov 18, 2026
Merged

Warchamp7 merged 1 commit into
obsproject:masterfrom
Warchamp7:fix-group-duplication-names

Conversation

@Warchamp7

@Warchamp7 Warchamp7 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes duplicated groups not being named correctly.

Motivation and Context

A scene can be duplicated either manually by the user, or when using Studio Mode. For the ephemeral copy used by studio mode, names don't matter. The check for whether to bother generating a name for the duplicated item was inverted by mistake.

Fixes #14145

How Has This Been Tested?

Duplicated a scene manually and observed the group had a name.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7 Warchamp7 added this to the OBS Studio 33.0 milestone Nov 4, 2026
@Warchamp7 Warchamp7 added kind/bug Categorizes issue or PR as related to a bug. kind/regression Regression from a previous version area/ui-ux Anything to do with changes or additions to UI/UX elements. area/libobs labels Nov 4, 2026
@exeldro

exeldro commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Names for private duplicates scene do matter. For example my move plugin needs the name of the source to match the same source when transitioning in studio mode.
So I think it is better to remove the private check and always give the source name, like this:
return obs_source_duplicate(source, obs_source_get_name(source), private);

I think it was not inverted by mistake, it was to prevent getting 2 not private sources with the same name. Which is now handled by obs_context_deduplicate_name.

@Warchamp7

Copy link
Copy Markdown
Member Author

Indeed it appears you yourself made that change in #3819.

While I'm okay to keep this behaviour for now, I do think you should look into more robust alternatives, such as holding a map of scene item <-> scene item when program changes, since at the time of transition, the contents will be in an identical order.

Always give duplicated sources a name.
@Warchamp7
Warchamp7 force-pushed the fix-group-duplication-names branch from 3cb91ea to 021f43e Compare November 9, 2026 20:22
@Warchamp7
Warchamp7 merged commit 717cfa8 into obsproject:master Nov 18, 2026
15 checks passed
@Warchamp7
Warchamp7 deleted the fix-group-duplication-names branch November 18, 2026 03:35
@github-project-automation github-project-automation Bot moved this from Ready For Review to Merged in Current Release Tracker (33.0) Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libobs area/ui-ux Anything to do with changes or additions to UI/UX elements. kind/bug Categorizes issue or PR as related to a bug. kind/regression Regression from a previous version

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

Duplicating Scene Creates New Unnamed Groups

2 participants