Skip to content

Add ability to sync metadata across difficulties in editor setup#37465

Open
Hiviexd wants to merge 5 commits intoppy:masterfrom
Hiviexd:editor/sync-metadata-button
Open

Add ability to sync metadata across difficulties in editor setup#37465
Hiviexd wants to merge 5 commits intoppy:masterfrom
Hiviexd:editor/sync-metadata-button

Conversation

@Hiviexd
Copy link
Copy Markdown
Member

@Hiviexd Hiviexd commented Apr 21, 2026

NVIDIA_Overlay_wQbbcYQ7sa.mp4

This has been a pain point in both lazer and stable, and people usually use external tools for this kind of stuff for stable.

try
{
var beatmapWorking = beatmaps.GetWorkingBeatmap(b);
beatmaps.Save(b, beatmapWorking.GetPlayableBeatmap(b.Ruleset));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely completely dropping beatmap skin-related ini keys like combo colours and such.

Compare:

// save the difficulty to re-encode the .osu file, updating any reference of the old filename.
//
// note that this triggers a full save flow, including triggering a difficulty calculation.
// this is not a cheap operation and should be reconsidered in the future.
var beatmapWorking = beatmaps.GetWorkingBeatmap(b);
beatmaps.Save(b, beatmapWorking.GetPlayableBeatmap(b.Ruleset), beatmapWorking.GetSkin());

editor?.Save();
}

private static void copySyncedMetadataTo(BeatmapMetadata source, BeatmapMetadata target)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really get why this is a separate method. Not like anything else is going to ever call it. Probably inline it.

RelativeSizeAxes = Axes.X,
Text = EditorSetupStrings.SyncMetadataWithAllDifficulties,
TooltipText = EditorSetupStrings.SyncMetadataWithAllDifficultiesTooltip,
Action = syncMetadataToAllOtherDifficulties,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a potentially-destructive action that will likely never support undo. I think a confirmation dialog is warranted. Or at least some hold-to-confirm facility on the button itself to prevent accidents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants