X Tutup
Skip to content

Change preview methods to take Callable#108162

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:preview_simplication
Sep 23, 2025
Merged

Change preview methods to take Callable#108162
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:preview_simplication

Conversation

@KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jul 1, 2025

In Godot 4 most methods moved from "object, method, userdata" combo to just use a single Callable. The only remaining one (I think) are preview methods: queue_resource_preview and queue_edited_resource_preview.

For now the new methods are unexposed, and only used internally.

@KoBeWi KoBeWi added this to the 4.x milestone Jul 1, 2025
@KoBeWi KoBeWi requested review from a team as code owners July 1, 2025 11:49
@KoBeWi KoBeWi requested a review from a team July 1, 2025 11:49
@KoBeWi KoBeWi requested a review from a team as a code owner July 1, 2025 11:49
@Mickeon
Copy link
Member

Mickeon commented Jul 1, 2025

Could we change the implementation internally but still keep the original method exposed as is?
The current state of things is obviously an oversight, but the current name feels so right that any newly exposed method would be unusable just by its confusable nature. When it's gonna be time to clean the slate and remove all deprecated methods, the newer, yet "badly" named methods may slip through the cracks.

At the end of the day, fortunately, it's pretty easy to mitigate this issue by fetching a Callable's object and method name individually.

@KoBeWi
Copy link
Member Author

KoBeWi commented Jul 1, 2025

You mean like, not exposing the new methods? Yeah, they don't need to be exposed. I mostly noticed it when doing #108147

@Mickeon
Copy link
Member

Mickeon commented Jul 1, 2025

Indeed, maybe slapping a huge "TODO" to have those methods use Callable as soon as it's reasonable to do so.

@KoBeWi KoBeWi force-pushed the preview_simplication branch from 5202eb4 to 48f3c11 Compare July 1, 2025 16:51
@Mickeon Mickeon removed the request for review from a team July 1, 2025 16:57
Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

Now that the change is internal this is more reasonable.

That aside, the PR is a pretty sweet clean-up of a very shoddy, likely legacy, part of the editor.
It may speed up things a little too, but that was not the goal. Seeing Variant being passed around for no reason was already painful enough.

@Repiteo Repiteo modified the milestones: 4.x, 4.6 Sep 23, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Sep 23, 2025

Needs rebase

@KoBeWi KoBeWi force-pushed the preview_simplication branch from 48f3c11 to eae9ef2 Compare September 23, 2025 18:13
@KoBeWi KoBeWi requested a review from a team September 23, 2025 18:13
@Repiteo Repiteo merged commit 44c847c into godotengine:master Sep 23, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 23, 2025

Thanks!

@KoBeWi KoBeWi deleted the preview_simplication branch September 23, 2025 20:19
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.

3 participants

X Tutup