[3.x] FTI
- Change SceneTree
global setting to static
#107889
Merged
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.
Also fixup
FTI
configuration warnings so that they only output when the project is usingFTI
.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 checkis_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.