Skip to content

[3.x] FTI - Change SceneTree global setting to static #107889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

lawnjelly
Copy link
Member

Also fixup FTI configuration warnings so that they only output when the project is using FTI.

Backport of #107886.

@BastiaanOlij noticed that some FTI configuration warnings were firing when FTI was off in the project.
This happened because checking whether FTI was on in the editor was previously unsupported (as it was hard coded to OFF).

I had also been long term intending to swap using a local variable for global on / off in SceneTree to a static, the reason being that it would no longer be necessary to check is_inside_tree() and access the variable via a pointer, for what is likely to be a bottleneck check (and the global setting hardly ever changes, so a static makes sense here).

So I take the opportunity to swap both the global setting to a static, and add an extra one for checking the on / off setting within the editor (while not actually enabled the FTI functionality).

This enables us to check the project global setting before issuing configuration warnings, without having to use e.g. GET_GLOBAL_CACHED(), which isn't a particularly good way of doing this here due to the string duplication.

Also fixup `FTI` configuration warnings so that they only output when the project is using `FTI`.
@lawnjelly lawnjelly merged commit c340016 into godotengine:3.x Jun 24, 2025
14 checks passed
@lawnjelly
Copy link
Member Author

Thanks!

@lawnjelly lawnjelly deleted the fti_global_setting_static3 branch June 24, 2025 07:37
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