@@ -66,7 +66,6 @@ class AnimationNode : public Resource {
6666 LocalVector<Input> inputs;
6767 HashSet<NodePath> filter;
6868 bool filter_enabled = false ;
69- bool filters_dirty = true ;
7069
7170 // To propagate information from upstream for use in estimation of playback progress.
7271 // These values must be taken from the result of blend_node() or blend_input() and must be essentially read-only.
@@ -179,6 +178,9 @@ class AnimationNode : public Resource {
179178 GDVIRTUAL4R (double , _process, double , bool , bool , bool )
180179 GDVIRTUAL0RC (String, _get_caption)
181180 GDVIRTUAL0RC (bool , _has_filter)
181+ private:
182+ mutable uint32_t filters_version = 1 ;
183+ void _mark_filters_dirty ();
182184
183185public:
184186 virtual void get_parameter_list (LocalVector<PropertyInfo> *r_list) const ;
@@ -266,6 +268,7 @@ struct AnimationNodeInstance {
266268 mutable LocalVector<AnimationNodeInstance *> connection_instances; // AnimationNodeInstance* | nullptr
267269 mutable LocalVector<real_t > track_weights;
268270 mutable LocalVector<int > filtered_track_indices_cache;
271+ mutable uint32_t filters_version = 0 ;
269272 mutable AHashMap<StringName, AnimationNodeInstance *> child_instances; // Child Name -> AnimationNodeInstance*
270273
271274 // Multiple AnimationNodeInstances can share the same resource btw.
0 commit comments