Open tayloraswift opened 3 years ago
This seems to be because RootMotionView
is registered as an editor-only class with a somewhat unconventional pattern: it's registered as core class, then disabled, and re-enabled in the editor:
This was done on purpose by @reduz in https://github.com/godotengine/godot/commit/c633b770cb6.
ClassDB::get_method_list()
ignores disabled classes, while ClassDB::get_property_list()
doesn't, which is why properties end up listed but not the methods. Not sure if that's a bug or just a design quirk from this weird pattern.
See also https://github.com/godotengine/godot/pull/46432#issuecomment-824287974.
@akien-mga I don't know if we changed this for extensions but on a broader discussion, I don't think we should filter out editor only classes, maybe just flag them in the api.json. We need those classes in order to make plugins that add features for the editor. I guess we just need to figure out a good way to prevent those classes from being used in runtime as they will give an error.
To this particular problem, I wonder why its done this way? Sounds like Reduz only did the trick so he could debug an in editor issue and should probably have reverted it.
To this particular problem, I wonder why its done this way? Sounds like Reduz only did the trick so he could debug an in editor issue and should probably have reverted it.
RootMotionView is an editor-specific helper node, but as it's a node it's something which you place in your scene tree directly - and thus it needs to be registered in core. It's the only component which is like this in Godot AFAIK.
The property
RootMotionView::animation_path
defined in the api.json uses accessorsget_animation_path
,set_animation_path
, but these functions are not present in the api description. there is a similar issue with the following properties: