Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick. This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed. Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
This commit is contained in:
@ -636,8 +636,8 @@ bool AnimationMixer::_update_caches() {
|
||||
List<StringName> sname_list;
|
||||
get_animation_list(&sname_list);
|
||||
|
||||
bool check_path = GLOBAL_GET("animation/warnings/check_invalid_track_paths");
|
||||
bool check_angle_interpolation = GLOBAL_GET("animation/warnings/check_angle_interpolation_type_conflicting");
|
||||
bool check_path = GLOBAL_GET_CACHED(bool, "animation/warnings/check_invalid_track_paths");
|
||||
bool check_angle_interpolation = GLOBAL_GET_CACHED(bool, "animation/warnings/check_angle_interpolation_type_conflicting");
|
||||
|
||||
Node *parent = get_node_or_null(root_node);
|
||||
if (!parent) {
|
||||
|
||||
Reference in New Issue
Block a user