AnimationTree, can "Enable Filtering" be accessed, by code?

Can the “Enable Filtering” property of a node of an AnimationTree be accessed from GDScript? I want to use the same animation in some cases with the filter and in others without it. I have duplicated the nodes but that complicates the diagram.

I found it, first you access the AnimationTree node and there you have the filter_enabled property:

	var one_shot_espadazo = animation_tree.tree_root.get_node("OneShotEspadazo")
	one_shot_espadazo.filter_enabled = true or false

Do you know if it is possible to also activate certain tracks? I want to target a method track I created and toggle it via code.

I haven’t done it but I think that to access the tracks you should do it through the AnimationPlayer and not the AnimationTree.
In the AnimationPlayer you have a get_animation that returns an Animation. In this Animation you have a track_set_enabled method.
On this page of the documentation they indicate how to add tracks by code, for example: https://docs.godotengine.org/es/4.x/classes/class_animation.html#class-animation