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