register_scene_types.cpp 51 KB

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