`init` method defined on `ScriptLanguageExtension` does not get properly registered with godot
When creating and registering a ScriptLanguageExtension, godot complains that ERROR: Required virtual method RustType::_init must be overridden before calling even when i have defined a init method.
A few classes are special in that they have a _init virtual method which is exposed in the API JSON. This is seemingly (?) different from the usual constructor. But it looks like that method must be overridden when present, at least according to your error message.
At the moment, we have a mechanism that renames _init to init_ext in Rust, and back when registering a virtual function with Godot. But nothing forces the user to override it (and it's not as simple as not providing a default implementation, as the user is allowed to omit the entire impl block).
Since this behaves very different from other virtual functions, we may want to special-case it. I would probably even go as far as letting gdext generate always an implementation for _init when present, and not let the user override it -- we already have our own constructor init for initialization.
This probably has been addressed by ScriptInstance in the meantime, no?
@TitanNano as the king of ScriptInstance, do you know if this is still an issue? :grinning:
@Bromeon yes, I'm aware of this issue, and it hasn't been resolved yet. Even when IScriptLanguageExtension::init is implemented, the engine reports it as unimplemented.
I briefly looked into this, and the engine wants to make a virtual call to _init. But the godot_api macro doesn't implement this in __virtual_call.
If I get this right, then fn init(base) is not a GDExtension thing, but something gdext added to replicate the structure of GdScript and support instantiation from the godot side, right? That seems to be a naming conflict now, since the engine internally has no general concept of an init() constructor and (at least in ScriptLanguage) uses an init() method to perform an initialization step on existing class instances.
Might be a result of this renaming, which isn't consequently applied:
https://github.com/godot-rust/gdext/blob/feff365ca8eb194db27d8083984cce26e1a15b26/godot-codegen/src/special_cases/special_cases.rs#L303-L310
I see, and the init_ext method does indeed exist in the IScriptLanguageExtension trait. This is entirely a user error, but it's confusing because the engine prints an error complaining about the absence of the init method.
Perhaps we can add a default implementation that prints a gdext specific error to explain that init_ext has to be implemented...
Perhaps we can add a default implementation that prints a
gdextspecific error to explain that init_ext has to be implemented...
Oh, that's a great idea 💡
I played around with this and got stumped when trying to add any sort of handling for _init to fn __virtual_call() inside the godot_api macro for when the trait has an init_ext method, but it wasn't implemented. There is no way of knowing inside the proc macro what methods a trait defines without some additional metadata. This feels quite clunky for this one edge case... But it got me thinking, why not add a godot_codegen::special_cases::special_cases::is_required_virtual_method which looks something like:
fn is_required_virtual_method(trait_name: &str, method: &str) -> bool {
match (trait_name, method) {
("IScriptLanguageExtension", _) => true,
(_; _) => false,
}
}
Based on that, we can just not generate a unimplemented!() function body to the trait method definitions and move the requirement to implement certain methods to compile-time where they belong.
For ScriptLanguageExtension, if memory serves me right, all methods are required to be implemented by the engine. It's just never communicated until the method is called. Other extension classes are probably in a similar situation.
This adds a bit of over head for manually tracking down all required methods, but would improve the experience of everyone who wants to implement an extension class.
Another very good idea :+1:
For
ScriptLanguageExtension, if memory serves me right, all methods are required to be implemented by the engine. It's just never communicated until the method is called. Other extension classes are probably in a similar situation.
That seems a bit excessive though, there are many dozens. And a lot of them could technically have defaults :thinking: so probably we should clarify this... If it's the case, we might also consider manually implementing some defaults over time.
There are many I*Extension traits:
Scripts:
Multiplayer:
OpenXR:
WebRTC:
Rendering / text / model formats:
-
IRenderDataExtension -
IRenderSceneBuffersExtension -
IImageFormatLoaderExtension -
ITextServerExtension -
IGltfDocumentExtension
Physics:
I was way off with my assumption that this would affect all extension classes. An actual search across the current godot master shows these as being required virtual methods:
List of required virtual methods
core/object/script_language_extension.h
63: GDVIRTUAL_REQUIRED_CALL(_instance_create, p_this, ret);
69: GDVIRTUAL_REQUIRED_CALL(_placeholder_instance_create, p_this, ret);
84: GDVIRTUAL_REQUIRED_CALL(_get_documentation, doc);
120: GDVIRTUAL_REQUIRED_CALL(_get_method_info, p_method, mi);
140: GDVIRTUAL_REQUIRED_CALL(_get_script_signal_list, sl);
151: if (!GDVIRTUAL_REQUIRED_CALL(_has_property_default_value, p_property, has_dv) || !has_dv) {
155: GDVIRTUAL_REQUIRED_CALL(_get_property_default_value, p_property, ret);
166: GDVIRTUAL_REQUIRED_CALL(_get_script_method_list, sl);
176: GDVIRTUAL_REQUIRED_CALL(_get_script_property_list, sl);
188: GDVIRTUAL_REQUIRED_CALL(_get_constants, constants);
198: GDVIRTUAL_REQUIRED_CALL(_get_members, members);
210: GDVIRTUAL_REQUIRED_CALL(_get_rpc_config, ret);
240: GDVIRTUAL_REQUIRED_CALL(_get_reserved_words, ret);
251: GDVIRTUAL_REQUIRED_CALL(_get_comment_delimiters, ret);
271: GDVIRTUAL_REQUIRED_CALL(_get_string_delimiters, ret);
283: GDVIRTUAL_REQUIRED_CALL(_get_built_in_templates, p_object, ret);
310: GDVIRTUAL_REQUIRED_CALL(_validate, p_script, p_path, r_functions != nullptr, r_errors != nullptr, r_warnings != nullptr, r_safe_lines != nullptr, ret);
377: GDVIRTUAL_REQUIRED_CALL(_create_script, ret);
407: GDVIRTUAL_REQUIRED_CALL(_complete_code, p_code, p_path, p_owner, ret);
456: GDVIRTUAL_REQUIRED_CALL(_lookup_code, p_code, p_symbol, p_path, p_owner, ret);
480: GDVIRTUAL_REQUIRED_CALL(_auto_indent_code, p_code, p_from_line, p_to_line, ret);
502: GDVIRTUAL_REQUIRED_CALL(_debug_get_stack_level_locals, p_level, p_max_subitems, p_max_depth, ret);
522: GDVIRTUAL_REQUIRED_CALL(_debug_get_stack_level_members, p_level, p_max_subitems, p_max_depth, ret);
543: GDVIRTUAL_REQUIRED_CALL(_debug_get_stack_level_instance, p_level, ret);
549: GDVIRTUAL_REQUIRED_CALL(_debug_get_globals, p_max_subitems, p_max_depth, ret);
572: GDVIRTUAL_REQUIRED_CALL(_debug_get_current_stack_info, ret);
597: GDVIRTUAL_REQUIRED_CALL(_get_recognized_extensions, ret);
606: GDVIRTUAL_REQUIRED_CALL(_get_public_functions, ret);
615: GDVIRTUAL_REQUIRED_CALL(_get_public_constants, ret);
626: GDVIRTUAL_REQUIRED_CALL(_get_public_annotations, ret);
641: GDVIRTUAL_REQUIRED_CALL(_profiling_get_accumulated_data, p_info_arr, p_info_max, ret);
649: GDVIRTUAL_REQUIRED_CALL(_profiling_get_accumulated_data, p_info_arr, p_info_max, ret);
661: GDVIRTUAL_REQUIRED_CALL(_get_global_class_name, p_path, ret);
editor/export/editor_export_plugin.cpp
182: GDVIRTUAL_REQUIRED_CALL(_customize_resource, p_resource, p_path, ret);
194: GDVIRTUAL_REQUIRED_CALL(_customize_scene, p_root, p_path, ret);
200: GDVIRTUAL_REQUIRED_CALL(_get_customization_configuration_hash, ret);
214: GDVIRTUAL_REQUIRED_CALL(_get_name, ret);
editor/editor_vcs_interface.cpp
44: GDVIRTUAL_REQUIRED_CALL(_initialize, p_project_path, result);
49: GDVIRTUAL_REQUIRED_CALL(_set_credentials, p_username, p_password, p_ssh_public_key, p_ssh_private_key, p_ssh_passphrase);
54: if (!GDVIRTUAL_REQUIRED_CALL(_get_remotes, result)) {
67: if (!GDVIRTUAL_REQUIRED_CALL(_get_modified_files_data, result)) {
79: GDVIRTUAL_REQUIRED_CALL(_stage_file, p_file_path);
83: GDVIRTUAL_REQUIRED_CALL(_unstage_file, p_file_path);
87: GDVIRTUAL_REQUIRED_CALL(_discard_file, p_file_path);
91: GDVIRTUAL_REQUIRED_CALL(_commit, p_msg);
96: if (!GDVIRTUAL_REQUIRED_CALL(_get_diff, p_identifier, int(p_area), result)) {
109: if (!GDVIRTUAL_REQUIRED_CALL(_get_previous_commits, p_max_commits, result)) {
122: if (!GDVIRTUAL_REQUIRED_CALL(_get_branch_list, result)) {
134: GDVIRTUAL_REQUIRED_CALL(_create_branch, p_branch_name);
138: GDVIRTUAL_REQUIRED_CALL(_create_remote, p_remote_name, p_remote_url);
142: GDVIRTUAL_REQUIRED_CALL(_remove_branch, p_branch_name);
146: GDVIRTUAL_REQUIRED_CALL(_remove_remote, p_remote_name);
151: GDVIRTUAL_REQUIRED_CALL(_get_current_branch_name, result);
157: GDVIRTUAL_REQUIRED_CALL(_checkout_branch, p_branch_name, result);
162: GDVIRTUAL_REQUIRED_CALL(_pull, p_remote);
166: GDVIRTUAL_REQUIRED_CALL(_push, p_remote, p_force);
170: GDVIRTUAL_REQUIRED_CALL(_fetch, p_remote);
175: if (!GDVIRTUAL_REQUIRED_CALL(_get_line_diff, p_file_path, p_text, result)) {
188: GDVIRTUAL_REQUIRED_CALL(_shut_down, result);
194: GDVIRTUAL_REQUIRED_CALL(_get_vcs_name, result);
servers/movie_writer/movie_writer.cpp
57: GDVIRTUAL_REQUIRED_CALL(_get_audio_mix_rate, ret);
62: GDVIRTUAL_REQUIRED_CALL(_get_audio_speaker_mode, ret);
68: GDVIRTUAL_REQUIRED_CALL(_write_begin, p_movie_size, p_fps, p_base_path, ret);
74: GDVIRTUAL_REQUIRED_CALL(_write_frame, p_image, p_audio_data, ret);
79: GDVIRTUAL_REQUIRED_CALL(_write_end);
84: GDVIRTUAL_REQUIRED_CALL(_handles_file, p_path, ret);
90: GDVIRTUAL_REQUIRED_CALL(_get_supported_extensions, exts);
servers/text/text_server_extension.cpp
354: GDVIRTUAL_REQUIRED_CALL(_has_feature, p_feature, ret);
360: GDVIRTUAL_REQUIRED_CALL(_get_name, ret);
366: GDVIRTUAL_REQUIRED_CALL(_get_features, ret);
371: GDVIRTUAL_REQUIRED_CALL(_free_rid, p_rid);
376: GDVIRTUAL_REQUIRED_CALL(_has, p_rid, ret);
432: GDVIRTUAL_REQUIRED_CALL(_create_font, ret);
583: GDVIRTUAL_REQUIRED_CALL(_font_set_fixed_size, p_font_rid, p_fixed_size);
588: GDVIRTUAL_REQUIRED_CALL(_font_get_fixed_size, p_font_rid, ret);
593: GDVIRTUAL_REQUIRED_CALL(_font_set_fixed_size_scale_mode, p_font_rid, p_fixed_size_scale_mode);
598: GDVIRTUAL_REQUIRED_CALL(_font_get_fixed_size_scale_mode, p_font_rid, ret);
704: GDVIRTUAL_REQUIRED_CALL(_font_get_size_cache_list, p_font_rid, ret);
709: GDVIRTUAL_REQUIRED_CALL(_font_clear_size_cache, p_font_rid);
713: GDVIRTUAL_REQUIRED_CALL(_font_remove_size_cache, p_font_rid, p_size);
717: GDVIRTUAL_REQUIRED_CALL(_font_set_ascent, p_font_rid, p_size, p_ascent);
722: GDVIRTUAL_REQUIRED_CALL(_font_get_ascent, p_font_rid, p_size, ret);
727: GDVIRTUAL_REQUIRED_CALL(_font_set_descent, p_font_rid, p_size, p_descent);
732: GDVIRTUAL_REQUIRED_CALL(_font_get_descent, p_font_rid, p_size, ret);
737: GDVIRTUAL_REQUIRED_CALL(_font_set_underline_position, p_font_rid, p_size, p_underline_position);
742: GDVIRTUAL_REQUIRED_CALL(_font_get_underline_position, p_font_rid, p_size, ret);
747: GDVIRTUAL_REQUIRED_CALL(_font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);
752: GDVIRTUAL_REQUIRED_CALL(_font_get_underline_thickness, p_font_rid, p_size, ret);
757: GDVIRTUAL_REQUIRED_CALL(_font_set_scale, p_font_rid, p_size, p_scale);
762: GDVIRTUAL_REQUIRED_CALL(_font_get_scale, p_font_rid, p_size, ret);
768: GDVIRTUAL_REQUIRED_CALL(_font_get_texture_count, p_font_rid, p_size, ret);
773: GDVIRTUAL_REQUIRED_CALL(_font_clear_textures, p_font_rid, p_size);
777: GDVIRTUAL_REQUIRED_CALL(_font_remove_texture, p_font_rid, p_size, p_texture_index);
781: GDVIRTUAL_REQUIRED_CALL(_font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);
786: GDVIRTUAL_REQUIRED_CALL(_font_get_texture_image, p_font_rid, p_size, p_texture_index, ret);
802: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_list, p_font_rid, p_size, ret);
807: GDVIRTUAL_REQUIRED_CALL(_font_clear_glyphs, p_font_rid, p_size);
811: GDVIRTUAL_REQUIRED_CALL(_font_remove_glyph, p_font_rid, p_size, p_glyph);
816: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret);
821: GDVIRTUAL_REQUIRED_CALL(_font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);
826: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret);
831: GDVIRTUAL_REQUIRED_CALL(_font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);
836: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_size, p_font_rid, p_size, p_glyph, ret);
841: GDVIRTUAL_REQUIRED_CALL(_font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);
846: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret);
851: GDVIRTUAL_REQUIRED_CALL(_font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);
856: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret);
861: GDVIRTUAL_REQUIRED_CALL(_font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);
866: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret);
872: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret);
908: GDVIRTUAL_REQUIRED_CALL(_font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret);
914: GDVIRTUAL_REQUIRED_CALL(_font_get_char_from_glyph_index, p_font_rid, p_size, p_glyph_index, ret);
920: GDVIRTUAL_REQUIRED_CALL(_font_has_char, p_font_rid, p_char, ret);
926: GDVIRTUAL_REQUIRED_CALL(_font_get_supported_chars, p_font_rid, ret);
939: GDVIRTUAL_REQUIRED_CALL(_font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);
943: GDVIRTUAL_REQUIRED_CALL(_font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
1050: GDVIRTUAL_REQUIRED_CALL(_create_shaped_text, p_direction, p_orientation, ret);
1055: GDVIRTUAL_REQUIRED_CALL(_shaped_text_clear, p_shaped);
1140: GDVIRTUAL_REQUIRED_CALL(_shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret);
1146: GDVIRTUAL_REQUIRED_CALL(_shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, p_baseline, ret);
1152: GDVIRTUAL_REQUIRED_CALL(_shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, p_baseline, ret);
1158: GDVIRTUAL_REQUIRED_CALL(_shaped_get_span_count, p_shaped, ret);
1164: GDVIRTUAL_REQUIRED_CALL(_shaped_get_span_meta, p_shaped, p_index, ret);
1169: GDVIRTUAL_REQUIRED_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
1174: GDVIRTUAL_REQUIRED_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret);
1180: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_parent, p_shaped, ret);
1198: GDVIRTUAL_REQUIRED_CALL(_shaped_text_shape, p_shaped, ret);
1216: GDVIRTUAL_REQUIRED_CALL(_shaped_text_is_ready, p_shaped, ret);
1222: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_glyphs, p_shaped, ret);
1228: GDVIRTUAL_REQUIRED_CALL(_shaped_text_sort_logical, p_shaped, ret);
1234: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_glyph_count, p_shaped, ret);
1240: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_range, p_shaped, ret);
1270: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_trim_pos, p_shaped, ret);
1276: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_ellipsis_pos, p_shaped, ret);
1282: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret);
1288: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_ellipsis_glyph_count, p_shaped, ret);
1298: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_objects, p_shaped, ret);
1304: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_object_rect, p_shaped, p_key, ret);
1310: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_object_range, p_shaped, p_key, ret);
1316: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_object_glyph, p_shaped, p_key, ret);
1322: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_size, p_shaped, ret);
1328: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_ascent, p_shaped, ret);
1334: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_descent, p_shaped, ret);
1340: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_width, p_shaped, ret);
1346: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_underline_position, p_shaped, ret);
1352: GDVIRTUAL_REQUIRED_CALL(_shaped_text_get_underline_thickness, p_shaped, ret);
servers/physics_server_3d.cpp
40: GDVIRTUAL_REQUIRED_CALL(_set_vertex, p_vertex_id, p_vertex);
43: GDVIRTUAL_REQUIRED_CALL(_set_normal, p_vertex_id, p_normal);
46: GDVIRTUAL_REQUIRED_CALL(_set_aabb, p_aabb);
servers/audio/audio_stream.cpp
75: GDVIRTUAL_REQUIRED_CALL(_mix, p_buffer, p_rate_scale, p_frames, ret);
120: GDVIRTUAL_REQUIRED_CALL(_mix_resampled, p_buffer, p_frames, ret);
125: GDVIRTUAL_REQUIRED_CALL(_get_stream_sampling_rate, ret);
servers/audio/audio_effect.cpp
34: GDVIRTUAL_REQUIRED_CALL(_process, p_src_frames, p_dst_frames, p_frame_count);
51: GDVIRTUAL_REQUIRED_CALL(_instantiate, ret);
servers/extensions/physics_server_3d_extension.h
144: GDVIRTUAL_REQUIRED_CALL(_intersect_ray, p_parameters.from, p_parameters.to, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, p_parameters.hit_from_inside, p_parameters.hit_back_faces, p_parameters.pick_ray, &r_result, ret);
151: GDVIRTUAL_REQUIRED_CALL(_intersect_point, p_parameters.position, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, ret);
158: GDVIRTUAL_REQUIRED_CALL(_intersect_shape, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, ret);
165: GDVIRTUAL_REQUIRED_CALL(_cast_motion, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, &p_closest_safe, &p_closest_unsafe, r_info, ret);
172: GDVIRTUAL_REQUIRED_CALL(_collide_shape, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, &r_result_count, ret);
179: GDVIRTUAL_REQUIRED_CALL(_rest_info, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_info, ret);
186: GDVIRTUAL_REQUIRED_CALL(_get_closest_point_to_object_volume, p_object, p_point, ret);
366: GDVIRTUAL_REQUIRED_CALL(_body_get_collision_exceptions, p_body, ret);
398: GDVIRTUAL_REQUIRED_CALL(_body_test_motion, p_body, p_parameters.from, p_parameters.motion, p_parameters.margin, p_parameters.max_collisions, p_parameters.collide_separation_ray, p_parameters.recovery_as_collision, r_result, ret);
430: GDVIRTUAL_REQUIRED_CALL(_soft_body_get_collision_exceptions, p_soft_body, ret);
525: GDVIRTUAL_REQUIRED_CALL(_free_rid, p_rid);
servers/extensions/physics_server_2d_extension.h
141: GDVIRTUAL_REQUIRED_CALL(_intersect_ray, p_parameters.from, p_parameters.to, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, p_parameters.hit_from_inside, &r_result, ret);
148: GDVIRTUAL_REQUIRED_CALL(_intersect_point, p_parameters.position, p_parameters.canvas_instance_id, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, ret);
155: GDVIRTUAL_REQUIRED_CALL(_intersect_shape, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, ret);
162: GDVIRTUAL_REQUIRED_CALL(_cast_motion, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, &p_closest_safe, &p_closest_unsafe, ret);
169: GDVIRTUAL_REQUIRED_CALL(_collide_shape, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_results, p_result_max, &r_result_count, ret);
176: GDVIRTUAL_REQUIRED_CALL(_rest_info, p_parameters.shape_rid, p_parameters.transform, p_parameters.motion, p_parameters.margin, p_parameters.collision_mask, p_parameters.collide_with_bodies, p_parameters.collide_with_areas, r_info, ret);
221: GDVIRTUAL_REQUIRED_CALL(_shape_collide, p_shape_A, p_xform_A, p_motion_A, p_shape_B, p_xform_B, p_motion_B, r_results, p_result_max, &r_result_count, ret);
361: GDVIRTUAL_REQUIRED_CALL(_body_get_collision_exceptions, p_body, ret);
381: GDVIRTUAL_REQUIRED_CALL(_body_collide_shape, p_body, p_body_shape, p_shape, p_shape_xform, p_motion, r_results, p_result_max, &r_result_count, ret);
401: GDVIRTUAL_REQUIRED_CALL(_body_test_motion, p_body, p_parameters.from, p_parameters.motion, p_parameters.margin, p_parameters.collide_separation_ray, p_parameters.recovery_as_collision, r_result, ret);
437: GDVIRTUAL_REQUIRED_CALL(_free_rid, p_rid);
editor/editor_script.cpp
65: GDVIRTUAL_REQUIRED_CALL(_run);
scene/resources/video_stream.cpp
122: GDVIRTUAL_REQUIRED_CALL(_update, p_delta);
editor/editor_file_system.h
122: GDVIRTUAL_REQUIRED_CALL(_is_active, ret);
127: GDVIRTUAL_REQUIRED_CALL(_get_file_extensions, ret);
132: GDVIRTUAL_REQUIRED_CALL(_query, ret);
scene/resources/mesh.cpp
208: GDVIRTUAL_REQUIRED_CALL(_get_surface_count, ret);
214: GDVIRTUAL_REQUIRED_CALL(_surface_get_array_len, p_idx, ret);
220: GDVIRTUAL_REQUIRED_CALL(_surface_get_array_index_len, p_idx, ret);
226: GDVIRTUAL_REQUIRED_CALL(_surface_get_arrays, p_surface, ret);
232: GDVIRTUAL_REQUIRED_CALL(_surface_get_blend_shape_arrays, p_surface, ret);
238: GDVIRTUAL_REQUIRED_CALL(_surface_get_lods, p_surface, ret);
244: GDVIRTUAL_REQUIRED_CALL(_surface_get_format, p_idx, ret);
250: GDVIRTUAL_REQUIRED_CALL(_surface_get_primitive_type, p_idx, ret);
255: GDVIRTUAL_REQUIRED_CALL(_surface_set_material, p_idx, p_material);
260: GDVIRTUAL_REQUIRED_CALL(_surface_get_material, p_idx, ret);
266: GDVIRTUAL_REQUIRED_CALL(_get_blend_shape_count, ret);
272: GDVIRTUAL_REQUIRED_CALL(_get_blend_shape_name, p_index, ret);
277: GDVIRTUAL_REQUIRED_CALL(_set_blend_shape_name, p_index, p_name);
282: GDVIRTUAL_REQUIRED_CALL(_get_aabb, ret);
scene/resources/texture.cpp
37: GDVIRTUAL_REQUIRED_CALL(_get_width, ret);
43: GDVIRTUAL_REQUIRED_CALL(_get_height, ret);
136: GDVIRTUAL_REQUIRED_CALL(_get_format, ret);
142: GDVIRTUAL_REQUIRED_CALL(_get_width, ret);
148: GDVIRTUAL_REQUIRED_CALL(_get_height, ret);
154: GDVIRTUAL_REQUIRED_CALL(_get_depth, ret);
160: GDVIRTUAL_REQUIRED_CALL(_has_mipmaps, ret);
166: GDVIRTUAL_REQUIRED_CALL(_get_data, ret);
201: GDVIRTUAL_REQUIRED_CALL(_get_format, ret);
207: GDVIRTUAL_REQUIRED_CALL(_get_layered_type, ret);
213: GDVIRTUAL_REQUIRED_CALL(_get_width, ret);
219: GDVIRTUAL_REQUIRED_CALL(_get_height, ret);
225: GDVIRTUAL_REQUIRED_CALL(_get_layers, ret);
231: GDVIRTUAL_REQUIRED_CALL(_has_mipmaps, ret);
237: GDVIRTUAL_REQUIRED_CALL(_get_layer_data, p_layer, ret);
scene/resources/style_box.cpp
93: GDVIRTUAL_REQUIRED_CALL(_draw, p_canvas_item, p_rect);
scene/resources/material.cpp
116: GDVIRTUAL_REQUIRED_CALL(_get_shader_rid, ret);
121: GDVIRTUAL_REQUIRED_CALL(_get_shader_mode, ret);
This is still a long list, but it's quite annoying to have these requirements as a runtime error.
I also started a proposal discussion because the engine should really just expose this information.