register_scene_types.cpp 55 KB

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