Add `AnimationTrackFilter` and implement filter as an `AnimationNode`'s parameter.
Implement #6808.
- Add resource type
AnimationTrackFilter, removeAnimationNodemenbers:filter,filter_enabled_get_filters(),_set_filters(),has_filter(),set_filter_path(),set_filter_path(),
- Implement
filterlike otherAnimationNode's parameters. - Modify
AnimationNodeBlendTreeEditorto adapt to first change. - Implement
AnimationTrackFilterEditorPluginto edit filter tracks in inspector.
https://github.com/godotengine/godot/assets/61624558/d60a00fc-9506-400b-af81-c008b572d16a
This pr implement filter for AnimationNodeBlend3, will close #76506.
The filter is implemented as gradual style, will close #7578.
Bugsquad Edited: Closes https://github.com/godotengine/godot-proposals/discussions/7896
How to fix this static checks?
You basically add whatever is marked green to your code. If you have line of code that is marked red and right below it is the same line of code that is marked green then that means that you have to edit the line of code to look like the green one.
In your case you seem to be missing license related comments so adding those should fix static checking.
You basically add whatever is marked green to your code. If you have line of code that is marked red and right below it is the same line of code that is marked green then that means that you have to edit the line of code to look like the green one.
In your case you seem to be missing license related comments so adding those should fix static checking.
You can my changed files, I already add the lisence info.
Can someone help me?
Also, you may want to check for invisible characters that may have been inserted such as unwanted invisible BOM codes. (Some multi-byte language users often encounter this problem)
Also, you may want to check for invisible characters that may have been inserted such as unwanted invisible BOM codes. (Some multi-byte language users often encounter this problem)
Thanks,my editor default is UTF8-BOM, changed it to UTF8 can pass static check.
@TokageItLab I am not sure filter should be used only extends from AnimationNodeSync.
From proppsals #6816 and #1187, we can see some users prefer to use a standalone filter node.
Because filter only make sense when work with multiple inputs, I oppose their are solutions, but it means that developers are hindered by animation node types, I think we should not limit the filterable node's extends type.
In conclusion, I implement this feature by adding "filter" parameter for each filterable node type repeatedly (including Blend3).
It seems like the way to go is never wrong, but there may be a better writing way, so I will also think about it later.
I know it will be difficult to implement these changes immediately, but it definitely makes sense to make the filter a Resource, and I personally plan to make some improvements at 4.2 or 4.3.
Refactor is done, please review again.
I like this PR, I think its the right direction to go for both ease of use and memory saving. Regarding the deprecation thing, the way I would suggest implementing this without breaking compat is keeping the old filter function, but marking them as deprecated as per the deprecation system we introduced for 4.x. You can then make the existing functions, for example, for when setting the filters property, generate a unique filter resource for them. This will ensure backwards compatibility with the old system and allow this to be introduced without breaking existing trees.
I like this PR, I think its the right direction to go for both ease of use and memory saving. Regarding the deprecation thing, the way I would suggest implementing this without breaking compat is keeping the old filter function, but marking them as deprecated as per the deprecation system we introduced for 4.x. You can then make the existing functions, for example, for when setting the filters property, generate a unique filter resource for them. This will ensure backwards compatibility with the old system and allow this to be introduced without breaking existing trees.
"filter" in this pr is not belong to AnimationNode and should be referenced by specific AnimationTree nodes, unless we can find out correct AnimationTree nodes when loading an AnimationNode, it is impossible to keep old filter info from old resources datas.
Although I add filter, _set_filter(), _get_filter() to pass compat check, old filter info will be lost when opening old scenes.
The filter_enabled doesn't work from code. filter_enabled
I've tried to trigger it in multiple ways, but in 4.3 it doesn't work.