How should I enable filtering in a custom AnimationNode

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Poutinator

With a bit of trial and error, I managed to make a custom AnimationNode script. However, even if I’ve implemented the has_filter() method to return true, I don’t see the “Edit Filter” in the AnimationTree. I even tried returning the string “true” because the doc says this method should return a String.

I feel like has_filter method is never called, I put a print in it and never saw anything in the console. Am I missing a step? I can’t find any exemple of custom nodes so I have nothing to compare to.

tool
extends AnimationNode

class_name AnimationNodeStartStop

export(float, 0, 10, 0.1)var fade_in = 0.1
export(float, 0, 10, 0.1)var fade_out = 0.1

func _init():
	add_input("in")
	add_input("shot")
	filter_enabled = true

func get_caption():
	return "StartStopOneShot"

func get_parameter_list():
	var result = [
		{"name": "start", "type": TYPE_BOOL},
		{"name": "stop", "type": TYPE_BOOL},
		{"name": "playing", "type": TYPE_BOOL, "usage": 0},
		{"name": "time", "type": TYPE_REAL, "usage": 0},
		{"name": "remaining", "type": TYPE_REAL, "usage": 0}
	]

	return result

func get_parameter_default_value(name):
	match name:
		"start": return false
		"stop": return false
		"playing": return false
		"time": return 0.0
		"remaining": return 0.0

func has_filter():
	return true

func process(time, seek):
	pass