| 1 | /**************************************************************************/ |
| 2 | /* register_scene_types.cpp */ |
| 3 | /**************************************************************************/ |
| 4 | /* This file is part of: */ |
| 5 | /* GODOT ENGINE */ |
| 6 | /* https://godotengine.org */ |
| 7 | /**************************************************************************/ |
| 8 | /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ |
| 9 | /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ |
| 10 | /* */ |
| 11 | /* Permission is hereby granted, free of charge, to any person obtaining */ |
| 12 | /* a copy of this software and associated documentation files (the */ |
| 13 | /* "Software"), to deal in the Software without restriction, including */ |
| 14 | /* without limitation the rights to use, copy, modify, merge, publish, */ |
| 15 | /* distribute, sublicense, and/or sell copies of the Software, and to */ |
| 16 | /* permit persons to whom the Software is furnished to do so, subject to */ |
| 17 | /* the following conditions: */ |
| 18 | /* */ |
| 19 | /* The above copyright notice and this permission notice shall be */ |
| 20 | /* included in all copies or substantial portions of the Software. */ |
| 21 | /* */ |
| 22 | /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ |
| 23 | /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
| 24 | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
| 25 | /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
| 26 | /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ |
| 27 | /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ |
| 28 | /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
| 29 | /**************************************************************************/ |
| 30 | |
| 31 | #include "register_scene_types.h" |
| 32 | |
| 33 | #include "core/config/project_settings.h" |
| 34 | #include "core/extension/gdextension_manager.h" |
| 35 | #include "core/object/class_db.h" |
| 36 | #include "core/os/os.h" |
| 37 | #include "scene/2d/animated_sprite_2d.h" |
| 38 | #include "scene/2d/area_2d.h" |
| 39 | #include "scene/2d/audio_listener_2d.h" |
| 40 | #include "scene/2d/audio_stream_player_2d.h" |
| 41 | #include "scene/2d/back_buffer_copy.h" |
| 42 | #include "scene/2d/camera_2d.h" |
| 43 | #include "scene/2d/canvas_group.h" |
| 44 | #include "scene/2d/canvas_modulate.h" |
| 45 | #include "scene/2d/collision_polygon_2d.h" |
| 46 | #include "scene/2d/collision_shape_2d.h" |
| 47 | #include "scene/2d/cpu_particles_2d.h" |
| 48 | #include "scene/2d/gpu_particles_2d.h" |
| 49 | #include "scene/2d/joint_2d.h" |
| 50 | #include "scene/2d/light_2d.h" |
| 51 | #include "scene/2d/light_occluder_2d.h" |
| 52 | #include "scene/2d/line_2d.h" |
| 53 | #include "scene/2d/marker_2d.h" |
| 54 | #include "scene/2d/mesh_instance_2d.h" |
| 55 | #include "scene/2d/multimesh_instance_2d.h" |
| 56 | #include "scene/2d/navigation_agent_2d.h" |
| 57 | #include "scene/2d/navigation_link_2d.h" |
| 58 | #include "scene/2d/navigation_obstacle_2d.h" |
| 59 | #include "scene/2d/navigation_region_2d.h" |
| 60 | #include "scene/2d/parallax_background.h" |
| 61 | #include "scene/2d/parallax_layer.h" |
| 62 | #include "scene/2d/path_2d.h" |
| 63 | #include "scene/2d/physical_bone_2d.h" |
| 64 | #include "scene/2d/physics_body_2d.h" |
| 65 | #include "scene/2d/polygon_2d.h" |
| 66 | #include "scene/2d/ray_cast_2d.h" |
| 67 | #include "scene/2d/remote_transform_2d.h" |
| 68 | #include "scene/2d/shape_cast_2d.h" |
| 69 | #include "scene/2d/skeleton_2d.h" |
| 70 | #include "scene/2d/sprite_2d.h" |
| 71 | #include "scene/2d/tile_map.h" |
| 72 | #include "scene/2d/touch_screen_button.h" |
| 73 | #include "scene/2d/visible_on_screen_notifier_2d.h" |
| 74 | #include "scene/animation/animation_blend_space_1d.h" |
| 75 | #include "scene/animation/animation_blend_space_2d.h" |
| 76 | #include "scene/animation/animation_blend_tree.h" |
| 77 | #include "scene/animation/animation_node_state_machine.h" |
| 78 | #include "scene/animation/animation_player.h" |
| 79 | #include "scene/animation/animation_tree.h" |
| 80 | #include "scene/animation/root_motion_view.h" |
| 81 | #include "scene/animation/tween.h" |
| 82 | #include "scene/audio/audio_stream_player.h" |
| 83 | #include "scene/debugger/scene_debugger.h" |
| 84 | #include "scene/gui/aspect_ratio_container.h" |
| 85 | #include "scene/gui/box_container.h" |
| 86 | #include "scene/gui/button.h" |
| 87 | #include "scene/gui/center_container.h" |
| 88 | #include "scene/gui/check_box.h" |
| 89 | #include "scene/gui/check_button.h" |
| 90 | #include "scene/gui/code_edit.h" |
| 91 | #include "scene/gui/color_picker.h" |
| 92 | #include "scene/gui/color_rect.h" |
| 93 | #include "scene/gui/control.h" |
| 94 | #include "scene/gui/dialogs.h" |
| 95 | #include "scene/gui/file_dialog.h" |
| 96 | #include "scene/gui/flow_container.h" |
| 97 | #include "scene/gui/graph_edit.h" |
| 98 | #include "scene/gui/graph_node.h" |
| 99 | #include "scene/gui/grid_container.h" |
| 100 | #include "scene/gui/item_list.h" |
| 101 | #include "scene/gui/label.h" |
| 102 | #include "scene/gui/line_edit.h" |
| 103 | #include "scene/gui/link_button.h" |
| 104 | #include "scene/gui/margin_container.h" |
| 105 | #include "scene/gui/menu_bar.h" |
| 106 | #include "scene/gui/menu_button.h" |
| 107 | #include "scene/gui/nine_patch_rect.h" |
| 108 | #include "scene/gui/option_button.h" |
| 109 | #include "scene/gui/panel.h" |
| 110 | #include "scene/gui/panel_container.h" |
| 111 | #include "scene/gui/popup_menu.h" |
| 112 | #include "scene/gui/progress_bar.h" |
| 113 | #include "scene/gui/reference_rect.h" |
| 114 | #include "scene/gui/rich_text_effect.h" |
| 115 | #include "scene/gui/rich_text_label.h" |
| 116 | #include "scene/gui/scroll_bar.h" |
| 117 | #include "scene/gui/scroll_container.h" |
| 118 | #include "scene/gui/separator.h" |
| 119 | #include "scene/gui/slider.h" |
| 120 | #include "scene/gui/spin_box.h" |
| 121 | #include "scene/gui/split_container.h" |
| 122 | #include "scene/gui/subviewport_container.h" |
| 123 | #include "scene/gui/tab_bar.h" |
| 124 | #include "scene/gui/tab_container.h" |
| 125 | #include "scene/gui/text_edit.h" |
| 126 | #include "scene/gui/texture_button.h" |
| 127 | #include "scene/gui/texture_progress_bar.h" |
| 128 | #include "scene/gui/texture_rect.h" |
| 129 | #include "scene/gui/tree.h" |
| 130 | #include "scene/gui/video_stream_player.h" |
| 131 | #include "scene/main/canvas_item.h" |
| 132 | #include "scene/main/canvas_layer.h" |
| 133 | #include "scene/main/http_request.h" |
| 134 | #include "scene/main/instance_placeholder.h" |
| 135 | #include "scene/main/missing_node.h" |
| 136 | #include "scene/main/multiplayer_api.h" |
| 137 | #include "scene/main/resource_preloader.h" |
| 138 | #include "scene/main/scene_tree.h" |
| 139 | #include "scene/main/timer.h" |
| 140 | #include "scene/main/viewport.h" |
| 141 | #include "scene/main/window.h" |
| 142 | #include "scene/resources/animated_texture.h" |
| 143 | #include "scene/resources/animation_library.h" |
| 144 | #include "scene/resources/atlas_texture.h" |
| 145 | #include "scene/resources/audio_stream_polyphonic.h" |
| 146 | #include "scene/resources/audio_stream_wav.h" |
| 147 | #include "scene/resources/bit_map.h" |
| 148 | #include "scene/resources/bone_map.h" |
| 149 | #include "scene/resources/box_shape_3d.h" |
| 150 | #include "scene/resources/camera_attributes.h" |
| 151 | #include "scene/resources/camera_texture.h" |
| 152 | #include "scene/resources/capsule_shape_2d.h" |
| 153 | #include "scene/resources/capsule_shape_3d.h" |
| 154 | #include "scene/resources/circle_shape_2d.h" |
| 155 | #include "scene/resources/compressed_texture.h" |
| 156 | #include "scene/resources/concave_polygon_shape_2d.h" |
| 157 | #include "scene/resources/concave_polygon_shape_3d.h" |
| 158 | #include "scene/resources/convex_polygon_shape_2d.h" |
| 159 | #include "scene/resources/convex_polygon_shape_3d.h" |
| 160 | #include "scene/resources/curve_texture.h" |
| 161 | #include "scene/resources/cylinder_shape_3d.h" |
| 162 | #include "scene/resources/environment.h" |
| 163 | #include "scene/resources/font.h" |
| 164 | #include "scene/resources/gradient.h" |
| 165 | #include "scene/resources/gradient_texture.h" |
| 166 | #include "scene/resources/height_map_shape_3d.h" |
| 167 | #include "scene/resources/image_texture.h" |
| 168 | #include "scene/resources/immediate_mesh.h" |
| 169 | #include "scene/resources/label_settings.h" |
| 170 | #include "scene/resources/material.h" |
| 171 | #include "scene/resources/mesh_data_tool.h" |
| 172 | #include "scene/resources/mesh_texture.h" |
| 173 | #include "scene/resources/multimesh.h" |
| 174 | #include "scene/resources/navigation_mesh.h" |
| 175 | #include "scene/resources/navigation_mesh_source_geometry_data_3d.h" |
| 176 | #include "scene/resources/navigation_polygon.h" |
| 177 | #include "scene/resources/packed_scene.h" |
| 178 | #include "scene/resources/particle_process_material.h" |
| 179 | #include "scene/resources/physics_material.h" |
| 180 | #include "scene/resources/placeholder_textures.h" |
| 181 | #include "scene/resources/polygon_path_finder.h" |
| 182 | #include "scene/resources/portable_compressed_texture.h" |
| 183 | #include "scene/resources/primitive_meshes.h" |
| 184 | #include "scene/resources/rectangle_shape_2d.h" |
| 185 | #include "scene/resources/resource_format_text.h" |
| 186 | #include "scene/resources/segment_shape_2d.h" |
| 187 | #include "scene/resources/separation_ray_shape_2d.h" |
| 188 | #include "scene/resources/separation_ray_shape_3d.h" |
| 189 | #include "scene/resources/shader_include.h" |
| 190 | #include "scene/resources/skeleton_modification_2d.h" |
| 191 | #include "scene/resources/skeleton_modification_2d_ccdik.h" |
| 192 | #include "scene/resources/skeleton_modification_2d_fabrik.h" |
| 193 | #include "scene/resources/skeleton_modification_2d_jiggle.h" |
| 194 | #include "scene/resources/skeleton_modification_2d_lookat.h" |
| 195 | #include "scene/resources/skeleton_modification_2d_physicalbones.h" |
| 196 | #include "scene/resources/skeleton_modification_2d_stackholder.h" |
| 197 | #include "scene/resources/skeleton_modification_2d_twoboneik.h" |
| 198 | #include "scene/resources/skeleton_modification_stack_2d.h" |
| 199 | #include "scene/resources/skeleton_profile.h" |
| 200 | #include "scene/resources/sky.h" |
| 201 | #include "scene/resources/sky_material.h" |
| 202 | #include "scene/resources/sphere_shape_3d.h" |
| 203 | #include "scene/resources/style_box.h" |
| 204 | #include "scene/resources/style_box_flat.h" |
| 205 | #include "scene/resources/style_box_line.h" |
| 206 | #include "scene/resources/style_box_texture.h" |
| 207 | #include "scene/resources/surface_tool.h" |
| 208 | #include "scene/resources/syntax_highlighter.h" |
| 209 | #include "scene/resources/text_file.h" |
| 210 | #include "scene/resources/text_line.h" |
| 211 | #include "scene/resources/text_paragraph.h" |
| 212 | #include "scene/resources/texture.h" |
| 213 | #include "scene/resources/texture_rd.h" |
| 214 | #include "scene/resources/theme.h" |
| 215 | #include "scene/resources/tile_set.h" |
| 216 | #include "scene/resources/video_stream.h" |
| 217 | #include "scene/resources/visual_shader.h" |
| 218 | #include "scene/resources/visual_shader_nodes.h" |
| 219 | #include "scene/resources/visual_shader_particle_nodes.h" |
| 220 | #include "scene/resources/visual_shader_sdf_nodes.h" |
| 221 | #include "scene/resources/world_2d.h" |
| 222 | #include "scene/resources/world_3d.h" |
| 223 | #include "scene/resources/world_boundary_shape_2d.h" |
| 224 | #include "scene/resources/world_boundary_shape_3d.h" |
| 225 | #include "scene/scene_string_names.h" |
| 226 | #include "scene/theme/theme_db.h" |
| 227 | |
| 228 | #include "scene/main/shader_globals_override.h" |
| 229 | |
| 230 | #ifndef _3D_DISABLED |
| 231 | #include "scene/3d/area_3d.h" |
| 232 | #include "scene/3d/audio_listener_3d.h" |
| 233 | #include "scene/3d/audio_stream_player_3d.h" |
| 234 | #include "scene/3d/bone_attachment_3d.h" |
| 235 | #include "scene/3d/camera_3d.h" |
| 236 | #include "scene/3d/collision_polygon_3d.h" |
| 237 | #include "scene/3d/collision_shape_3d.h" |
| 238 | #include "scene/3d/cpu_particles_3d.h" |
| 239 | #include "scene/3d/decal.h" |
| 240 | #include "scene/3d/fog_volume.h" |
| 241 | #include "scene/3d/gpu_particles_3d.h" |
| 242 | #include "scene/3d/gpu_particles_collision_3d.h" |
| 243 | #include "scene/3d/importer_mesh_instance_3d.h" |
| 244 | #include "scene/3d/joint_3d.h" |
| 245 | #include "scene/3d/label_3d.h" |
| 246 | #include "scene/3d/light_3d.h" |
| 247 | #include "scene/3d/lightmap_gi.h" |
| 248 | #include "scene/3d/lightmap_probe.h" |
| 249 | #include "scene/3d/marker_3d.h" |
| 250 | #include "scene/3d/mesh_instance_3d.h" |
| 251 | #include "scene/3d/multimesh_instance_3d.h" |
| 252 | #include "scene/3d/navigation_agent_3d.h" |
| 253 | #include "scene/3d/navigation_link_3d.h" |
| 254 | #include "scene/3d/navigation_obstacle_3d.h" |
| 255 | #include "scene/3d/navigation_region_3d.h" |
| 256 | #include "scene/3d/node_3d.h" |
| 257 | #include "scene/3d/occluder_instance_3d.h" |
| 258 | #include "scene/3d/path_3d.h" |
| 259 | #include "scene/3d/physics_body_3d.h" |
| 260 | #include "scene/3d/ray_cast_3d.h" |
| 261 | #include "scene/3d/reflection_probe.h" |
| 262 | #include "scene/3d/remote_transform_3d.h" |
| 263 | #include "scene/3d/shape_cast_3d.h" |
| 264 | #include "scene/3d/skeleton_3d.h" |
| 265 | #include "scene/3d/skeleton_ik_3d.h" |
| 266 | #include "scene/3d/soft_body_3d.h" |
| 267 | #include "scene/3d/spring_arm_3d.h" |
| 268 | #include "scene/3d/sprite_3d.h" |
| 269 | #include "scene/3d/vehicle_body_3d.h" |
| 270 | #include "scene/3d/visible_on_screen_notifier_3d.h" |
| 271 | #include "scene/3d/voxel_gi.h" |
| 272 | #include "scene/3d/world_environment.h" |
| 273 | #include "scene/3d/xr_nodes.h" |
| 274 | #include "scene/resources/environment.h" |
| 275 | #include "scene/resources/fog_material.h" |
| 276 | #include "scene/resources/importer_mesh.h" |
| 277 | #include "scene/resources/mesh_library.h" |
| 278 | #endif // _3D_DISABLED |
| 279 | |
| 280 | static Ref<ResourceFormatSaverText> resource_saver_text; |
| 281 | static Ref<ResourceFormatLoaderText> resource_loader_text; |
| 282 | |
| 283 | static Ref<ResourceFormatLoaderCompressedTexture2D> resource_loader_stream_texture; |
| 284 | static Ref<ResourceFormatLoaderCompressedTextureLayered> resource_loader_texture_layered; |
| 285 | static Ref<ResourceFormatLoaderCompressedTexture3D> resource_loader_texture_3d; |
| 286 | |
| 287 | static Ref<ResourceFormatSaverShader> resource_saver_shader; |
| 288 | static Ref<ResourceFormatLoaderShader> resource_loader_shader; |
| 289 | |
| 290 | static Ref<ResourceFormatSaverShaderInclude> resource_saver_shader_include; |
| 291 | static Ref<ResourceFormatLoaderShaderInclude> resource_loader_shader_include; |
| 292 | |
| 293 | void register_scene_types() { |
| 294 | SceneStringNames::create(); |
| 295 | |
| 296 | OS::get_singleton()->yield(); // may take time to init |
| 297 | |
| 298 | Node::init_node_hrcr(); |
| 299 | |
| 300 | resource_loader_stream_texture.instantiate(); |
| 301 | ResourceLoader::add_resource_format_loader(resource_loader_stream_texture); |
| 302 | |
| 303 | resource_loader_texture_layered.instantiate(); |
| 304 | ResourceLoader::add_resource_format_loader(resource_loader_texture_layered); |
| 305 | |
| 306 | resource_loader_texture_3d.instantiate(); |
| 307 | ResourceLoader::add_resource_format_loader(resource_loader_texture_3d); |
| 308 | |
| 309 | resource_saver_text.instantiate(); |
| 310 | ResourceSaver::add_resource_format_saver(resource_saver_text, true); |
| 311 | |
| 312 | resource_loader_text.instantiate(); |
| 313 | ResourceLoader::add_resource_format_loader(resource_loader_text, true); |
| 314 | |
| 315 | resource_saver_shader.instantiate(); |
| 316 | ResourceSaver::add_resource_format_saver(resource_saver_shader, true); |
| 317 | |
| 318 | resource_loader_shader.instantiate(); |
| 319 | ResourceLoader::add_resource_format_loader(resource_loader_shader, true); |
| 320 | |
| 321 | resource_saver_shader_include.instantiate(); |
| 322 | ResourceSaver::add_resource_format_saver(resource_saver_shader_include, true); |
| 323 | |
| 324 | resource_loader_shader_include.instantiate(); |
| 325 | ResourceLoader::add_resource_format_loader(resource_loader_shader_include, true); |
| 326 | |
| 327 | OS::get_singleton()->yield(); // may take time to init |
| 328 | |
| 329 | GDREGISTER_CLASS(Object); |
| 330 | |
| 331 | GDREGISTER_CLASS(Node); |
| 332 | GDREGISTER_VIRTUAL_CLASS(MissingNode); |
| 333 | GDREGISTER_ABSTRACT_CLASS(InstancePlaceholder); |
| 334 | |
| 335 | GDREGISTER_ABSTRACT_CLASS(Viewport); |
| 336 | GDREGISTER_CLASS(SubViewport); |
| 337 | GDREGISTER_CLASS(ViewportTexture); |
| 338 | |
| 339 | GDREGISTER_ABSTRACT_CLASS(MultiplayerPeer); |
| 340 | GDREGISTER_CLASS(MultiplayerPeerExtension); |
| 341 | GDREGISTER_ABSTRACT_CLASS(MultiplayerAPI); |
| 342 | GDREGISTER_CLASS(MultiplayerAPIExtension); |
| 343 | |
| 344 | GDREGISTER_CLASS(HTTPRequest); |
| 345 | GDREGISTER_CLASS(Timer); |
| 346 | GDREGISTER_CLASS(CanvasLayer); |
| 347 | GDREGISTER_CLASS(CanvasModulate); |
| 348 | GDREGISTER_CLASS(ResourcePreloader); |
| 349 | GDREGISTER_CLASS(Window); |
| 350 | |
| 351 | /* REGISTER GUI */ |
| 352 | |
| 353 | GDREGISTER_CLASS(ButtonGroup); |
| 354 | GDREGISTER_VIRTUAL_CLASS(BaseButton); |
| 355 | |
| 356 | OS::get_singleton()->yield(); // may take time to init |
| 357 | |
| 358 | GDREGISTER_CLASS(Control); |
| 359 | GDREGISTER_CLASS(Button); |
| 360 | GDREGISTER_CLASS(Label); |
| 361 | GDREGISTER_ABSTRACT_CLASS(ScrollBar); |
| 362 | GDREGISTER_CLASS(HScrollBar); |
| 363 | GDREGISTER_CLASS(VScrollBar); |
| 364 | GDREGISTER_CLASS(ProgressBar); |
| 365 | GDREGISTER_ABSTRACT_CLASS(Slider); |
| 366 | GDREGISTER_CLASS(HSlider); |
| 367 | GDREGISTER_CLASS(VSlider); |
| 368 | GDREGISTER_CLASS(Popup); |
| 369 | GDREGISTER_CLASS(PopupPanel); |
| 370 | GDREGISTER_CLASS(MenuBar); |
| 371 | GDREGISTER_CLASS(MenuButton); |
| 372 | GDREGISTER_CLASS(CheckBox); |
| 373 | GDREGISTER_CLASS(CheckButton); |
| 374 | GDREGISTER_CLASS(LinkButton); |
| 375 | GDREGISTER_CLASS(Panel); |
| 376 | GDREGISTER_VIRTUAL_CLASS(Range); |
| 377 | |
| 378 | OS::get_singleton()->yield(); // may take time to init |
| 379 | |
| 380 | GDREGISTER_CLASS(TextureRect); |
| 381 | GDREGISTER_CLASS(ColorRect); |
| 382 | GDREGISTER_CLASS(NinePatchRect); |
| 383 | GDREGISTER_CLASS(ReferenceRect); |
| 384 | GDREGISTER_CLASS(AspectRatioContainer); |
| 385 | GDREGISTER_CLASS(TabContainer); |
| 386 | GDREGISTER_CLASS(TabBar); |
| 387 | GDREGISTER_ABSTRACT_CLASS(Separator); |
| 388 | GDREGISTER_CLASS(HSeparator); |
| 389 | GDREGISTER_CLASS(VSeparator); |
| 390 | GDREGISTER_CLASS(TextureButton); |
| 391 | GDREGISTER_CLASS(Container); |
| 392 | GDREGISTER_CLASS(BoxContainer); |
| 393 | GDREGISTER_CLASS(HBoxContainer); |
| 394 | GDREGISTER_CLASS(VBoxContainer); |
| 395 | GDREGISTER_CLASS(GridContainer); |
| 396 | GDREGISTER_CLASS(CenterContainer); |
| 397 | GDREGISTER_CLASS(ScrollContainer); |
| 398 | GDREGISTER_CLASS(PanelContainer); |
| 399 | GDREGISTER_CLASS(FlowContainer); |
| 400 | GDREGISTER_CLASS(HFlowContainer); |
| 401 | GDREGISTER_CLASS(VFlowContainer); |
| 402 | GDREGISTER_CLASS(MarginContainer); |
| 403 | |
| 404 | OS::get_singleton()->yield(); // may take time to init |
| 405 | |
| 406 | GDREGISTER_CLASS(TextureProgressBar); |
| 407 | GDREGISTER_CLASS(ItemList); |
| 408 | |
| 409 | GDREGISTER_CLASS(LineEdit); |
| 410 | GDREGISTER_CLASS(VideoStreamPlayer); |
| 411 | GDREGISTER_VIRTUAL_CLASS(VideoStreamPlayback); |
| 412 | GDREGISTER_VIRTUAL_CLASS(VideoStream); |
| 413 | |
| 414 | #ifndef ADVANCED_GUI_DISABLED |
| 415 | GDREGISTER_CLASS(FileDialog); |
| 416 | |
| 417 | GDREGISTER_CLASS(PopupMenu); |
| 418 | GDREGISTER_CLASS(Tree); |
| 419 | |
| 420 | GDREGISTER_CLASS(TextEdit); |
| 421 | GDREGISTER_CLASS(CodeEdit); |
| 422 | GDREGISTER_CLASS(SyntaxHighlighter); |
| 423 | GDREGISTER_CLASS(CodeHighlighter); |
| 424 | |
| 425 | GDREGISTER_ABSTRACT_CLASS(TreeItem); |
| 426 | GDREGISTER_CLASS(OptionButton); |
| 427 | GDREGISTER_CLASS(SpinBox); |
| 428 | GDREGISTER_CLASS(ColorPicker); |
| 429 | GDREGISTER_CLASS(ColorPickerButton); |
| 430 | GDREGISTER_CLASS(RichTextLabel); |
| 431 | GDREGISTER_CLASS(RichTextEffect); |
| 432 | GDREGISTER_CLASS(CharFXTransform); |
| 433 | |
| 434 | GDREGISTER_CLASS(AcceptDialog); |
| 435 | GDREGISTER_CLASS(ConfirmationDialog); |
| 436 | |
| 437 | GDREGISTER_CLASS(SubViewportContainer); |
| 438 | GDREGISTER_CLASS(SplitContainer); |
| 439 | GDREGISTER_CLASS(HSplitContainer); |
| 440 | GDREGISTER_CLASS(VSplitContainer); |
| 441 | |
| 442 | GDREGISTER_CLASS(GraphElement); |
| 443 | GDREGISTER_CLASS(GraphNode); |
| 444 | GDREGISTER_CLASS(GraphEdit); |
| 445 | |
| 446 | OS::get_singleton()->yield(); // may take time to init |
| 447 | |
| 448 | bool swap_cancel_ok = false; |
| 449 | if (DisplayServer::get_singleton()) { |
| 450 | swap_cancel_ok = GLOBAL_DEF_NOVAL("gui/common/swap_cancel_ok" , bool(DisplayServer::get_singleton()->get_swap_cancel_ok())); |
| 451 | } |
| 452 | AcceptDialog::set_swap_cancel_ok(swap_cancel_ok); |
| 453 | #endif |
| 454 | |
| 455 | /* REGISTER ANIMATION */ |
| 456 | |
| 457 | GDREGISTER_CLASS(AnimationPlayer); |
| 458 | GDREGISTER_CLASS(Tween); |
| 459 | GDREGISTER_ABSTRACT_CLASS(Tweener); |
| 460 | GDREGISTER_CLASS(PropertyTweener); |
| 461 | GDREGISTER_CLASS(IntervalTweener); |
| 462 | GDREGISTER_CLASS(CallbackTweener); |
| 463 | GDREGISTER_CLASS(MethodTweener); |
| 464 | |
| 465 | GDREGISTER_CLASS(AnimationTree); |
| 466 | GDREGISTER_CLASS(AnimationNode); |
| 467 | GDREGISTER_CLASS(AnimationRootNode); |
| 468 | GDREGISTER_CLASS(AnimationNodeBlendTree); |
| 469 | GDREGISTER_CLASS(AnimationNodeBlendSpace1D); |
| 470 | GDREGISTER_CLASS(AnimationNodeBlendSpace2D); |
| 471 | GDREGISTER_CLASS(AnimationNodeStateMachine); |
| 472 | GDREGISTER_CLASS(AnimationNodeStateMachinePlayback); |
| 473 | |
| 474 | GDREGISTER_CLASS(AnimationNodeSync); |
| 475 | GDREGISTER_CLASS(AnimationNodeStateMachineTransition); |
| 476 | GDREGISTER_CLASS(AnimationNodeOutput); |
| 477 | GDREGISTER_CLASS(AnimationNodeOneShot); |
| 478 | GDREGISTER_CLASS(AnimationNodeAnimation); |
| 479 | GDREGISTER_CLASS(AnimationNodeAdd2); |
| 480 | GDREGISTER_CLASS(AnimationNodeAdd3); |
| 481 | GDREGISTER_CLASS(AnimationNodeBlend2); |
| 482 | GDREGISTER_CLASS(AnimationNodeBlend3); |
| 483 | GDREGISTER_CLASS(AnimationNodeSub2); |
| 484 | GDREGISTER_CLASS(AnimationNodeTimeScale); |
| 485 | GDREGISTER_CLASS(AnimationNodeTimeSeek); |
| 486 | GDREGISTER_CLASS(AnimationNodeTransition); |
| 487 | |
| 488 | GDREGISTER_CLASS(ShaderGlobalsOverride); // can be used in any shader |
| 489 | |
| 490 | OS::get_singleton()->yield(); // may take time to init |
| 491 | |
| 492 | /* REGISTER 3D */ |
| 493 | |
| 494 | #ifndef _3D_DISABLED |
| 495 | GDREGISTER_CLASS(Node3D); |
| 496 | GDREGISTER_ABSTRACT_CLASS(Node3DGizmo); |
| 497 | GDREGISTER_CLASS(Skin); |
| 498 | GDREGISTER_ABSTRACT_CLASS(SkinReference); |
| 499 | GDREGISTER_CLASS(Skeleton3D); |
| 500 | GDREGISTER_CLASS(ImporterMesh); |
| 501 | GDREGISTER_CLASS(ImporterMeshInstance3D); |
| 502 | GDREGISTER_VIRTUAL_CLASS(VisualInstance3D); |
| 503 | GDREGISTER_VIRTUAL_CLASS(GeometryInstance3D); |
| 504 | GDREGISTER_CLASS(Camera3D); |
| 505 | GDREGISTER_CLASS(AudioListener3D); |
| 506 | GDREGISTER_CLASS(XRCamera3D); |
| 507 | GDREGISTER_ABSTRACT_CLASS(XRNode3D); |
| 508 | GDREGISTER_CLASS(XRController3D); |
| 509 | GDREGISTER_CLASS(XRAnchor3D); |
| 510 | GDREGISTER_CLASS(XROrigin3D); |
| 511 | GDREGISTER_CLASS(MeshInstance3D); |
| 512 | GDREGISTER_CLASS(OccluderInstance3D); |
| 513 | GDREGISTER_ABSTRACT_CLASS(Occluder3D); |
| 514 | GDREGISTER_CLASS(ArrayOccluder3D); |
| 515 | GDREGISTER_CLASS(QuadOccluder3D); |
| 516 | GDREGISTER_CLASS(BoxOccluder3D); |
| 517 | GDREGISTER_CLASS(SphereOccluder3D); |
| 518 | GDREGISTER_CLASS(PolygonOccluder3D); |
| 519 | GDREGISTER_ABSTRACT_CLASS(SpriteBase3D); |
| 520 | GDREGISTER_CLASS(Sprite3D); |
| 521 | GDREGISTER_CLASS(AnimatedSprite3D); |
| 522 | GDREGISTER_CLASS(Label3D); |
| 523 | GDREGISTER_ABSTRACT_CLASS(Light3D); |
| 524 | GDREGISTER_CLASS(DirectionalLight3D); |
| 525 | GDREGISTER_CLASS(OmniLight3D); |
| 526 | GDREGISTER_CLASS(SpotLight3D); |
| 527 | GDREGISTER_CLASS(ReflectionProbe); |
| 528 | GDREGISTER_CLASS(Decal); |
| 529 | GDREGISTER_CLASS(VoxelGI); |
| 530 | GDREGISTER_CLASS(VoxelGIData); |
| 531 | GDREGISTER_CLASS(LightmapGI); |
| 532 | GDREGISTER_CLASS(LightmapGIData); |
| 533 | GDREGISTER_CLASS(LightmapProbe); |
| 534 | GDREGISTER_ABSTRACT_CLASS(Lightmapper); |
| 535 | GDREGISTER_CLASS(GPUParticles3D); |
| 536 | GDREGISTER_ABSTRACT_CLASS(GPUParticlesCollision3D); |
| 537 | GDREGISTER_CLASS(GPUParticlesCollisionBox3D); |
| 538 | GDREGISTER_CLASS(GPUParticlesCollisionSphere3D); |
| 539 | GDREGISTER_CLASS(GPUParticlesCollisionSDF3D); |
| 540 | GDREGISTER_CLASS(GPUParticlesCollisionHeightField3D); |
| 541 | GDREGISTER_ABSTRACT_CLASS(GPUParticlesAttractor3D); |
| 542 | GDREGISTER_CLASS(GPUParticlesAttractorBox3D); |
| 543 | GDREGISTER_CLASS(GPUParticlesAttractorSphere3D); |
| 544 | GDREGISTER_CLASS(GPUParticlesAttractorVectorField3D); |
| 545 | GDREGISTER_CLASS(CPUParticles3D); |
| 546 | GDREGISTER_CLASS(Marker3D); |
| 547 | GDREGISTER_CLASS(RootMotionView); |
| 548 | |
| 549 | OS::get_singleton()->yield(); // may take time to init |
| 550 | |
| 551 | GDREGISTER_ABSTRACT_CLASS(CollisionObject3D); |
| 552 | GDREGISTER_ABSTRACT_CLASS(PhysicsBody3D); |
| 553 | GDREGISTER_CLASS(StaticBody3D); |
| 554 | GDREGISTER_CLASS(AnimatableBody3D); |
| 555 | GDREGISTER_CLASS(RigidBody3D); |
| 556 | GDREGISTER_CLASS(KinematicCollision3D); |
| 557 | GDREGISTER_CLASS(CharacterBody3D); |
| 558 | GDREGISTER_CLASS(SpringArm3D); |
| 559 | |
| 560 | GDREGISTER_CLASS(PhysicalBone3D); |
| 561 | GDREGISTER_CLASS(SoftBody3D); |
| 562 | |
| 563 | GDREGISTER_CLASS(SkeletonIK3D); |
| 564 | GDREGISTER_CLASS(BoneAttachment3D); |
| 565 | |
| 566 | GDREGISTER_CLASS(VehicleBody3D); |
| 567 | GDREGISTER_CLASS(VehicleWheel3D); |
| 568 | GDREGISTER_CLASS(Area3D); |
| 569 | GDREGISTER_CLASS(CollisionShape3D); |
| 570 | GDREGISTER_CLASS(CollisionPolygon3D); |
| 571 | GDREGISTER_CLASS(RayCast3D); |
| 572 | GDREGISTER_CLASS(ShapeCast3D); |
| 573 | GDREGISTER_CLASS(MultiMeshInstance3D); |
| 574 | |
| 575 | GDREGISTER_CLASS(Curve3D); |
| 576 | GDREGISTER_CLASS(Path3D); |
| 577 | GDREGISTER_CLASS(PathFollow3D); |
| 578 | GDREGISTER_CLASS(VisibleOnScreenNotifier3D); |
| 579 | GDREGISTER_CLASS(VisibleOnScreenEnabler3D); |
| 580 | GDREGISTER_CLASS(WorldEnvironment); |
| 581 | GDREGISTER_CLASS(FogVolume); |
| 582 | GDREGISTER_CLASS(FogMaterial); |
| 583 | GDREGISTER_CLASS(RemoteTransform3D); |
| 584 | |
| 585 | GDREGISTER_ABSTRACT_CLASS(Joint3D); |
| 586 | GDREGISTER_CLASS(PinJoint3D); |
| 587 | GDREGISTER_CLASS(HingeJoint3D); |
| 588 | GDREGISTER_CLASS(SliderJoint3D); |
| 589 | GDREGISTER_CLASS(ConeTwistJoint3D); |
| 590 | GDREGISTER_CLASS(Generic6DOFJoint3D); |
| 591 | |
| 592 | GDREGISTER_CLASS(NavigationRegion3D); |
| 593 | GDREGISTER_CLASS(NavigationAgent3D); |
| 594 | GDREGISTER_CLASS(NavigationObstacle3D); |
| 595 | GDREGISTER_CLASS(NavigationLink3D); |
| 596 | |
| 597 | OS::get_singleton()->yield(); // may take time to init |
| 598 | #endif // _3D_DISABLED |
| 599 | |
| 600 | /* REGISTER SHADER */ |
| 601 | |
| 602 | GDREGISTER_CLASS(Shader); |
| 603 | GDREGISTER_CLASS(VisualShader); |
| 604 | GDREGISTER_CLASS(ShaderInclude); |
| 605 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNode); |
| 606 | GDREGISTER_CLASS(VisualShaderNodeCustom); |
| 607 | GDREGISTER_CLASS(VisualShaderNodeInput); |
| 608 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeOutput); |
| 609 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeResizableBase); |
| 610 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeGroupBase); |
| 611 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeConstant); |
| 612 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeVectorBase); |
| 613 | GDREGISTER_CLASS(VisualShaderNodeComment); |
| 614 | GDREGISTER_CLASS(VisualShaderNodeFloatConstant); |
| 615 | GDREGISTER_CLASS(VisualShaderNodeIntConstant); |
| 616 | GDREGISTER_CLASS(VisualShaderNodeUIntConstant); |
| 617 | GDREGISTER_CLASS(VisualShaderNodeBooleanConstant); |
| 618 | GDREGISTER_CLASS(VisualShaderNodeColorConstant); |
| 619 | GDREGISTER_CLASS(VisualShaderNodeVec2Constant); |
| 620 | GDREGISTER_CLASS(VisualShaderNodeVec3Constant); |
| 621 | GDREGISTER_CLASS(VisualShaderNodeVec4Constant); |
| 622 | GDREGISTER_CLASS(VisualShaderNodeTransformConstant); |
| 623 | GDREGISTER_CLASS(VisualShaderNodeFloatOp); |
| 624 | GDREGISTER_CLASS(VisualShaderNodeIntOp); |
| 625 | GDREGISTER_CLASS(VisualShaderNodeUIntOp); |
| 626 | GDREGISTER_CLASS(VisualShaderNodeVectorOp); |
| 627 | GDREGISTER_CLASS(VisualShaderNodeColorOp); |
| 628 | GDREGISTER_CLASS(VisualShaderNodeTransformOp); |
| 629 | GDREGISTER_CLASS(VisualShaderNodeTransformVecMult); |
| 630 | GDREGISTER_CLASS(VisualShaderNodeFloatFunc); |
| 631 | GDREGISTER_CLASS(VisualShaderNodeIntFunc); |
| 632 | GDREGISTER_CLASS(VisualShaderNodeUIntFunc); |
| 633 | GDREGISTER_CLASS(VisualShaderNodeVectorFunc); |
| 634 | GDREGISTER_CLASS(VisualShaderNodeColorFunc); |
| 635 | GDREGISTER_CLASS(VisualShaderNodeTransformFunc); |
| 636 | GDREGISTER_CLASS(VisualShaderNodeUVFunc); |
| 637 | GDREGISTER_CLASS(VisualShaderNodeUVPolarCoord); |
| 638 | GDREGISTER_CLASS(VisualShaderNodeDotProduct); |
| 639 | GDREGISTER_CLASS(VisualShaderNodeVectorLen); |
| 640 | GDREGISTER_CLASS(VisualShaderNodeDeterminant); |
| 641 | GDREGISTER_CLASS(VisualShaderNodeDerivativeFunc); |
| 642 | GDREGISTER_CLASS(VisualShaderNodeClamp); |
| 643 | GDREGISTER_CLASS(VisualShaderNodeFaceForward); |
| 644 | GDREGISTER_CLASS(VisualShaderNodeOuterProduct); |
| 645 | GDREGISTER_CLASS(VisualShaderNodeSmoothStep); |
| 646 | GDREGISTER_CLASS(VisualShaderNodeStep); |
| 647 | GDREGISTER_CLASS(VisualShaderNodeVectorDistance); |
| 648 | GDREGISTER_CLASS(VisualShaderNodeVectorRefract); |
| 649 | GDREGISTER_CLASS(VisualShaderNodeMix); |
| 650 | GDREGISTER_CLASS(VisualShaderNodeVectorCompose); |
| 651 | GDREGISTER_CLASS(VisualShaderNodeTransformCompose); |
| 652 | GDREGISTER_CLASS(VisualShaderNodeVectorDecompose); |
| 653 | GDREGISTER_CLASS(VisualShaderNodeTransformDecompose); |
| 654 | GDREGISTER_CLASS(VisualShaderNodeTexture); |
| 655 | GDREGISTER_CLASS(VisualShaderNodeCurveTexture); |
| 656 | GDREGISTER_CLASS(VisualShaderNodeCurveXYZTexture); |
| 657 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeSample3D); |
| 658 | GDREGISTER_CLASS(VisualShaderNodeTexture2DArray); |
| 659 | GDREGISTER_CLASS(VisualShaderNodeTexture3D); |
| 660 | GDREGISTER_CLASS(VisualShaderNodeCubemap); |
| 661 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeParameter); |
| 662 | GDREGISTER_CLASS(VisualShaderNodeParameterRef); |
| 663 | GDREGISTER_CLASS(VisualShaderNodeFloatParameter); |
| 664 | GDREGISTER_CLASS(VisualShaderNodeIntParameter); |
| 665 | GDREGISTER_CLASS(VisualShaderNodeUIntParameter); |
| 666 | GDREGISTER_CLASS(VisualShaderNodeBooleanParameter); |
| 667 | GDREGISTER_CLASS(VisualShaderNodeColorParameter); |
| 668 | GDREGISTER_CLASS(VisualShaderNodeVec2Parameter); |
| 669 | GDREGISTER_CLASS(VisualShaderNodeVec3Parameter); |
| 670 | GDREGISTER_CLASS(VisualShaderNodeVec4Parameter); |
| 671 | GDREGISTER_CLASS(VisualShaderNodeTransformParameter); |
| 672 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeTextureParameter); |
| 673 | GDREGISTER_CLASS(VisualShaderNodeTexture2DParameter); |
| 674 | GDREGISTER_CLASS(VisualShaderNodeTextureParameterTriplanar); |
| 675 | GDREGISTER_CLASS(VisualShaderNodeTexture2DArrayParameter); |
| 676 | GDREGISTER_CLASS(VisualShaderNodeTexture3DParameter); |
| 677 | GDREGISTER_CLASS(VisualShaderNodeCubemapParameter); |
| 678 | GDREGISTER_CLASS(VisualShaderNodeLinearSceneDepth); |
| 679 | GDREGISTER_CLASS(VisualShaderNodeWorldPositionFromDepth); |
| 680 | GDREGISTER_CLASS(VisualShaderNodeScreenNormalWorldSpace); |
| 681 | GDREGISTER_CLASS(VisualShaderNodeIf); |
| 682 | GDREGISTER_CLASS(VisualShaderNodeSwitch); |
| 683 | GDREGISTER_CLASS(VisualShaderNodeFresnel); |
| 684 | GDREGISTER_CLASS(VisualShaderNodeExpression); |
| 685 | GDREGISTER_CLASS(VisualShaderNodeGlobalExpression); |
| 686 | GDREGISTER_CLASS(VisualShaderNodeIs); |
| 687 | GDREGISTER_CLASS(VisualShaderNodeCompare); |
| 688 | GDREGISTER_CLASS(VisualShaderNodeMultiplyAdd); |
| 689 | GDREGISTER_CLASS(VisualShaderNodeBillboard); |
| 690 | GDREGISTER_CLASS(VisualShaderNodeDistanceFade); |
| 691 | GDREGISTER_CLASS(VisualShaderNodeProximityFade); |
| 692 | GDREGISTER_CLASS(VisualShaderNodeRandomRange); |
| 693 | GDREGISTER_CLASS(VisualShaderNodeRemap); |
| 694 | GDREGISTER_CLASS(VisualShaderNodeRotationByAxis); |
| 695 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeVarying); |
| 696 | GDREGISTER_CLASS(VisualShaderNodeVaryingSetter); |
| 697 | GDREGISTER_CLASS(VisualShaderNodeVaryingGetter); |
| 698 | |
| 699 | GDREGISTER_CLASS(VisualShaderNodeSDFToScreenUV); |
| 700 | GDREGISTER_CLASS(VisualShaderNodeScreenUVToSDF); |
| 701 | GDREGISTER_CLASS(VisualShaderNodeTextureSDF); |
| 702 | GDREGISTER_CLASS(VisualShaderNodeTextureSDFNormal); |
| 703 | GDREGISTER_CLASS(VisualShaderNodeSDFRaymarch); |
| 704 | |
| 705 | GDREGISTER_CLASS(VisualShaderNodeParticleOutput); |
| 706 | GDREGISTER_ABSTRACT_CLASS(VisualShaderNodeParticleEmitter); |
| 707 | GDREGISTER_CLASS(VisualShaderNodeParticleSphereEmitter); |
| 708 | GDREGISTER_CLASS(VisualShaderNodeParticleBoxEmitter); |
| 709 | GDREGISTER_CLASS(VisualShaderNodeParticleRingEmitter); |
| 710 | GDREGISTER_CLASS(VisualShaderNodeParticleMeshEmitter); |
| 711 | GDREGISTER_CLASS(VisualShaderNodeParticleMultiplyByAxisAngle); |
| 712 | GDREGISTER_CLASS(VisualShaderNodeParticleConeVelocity); |
| 713 | GDREGISTER_CLASS(VisualShaderNodeParticleRandomness); |
| 714 | GDREGISTER_CLASS(VisualShaderNodeParticleAccelerator); |
| 715 | GDREGISTER_CLASS(VisualShaderNodeParticleEmit); |
| 716 | |
| 717 | GDREGISTER_VIRTUAL_CLASS(Material); |
| 718 | GDREGISTER_CLASS(PlaceholderMaterial); |
| 719 | GDREGISTER_CLASS(ShaderMaterial); |
| 720 | GDREGISTER_ABSTRACT_CLASS(CanvasItem); |
| 721 | GDREGISTER_CLASS(CanvasTexture); |
| 722 | GDREGISTER_CLASS(CanvasItemMaterial); |
| 723 | SceneTree::add_idle_callback(CanvasItemMaterial::flush_changes); |
| 724 | CanvasItemMaterial::init_shaders(); |
| 725 | |
| 726 | /* REGISTER 2D */ |
| 727 | |
| 728 | GDREGISTER_CLASS(Node2D); |
| 729 | GDREGISTER_CLASS(CanvasGroup); |
| 730 | GDREGISTER_CLASS(CPUParticles2D); |
| 731 | GDREGISTER_CLASS(GPUParticles2D); |
| 732 | GDREGISTER_CLASS(Sprite2D); |
| 733 | GDREGISTER_CLASS(SpriteFrames); |
| 734 | GDREGISTER_CLASS(AnimatedSprite2D); |
| 735 | GDREGISTER_CLASS(Marker2D); |
| 736 | GDREGISTER_CLASS(Line2D); |
| 737 | GDREGISTER_CLASS(MeshInstance2D); |
| 738 | GDREGISTER_CLASS(MultiMeshInstance2D); |
| 739 | GDREGISTER_ABSTRACT_CLASS(CollisionObject2D); |
| 740 | GDREGISTER_ABSTRACT_CLASS(PhysicsBody2D); |
| 741 | GDREGISTER_CLASS(StaticBody2D); |
| 742 | GDREGISTER_CLASS(AnimatableBody2D); |
| 743 | GDREGISTER_CLASS(RigidBody2D); |
| 744 | GDREGISTER_CLASS(CharacterBody2D); |
| 745 | GDREGISTER_CLASS(KinematicCollision2D); |
| 746 | GDREGISTER_CLASS(Area2D); |
| 747 | GDREGISTER_CLASS(CollisionShape2D); |
| 748 | GDREGISTER_CLASS(CollisionPolygon2D); |
| 749 | GDREGISTER_CLASS(RayCast2D); |
| 750 | GDREGISTER_CLASS(ShapeCast2D); |
| 751 | GDREGISTER_CLASS(VisibleOnScreenNotifier2D); |
| 752 | GDREGISTER_CLASS(VisibleOnScreenEnabler2D); |
| 753 | GDREGISTER_CLASS(Polygon2D); |
| 754 | GDREGISTER_CLASS(Skeleton2D); |
| 755 | GDREGISTER_CLASS(Bone2D); |
| 756 | GDREGISTER_ABSTRACT_CLASS(Light2D); |
| 757 | GDREGISTER_CLASS(PointLight2D); |
| 758 | GDREGISTER_CLASS(DirectionalLight2D); |
| 759 | GDREGISTER_CLASS(LightOccluder2D); |
| 760 | GDREGISTER_CLASS(OccluderPolygon2D); |
| 761 | GDREGISTER_CLASS(BackBufferCopy); |
| 762 | |
| 763 | OS::get_singleton()->yield(); // may take time to init |
| 764 | |
| 765 | GDREGISTER_CLASS(Camera2D); |
| 766 | GDREGISTER_CLASS(AudioListener2D); |
| 767 | GDREGISTER_ABSTRACT_CLASS(Joint2D); |
| 768 | GDREGISTER_CLASS(PinJoint2D); |
| 769 | GDREGISTER_CLASS(GrooveJoint2D); |
| 770 | GDREGISTER_CLASS(DampedSpringJoint2D); |
| 771 | GDREGISTER_CLASS(TileSet); |
| 772 | GDREGISTER_ABSTRACT_CLASS(TileSetSource); |
| 773 | GDREGISTER_CLASS(TileSetAtlasSource); |
| 774 | GDREGISTER_CLASS(TileSetScenesCollectionSource); |
| 775 | GDREGISTER_CLASS(TileMapPattern); |
| 776 | GDREGISTER_CLASS(TileData); |
| 777 | GDREGISTER_CLASS(TileMap); |
| 778 | GDREGISTER_CLASS(ParallaxBackground); |
| 779 | GDREGISTER_CLASS(ParallaxLayer); |
| 780 | GDREGISTER_CLASS(TouchScreenButton); |
| 781 | GDREGISTER_CLASS(RemoteTransform2D); |
| 782 | |
| 783 | GDREGISTER_CLASS(SkeletonModificationStack2D); |
| 784 | GDREGISTER_CLASS(SkeletonModification2D); |
| 785 | GDREGISTER_CLASS(SkeletonModification2DLookAt); |
| 786 | GDREGISTER_CLASS(SkeletonModification2DCCDIK); |
| 787 | GDREGISTER_CLASS(SkeletonModification2DFABRIK); |
| 788 | GDREGISTER_CLASS(SkeletonModification2DJiggle); |
| 789 | GDREGISTER_CLASS(SkeletonModification2DTwoBoneIK); |
| 790 | GDREGISTER_CLASS(SkeletonModification2DStackHolder); |
| 791 | |
| 792 | GDREGISTER_CLASS(PhysicalBone2D); |
| 793 | GDREGISTER_CLASS(SkeletonModification2DPhysicalBones); |
| 794 | |
| 795 | OS::get_singleton()->yield(); // may take time to init |
| 796 | |
| 797 | /* REGISTER RESOURCES */ |
| 798 | |
| 799 | GDREGISTER_ABSTRACT_CLASS(Shader); |
| 800 | GDREGISTER_CLASS(ParticleProcessMaterial); |
| 801 | SceneTree::add_idle_callback(ParticleProcessMaterial::flush_changes); |
| 802 | ParticleProcessMaterial::init_shaders(); |
| 803 | |
| 804 | GDREGISTER_VIRTUAL_CLASS(Mesh); |
| 805 | GDREGISTER_CLASS(MeshConvexDecompositionSettings); |
| 806 | GDREGISTER_CLASS(ArrayMesh); |
| 807 | GDREGISTER_CLASS(PlaceholderMesh); |
| 808 | GDREGISTER_CLASS(ImmediateMesh); |
| 809 | GDREGISTER_CLASS(MultiMesh); |
| 810 | GDREGISTER_CLASS(SurfaceTool); |
| 811 | GDREGISTER_CLASS(MeshDataTool); |
| 812 | |
| 813 | #ifndef _3D_DISABLED |
| 814 | GDREGISTER_VIRTUAL_CLASS(PrimitiveMesh); |
| 815 | GDREGISTER_CLASS(BoxMesh); |
| 816 | GDREGISTER_CLASS(CapsuleMesh); |
| 817 | GDREGISTER_CLASS(CylinderMesh); |
| 818 | GDREGISTER_CLASS(PlaneMesh); |
| 819 | GDREGISTER_CLASS(PrismMesh); |
| 820 | GDREGISTER_CLASS(QuadMesh); |
| 821 | GDREGISTER_CLASS(SphereMesh); |
| 822 | GDREGISTER_CLASS(TextMesh); |
| 823 | GDREGISTER_CLASS(TorusMesh); |
| 824 | GDREGISTER_CLASS(TubeTrailMesh); |
| 825 | GDREGISTER_CLASS(RibbonTrailMesh); |
| 826 | GDREGISTER_CLASS(PointMesh); |
| 827 | GDREGISTER_ABSTRACT_CLASS(BaseMaterial3D); |
| 828 | GDREGISTER_CLASS(StandardMaterial3D); |
| 829 | GDREGISTER_CLASS(ORMMaterial3D); |
| 830 | GDREGISTER_CLASS(ProceduralSkyMaterial); |
| 831 | GDREGISTER_CLASS(PanoramaSkyMaterial); |
| 832 | GDREGISTER_CLASS(PhysicalSkyMaterial); |
| 833 | SceneTree::add_idle_callback(BaseMaterial3D::flush_changes); |
| 834 | BaseMaterial3D::init_shaders(); |
| 835 | |
| 836 | GDREGISTER_CLASS(MeshLibrary); |
| 837 | |
| 838 | OS::get_singleton()->yield(); // may take time to init |
| 839 | |
| 840 | GDREGISTER_ABSTRACT_CLASS(Shape3D); |
| 841 | GDREGISTER_CLASS(SeparationRayShape3D); |
| 842 | GDREGISTER_CLASS(SphereShape3D); |
| 843 | GDREGISTER_CLASS(BoxShape3D); |
| 844 | GDREGISTER_CLASS(CapsuleShape3D); |
| 845 | GDREGISTER_CLASS(CylinderShape3D); |
| 846 | GDREGISTER_CLASS(HeightMapShape3D); |
| 847 | GDREGISTER_CLASS(WorldBoundaryShape3D); |
| 848 | GDREGISTER_CLASS(ConvexPolygonShape3D); |
| 849 | GDREGISTER_CLASS(ConcavePolygonShape3D); |
| 850 | |
| 851 | OS::get_singleton()->yield(); // may take time to init |
| 852 | #endif // _3D_DISABLED |
| 853 | |
| 854 | GDREGISTER_CLASS(PhysicsMaterial); |
| 855 | GDREGISTER_CLASS(World3D); |
| 856 | GDREGISTER_CLASS(Environment); |
| 857 | GDREGISTER_VIRTUAL_CLASS(CameraAttributes); |
| 858 | GDREGISTER_CLASS(CameraAttributesPhysical); |
| 859 | GDREGISTER_CLASS(CameraAttributesPractical); |
| 860 | GDREGISTER_CLASS(World2D); |
| 861 | GDREGISTER_VIRTUAL_CLASS(Texture); |
| 862 | GDREGISTER_VIRTUAL_CLASS(Texture2D); |
| 863 | GDREGISTER_CLASS(Sky); |
| 864 | GDREGISTER_CLASS(CompressedTexture2D); |
| 865 | GDREGISTER_CLASS(PortableCompressedTexture2D); |
| 866 | GDREGISTER_CLASS(ImageTexture); |
| 867 | GDREGISTER_CLASS(AtlasTexture); |
| 868 | GDREGISTER_CLASS(MeshTexture); |
| 869 | GDREGISTER_CLASS(CurveTexture); |
| 870 | GDREGISTER_CLASS(CurveXYZTexture); |
| 871 | GDREGISTER_CLASS(GradientTexture1D); |
| 872 | GDREGISTER_CLASS(GradientTexture2D); |
| 873 | GDREGISTER_CLASS(AnimatedTexture); |
| 874 | GDREGISTER_CLASS(CameraTexture); |
| 875 | GDREGISTER_VIRTUAL_CLASS(TextureLayered); |
| 876 | GDREGISTER_ABSTRACT_CLASS(ImageTextureLayered); |
| 877 | GDREGISTER_VIRTUAL_CLASS(Texture3D); |
| 878 | GDREGISTER_CLASS(ImageTexture3D); |
| 879 | GDREGISTER_CLASS(CompressedTexture3D); |
| 880 | GDREGISTER_CLASS(Cubemap); |
| 881 | GDREGISTER_CLASS(CubemapArray); |
| 882 | GDREGISTER_CLASS(Texture2DArray); |
| 883 | GDREGISTER_ABSTRACT_CLASS(CompressedTextureLayered); |
| 884 | GDREGISTER_CLASS(CompressedCubemap); |
| 885 | GDREGISTER_CLASS(CompressedCubemapArray); |
| 886 | GDREGISTER_CLASS(CompressedTexture2DArray); |
| 887 | GDREGISTER_CLASS(PlaceholderTexture2D); |
| 888 | GDREGISTER_CLASS(PlaceholderTexture3D); |
| 889 | GDREGISTER_ABSTRACT_CLASS(PlaceholderTextureLayered); |
| 890 | GDREGISTER_CLASS(PlaceholderTexture2DArray); |
| 891 | GDREGISTER_CLASS(PlaceholderCubemap); |
| 892 | GDREGISTER_CLASS(PlaceholderCubemapArray); |
| 893 | |
| 894 | // These classes are part of renderer_rd |
| 895 | GDREGISTER_CLASS(Texture2DRD); |
| 896 | GDREGISTER_ABSTRACT_CLASS(TextureLayeredRD); |
| 897 | GDREGISTER_CLASS(Texture2DArrayRD); |
| 898 | GDREGISTER_CLASS(TextureCubemapRD); |
| 899 | GDREGISTER_CLASS(TextureCubemapArrayRD); |
| 900 | GDREGISTER_CLASS(Texture3DRD); |
| 901 | |
| 902 | GDREGISTER_CLASS(Animation); |
| 903 | GDREGISTER_CLASS(AnimationLibrary); |
| 904 | |
| 905 | GDREGISTER_ABSTRACT_CLASS(Font); |
| 906 | GDREGISTER_CLASS(FontFile); |
| 907 | GDREGISTER_CLASS(FontVariation); |
| 908 | GDREGISTER_CLASS(SystemFont); |
| 909 | |
| 910 | GDREGISTER_CLASS(Curve); |
| 911 | |
| 912 | GDREGISTER_CLASS(LabelSettings); |
| 913 | |
| 914 | GDREGISTER_CLASS(TextLine); |
| 915 | GDREGISTER_CLASS(TextParagraph); |
| 916 | |
| 917 | GDREGISTER_VIRTUAL_CLASS(StyleBox); |
| 918 | GDREGISTER_CLASS(StyleBoxEmpty); |
| 919 | GDREGISTER_CLASS(StyleBoxTexture); |
| 920 | GDREGISTER_CLASS(StyleBoxFlat); |
| 921 | GDREGISTER_CLASS(StyleBoxLine); |
| 922 | GDREGISTER_CLASS(Theme); |
| 923 | |
| 924 | GDREGISTER_CLASS(PolygonPathFinder); |
| 925 | GDREGISTER_CLASS(BitMap); |
| 926 | GDREGISTER_CLASS(Gradient); |
| 927 | |
| 928 | GDREGISTER_CLASS(SkeletonProfile); |
| 929 | GDREGISTER_CLASS(SkeletonProfileHumanoid); |
| 930 | GDREGISTER_CLASS(BoneMap); |
| 931 | |
| 932 | OS::get_singleton()->yield(); // may take time to init |
| 933 | |
| 934 | GDREGISTER_CLASS(AudioStreamPlayer); |
| 935 | GDREGISTER_CLASS(AudioStreamPlayer2D); |
| 936 | #ifndef _3D_DISABLED |
| 937 | GDREGISTER_CLASS(AudioStreamPlayer3D); |
| 938 | #endif |
| 939 | GDREGISTER_CLASS(AudioStreamWAV); |
| 940 | GDREGISTER_CLASS(AudioStreamPolyphonic); |
| 941 | GDREGISTER_ABSTRACT_CLASS(AudioStreamPlaybackPolyphonic); |
| 942 | |
| 943 | OS::get_singleton()->yield(); // may take time to init |
| 944 | |
| 945 | GDREGISTER_ABSTRACT_CLASS(Shape2D); |
| 946 | GDREGISTER_CLASS(WorldBoundaryShape2D); |
| 947 | GDREGISTER_CLASS(SegmentShape2D); |
| 948 | GDREGISTER_CLASS(SeparationRayShape2D); |
| 949 | GDREGISTER_CLASS(CircleShape2D); |
| 950 | GDREGISTER_CLASS(RectangleShape2D); |
| 951 | GDREGISTER_CLASS(CapsuleShape2D); |
| 952 | GDREGISTER_CLASS(ConvexPolygonShape2D); |
| 953 | GDREGISTER_CLASS(ConcavePolygonShape2D); |
| 954 | GDREGISTER_CLASS(Curve2D); |
| 955 | GDREGISTER_CLASS(Path2D); |
| 956 | GDREGISTER_CLASS(PathFollow2D); |
| 957 | |
| 958 | GDREGISTER_CLASS(NavigationMesh); |
| 959 | GDREGISTER_CLASS(NavigationMeshSourceGeometryData3D); |
| 960 | GDREGISTER_CLASS(NavigationPolygon); |
| 961 | GDREGISTER_CLASS(NavigationRegion2D); |
| 962 | GDREGISTER_CLASS(NavigationAgent2D); |
| 963 | GDREGISTER_CLASS(NavigationObstacle2D); |
| 964 | GDREGISTER_CLASS(NavigationLink2D); |
| 965 | |
| 966 | OS::get_singleton()->yield(); // may take time to init |
| 967 | |
| 968 | GDREGISTER_ABSTRACT_CLASS(SceneState); |
| 969 | GDREGISTER_CLASS(PackedScene); |
| 970 | |
| 971 | GDREGISTER_CLASS(SceneTree); |
| 972 | GDREGISTER_ABSTRACT_CLASS(SceneTreeTimer); // sorry, you can't create it |
| 973 | |
| 974 | #ifndef DISABLE_DEPRECATED |
| 975 | // Dropped in 4.0, near approximation. |
| 976 | ClassDB::add_compatibility_class("AnimationTreePlayer" , "AnimationTree" ); |
| 977 | ClassDB::add_compatibility_class("BakedLightmap" , "LightmapGI" ); |
| 978 | ClassDB::add_compatibility_class("BakedLightmapData" , "LightmapGIData" ); |
| 979 | ClassDB::add_compatibility_class("BitmapFont" , "FontFile" ); |
| 980 | ClassDB::add_compatibility_class("DynamicFont" , "FontFile" ); |
| 981 | ClassDB::add_compatibility_class("DynamicFontData" , "FontFile" ); |
| 982 | ClassDB::add_compatibility_class("Navigation3D" , "Node3D" ); |
| 983 | ClassDB::add_compatibility_class("Navigation2D" , "Node2D" ); |
| 984 | ClassDB::add_compatibility_class("OpenSimplexNoise" , "FastNoiseLite" ); |
| 985 | ClassDB::add_compatibility_class("ProximityGroup" , "Node3D" ); |
| 986 | ClassDB::add_compatibility_class("ToolButton" , "Button" ); |
| 987 | ClassDB::add_compatibility_class("YSort" , "Node2D" ); |
| 988 | // Portal and room occlusion was replaced by raster occlusion (OccluderInstance3D node). |
| 989 | ClassDB::add_compatibility_class("Portal" , "Node3D" ); |
| 990 | ClassDB::add_compatibility_class("Room" , "Node3D" ); |
| 991 | ClassDB::add_compatibility_class("RoomManager" , "Node3D" ); |
| 992 | ClassDB::add_compatibility_class("RoomGroup" , "Node3D" ); |
| 993 | ClassDB::add_compatibility_class("Occluder" , "Node3D" ); |
| 994 | // The OccluderShapeSphere resource (used in the old Occluder node) is not present anymore. |
| 995 | ClassDB::add_compatibility_class("OccluderShapeSphere" , "Resource" ); |
| 996 | |
| 997 | // Renamed in 4.0. |
| 998 | // Keep alphabetical ordering to easily locate classes and avoid duplicates. |
| 999 | ClassDB::add_compatibility_class("AnimatedSprite" , "AnimatedSprite2D" ); |
| 1000 | ClassDB::add_compatibility_class("Area" , "Area3D" ); |
| 1001 | ClassDB::add_compatibility_class("ARVRCamera" , "XRCamera3D" ); |
| 1002 | ClassDB::add_compatibility_class("ARVRController" , "XRController3D" ); |
| 1003 | ClassDB::add_compatibility_class("ARVRAnchor" , "XRAnchor3D" ); |
| 1004 | ClassDB::add_compatibility_class("ARVRInterface" , "XRInterface" ); |
| 1005 | ClassDB::add_compatibility_class("ARVROrigin" , "XROrigin3D" ); |
| 1006 | ClassDB::add_compatibility_class("ARVRPositionalTracker" , "XRPositionalTracker" ); |
| 1007 | ClassDB::add_compatibility_class("ARVRServer" , "XRServer" ); |
| 1008 | ClassDB::add_compatibility_class("AStar" , "AStar3D" ); |
| 1009 | ClassDB::add_compatibility_class("BoneAttachment" , "BoneAttachment3D" ); |
| 1010 | ClassDB::add_compatibility_class("BoxShape" , "BoxShape3D" ); |
| 1011 | ClassDB::add_compatibility_class("Camera" , "Camera3D" ); |
| 1012 | ClassDB::add_compatibility_class("CapsuleShape" , "CapsuleShape3D" ); |
| 1013 | ClassDB::add_compatibility_class("ClippedCamera" , "ClippedCamera3D" ); |
| 1014 | ClassDB::add_compatibility_class("CollisionObject" , "CollisionObject3D" ); |
| 1015 | ClassDB::add_compatibility_class("CollisionPolygon" , "CollisionPolygon3D" ); |
| 1016 | ClassDB::add_compatibility_class("CollisionShape" , "CollisionShape3D" ); |
| 1017 | ClassDB::add_compatibility_class("ConcavePolygonShape" , "ConcavePolygonShape3D" ); |
| 1018 | ClassDB::add_compatibility_class("ConeTwistJoint" , "ConeTwistJoint3D" ); |
| 1019 | ClassDB::add_compatibility_class("ConvexPolygonShape" , "ConvexPolygonShape3D" ); |
| 1020 | ClassDB::add_compatibility_class("CPUParticles" , "CPUParticles3D" ); |
| 1021 | ClassDB::add_compatibility_class("CSGBox" , "CSGBox3D" ); |
| 1022 | ClassDB::add_compatibility_class("CSGCombiner" , "CSGCombiner3D" ); |
| 1023 | ClassDB::add_compatibility_class("CSGCylinder" , "CSGCylinder3D" ); |
| 1024 | ClassDB::add_compatibility_class("CSGMesh" , "CSGMesh3D" ); |
| 1025 | ClassDB::add_compatibility_class("CSGPolygon" , "CSGPolygon3D" ); |
| 1026 | ClassDB::add_compatibility_class("CSGPrimitive" , "CSGPrimitive3D" ); |
| 1027 | ClassDB::add_compatibility_class("CSGShape" , "CSGShape3D" ); |
| 1028 | ClassDB::add_compatibility_class("CSGSphere" , "CSGSphere3D" ); |
| 1029 | ClassDB::add_compatibility_class("CSGTorus" , "CSGTorus3D" ); |
| 1030 | ClassDB::add_compatibility_class("CubeMesh" , "BoxMesh" ); |
| 1031 | ClassDB::add_compatibility_class("CylinderShape" , "CylinderShape3D" ); |
| 1032 | ClassDB::add_compatibility_class("DirectionalLight" , "DirectionalLight3D" ); |
| 1033 | ClassDB::add_compatibility_class("EditorSpatialGizmo" , "EditorNode3DGizmo" ); |
| 1034 | ClassDB::add_compatibility_class("EditorSpatialGizmoPlugin" , "EditorNode3DGizmoPlugin" ); |
| 1035 | ClassDB::add_compatibility_class("Generic6DOFJoint" , "Generic6DOFJoint3D" ); |
| 1036 | ClassDB::add_compatibility_class("GIProbe" , "VoxelGI" ); |
| 1037 | ClassDB::add_compatibility_class("GIProbeData" , "VoxelGIData" ); |
| 1038 | ClassDB::add_compatibility_class("GradientTexture" , "GradientTexture1D" ); |
| 1039 | ClassDB::add_compatibility_class("HeightMapShape" , "HeightMapShape3D" ); |
| 1040 | ClassDB::add_compatibility_class("HingeJoint" , "HingeJoint3D" ); |
| 1041 | ClassDB::add_compatibility_class("Joint" , "Joint3D" ); |
| 1042 | ClassDB::add_compatibility_class("KinematicBody" , "CharacterBody3D" ); |
| 1043 | ClassDB::add_compatibility_class("KinematicBody2D" , "CharacterBody2D" ); |
| 1044 | ClassDB::add_compatibility_class("KinematicCollision" , "KinematicCollision3D" ); |
| 1045 | ClassDB::add_compatibility_class("Light" , "Light3D" ); |
| 1046 | ClassDB::add_compatibility_class("Light2D" , "PointLight2D" ); |
| 1047 | ClassDB::add_compatibility_class("LineShape2D" , "WorldBoundaryShape2D" ); |
| 1048 | ClassDB::add_compatibility_class("Listener" , "AudioListener3D" ); |
| 1049 | ClassDB::add_compatibility_class("MeshInstance" , "MeshInstance3D" ); |
| 1050 | ClassDB::add_compatibility_class("MultiMeshInstance" , "MultiMeshInstance3D" ); |
| 1051 | ClassDB::add_compatibility_class("NavigationAgent" , "NavigationAgent3D" ); |
| 1052 | ClassDB::add_compatibility_class("NavigationMeshInstance" , "NavigationRegion3D" ); |
| 1053 | ClassDB::add_compatibility_class("NavigationObstacle" , "NavigationObstacle3D" ); |
| 1054 | ClassDB::add_compatibility_class("NavigationPolygonInstance" , "NavigationRegion2D" ); |
| 1055 | ClassDB::add_compatibility_class("NavigationRegion" , "NavigationRegion3D" ); |
| 1056 | ClassDB::add_compatibility_class("Navigation2DServer" , "NavigationServer2D" ); |
| 1057 | ClassDB::add_compatibility_class("NavigationServer" , "NavigationServer3D" ); |
| 1058 | ClassDB::add_compatibility_class("OmniLight" , "OmniLight3D" ); |
| 1059 | ClassDB::add_compatibility_class("PanoramaSky" , "Sky" ); |
| 1060 | ClassDB::add_compatibility_class("Particles" , "GPUParticles3D" ); |
| 1061 | ClassDB::add_compatibility_class("Particles2D" , "GPUParticles2D" ); |
| 1062 | ClassDB::add_compatibility_class("ParticlesMaterial" , "ParticleProcessMaterial" ); |
| 1063 | ClassDB::add_compatibility_class("Path" , "Path3D" ); |
| 1064 | ClassDB::add_compatibility_class("PathFollow" , "PathFollow3D" ); |
| 1065 | ClassDB::add_compatibility_class("PhysicalBone" , "PhysicalBone3D" ); |
| 1066 | ClassDB::add_compatibility_class("Physics2DDirectBodyState" , "PhysicsDirectBodyState2D" ); |
| 1067 | ClassDB::add_compatibility_class("Physics2DDirectSpaceState" , "PhysicsDirectSpaceState2D" ); |
| 1068 | ClassDB::add_compatibility_class("Physics2DServer" , "PhysicsServer2D" ); |
| 1069 | ClassDB::add_compatibility_class("Physics2DShapeQueryParameters" , "PhysicsShapeQueryParameters2D" ); |
| 1070 | ClassDB::add_compatibility_class("Physics2DTestMotionResult" , "PhysicsTestMotionResult2D" ); |
| 1071 | ClassDB::add_compatibility_class("PhysicsBody" , "PhysicsBody3D" ); |
| 1072 | ClassDB::add_compatibility_class("PhysicsDirectBodyState" , "PhysicsDirectBodyState3D" ); |
| 1073 | ClassDB::add_compatibility_class("PhysicsDirectSpaceState" , "PhysicsDirectSpaceState3D" ); |
| 1074 | ClassDB::add_compatibility_class("PhysicsServer" , "PhysicsServer3D" ); |
| 1075 | ClassDB::add_compatibility_class("PhysicsShapeQueryParameters" , "PhysicsShapeQueryParameters3D" ); |
| 1076 | ClassDB::add_compatibility_class("PinJoint" , "PinJoint3D" ); |
| 1077 | ClassDB::add_compatibility_class("PlaneShape" , "WorldBoundaryShape3D" ); |
| 1078 | ClassDB::add_compatibility_class("Position2D" , "Marker2D" ); |
| 1079 | ClassDB::add_compatibility_class("Position3D" , "Marker3D" ); |
| 1080 | ClassDB::add_compatibility_class("ProceduralSky" , "Sky" ); |
| 1081 | ClassDB::add_compatibility_class("RayCast" , "RayCast3D" ); |
| 1082 | ClassDB::add_compatibility_class("RayShape" , "SeparationRayShape3D" ); |
| 1083 | ClassDB::add_compatibility_class("RayShape2D" , "SeparationRayShape2D" ); |
| 1084 | ClassDB::add_compatibility_class("RemoteTransform" , "RemoteTransform3D" ); |
| 1085 | ClassDB::add_compatibility_class("RigidBody" , "RigidBody3D" ); |
| 1086 | ClassDB::add_compatibility_class("RigidDynamicBody2D" , "RigidBody2D" ); |
| 1087 | ClassDB::add_compatibility_class("RigidDynamicBody3D" , "RigidBody3D" ); |
| 1088 | ClassDB::add_compatibility_class("Shape" , "Shape3D" ); |
| 1089 | ClassDB::add_compatibility_class("ShortCut" , "Shortcut" ); |
| 1090 | ClassDB::add_compatibility_class("Skeleton" , "Skeleton3D" ); |
| 1091 | ClassDB::add_compatibility_class("SkeletonIK" , "SkeletonIK3D" ); |
| 1092 | ClassDB::add_compatibility_class("SliderJoint" , "SliderJoint3D" ); |
| 1093 | ClassDB::add_compatibility_class("SoftBody" , "SoftBody3D" ); |
| 1094 | ClassDB::add_compatibility_class("SoftDynamicBody3D" , "SoftBody3D" ); |
| 1095 | ClassDB::add_compatibility_class("Spatial" , "Node3D" ); |
| 1096 | ClassDB::add_compatibility_class("SpatialGizmo" , "Node3DGizmo" ); |
| 1097 | ClassDB::add_compatibility_class("SpatialMaterial" , "StandardMaterial3D" ); |
| 1098 | ClassDB::add_compatibility_class("SphereShape" , "SphereShape3D" ); |
| 1099 | ClassDB::add_compatibility_class("SpotLight" , "SpotLight3D" ); |
| 1100 | ClassDB::add_compatibility_class("SpringArm" , "SpringArm3D" ); |
| 1101 | ClassDB::add_compatibility_class("Sprite" , "Sprite2D" ); |
| 1102 | ClassDB::add_compatibility_class("StaticBody" , "StaticBody3D" ); |
| 1103 | ClassDB::add_compatibility_class("StreamTexture" , "CompressedTexture2D" ); |
| 1104 | ClassDB::add_compatibility_class("TextureProgress" , "TextureProgressBar" ); |
| 1105 | ClassDB::add_compatibility_class("VehicleBody" , "VehicleBody3D" ); |
| 1106 | ClassDB::add_compatibility_class("VehicleWheel" , "VehicleWheel3D" ); |
| 1107 | ClassDB::add_compatibility_class("VideoPlayer" , "VideoStreamPlayer" ); |
| 1108 | ClassDB::add_compatibility_class("ViewportContainer" , "SubViewportContainer" ); |
| 1109 | ClassDB::add_compatibility_class("Viewport" , "SubViewport" ); |
| 1110 | ClassDB::add_compatibility_class("VisibilityEnabler" , "VisibleOnScreenEnabler3D" ); |
| 1111 | ClassDB::add_compatibility_class("VisibilityNotifier" , "VisibleOnScreenNotifier3D" ); |
| 1112 | ClassDB::add_compatibility_class("VisibilityNotifier2D" , "VisibleOnScreenNotifier2D" ); |
| 1113 | ClassDB::add_compatibility_class("VisibilityNotifier3D" , "VisibleOnScreenNotifier3D" ); |
| 1114 | ClassDB::add_compatibility_class("VisualServer" , "RenderingServer" ); |
| 1115 | ClassDB::add_compatibility_class("World" , "World3D" ); |
| 1116 | |
| 1117 | // VisualShader classes. |
| 1118 | ClassDB::add_compatibility_class("VisualShaderNodeScalarConstant" , "VisualShaderNodeFloatConstant" ); |
| 1119 | ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc" , "VisualShaderNodeFloatFunc" ); |
| 1120 | ClassDB::add_compatibility_class("VisualShaderNodeScalarOp" , "VisualShaderNodeFloatOp" ); |
| 1121 | ClassDB::add_compatibility_class("VisualShaderNodeScalarClamp" , "VisualShaderNodeClamp" ); |
| 1122 | ClassDB::add_compatibility_class("VisualShaderNodeVectorClamp" , "VisualShaderNodeClamp" ); |
| 1123 | ClassDB::add_compatibility_class("VisualShaderNodeScalarInterp" , "VisualShaderNodeMix" ); |
| 1124 | ClassDB::add_compatibility_class("VisualShaderNodeVectorInterp" , "VisualShaderNodeMix" ); |
| 1125 | ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarMix" , "VisualShaderNodeMix" ); |
| 1126 | ClassDB::add_compatibility_class("VisualShaderNodeScalarSmoothStep" , "VisualShaderNodeSmoothStep" ); |
| 1127 | ClassDB::add_compatibility_class("VisualShaderNodeVectorSmoothStep" , "VisualShaderNodeSmoothStep" ); |
| 1128 | ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarSmoothStep" , "VisualShaderNodeSmoothStep" ); |
| 1129 | ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarStep" , "VisualShaderNodeStep" ); |
| 1130 | ClassDB::add_compatibility_class("VisualShaderNodeScalarSwitch" , "VisualShaderNodeSwitch" ); |
| 1131 | ClassDB::add_compatibility_class("VisualShaderNodeScalarTransformMult" , "VisualShaderNodeTransformOp" ); |
| 1132 | ClassDB::add_compatibility_class("VisualShaderNodeScalarDerivativeFunc" , "VisualShaderNodeDerivativeFunc" ); |
| 1133 | ClassDB::add_compatibility_class("VisualShaderNodeVectorDerivativeFunc" , "VisualShaderNodeDerivativeFunc" ); |
| 1134 | |
| 1135 | ClassDB::add_compatibility_class("VisualShaderNodeBooleanUniform" , "VisualShaderNodeBooleanParameter" ); |
| 1136 | ClassDB::add_compatibility_class("VisualShaderNodeColorUniform" , "VisualShaderNodeColorParameter" ); |
| 1137 | ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform" , "VisualShaderNodeFloatParameter" ); |
| 1138 | ClassDB::add_compatibility_class("VisualShaderNodeCubeMapUniform" , "VisualShaderNodeCubeMapParameter" ); |
| 1139 | ClassDB::add_compatibility_class("VisualShaderNodeTextureUniform" , "VisualShaderNodeTexture2DParameter" ); |
| 1140 | ClassDB::add_compatibility_class("VisualShaderNodeTextureUniformTriplanar" , "VisualShaderNodeTextureParameterTriplanar" ); |
| 1141 | ClassDB::add_compatibility_class("VisualShaderNodeTransformUniform" , "VisualShaderNodeTransformParameter" ); |
| 1142 | ClassDB::add_compatibility_class("VisualShaderNodeVec3Uniform" , "VisualShaderNodeVec3Parameter" ); |
| 1143 | ClassDB::add_compatibility_class("VisualShaderNodeUniform" , "VisualShaderNodeParameter" ); |
| 1144 | ClassDB::add_compatibility_class("VisualShaderNodeUniformRef" , "VisualShaderNodeParameterRef" ); |
| 1145 | |
| 1146 | // Renamed during 4.0 alpha, added to ease transition between alphas. |
| 1147 | ClassDB::add_compatibility_class("AudioStreamOGGVorbis" , "AudioStreamOggVorbis" ); |
| 1148 | ClassDB::add_compatibility_class("AudioStreamSample" , "AudioStreamWAV" ); |
| 1149 | ClassDB::add_compatibility_class("OGGPacketSequence" , "OggPacketSequence" ); |
| 1150 | ClassDB::add_compatibility_class("StreamCubemap" , "CompressedCubemap" ); |
| 1151 | ClassDB::add_compatibility_class("StreamCubemapArray" , "CompressedCubemapArray" ); |
| 1152 | ClassDB::add_compatibility_class("StreamTexture2D" , "CompressedTexture2D" ); |
| 1153 | ClassDB::add_compatibility_class("StreamTexture2DArray" , "CompressedTexture2DArray" ); |
| 1154 | ClassDB::add_compatibility_class("StreamTexture3D" , "CompressedTexture3D" ); |
| 1155 | ClassDB::add_compatibility_class("StreamTextureLayered" , "CompressedTextureLayered" ); |
| 1156 | ClassDB::add_compatibility_class("VisualShaderNodeFloatUniform" , "VisualShaderNodeFloatParameter" ); |
| 1157 | #endif /* DISABLE_DEPRECATED */ |
| 1158 | |
| 1159 | OS::get_singleton()->yield(); // may take time to init |
| 1160 | |
| 1161 | for (int i = 0; i < 20; i++) { |
| 1162 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/2d_render" ), i + 1), "" ); |
| 1163 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/3d_render" ), i + 1), "" ); |
| 1164 | } |
| 1165 | |
| 1166 | for (int i = 0; i < 32; i++) { |
| 1167 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/2d_physics" ), i + 1), "" ); |
| 1168 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/2d_navigation" ), i + 1), "" ); |
| 1169 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/3d_physics" ), i + 1), "" ); |
| 1170 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/3d_navigation" ), i + 1), "" ); |
| 1171 | } |
| 1172 | |
| 1173 | for (int i = 0; i < 32; i++) { |
| 1174 | GLOBAL_DEF_BASIC(vformat("%s/layer_%d" , PNAME("layer_names/avoidance" ), i + 1), "" ); |
| 1175 | } |
| 1176 | |
| 1177 | if (RenderingServer::get_singleton()) { |
| 1178 | ColorPicker::init_shaders(); // RenderingServer needs to exist for this to succeed. |
| 1179 | } |
| 1180 | |
| 1181 | SceneDebugger::initialize(); |
| 1182 | } |
| 1183 | |
| 1184 | void unregister_scene_types() { |
| 1185 | SceneDebugger::deinitialize(); |
| 1186 | |
| 1187 | ResourceLoader::remove_resource_format_loader(resource_loader_texture_layered); |
| 1188 | resource_loader_texture_layered.unref(); |
| 1189 | |
| 1190 | ResourceLoader::remove_resource_format_loader(resource_loader_texture_3d); |
| 1191 | resource_loader_texture_3d.unref(); |
| 1192 | |
| 1193 | ResourceLoader::remove_resource_format_loader(resource_loader_stream_texture); |
| 1194 | resource_loader_stream_texture.unref(); |
| 1195 | |
| 1196 | ResourceSaver::remove_resource_format_saver(resource_saver_text); |
| 1197 | resource_saver_text.unref(); |
| 1198 | |
| 1199 | ResourceLoader::remove_resource_format_loader(resource_loader_text); |
| 1200 | resource_loader_text.unref(); |
| 1201 | |
| 1202 | ResourceSaver::remove_resource_format_saver(resource_saver_shader); |
| 1203 | resource_saver_shader.unref(); |
| 1204 | |
| 1205 | ResourceLoader::remove_resource_format_loader(resource_loader_shader); |
| 1206 | resource_loader_shader.unref(); |
| 1207 | |
| 1208 | ResourceSaver::remove_resource_format_saver(resource_saver_shader_include); |
| 1209 | resource_saver_shader_include.unref(); |
| 1210 | |
| 1211 | ResourceLoader::remove_resource_format_loader(resource_loader_shader_include); |
| 1212 | resource_loader_shader_include.unref(); |
| 1213 | |
| 1214 | // StandardMaterial3D is not initialized when 3D is disabled, so it shouldn't be cleaned up either |
| 1215 | #ifndef _3D_DISABLED |
| 1216 | BaseMaterial3D::finish_shaders(); |
| 1217 | PhysicalSkyMaterial::cleanup_shader(); |
| 1218 | PanoramaSkyMaterial::cleanup_shader(); |
| 1219 | ProceduralSkyMaterial::cleanup_shader(); |
| 1220 | #endif // _3D_DISABLED |
| 1221 | |
| 1222 | ParticleProcessMaterial::finish_shaders(); |
| 1223 | CanvasItemMaterial::finish_shaders(); |
| 1224 | ColorPicker::finish_shaders(); |
| 1225 | SceneStringNames::free(); |
| 1226 | } |
| 1227 | |
| 1228 | void register_scene_singletons() { |
| 1229 | GDREGISTER_CLASS(ThemeDB); |
| 1230 | |
| 1231 | Engine::get_singleton()->add_singleton(Engine::Singleton("ThemeDB" , ThemeDB::get_singleton())); |
| 1232 | } |
| 1233 | |