summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/array.cpp4
-rw-r--r--core/bind/core_bind.cpp48
-rw-r--r--core/callable.cpp10
-rw-r--r--core/class_db.cpp4
-rw-r--r--core/color.cpp1
-rw-r--r--core/compressed_translation.cpp1
-rw-r--r--core/crypto/crypto.cpp1
-rw-r--r--core/debugger/script_debugger.cpp2
-rw-r--r--core/dictionary.cpp4
-rw-r--r--core/engine.cpp1
-rw-r--r--core/image.cpp2
-rw-r--r--core/input/input.cpp2
-rw-r--r--core/input/input_event.cpp21
-rw-r--r--core/io/config_file.cpp3
-rw-r--r--core/io/file_access_compressed.cpp4
-rw-r--r--core/io/file_access_encrypted.cpp4
-rw-r--r--core/io/file_access_network.cpp3
-rw-r--r--core/io/file_access_pack.cpp8
-rw-r--r--core/io/multiplayer_api.cpp2
-rw-r--r--core/io/packet_peer.cpp1
-rw-r--r--core/io/packet_peer_udp.cpp1
-rw-r--r--core/io/resource_format_binary.cpp2
-rw-r--r--core/io/resource_loader.cpp2
-rw-r--r--core/io/stream_peer.cpp24
-rw-r--r--core/io/translation_loader_po.cpp1
-rw-r--r--core/io/xml_parser.cpp8
-rw-r--r--core/math/aabb.cpp5
-rw-r--r--core/math/basis.cpp1
-rw-r--r--core/math/camera_matrix.cpp1
-rw-r--r--core/math/geometry.cpp1
-rw-r--r--core/math/octree.h1
-rw-r--r--core/math/transform.cpp2
-rw-r--r--core/math/transform.h2
-rw-r--r--core/math/transform_2d.cpp3
-rw-r--r--core/math/transform_2d.h2
-rw-r--r--core/math/vector2.cpp4
-rw-r--r--core/math/vector2.h4
-rw-r--r--core/math/vector3.cpp3
-rw-r--r--core/math/vector3.h2
-rw-r--r--core/math/vector3i.cpp2
-rw-r--r--core/math/vector3i.h2
-rw-r--r--core/message_queue.cpp1
-rw-r--r--core/method_bind.cpp2
-rw-r--r--core/node_path.cpp4
-rw-r--r--core/object.cpp9
-rw-r--r--core/os/dir_access.cpp1
-rw-r--r--core/os/file_access.cpp4
-rw-r--r--core/os/main_loop.cpp2
-rw-r--r--core/os/os.cpp4
-rw-r--r--core/packed_data_container.cpp2
-rw-r--r--core/pool_allocator.cpp1
-rw-r--r--core/project_settings.cpp2
-rw-r--r--core/resource.cpp2
-rw-r--r--core/script_language.cpp9
-rw-r--r--core/string_name.cpp1
-rw-r--r--core/translation.cpp2
-rw-r--r--core/undo_redo.cpp4
-rw-r--r--core/ustring.cpp12
-rw-r--r--core/variant.cpp33
-rw-r--r--core/variant_op.cpp2
-rw-r--r--core/variant_parser.cpp2
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.cpp2
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp4
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp13
-rw-r--r--drivers/gles2/shaders/blend_shape.glsl1
-rw-r--r--drivers/gles2/shaders/particles.glsl1
-rw-r--r--drivers/gles2/shaders/scene.glsl2
-rw-r--r--drivers/unix/os_unix.cpp1
-rw-r--r--drivers/unix/thread_posix.cpp2
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp10
-rw-r--r--drivers/vulkan/vulkan_context.cpp2
-rw-r--r--drivers/windows/dir_access_windows.cpp4
-rw-r--r--drivers/windows/file_access_windows.cpp4
-rw-r--r--drivers/windows/thread_windows.cpp2
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.cpp1
-rw-r--r--editor/animation_bezier_editor.cpp2
-rw-r--r--editor/animation_track_editor.cpp11
-rw-r--r--editor/animation_track_editor_plugins.cpp14
-rw-r--r--editor/array_property_edit.cpp1
-rw-r--r--editor/audio_stream_preview.cpp2
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/debugger/editor_debugger_node.cpp8
-rw-r--r--editor/debugger/script_editor_debugger.cpp6
-rw-r--r--editor/doc_data.cpp2
-rw-r--r--editor/editor_atlas_packer.cpp1
-rw-r--r--editor/editor_audio_buses.cpp2
-rw-r--r--editor/editor_data.cpp12
-rw-r--r--editor/editor_export.cpp5
-rw-r--r--editor/editor_feature_profile.cpp2
-rw-r--r--editor/editor_file_dialog.cpp9
-rw-r--r--editor/editor_file_system.cpp2
-rw-r--r--editor/editor_folding.cpp2
-rw-r--r--editor/editor_help.cpp1
-rw-r--r--editor/editor_inspector.cpp12
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_plugin.cpp6
-rw-r--r--editor/editor_properties.cpp24
-rw-r--r--editor/editor_scale.cpp1
-rw-r--r--editor/export_template_manager.cpp1
-rw-r--r--editor/import/editor_import_collada.cpp2
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp2
-rw-r--r--editor/import/resource_importer_bitmask.cpp3
-rw-r--r--editor/import/resource_importer_csv.cpp2
-rw-r--r--editor/import/resource_importer_csv_translation.cpp2
-rw-r--r--editor/import/resource_importer_image.cpp2
-rw-r--r--editor/import/resource_importer_layered_texture.cpp3
-rw-r--r--editor/import/resource_importer_obj.cpp8
-rw-r--r--editor/import/resource_importer_scene.cpp7
-rw-r--r--editor/import/resource_importer_shader_file.cpp4
-rw-r--r--editor/import/resource_importer_texture.cpp3
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp2
-rw-r--r--editor/import/resource_importer_wav.cpp3
-rw-r--r--editor/import_dock.cpp2
-rw-r--r--editor/inspector_dock.cpp1
-rw-r--r--editor/node_3d_editor_gizmos.cpp20
-rw-r--r--editor/pane_drag.cpp1
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp1
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/collision_polygon_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/editor_preview_plugins.cpp3
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp1
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp1
-rw-r--r--editor/plugins/material_editor_plugin.cpp12
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp1
-rw-r--r--editor/plugins/shader_editor_plugin.cpp1
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp1
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_editor_plugin.cpp1
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp1
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp1
-rw-r--r--editor/progress_dialog.cpp2
-rw-r--r--editor/project_export.cpp1
-rw-r--r--editor/project_settings_editor.cpp2
-rw-r--r--editor/property_selector.cpp1
-rw-r--r--editor/reparent_dialog.cpp1
-rw-r--r--editor/run_settings_dialog.cpp1
-rw-r--r--editor/scene_tree_editor.cpp4
-rw-r--r--editor/script_create_dialog.cpp1
-rw-r--r--editor/shader_globals_editor.cpp1
-rw-r--r--main/tests/test_gdscript.cpp2
-rw-r--r--main/tests/test_gui.cpp1
-rw-r--r--main/tests/test_math.cpp1
-rw-r--r--main/tests/test_oa_hash_map.cpp1
-rw-r--r--main/tests/test_ordered_hash_map.cpp1
-rw-r--r--main/tests/test_physics_2d.cpp1
-rw-r--r--main/tests/test_physics_3d.cpp1
-rw-r--r--main/tests/test_render.cpp1
-rw-r--r--main/tests/test_shader_lang.cpp1
-rw-r--r--main/tests/test_string.cpp1
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp1
-rw-r--r--modules/bullet/rigid_body_bullet.cpp1
-rw-r--r--modules/bullet/slider_joint_bullet.cpp1
-rw-r--r--modules/csg/csg_gizmos.cpp4
-rw-r--r--modules/csg/csg_shape.cpp4
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp2
-rw-r--r--modules/gdnative/gdnative/string.cpp1
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp25
-rw-r--r--modules/gdscript/gdscript.cpp9
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/gdscript/gdscript_editor.cpp5
-rw-r--r--modules/gdscript/gdscript_function.cpp2
-rw-r--r--modules/gdscript/gdscript_parser.cpp1
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp7
-rw-r--r--modules/glslang/register_types.cpp1
-rw-r--r--modules/gridmap/grid_map.cpp2
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp7
-rw-r--r--modules/lightmapper_rd/lm_common_inc.glsl7
-rw-r--r--modules/lightmapper_rd/lm_compute.glsl2
-rw-r--r--modules/lightmapper_rd/lm_raster.glsl1
-rw-r--r--modules/mbedtls/stream_peer_mbedtls.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp1
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.h1
-rw-r--r--[-rwxr-xr-x]modules/mono/mono_gd/support/android_support.cpp0
-rw-r--r--[-rwxr-xr-x]modules/mono/mono_gd/support/ios_support.mm0
-rw-r--r--modules/mono/utils/mono_reg_utils.cpp1
-rw-r--r--modules/mono/utils/string_utils.cpp1
-rw-r--r--modules/pvr/texture_loader_pvr.cpp2
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp2
-rw-r--r--modules/svg/image_loader_svg.cpp1
-rw-r--r--modules/visual_script/visual_script.cpp41
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp2
-rw-r--r--modules/visual_script/visual_script_editor.cpp1
-rw-r--r--modules/visual_script/visual_script_expression.cpp5
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp18
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp15
-rw-r--r--modules/visual_script/visual_script_nodes.cpp67
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp4
-rw-r--r--modules/webm/video_stream_webm.cpp7
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp1
-rw-r--r--platform/android/file_access_jandroid.cpp1
-rw-r--r--platform/iphone/icloud.mm2
-rw-r--r--platform/iphone/in_app_store.mm1
-rw-r--r--platform/javascript/display_server_javascript.cpp2
-rw-r--r--platform/linuxbsd/context_gl_x11.cpp1
-rw-r--r--platform/linuxbsd/display_server_x11.cpp19
-rw-r--r--platform/osx/display_server_osx.mm2
-rw-r--r--platform/osx/joypad_osx.cpp1
-rw-r--r--platform/server/os_server.cpp1
-rw-r--r--platform/uwp/app.cpp1
-rw-r--r--platform/uwp/os_uwp.cpp4
-rw-r--r--platform/windows/display_server_windows.cpp28
-rw-r--r--platform/windows/joypad_windows.cpp1
-rw-r--r--platform/windows/os_windows.cpp2
-rw-r--r--scene/2d/animated_sprite_2d.cpp11
-rw-r--r--scene/2d/area_2d.cpp6
-rw-r--r--scene/2d/audio_stream_player_2d.cpp6
-rw-r--r--scene/2d/back_buffer_copy.cpp2
-rw-r--r--scene/2d/camera_2d.cpp1
-rw-r--r--scene/2d/canvas_modulate.cpp1
-rw-r--r--scene/2d/collision_object_2d.cpp4
-rw-r--r--scene/2d/collision_polygon_2d.cpp1
-rw-r--r--scene/2d/cpu_particles_2d.cpp18
-rw-r--r--scene/2d/gpu_particles_2d.cpp14
-rw-r--r--scene/2d/joints_2d.cpp1
-rw-r--r--scene/2d/light_2d.cpp6
-rw-r--r--scene/2d/navigation_region_2d.cpp3
-rw-r--r--scene/2d/node_2d.cpp1
-rw-r--r--scene/2d/physics_body_2d.cpp21
-rw-r--r--scene/2d/polygon_2d.cpp16
-rw-r--r--scene/2d/ray_cast_2d.cpp3
-rw-r--r--scene/2d/skeleton_2d.cpp3
-rw-r--r--scene/2d/sprite_2d.cpp5
-rw-r--r--scene/2d/tile_map.cpp4
-rw-r--r--scene/2d/visibility_notifier_2d.cpp1
-rw-r--r--scene/3d/area_3d.cpp15
-rw-r--r--scene/3d/audio_stream_player_3d.cpp10
-rw-r--r--scene/3d/baked_lightmap.cpp10
-rw-r--r--scene/3d/camera_3d.cpp7
-rw-r--r--scene/3d/collision_object_3d.cpp4
-rw-r--r--scene/3d/collision_polygon_3d.cpp1
-rw-r--r--scene/3d/cpu_particles_3d.cpp21
-rw-r--r--scene/3d/decal.cpp11
-rw-r--r--scene/3d/gi_probe.cpp6
-rw-r--r--scene/3d/gpu_particles_3d.cpp16
-rw-r--r--scene/3d/immediate_geometry_3d.cpp1
-rw-r--r--scene/3d/light_3d.cpp5
-rw-r--r--scene/3d/listener_3d.cpp1
-rw-r--r--scene/3d/mesh_instance_3d.cpp1
-rw-r--r--scene/3d/node_3d.cpp3
-rw-r--r--scene/3d/physics_body_3d.cpp22
-rw-r--r--scene/3d/physics_joint_3d.cpp12
-rw-r--r--scene/3d/ray_cast_3d.cpp3
-rw-r--r--scene/3d/reflection_probe.cpp7
-rw-r--r--scene/3d/skeleton_3d.cpp8
-rw-r--r--scene/3d/soft_body_3d.cpp1
-rw-r--r--scene/3d/sprite_3d.cpp11
-rw-r--r--scene/3d/vehicle_body_3d.cpp11
-rw-r--r--scene/3d/velocity_tracker_3d.cpp2
-rw-r--r--scene/3d/visibility_notifier_3d.cpp1
-rw-r--r--scene/3d/visual_instance_3d.cpp2
-rw-r--r--scene/3d/voxelizer.cpp4
-rw-r--r--scene/animation/animation_blend_space_1d.cpp1
-rw-r--r--scene/animation/animation_blend_space_2d.cpp12
-rw-r--r--scene/animation/animation_blend_tree.cpp25
-rw-r--r--scene/animation/animation_node_state_machine.cpp12
-rw-r--r--scene/animation/animation_player.cpp5
-rw-r--r--scene/animation/animation_tree.cpp4
-rw-r--r--scene/animation/root_motion_view.cpp1
-rw-r--r--scene/audio/audio_stream_player.cpp5
-rw-r--r--scene/debugger/scene_debugger.cpp11
-rw-r--r--scene/gui/button.cpp1
-rw-r--r--scene/gui/color_picker.cpp1
-rw-r--r--scene/gui/control.cpp17
-rw-r--r--scene/gui/dialogs.cpp3
-rw-r--r--scene/gui/file_dialog.cpp6
-rw-r--r--scene/gui/graph_edit.cpp2
-rw-r--r--scene/gui/graph_node.cpp5
-rw-r--r--scene/gui/item_list.cpp9
-rw-r--r--scene/gui/label.cpp2
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/nine_patch_rect.cpp1
-rw-r--r--scene/gui/option_button.cpp5
-rw-r--r--scene/gui/panel.cpp1
-rw-r--r--scene/gui/popup.cpp2
-rw-r--r--scene/gui/popup_menu.cpp3
-rw-r--r--scene/gui/range.cpp9
-rw-r--r--scene/gui/rich_text_label.cpp1
-rw-r--r--scene/gui/scroll_container.cpp2
-rw-r--r--scene/gui/tab_container.cpp2
-rw-r--r--scene/gui/tabs.cpp3
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/texture_button.cpp7
-rw-r--r--scene/gui/tree.cpp11
-rw-r--r--scene/main/canvas_item.cpp8
-rw-r--r--scene/main/http_request.cpp1
-rw-r--r--scene/main/node.cpp5
-rw-r--r--scene/main/resource_preloader.cpp2
-rw-r--r--scene/main/scene_tree.cpp6
-rw-r--r--scene/main/shader_globals_override.cpp1
-rw-r--r--scene/main/timer.cpp3
-rw-r--r--scene/main/viewport.cpp20
-rw-r--r--scene/main/window.cpp29
-rw-r--r--scene/resources/animation.cpp17
-rw-r--r--scene/resources/audio_stream_sample.cpp8
-rw-r--r--scene/resources/bit_map.cpp1
-rw-r--r--scene/resources/curve.cpp12
-rw-r--r--scene/resources/dynamic_font.cpp5
-rw-r--r--scene/resources/environment.cpp58
-rw-r--r--scene/resources/font.cpp3
-rw-r--r--scene/resources/line_shape_2d.cpp2
-rw-r--r--scene/resources/material.cpp26
-rw-r--r--scene/resources/mesh.cpp6
-rw-r--r--scene/resources/mesh_data_tool.cpp17
-rw-r--r--scene/resources/mesh_library.cpp2
-rw-r--r--scene/resources/multimesh.cpp5
-rw-r--r--scene/resources/navigation_mesh.cpp3
-rw-r--r--scene/resources/packed_scene.cpp12
-rw-r--r--scene/resources/particles_material.cpp7
-rw-r--r--scene/resources/primitive_meshes.cpp1
-rw-r--r--scene/resources/resource_format_text.cpp3
-rw-r--r--scene/resources/segment_shape_2d.cpp3
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shape_2d.cpp1
-rw-r--r--scene/resources/skin.cpp1
-rw-r--r--scene/resources/sky_material.cpp20
-rw-r--r--scene/resources/style_box.cpp27
-rw-r--r--scene/resources/surface_tool.cpp5
-rw-r--r--scene/resources/texture.cpp49
-rw-r--r--scene/resources/theme.cpp4
-rw-r--r--scene/resources/visual_shader.cpp10
-rw-r--r--scene/resources/world_2d.cpp3
-rw-r--r--scene/resources/world_3d.cpp1
-rw-r--r--servers/audio/audio_filter_sw.cpp2
-rw-r--r--servers/audio/audio_stream.cpp2
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp8
-rw-r--r--servers/audio/effects/audio_effect_compressor.cpp5
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp12
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp4
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp1
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp2
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp3
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp3
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp2
-rw-r--r--servers/audio/effects/audio_effect_reverb.cpp12
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp1
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.cpp2
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp6
-rw-r--r--servers/audio/effects/eq.cpp2
-rw-r--r--servers/audio/effects/reverb.cpp3
-rw-r--r--servers/audio_server.cpp10
-rw-r--r--servers/display_server.cpp28
-rw-r--r--servers/navigation_server_2d.cpp11
-rw-r--r--servers/physics_2d/area_2d_sw.cpp1
-rw-r--r--servers/physics_2d/area_2d_sw.h2
-rw-r--r--servers/physics_2d/body_2d_sw.cpp2
-rw-r--r--servers/physics_2d/broad_phase_2d_basic.cpp6
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.cpp5
-rw-r--r--servers/physics_2d/physics_server_2d_sw.cpp14
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp1
-rw-r--r--servers/physics_2d/space_2d_sw.cpp4
-rw-r--r--servers/physics_3d/area_3d_sw.cpp1
-rw-r--r--servers/physics_3d/area_3d_sw.h2
-rw-r--r--servers/physics_3d/body_3d_sw.cpp3
-rw-r--r--servers/physics_3d/broad_phase_3d_basic.cpp6
-rw-r--r--servers/physics_3d/broad_phase_octree.cpp4
-rw-r--r--servers/physics_3d/collision_object_3d_sw.cpp1
-rw-r--r--servers/physics_3d/gjk_epa.cpp2
-rw-r--r--servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp1
-rw-r--r--servers/physics_3d/joints/hinge_joint_3d_sw.cpp3
-rw-r--r--servers/physics_3d/physics_server_3d_sw.cpp14
-rw-r--r--servers/physics_3d/shape_3d_sw.cpp3
-rw-r--r--servers/physics_3d/space_3d_sw.cpp5
-rw-r--r--servers/physics_server_2d.cpp14
-rw-r--r--servers/physics_server_3d.cpp8
-rw-r--r--servers/rendering/rasterizer.cpp1
-rw-r--r--servers/rendering/rasterizer_rd/light_cluster_builder.cpp2
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp7
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp1
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_scene_rd.cpp19
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp74
-rw-r--r--servers/rendering/rasterizer_rd/shader_compiler_rd.cpp1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/bokeh_dof.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/canvas_occlusion.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/canvas_uniforms_inc.glsl5
-rw-r--r--servers/rendering/rasterizer_rd/shaders/copy.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/copy_to_fb.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/cube_to_dp.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/cubemap_downsampler.glsl6
-rw-r--r--servers/rendering/rasterizer_rd/shaders/cubemap_filter.glsl2
-rw-r--r--servers/rendering/rasterizer_rd/shaders/cubemap_roughness.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/giprobe.glsl6
-rw-r--r--servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl2
-rw-r--r--servers/rendering/rasterizer_rd/shaders/giprobe_sdf.glsl4
-rw-r--r--servers/rendering/rasterizer_rd/shaders/giprobe_write.glsl5
-rw-r--r--servers/rendering/rasterizer_rd/shaders/luminance_reduce.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/roughness_limiter.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl13
-rw-r--r--servers/rendering/rasterizer_rd/shaders/screen_space_reflection.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/screen_space_reflection_filter.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/screen_space_reflection_scale.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/sky.glsl4
-rw-r--r--servers/rendering/rasterizer_rd/shaders/ssao.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/ssao_blur.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/ssao_minify.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/subsurface_scattering.glsl1
-rw-r--r--servers/rendering/rasterizer_rd/shaders/tonemap.glsl1
-rw-r--r--servers/rendering/rendering_device.cpp1
-rw-r--r--servers/rendering/rendering_server_canvas.cpp35
-rw-r--r--servers/rendering/rendering_server_raster.cpp6
-rw-r--r--servers/rendering/rendering_server_scene.cpp12
-rw-r--r--servers/rendering/rendering_server_viewport.cpp7
-rw-r--r--servers/rendering/shader_language.cpp1
409 files changed, 2286 insertions, 0 deletions
diff --git a/core/array.cpp b/core/array.cpp
index 75efe8f8ff..1a8a833404 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -83,9 +83,11 @@ const Variant &Array::operator[](int p_idx) const {
int Array::size() const {
return _p->array.size();
}
+
bool Array::empty() const {
return _p->array.empty();
}
+
void Array::clear() {
_p->array.clear();
}
@@ -151,6 +153,7 @@ void Array::_assign(const Array &p_array) {
void Array::operator=(const Array &p_array) {
_assign(p_array);
}
+
void Array::push_back(const Variant &p_value) {
ERR_FAIL_COND(!_p->typed.validate(p_value, "push_back"));
_p->array.push_back(p_value);
@@ -509,6 +512,7 @@ Array::Array() {
_p = memnew(ArrayPrivate);
_p->refcount.init();
}
+
Array::~Array() {
_unref();
}
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index a5809d6678..7c7ef4e03c 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -69,6 +69,7 @@ _ResourceLoader *_ResourceLoader::singleton = nullptr;
Error _ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) {
return ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads);
}
+
_ResourceLoader::ThreadLoadStatus _ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) {
float progress = 0;
ResourceLoader::ThreadLoadStatus tls = ResourceLoader::load_threaded_get_status(p_path, &progress);
@@ -76,6 +77,7 @@ _ResourceLoader::ThreadLoadStatus _ResourceLoader::load_threaded_get_status(cons
r_progress[0] = progress;
return (ThreadLoadStatus)tls;
}
+
RES _ResourceLoader::load_threaded_get(const String &p_path) {
Error error;
RES res = ResourceLoader::load_threaded_get(p_path, &error);
@@ -198,6 +200,7 @@ void _OS::set_use_file_access_save_and_swap(bool p_enable) {
void _OS::set_low_processor_usage_mode(bool p_enabled) {
OS::get_singleton()->set_low_processor_usage_mode(p_enabled);
}
+
bool _OS::is_in_low_processor_usage_mode() const {
return OS::get_singleton()->is_in_low_processor_usage_mode();
}
@@ -252,6 +255,7 @@ int _OS::get_process_id() const {
bool _OS::has_environment(const String &p_var) const {
return OS::get_singleton()->has_environment(p_var);
}
+
String _OS::get_environment(const String &p_var) const {
return OS::get_singleton()->get_environment(p_var);
}
@@ -259,6 +263,7 @@ String _OS::get_environment(const String &p_var) const {
String _OS::get_name() const {
return OS::get_singleton()->get_name();
}
+
Vector<String> _OS::get_cmdline_args() {
List<String> cmdline = OS::get_singleton()->get_cmdline_args();
Vector<String> cmdlinev;
@@ -811,6 +816,7 @@ Vector<Plane> _Geometry::build_box_planes(const Vector3 &p_extents) {
Vector<Plane> _Geometry::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) {
return Geometry::build_cylinder_planes(p_radius, p_height, p_sides, p_axis);
}
+
Vector<Plane> _Geometry::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
return Geometry::build_capsule_planes(p_radius, p_height, p_sides, p_lats, p_axis);
}
@@ -860,22 +866,27 @@ Vector<Vector3> _Geometry::get_closest_points_between_segments(const Vector3 &p1
r.set(1, r2);
return r;
}
+
Vector2 _Geometry::get_closest_point_to_segment_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
Vector2 s[2] = { p_a, p_b };
return Geometry::get_closest_point_to_segment_2d(p_point, s);
}
+
Vector3 _Geometry::get_closest_point_to_segment(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
Vector3 s[2] = { p_a, p_b };
return Geometry::get_closest_point_to_segment(p_point, s);
}
+
Vector2 _Geometry::get_closest_point_to_segment_uncapped_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
Vector2 s[2] = { p_a, p_b };
return Geometry::get_closest_point_to_segment_uncapped_2d(p_point, s);
}
+
Vector3 _Geometry::get_closest_point_to_segment_uncapped(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
Vector3 s[2] = { p_a, p_b };
return Geometry::get_closest_point_to_segment_uncapped(p_point, s);
}
+
Variant _Geometry::ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
Vector3 res;
if (Geometry::ray_intersects_triangle(p_from, p_dir, p_v0, p_v1, p_v2, &res))
@@ -883,6 +894,7 @@ Variant _Geometry::ray_intersects_triangle(const Vector3 &p_from, const Vector3
else
return Variant();
}
+
Variant _Geometry::segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
Vector3 res;
if (Geometry::segment_intersects_triangle(p_from, p_to, p_v0, p_v1, p_v2, &res))
@@ -906,6 +918,7 @@ Vector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, cons
r.set(1, norm);
return r;
}
+
Vector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) {
Vector<Vector3> r;
Vector3 res, norm;
@@ -917,6 +930,7 @@ Vector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, co
r.set(1, norm);
return r;
}
+
Vector<Vector3> _Geometry::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) {
Vector<Vector3> r;
Vector3 res, norm;
@@ -1198,9 +1212,11 @@ void _File::close() {
memdelete(f);
f = nullptr;
}
+
bool _File::is_open() const {
return f != nullptr;
}
+
String _File::get_path() const {
ERR_FAIL_COND_V_MSG(!f, "", "File must be opened before use.");
return f->get_path();
@@ -1215,10 +1231,12 @@ void _File::seek(int64_t p_position) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->seek(p_position);
}
+
void _File::seek_end(int64_t p_position) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->seek_end(p_position);
}
+
int64_t _File::get_position() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_position();
@@ -1238,14 +1256,17 @@ uint8_t _File::get_8() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_8();
}
+
uint16_t _File::get_16() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_16();
}
+
uint32_t _File::get_32() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_32();
}
+
uint64_t _File::get_64() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_64();
@@ -1255,10 +1276,12 @@ float _File::get_float() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_float();
}
+
double _File::get_double() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_double();
}
+
real_t _File::get_real() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_real();
@@ -1332,6 +1355,7 @@ void _File::set_endian_swap(bool p_swap) {
if (f)
f->set_endian_swap(p_swap);
}
+
bool _File::get_endian_swap() {
return eswap;
}
@@ -1347,16 +1371,19 @@ void _File::store_8(uint8_t p_dest) {
f->store_8(p_dest);
}
+
void _File::store_16(uint16_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_16(p_dest);
}
+
void _File::store_32(uint32_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_32(p_dest);
}
+
void _File::store_64(uint64_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
@@ -1368,11 +1395,13 @@ void _File::store_float(float p_dest) {
f->store_float(p_dest);
}
+
void _File::store_double(double p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_double(p_dest);
}
+
void _File::store_real(real_t p_real) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
@@ -1562,6 +1591,7 @@ String _Directory::get_next() {
}
return next;
}
+
bool _Directory::current_is_dir() const {
ERR_FAIL_COND_V_MSG(!d, false, "Directory must be opened before use.");
return d->current_is_dir();
@@ -1576,10 +1606,12 @@ int _Directory::get_drive_count() {
ERR_FAIL_COND_V_MSG(!d, 0, "Directory must be opened before use.");
return d->get_drive_count();
}
+
String _Directory::get_drive(int p_drive) {
ERR_FAIL_COND_V_MSG(!d, "", "Directory must be opened before use.");
return d->get_drive(p_drive);
}
+
int _Directory::get_current_drive() {
ERR_FAIL_COND_V_MSG(!d, 0, "Directory must be opened before use.");
return d->get_current_drive();
@@ -1589,10 +1621,12 @@ Error _Directory::change_dir(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
return d->change_dir(p_dir);
}
+
String _Directory::get_current_dir() {
ERR_FAIL_COND_V_MSG(!d, "", "Directory must be opened before use.");
return d->get_current_dir();
}
+
Error _Directory::make_dir(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
if (!p_dir.is_rel_path()) {
@@ -1603,6 +1637,7 @@ Error _Directory::make_dir(String p_dir) {
}
return d->make_dir(p_dir);
}
+
Error _Directory::make_dir_recursive(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
if (!p_dir.is_rel_path()) {
@@ -1646,6 +1681,7 @@ Error _Directory::copy(String p_from, String p_to) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
return d->copy(p_from, p_to);
}
+
Error _Directory::rename(String p_from, String p_to) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
if (!p_from.is_rel_path()) {
@@ -1657,6 +1693,7 @@ Error _Directory::rename(String p_from, String p_to) {
return d->rename(p_from, p_to);
}
+
Error _Directory::remove(String p_name) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
if (!p_name.is_rel_path()) {
@@ -1915,6 +1952,7 @@ String _Thread::get_id() const {
bool _Thread::is_active() const {
return active;
}
+
Variant _Thread::wait_to_finish() {
ERR_FAIL_COND_V_MSG(!thread, Variant(), "Thread must exist to wait for its completion.");
ERR_FAIL_COND_V_MSG(!active, Variant(), "Thread must be active to wait for its completion.");
@@ -1961,6 +1999,7 @@ PackedStringArray _ClassDB::get_class_list() const {
return ret;
}
+
PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const {
List<StringName> classes;
ClassDB::get_inheriters_from_class(p_class, &classes);
@@ -1974,18 +2013,23 @@ PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class)
return ret;
}
+
StringName _ClassDB::get_parent_class(const StringName &p_class) const {
return ClassDB::get_parent_class(p_class);
}
+
bool _ClassDB::class_exists(const StringName &p_class) const {
return ClassDB::class_exists(p_class);
}
+
bool _ClassDB::is_parent_class(const StringName &p_class, const StringName &p_inherits) const {
return ClassDB::is_parent_class(p_class, p_inherits);
}
+
bool _ClassDB::can_instance(const StringName &p_class) const {
return ClassDB::can_instance(p_class);
}
+
Variant _ClassDB::instance(const StringName &p_class) const {
Object *obj = ClassDB::instance(p_class);
if (!obj)
@@ -2002,6 +2046,7 @@ Variant _ClassDB::instance(const StringName &p_class) const {
bool _ClassDB::has_signal(StringName p_class, StringName p_signal) const {
return ClassDB::has_signal(p_class, p_signal);
}
+
Dictionary _ClassDB::get_signal(StringName p_class, StringName p_signal) const {
MethodInfo signal;
if (ClassDB::get_signal(p_class, p_signal, &signal)) {
@@ -2010,6 +2055,7 @@ Dictionary _ClassDB::get_signal(StringName p_class, StringName p_signal) const {
return Dictionary();
}
}
+
Array _ClassDB::get_signal_list(StringName p_class, bool p_no_inheritance) const {
List<MethodInfo> signals;
ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
@@ -2098,6 +2144,7 @@ int _ClassDB::get_integer_constant(const StringName &p_class, const StringName &
ERR_FAIL_COND_V(!found, 0);
return c;
}
+
StringName _ClassDB::get_category(const StringName &p_node) const {
return ClassDB::get_category(p_node);
}
@@ -2141,6 +2188,7 @@ void _ClassDB::_bind_methods() {
void _Engine::set_iterations_per_second(int p_ips) {
Engine::get_singleton()->set_iterations_per_second(p_ips);
}
+
int _Engine::get_iterations_per_second() const {
return Engine::get_singleton()->get_iterations_per_second();
}
diff --git a/core/callable.cpp b/core/callable.cpp
index dc2d034cc6..b7bdc715f8 100644
--- a/core/callable.cpp
+++ b/core/callable.cpp
@@ -72,6 +72,7 @@ ObjectID Callable::get_object_id() const {
return ObjectID(object);
}
}
+
StringName Callable::get_method() const {
ERR_FAIL_COND_V_MSG(is_custom(), StringName(),
vformat("Can't get method on CallableCustom \"%s\".", operator String()));
@@ -117,9 +118,11 @@ bool Callable::operator==(const Callable &p_callable) const {
return false;
}
}
+
bool Callable::operator!=(const Callable &p_callable) const {
return !(*this == p_callable);
}
+
bool Callable::operator<(const Callable &p_callable) const {
bool custom_a = is_custom();
bool custom_b = p_callable.is_custom();
@@ -222,6 +225,7 @@ Callable::Callable(ObjectID p_object, const StringName &p_method) {
object = p_object;
method = p_method;
}
+
Callable::Callable(CallableCustom *p_custom) {
if (p_custom->referenced) {
object = 0;
@@ -231,6 +235,7 @@ Callable::Callable(CallableCustom *p_custom) {
object = 0; //ensure object is all zero, since pointer may be 32 bits
custom = p_custom;
}
+
Callable::Callable(const Callable &p_callable) {
if (p_callable.is_custom()) {
if (!p_callable.custom->ref_count.ref()) {
@@ -262,9 +267,11 @@ CallableCustom::CallableCustom() {
Object *Signal::get_object() const {
return ObjectDB::get_instance(object);
}
+
ObjectID Signal::get_object_id() const {
return object;
}
+
StringName Signal::get_name() const {
return name;
}
@@ -307,17 +314,20 @@ Error Signal::emit(const Variant **p_arguments, int p_argcount) const {
return obj->emit_signal(name, p_arguments, p_argcount);
}
+
Error Signal::connect(const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
Object *object = get_object();
ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED);
return object->connect(name, p_callable, p_binds, p_flags);
}
+
void Signal::disconnect(const Callable &p_callable) {
Object *object = get_object();
ERR_FAIL_COND(!object);
object->disconnect(name, p_callable);
}
+
bool Signal::is_connected(const Callable &p_callable) const {
Object *object = get_object();
ERR_FAIL_COND_V(!object, false);
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 79e145248c..0a187416f4 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -255,6 +255,7 @@ bool ClassDB::is_parent_class(const StringName &p_class, const StringName &p_inh
return false;
}
+
void ClassDB::get_class_list(List<StringName> *p_classes) {
OBJTYPE_RLOCK;
@@ -505,6 +506,7 @@ Object *ClassDB::instance(const StringName &p_class) {
#endif
return ti->creation_func();
}
+
bool ClassDB::can_instance(const StringName &p_class) {
OBJTYPE_RLOCK;
@@ -934,6 +936,7 @@ void ClassDB::get_property_list(StringName p_class, List<PropertyInfo> *p_list,
check = check->inherits_ptr;
}
}
+
bool ClassDB::set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid) {
ClassInfo *type = classes.getptr(p_object->get_class_name());
ClassInfo *check = type;
@@ -978,6 +981,7 @@ bool ClassDB::set_property(Object *p_object, const StringName &p_property, const
return false;
}
+
bool ClassDB::get_property(Object *p_object, const StringName &p_property, Variant &r_value) {
ClassInfo *type = classes.getptr(p_object->get_class_name());
ClassInfo *check = type;
diff --git a/core/color.cpp b/core/color.cpp
index 328b2e3568..4bee14f3ba 100644
--- a/core/color.cpp
+++ b/core/color.cpp
@@ -213,6 +213,7 @@ void Color::invert() {
g = 1.0 - g;
b = 1.0 - b;
}
+
void Color::contrast() {
r = Math::fmod(r + 0.5, 1.0);
g = Math::fmod(g + 0.5, 1.0);
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index 89e738e596..dd46e23505 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -269,6 +269,7 @@ void PHashTranslation::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "strings"));
p_list->push_back(PropertyInfo(Variant::OBJECT, "load_from", PROPERTY_HINT_RESOURCE_TYPE, "Translation", PROPERTY_USAGE_EDITOR));
}
+
void PHashTranslation::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate", "from"), &PHashTranslation::generate);
}
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp
index 60db329e64..ed27d2ebc3 100644
--- a/core/crypto/crypto.cpp
+++ b/core/crypto/crypto.cpp
@@ -154,6 +154,7 @@ void ResourceFormatSaverCrypto::get_recognized_extensions(const RES &p_resource,
p_extensions->push_back("key");
}
}
+
bool ResourceFormatSaverCrypto::recognize(const RES &p_resource) const {
return Object::cast_to<X509Certificate>(*p_resource) || Object::cast_to<CryptoKey>(*p_resource);
}
diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp
index 9dd669f816..179745b11e 100644
--- a/core/debugger/script_debugger.cpp
+++ b/core/debugger/script_debugger.cpp
@@ -62,11 +62,13 @@ void ScriptDebugger::remove_breakpoint(int p_line, const StringName &p_source) {
if (breakpoints[p_line].size() == 0)
breakpoints.erase(p_line);
}
+
bool ScriptDebugger::is_breakpoint(int p_line, const StringName &p_source) const {
if (!breakpoints.has(p_line))
return false;
return breakpoints[p_line].has(p_source);
}
+
bool ScriptDebugger::is_breakpoint_line(int p_line) const {
return breakpoints.has(p_line);
}
diff --git a/core/dictionary.cpp b/core/dictionary.cpp
index bc8e795da7..0ef26cfc62 100644
--- a/core/dictionary.cpp
+++ b/core/dictionary.cpp
@@ -79,6 +79,7 @@ Variant &Dictionary::operator[](const Variant &p_key) {
const Variant &Dictionary::operator[](const Variant &p_key) const {
return _p->variant_map[p_key];
}
+
const Variant *Dictionary::getptr(const Variant &p_key) const {
OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key);
@@ -115,6 +116,7 @@ Variant Dictionary::get(const Variant &p_key, const Variant &p_default) const {
int Dictionary::size() const {
return _p->variant_map.size();
}
+
bool Dictionary::empty() const {
return !_p->variant_map.size();
}
@@ -170,6 +172,7 @@ void Dictionary::_unref() const {
}
_p = nullptr;
}
+
uint32_t Dictionary::hash() const {
uint32_t h = hash_djb2_one_32(Variant::DICTIONARY);
@@ -254,6 +257,7 @@ Dictionary::Dictionary() {
_p = memnew(DictionaryPrivate);
_p->refcount.init();
}
+
Dictionary::~Dictionary() {
_unref();
}
diff --git a/core/engine.cpp b/core/engine.cpp
index bd86535a70..25eac27921 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -40,6 +40,7 @@ void Engine::set_iterations_per_second(int p_ips) {
ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0.");
ips = p_ips;
}
+
int Engine::get_iterations_per_second() const {
return ips;
}
diff --git a/core/image.cpp b/core/image.cpp
index 4cbecbf44f..3fff93ed91 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -2283,6 +2283,7 @@ Error Image::decompress() {
Error Image::compress(CompressMode p_mode, CompressSource p_source, float p_lossy_quality) {
return compress_from_channels(p_mode, detect_used_channels(p_source), p_lossy_quality);
}
+
Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels, float p_lossy_quality) {
switch (p_mode) {
case COMPRESS_S3TC: {
@@ -3359,6 +3360,7 @@ void Image::convert_rg_to_ra_rgba8() {
w[i + 2] = 0;
}
}
+
void Image::convert_ra_rgba8_to_rg() {
ERR_FAIL_COND(format != FORMAT_RGBA8);
ERR_FAIL_COND(!data.size());
diff --git a/core/input/input.cpp b/core/input/input.cpp
index a9921f791a..e81dfcf30f 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -672,6 +672,7 @@ void Input::set_mouse_position(const Point2 &p_posf) {
Point2 Input::get_mouse_position() const {
return mouse_pos;
}
+
Point2 Input::get_last_mouse_speed() const {
return mouse_speed_track.speed;
}
@@ -812,6 +813,7 @@ void Input::accumulate_input_event(const Ref<InputEvent> &p_event) {
accumulated_events.push_back(p_event);
}
+
void Input::flush_accumulated_events() {
while (accumulated_events.front()) {
parse_input_event(accumulated_events.front()->get());
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp
index 094ed0bc56..497ce79038 100644
--- a/core/input/input_event.cpp
+++ b/core/input/input_event.cpp
@@ -131,6 +131,7 @@ void InputEventFromWindow::_bind_methods() {
void InputEventFromWindow::set_window_id(int64_t p_id) {
window_id = p_id;
}
+
int64_t InputEventFromWindow::get_window_id() const {
return window_id;
}
@@ -148,6 +149,7 @@ bool InputEventWithModifiers::get_shift() const {
void InputEventWithModifiers::set_alt(bool p_enabled) {
alt = p_enabled;
}
+
bool InputEventWithModifiers::get_alt() const {
return alt;
}
@@ -155,6 +157,7 @@ bool InputEventWithModifiers::get_alt() const {
void InputEventWithModifiers::set_control(bool p_enabled) {
control = p_enabled;
}
+
bool InputEventWithModifiers::get_control() const {
return control;
}
@@ -162,6 +165,7 @@ bool InputEventWithModifiers::get_control() const {
void InputEventWithModifiers::set_metakey(bool p_enabled) {
meta = p_enabled;
}
+
bool InputEventWithModifiers::get_metakey() const {
return meta;
}
@@ -169,6 +173,7 @@ bool InputEventWithModifiers::get_metakey() const {
void InputEventWithModifiers::set_command(bool p_enabled) {
command = p_enabled;
}
+
bool InputEventWithModifiers::get_command() const {
return command;
}
@@ -359,6 +364,7 @@ void InputEventKey::_bind_methods() {
void InputEventMouse::set_button_mask(int p_mask) {
button_mask = p_mask;
}
+
int InputEventMouse::get_button_mask() const {
return button_mask;
}
@@ -366,6 +372,7 @@ int InputEventMouse::get_button_mask() const {
void InputEventMouse::set_position(const Vector2 &p_pos) {
pos = p_pos;
}
+
Vector2 InputEventMouse::get_position() const {
return pos;
}
@@ -373,6 +380,7 @@ Vector2 InputEventMouse::get_position() const {
void InputEventMouse::set_global_position(const Vector2 &p_global_pos) {
global_pos = p_global_pos;
}
+
Vector2 InputEventMouse::get_global_position() const {
return global_pos;
}
@@ -405,6 +413,7 @@ float InputEventMouseButton::get_factor() const {
void InputEventMouseButton::set_button_index(int p_index) {
button_index = p_index;
}
+
int InputEventMouseButton::get_button_index() const {
return button_index;
}
@@ -412,6 +421,7 @@ int InputEventMouseButton::get_button_index() const {
void InputEventMouseButton::set_pressed(bool p_pressed) {
pressed = p_pressed;
}
+
bool InputEventMouseButton::is_pressed() const {
return pressed;
}
@@ -419,6 +429,7 @@ bool InputEventMouseButton::is_pressed() const {
void InputEventMouseButton::set_doubleclick(bool p_doubleclick) {
doubleclick = p_doubleclick;
}
+
bool InputEventMouseButton::is_doubleclick() const {
return doubleclick;
}
@@ -739,6 +750,7 @@ int InputEventJoypadButton::get_button_index() const {
void InputEventJoypadButton::set_pressed(bool p_pressed) {
pressed = p_pressed;
}
+
bool InputEventJoypadButton::is_pressed() const {
return pressed;
}
@@ -746,6 +758,7 @@ bool InputEventJoypadButton::is_pressed() const {
void InputEventJoypadButton::set_pressure(float p_pressure) {
pressure = p_pressure;
}
+
float InputEventJoypadButton::get_pressure() const {
return pressure;
}
@@ -798,6 +811,7 @@ void InputEventJoypadButton::_bind_methods() {
void InputEventScreenTouch::set_index(int p_index) {
index = p_index;
}
+
int InputEventScreenTouch::get_index() const {
return index;
}
@@ -805,6 +819,7 @@ int InputEventScreenTouch::get_index() const {
void InputEventScreenTouch::set_position(const Vector2 &p_pos) {
pos = p_pos;
}
+
Vector2 InputEventScreenTouch::get_position() const {
return pos;
}
@@ -812,6 +827,7 @@ Vector2 InputEventScreenTouch::get_position() const {
void InputEventScreenTouch::set_pressed(bool p_pressed) {
pressed = p_pressed;
}
+
bool InputEventScreenTouch::is_pressed() const {
return pressed;
}
@@ -860,6 +876,7 @@ int InputEventScreenDrag::get_index() const {
void InputEventScreenDrag::set_position(const Vector2 &p_pos) {
pos = p_pos;
}
+
Vector2 InputEventScreenDrag::get_position() const {
return pos;
}
@@ -867,6 +884,7 @@ Vector2 InputEventScreenDrag::get_position() const {
void InputEventScreenDrag::set_relative(const Vector2 &p_relative) {
relative = p_relative;
}
+
Vector2 InputEventScreenDrag::get_relative() const {
return relative;
}
@@ -874,6 +892,7 @@ Vector2 InputEventScreenDrag::get_relative() const {
void InputEventScreenDrag::set_speed(const Vector2 &p_speed) {
speed = p_speed;
}
+
Vector2 InputEventScreenDrag::get_speed() const {
return speed;
}
@@ -922,6 +941,7 @@ void InputEventScreenDrag::_bind_methods() {
void InputEventAction::set_action(const StringName &p_action) {
action = p_action;
}
+
StringName InputEventAction::get_action() const {
return action;
}
@@ -929,6 +949,7 @@ StringName InputEventAction::get_action() const {
void InputEventAction::set_pressed(bool p_pressed) {
pressed = p_pressed;
}
+
bool InputEventAction::is_pressed() const {
return pressed;
}
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 902d3cde9f..334c8f143e 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -78,6 +78,7 @@ void ConfigFile::set_value(const String &p_section, const String &p_key, const V
values[p_section][p_key] = p_value;
}
}
+
Variant ConfigFile::get_value(const String &p_section, const String &p_key, Variant p_default) const {
if (!values.has(p_section) || !values[p_section].has(p_key)) {
ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, Variant(),
@@ -91,6 +92,7 @@ Variant ConfigFile::get_value(const String &p_section, const String &p_key, Vari
bool ConfigFile::has_section(const String &p_section) const {
return values.has(p_section);
}
+
bool ConfigFile::has_section_key(const String &p_section, const String &p_key) const {
if (!values.has(p_section))
return false;
@@ -102,6 +104,7 @@ void ConfigFile::get_sections(List<String> *r_sections) const {
r_sections->push_back(E.key());
}
}
+
void ConfigFile::get_section_keys(const String &p_section, List<String> *r_keys) const {
ERR_FAIL_COND_MSG(!values.has(p_section), vformat("Cannot get keys from nonexistent section \"%s\".", p_section));
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp
index cbb9786af4..422100010c 100644
--- a/core/io/file_access_compressed.cpp
+++ b/core/io/file_access_compressed.cpp
@@ -132,6 +132,7 @@ Error FileAccessCompressed::_open(const String &p_path, int p_mode_flags) {
return OK;
}
+
void FileAccessCompressed::close() {
if (!f)
return;
@@ -221,6 +222,7 @@ void FileAccessCompressed::seek_end(int64_t p_position) {
seek(read_total + p_position);
}
}
+
size_t FileAccessCompressed::get_position() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
if (writing) {
@@ -229,6 +231,7 @@ size_t FileAccessCompressed::get_position() const {
return read_block * block_size + read_pos;
}
}
+
size_t FileAccessCompressed::get_len() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
if (writing) {
@@ -277,6 +280,7 @@ uint8_t FileAccessCompressed::get_8() const {
return ret;
}
+
int FileAccessCompressed::get_buffer(uint8_t *p_dst, int p_length) const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
ERR_FAIL_COND_V_MSG(writing, 0, "File has not been opened in read mode.");
diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp
index aaf21ad143..ceda6c5eb2 100644
--- a/core/io/file_access_encrypted.cpp
+++ b/core/io/file_access_encrypted.cpp
@@ -113,6 +113,7 @@ Error FileAccessEncrypted::open_and_parse_password(FileAccess *p_base, const Str
Error FileAccessEncrypted::_open(const String &p_path, int p_mode_flags) {
return OK;
}
+
void FileAccessEncrypted::close() {
if (!file)
return;
@@ -189,9 +190,11 @@ void FileAccessEncrypted::seek(size_t p_position) {
void FileAccessEncrypted::seek_end(int64_t p_position) {
seek(data.size() + p_position);
}
+
size_t FileAccessEncrypted::get_position() const {
return pos;
}
+
size_t FileAccessEncrypted::get_len() const {
return data.size();
}
@@ -211,6 +214,7 @@ uint8_t FileAccessEncrypted::get_8() const {
pos++;
return b;
}
+
int FileAccessEncrypted::get_buffer(uint8_t *p_dst, int p_length) const {
ERR_FAIL_COND_V_MSG(writing, 0, "File has not been opened in read mode.");
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 690a2bb269..4b7f99e5b0 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -300,6 +300,7 @@ void FileAccessNetwork::close() {
opened = false;
nc->unlock_mutex();
}
+
bool FileAccessNetwork::is_open() const {
return opened;
}
@@ -318,10 +319,12 @@ void FileAccessNetwork::seek(size_t p_position) {
void FileAccessNetwork::seek_end(int64_t p_position) {
seek(total_size + p_position);
}
+
size_t FileAccessNetwork::get_position() const {
ERR_FAIL_COND_V_MSG(!opened, 0, "File must be opened before use.");
return pos;
}
+
size_t FileAccessNetwork::get_len() const {
ERR_FAIL_COND_V_MSG(!opened, 0, "File must be opened before use.");
return total_size;
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index 4fd4d117af..bb65a1afbc 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -224,12 +224,15 @@ void FileAccessPack::seek(size_t p_position) {
f->seek(pf.offset + p_position);
pos = p_position;
}
+
void FileAccessPack::seek_end(int64_t p_position) {
seek(pf.size + p_position);
}
+
size_t FileAccessPack::get_position() const {
return pos;
}
+
size_t FileAccessPack::get_len() const {
return pf.size;
}
@@ -343,12 +346,15 @@ String DirAccessPack::get_next() {
return String();
}
}
+
bool DirAccessPack::current_is_dir() const {
return cdir;
}
+
bool DirAccessPack::current_is_hidden() const {
return false;
}
+
void DirAccessPack::list_dir_end() {
list_dirs.clear();
list_files.clear();
@@ -357,6 +363,7 @@ void DirAccessPack::list_dir_end() {
int DirAccessPack::get_drive_count() {
return 0;
}
+
String DirAccessPack::get_drive(int p_drive) {
return "";
}
@@ -440,6 +447,7 @@ Error DirAccessPack::make_dir(String p_dir) {
Error DirAccessPack::rename(String p_from, String p_to) {
return ERR_UNAVAILABLE;
}
+
Error DirAccessPack::remove(String p_name) {
return ERR_UNAVAILABLE;
}
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp
index b819725155..a2f65660f2 100644
--- a/core/io/multiplayer_api.cpp
+++ b/core/io/multiplayer_api.cpp
@@ -179,6 +179,7 @@ void _profile_node_data(const String &p_what, ObjectID p_id) {
EngineDebugger::profiler_add_frame_data("multiplayer", values);
}
}
+
void _profile_bandwidth_data(const String &p_inout, int p_size) {
if (EngineDebugger::is_profiling("multiplayer")) {
Array values;
@@ -668,6 +669,7 @@ Error MultiplayerAPI::_encode_and_compress_variant(const Variant &p_variant, uin
return OK;
}
+
Error MultiplayerAPI::_decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len) {
const uint8_t *buf = p_buffer;
int len = p_len;
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index 34fb5510b9..fe1c9a2eb1 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -117,6 +117,7 @@ Variant PacketPeer::_bnd_get_var(bool p_allow_objects) {
Error PacketPeer::_put_packet(const Vector<uint8_t> &p_buffer) {
return put_packet_buffer(p_buffer);
}
+
Vector<uint8_t> PacketPeer::_get_packet() {
Vector<uint8_t> raw;
last_get_error = get_packet_buffer(raw);
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index 0640d56c47..e36de8c228 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -291,6 +291,7 @@ Error PacketPeerUDP::_poll() {
return OK;
}
+
bool PacketPeerUDP::is_listening() const {
return _sock.is_valid() && _sock->is_open();
}
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 77fe331929..230925c29b 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -607,6 +607,7 @@ void ResourceLoaderBinary::set_local_path(const String &p_local_path) {
Ref<Resource> ResourceLoaderBinary::get_resource() {
return resource;
}
+
Error ResourceLoaderBinary::load() {
if (error != OK)
return error;
@@ -996,6 +997,7 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String
p_extensions->push_back(ext);
}
}
+
void ResourceFormatLoaderBinary::get_recognized_extensions(List<String> *p_extensions) const {
List<String> extensions;
ClassDB::get_resource_base_extensions(&extensions);
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 361f40cbc6..8490cb5627 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -260,6 +260,7 @@ void ResourceLoader::_thread_load_function(void *p_userdata) {
thread_load_mutex->unlock();
}
+
Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, const String &p_source_resource) {
String local_path;
if (p_path.is_rel_path())
@@ -412,6 +413,7 @@ ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const
return status;
}
+
RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) {
String local_path;
if (p_path.is_rel_path())
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index 2e63adcae9..e6175e78da 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -122,6 +122,7 @@ void StreamPeer::put_u8(uint8_t p_val) {
void StreamPeer::put_8(int8_t p_val) {
put_data((const uint8_t *)&p_val, 1);
}
+
void StreamPeer::put_u16(uint16_t p_val) {
if (big_endian) {
p_val = BSWAP16(p_val);
@@ -130,6 +131,7 @@ void StreamPeer::put_u16(uint16_t p_val) {
encode_uint16(p_val, buf);
put_data(buf, 2);
}
+
void StreamPeer::put_16(int16_t p_val) {
if (big_endian) {
p_val = BSWAP16(p_val);
@@ -138,6 +140,7 @@ void StreamPeer::put_16(int16_t p_val) {
encode_uint16(p_val, buf);
put_data(buf, 2);
}
+
void StreamPeer::put_u32(uint32_t p_val) {
if (big_endian) {
p_val = BSWAP32(p_val);
@@ -146,6 +149,7 @@ void StreamPeer::put_u32(uint32_t p_val) {
encode_uint32(p_val, buf);
put_data(buf, 4);
}
+
void StreamPeer::put_32(int32_t p_val) {
if (big_endian) {
p_val = BSWAP32(p_val);
@@ -154,6 +158,7 @@ void StreamPeer::put_32(int32_t p_val) {
encode_uint32(p_val, buf);
put_data(buf, 4);
}
+
void StreamPeer::put_u64(uint64_t p_val) {
if (big_endian) {
p_val = BSWAP64(p_val);
@@ -162,6 +167,7 @@ void StreamPeer::put_u64(uint64_t p_val) {
encode_uint64(p_val, buf);
put_data(buf, 8);
}
+
void StreamPeer::put_64(int64_t p_val) {
if (big_endian) {
p_val = BSWAP64(p_val);
@@ -170,6 +176,7 @@ void StreamPeer::put_64(int64_t p_val) {
encode_uint64(p_val, buf);
put_data(buf, 8);
}
+
void StreamPeer::put_float(float p_val) {
uint8_t buf[4];
@@ -181,6 +188,7 @@ void StreamPeer::put_float(float p_val) {
put_data(buf, 4);
}
+
void StreamPeer::put_double(double p_val) {
uint8_t buf[8];
encode_double(p_val, buf);
@@ -190,16 +198,19 @@ void StreamPeer::put_double(double p_val) {
}
put_data(buf, 8);
}
+
void StreamPeer::put_string(const String &p_string) {
CharString cs = p_string.ascii();
put_u32(cs.length());
put_data((const uint8_t *)cs.get_data(), cs.length());
}
+
void StreamPeer::put_utf8_string(const String &p_string) {
CharString cs = p_string.utf8();
put_u32(cs.length());
put_data((const uint8_t *)cs.get_data(), cs.length());
}
+
void StreamPeer::put_var(const Variant &p_variant, bool p_full_objects) {
int len = 0;
Vector<uint8_t> buf;
@@ -215,11 +226,13 @@ uint8_t StreamPeer::get_u8() {
get_data(buf, 1);
return buf[0];
}
+
int8_t StreamPeer::get_8() {
uint8_t buf[1];
get_data(buf, 1);
return buf[0];
}
+
uint16_t StreamPeer::get_u16() {
uint8_t buf[2];
get_data(buf, 2);
@@ -229,6 +242,7 @@ uint16_t StreamPeer::get_u16() {
}
return r;
}
+
int16_t StreamPeer::get_16() {
uint8_t buf[2];
get_data(buf, 2);
@@ -238,6 +252,7 @@ int16_t StreamPeer::get_16() {
}
return r;
}
+
uint32_t StreamPeer::get_u32() {
uint8_t buf[4];
get_data(buf, 4);
@@ -247,6 +262,7 @@ uint32_t StreamPeer::get_u32() {
}
return r;
}
+
int32_t StreamPeer::get_32() {
uint8_t buf[4];
get_data(buf, 4);
@@ -256,6 +272,7 @@ int32_t StreamPeer::get_32() {
}
return r;
}
+
uint64_t StreamPeer::get_u64() {
uint8_t buf[8];
get_data(buf, 8);
@@ -265,6 +282,7 @@ uint64_t StreamPeer::get_u64() {
}
return r;
}
+
int64_t StreamPeer::get_64() {
uint8_t buf[8];
get_data(buf, 8);
@@ -274,6 +292,7 @@ int64_t StreamPeer::get_64() {
}
return r;
}
+
float StreamPeer::get_float() {
uint8_t buf[4];
get_data(buf, 4);
@@ -297,6 +316,7 @@ double StreamPeer::get_double() {
return decode_double(buf);
}
+
String StreamPeer::get_string(int p_bytes) {
if (p_bytes < 0)
p_bytes = get_u32();
@@ -310,6 +330,7 @@ String StreamPeer::get_string(int p_bytes) {
buf.write[p_bytes] = 0;
return buf.ptr();
}
+
String StreamPeer::get_utf8_string(int p_bytes) {
if (p_bytes < 0)
p_bytes = get_u32();
@@ -325,6 +346,7 @@ String StreamPeer::get_utf8_string(int p_bytes) {
ret.parse_utf8((const char *)buf.ptr(), buf.size());
return ret;
}
+
Variant StreamPeer::get_var(bool p_allow_objects) {
int len = get_32();
Vector<uint8_t> var;
@@ -382,6 +404,7 @@ void StreamPeer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian_enabled");
}
+
////////////////////////////////
void StreamPeerBuffer::_bind_methods() {
@@ -455,6 +478,7 @@ void StreamPeerBuffer::seek(int p_pos) {
ERR_FAIL_COND(p_pos > data.size());
pointer = p_pos;
}
+
int StreamPeerBuffer::get_size() const {
return data.size();
}
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index b47e634a5a..5e109699f5 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -190,6 +190,7 @@ void TranslationLoaderPO::get_recognized_extensions(List<String> *p_extensions)
p_extensions->push_back("po");
//p_extensions->push_back("mo"); //mo in the future...
}
+
bool TranslationLoaderPO::handles_type(const String &p_type) const {
return (p_type == "Translation");
}
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 2926f4c92a..d575e75f0c 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -390,6 +390,7 @@ Error XMLParser::read() {
XMLParser::NodeType XMLParser::get_node_type() {
return node_type;
}
+
String XMLParser::get_node_data() const {
ERR_FAIL_COND_V(node_type != NODE_TEXT, "");
return node_name;
@@ -399,17 +400,21 @@ String XMLParser::get_node_name() const {
ERR_FAIL_COND_V(node_type == NODE_TEXT, "");
return node_name;
}
+
int XMLParser::get_attribute_count() const {
return attributes.size();
}
+
String XMLParser::get_attribute_name(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, attributes.size(), "");
return attributes[p_idx].name;
}
+
String XMLParser::get_attribute_value(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, attributes.size(), "");
return attributes[p_idx].value;
}
+
bool XMLParser::has_attribute(const String &p_name) const {
for (int i = 0; i < attributes.size(); i++) {
if (attributes[i].name == p_name)
@@ -418,6 +423,7 @@ bool XMLParser::has_attribute(const String &p_name) const {
return false;
}
+
String XMLParser::get_attribute_value(const String &p_name) const {
int idx = -1;
for (int i = 0; i < attributes.size(); i++) {
@@ -445,6 +451,7 @@ String XMLParser::get_attribute_value_safe(const String &p_name) const {
return "";
return attributes[idx].value;
}
+
bool XMLParser::is_empty() const {
return node_empty;
}
@@ -526,6 +533,7 @@ XMLParser::XMLParser() {
special_characters.push_back("\"quot;");
special_characters.push_back("'apos;");
}
+
XMLParser::~XMLParser() {
if (data)
memdelete_arr(data);
diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp
index 588ee84f58..d9cb928944 100644
--- a/core/math/aabb.cpp
+++ b/core/math/aabb.cpp
@@ -39,6 +39,7 @@ real_t AABB::get_area() const {
bool AABB::operator==(const AABB &p_rval) const {
return ((position == p_rval.position) && (size == p_rval.size));
}
+
bool AABB::operator!=(const AABB &p_rval) const {
return ((position != p_rval.position) || (size != p_rval.size));
}
@@ -238,6 +239,7 @@ Vector3 AABB::get_longest_axis() const {
return axis;
}
+
int AABB::get_longest_axis_index() const {
int axis = 0;
real_t max_size = size.x;
@@ -269,6 +271,7 @@ Vector3 AABB::get_shortest_axis() const {
return axis;
}
+
int AABB::get_shortest_axis_index() const {
int axis = 0;
real_t max_size = size.x;
@@ -290,11 +293,13 @@ AABB AABB::merge(const AABB &p_with) const {
aabb.merge_with(p_with);
return aabb;
}
+
AABB AABB::expand(const Vector3 &p_vector) const {
AABB aabb = *this;
aabb.expand_to(p_vector);
return aabb;
}
+
AABB AABB::grow(real_t p_by) const {
AABB aabb = *this;
aabb.grow_by(p_by);
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index e6bf6110f7..9981b673ed 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -327,6 +327,7 @@ void Basis::rotate_local(const Vector3 &p_axis, real_t p_phi) {
// M -> (M.R.Minv).M = M.R.
*this = rotated_local(p_axis, p_phi);
}
+
Basis Basis::rotated_local(const Vector3 &p_axis, real_t p_phi) const {
return (*this) * Basis(p_axis, p_phi);
}
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index 4b147bd987..c7a3918fe5 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -238,6 +238,7 @@ real_t CameraMatrix::get_z_far() const {
return new_plane.d;
}
+
real_t CameraMatrix::get_z_near() const {
const real_t *matrix = (const real_t *)this->matrix;
Plane new_plane = Plane(matrix[3] + matrix[2],
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index 3085997225..f1676ec152 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -51,6 +51,7 @@ bool Geometry::is_point_in_polygon(const Vector2 &p_point, const Vector<Vector2>
}
return false;
}
+
*/
void Geometry::MeshData::optimize_vertices() {
diff --git a/core/math/octree.h b/core/math/octree.h
index 0782a39804..067103112d 100644
--- a/core/math/octree.h
+++ b/core/math/octree.h
@@ -1218,6 +1218,7 @@ void Octree<T, use_pairs, AL>::set_pair_callback(PairCallback p_callback, void *
pair_callback = p_callback;
pair_callback_userdata = p_userdata;
}
+
template <class T, bool use_pairs, class AL>
void Octree<T, use_pairs, AL>::set_unpair_callback(UnpairCallback p_callback, void *p_userdata) {
unpair_callback = p_callback;
diff --git a/core/math/transform.cpp b/core/math/transform.cpp
index 0f62c8b2c0..0274dd18af 100644
--- a/core/math/transform.cpp
+++ b/core/math/transform.cpp
@@ -145,6 +145,7 @@ void Transform::scale_basis(const Vector3 &p_scale) {
void Transform::translate(real_t p_tx, real_t p_ty, real_t p_tz) {
translate(Vector3(p_tx, p_ty, p_tz));
}
+
void Transform::translate(const Vector3 &p_translation) {
for (int i = 0; i < 3; i++) {
origin[i] += basis[i].dot(p_translation);
@@ -174,6 +175,7 @@ bool Transform::is_equal_approx(const Transform &p_transform) const {
bool Transform::operator==(const Transform &p_transform) const {
return (basis == p_transform.basis && origin == p_transform.origin);
}
+
bool Transform::operator!=(const Transform &p_transform) const {
return (basis != p_transform.basis || origin != p_transform.origin);
}
diff --git a/core/math/transform.h b/core/math/transform.h
index 7f7e9ce833..71847d36ac 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -117,6 +117,7 @@ _FORCE_INLINE_ Vector3 Transform::xform(const Vector3 &p_vector) const {
basis[1].dot(p_vector) + origin.y,
basis[2].dot(p_vector) + origin.z);
}
+
_FORCE_INLINE_ Vector3 Transform::xform_inv(const Vector3 &p_vector) const {
Vector3 v = p_vector - origin;
@@ -138,6 +139,7 @@ _FORCE_INLINE_ Plane Transform::xform(const Plane &p_plane) const {
return Plane(normal, d);
}
+
_FORCE_INLINE_ Plane Transform::xform_inv(const Plane &p_plane) const {
Vector3 point = p_plane.normal * p_plane.d;
Vector3 point_dir = point + p_plane.normal;
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index f82d1d99c4..eecfc862f5 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -123,15 +123,18 @@ void Transform2D::scale(const Size2 &p_scale) {
scale_basis(p_scale);
elements[2] *= p_scale;
}
+
void Transform2D::scale_basis(const Size2 &p_scale) {
elements[0][0] *= p_scale.x;
elements[0][1] *= p_scale.y;
elements[1][0] *= p_scale.x;
elements[1][1] *= p_scale.y;
}
+
void Transform2D::translate(real_t p_tx, real_t p_ty) {
translate(Vector2(p_tx, p_ty));
}
+
void Transform2D::translate(const Vector2 &p_translation) {
elements[2] += basis_xform(p_translation);
}
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 66958257d7..46e97abaa7 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -153,6 +153,7 @@ Vector2 Transform2D::xform(const Vector2 &p_vec) const {
tdoty(p_vec)) +
elements[2];
}
+
Vector2 Transform2D::xform_inv(const Vector2 &p_vec) const {
Vector2 v = p_vec - elements[2];
@@ -160,6 +161,7 @@ Vector2 Transform2D::xform_inv(const Vector2 &p_vec) const {
elements[0].dot(v),
elements[1].dot(v));
}
+
Rect2 Transform2D::xform(const Rect2 &p_rect) const {
Vector2 x = elements[0] * p_rect.size.x;
Vector2 y = elements[1] * p_rect.size.y;
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index d06f64b40b..7f264ce119 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -192,13 +192,16 @@ bool Vector2::is_equal_approx(const Vector2 &p_v) const {
Vector2i Vector2i::operator+(const Vector2i &p_v) const {
return Vector2i(x + p_v.x, y + p_v.y);
}
+
void Vector2i::operator+=(const Vector2i &p_v) {
x += p_v.x;
y += p_v.y;
}
+
Vector2i Vector2i::operator-(const Vector2i &p_v) const {
return Vector2i(x - p_v.x, y - p_v.y);
}
+
void Vector2i::operator-=(const Vector2i &p_v) {
x -= p_v.x;
y -= p_v.y;
@@ -236,6 +239,7 @@ Vector2i Vector2i::operator-() const {
bool Vector2i::operator==(const Vector2i &p_vec2) const {
return x == p_vec2.x && y == p_vec2.y;
}
+
bool Vector2i::operator!=(const Vector2i &p_vec2) const {
return x != p_vec2.x || y != p_vec2.y;
}
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 5aa40d45f7..e5774f1d55 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -157,13 +157,16 @@ _FORCE_INLINE_ Vector2 operator*(real_t p_scalar, const Vector2 &p_vec) {
_FORCE_INLINE_ Vector2 Vector2::operator+(const Vector2 &p_v) const {
return Vector2(x + p_v.x, y + p_v.y);
}
+
_FORCE_INLINE_ void Vector2::operator+=(const Vector2 &p_v) {
x += p_v.x;
y += p_v.y;
}
+
_FORCE_INLINE_ Vector2 Vector2::operator-(const Vector2 &p_v) const {
return Vector2(x - p_v.x, y - p_v.y);
}
+
_FORCE_INLINE_ void Vector2::operator-=(const Vector2 &p_v) {
x -= p_v.x;
y -= p_v.y;
@@ -201,6 +204,7 @@ _FORCE_INLINE_ Vector2 Vector2::operator-() const {
_FORCE_INLINE_ bool Vector2::operator==(const Vector2 &p_vec2) const {
return x == p_vec2.x && y == p_vec2.y;
}
+
_FORCE_INLINE_ bool Vector2::operator!=(const Vector2 &p_vec2) const {
return x != p_vec2.x || y != p_vec2.y;
}
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 8acbe31f35..4a9b251406 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -46,6 +46,7 @@ void Vector3::set_axis(int p_axis, real_t p_value) {
ERR_FAIL_INDEX(p_axis, 3);
coord[p_axis] = p_value;
}
+
real_t Vector3::get_axis(int p_axis) const {
ERR_FAIL_INDEX_V(p_axis, 3, 0);
return operator[](p_axis);
@@ -54,6 +55,7 @@ real_t Vector3::get_axis(int p_axis) const {
int Vector3::min_axis() const {
return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2);
}
+
int Vector3::max_axis() const {
return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0);
}
@@ -63,6 +65,7 @@ void Vector3::snap(Vector3 p_val) {
y = Math::stepify(y, p_val.y);
z = Math::stepify(z, p_val.z);
}
+
Vector3 Vector3::snapped(Vector3 p_val) const {
Vector3 v = *this;
v.snap(p_val);
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 5fc412628f..3e35a5bba2 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -256,6 +256,7 @@ Vector3 &Vector3::operator-=(const Vector3 &p_v) {
z -= p_v.z;
return *this;
}
+
Vector3 Vector3::operator-(const Vector3 &p_v) const {
return Vector3(x - p_v.x, y - p_v.y, z - p_v.z);
}
@@ -266,6 +267,7 @@ Vector3 &Vector3::operator*=(const Vector3 &p_v) {
z *= p_v.z;
return *this;
}
+
Vector3 Vector3::operator*(const Vector3 &p_v) const {
return Vector3(x * p_v.x, y * p_v.y, z * p_v.z);
}
diff --git a/core/math/vector3i.cpp b/core/math/vector3i.cpp
index e621d5493a..718a1553a0 100644
--- a/core/math/vector3i.cpp
+++ b/core/math/vector3i.cpp
@@ -34,6 +34,7 @@ void Vector3i::set_axis(int p_axis, int32_t p_value) {
ERR_FAIL_INDEX(p_axis, 3);
coord[p_axis] = p_value;
}
+
int32_t Vector3i::get_axis(int p_axis) const {
ERR_FAIL_INDEX_V(p_axis, 3, 0);
return operator[](p_axis);
@@ -42,6 +43,7 @@ int32_t Vector3i::get_axis(int p_axis) const {
int Vector3i::min_axis() const {
return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2);
}
+
int Vector3i::max_axis() const {
return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0);
}
diff --git a/core/math/vector3i.h b/core/math/vector3i.h
index 5ecd3228b2..524f45b452 100644
--- a/core/math/vector3i.h
+++ b/core/math/vector3i.h
@@ -132,6 +132,7 @@ Vector3i &Vector3i::operator-=(const Vector3i &p_v) {
z -= p_v.z;
return *this;
}
+
Vector3i Vector3i::operator-(const Vector3i &p_v) const {
return Vector3i(x - p_v.x, y - p_v.y, z - p_v.z);
}
@@ -142,6 +143,7 @@ Vector3i &Vector3i::operator*=(const Vector3i &p_v) {
z *= p_v.z;
return *this;
}
+
Vector3i Vector3i::operator*(const Vector3i &p_v) const {
return Vector3i(x * p_v.x, y * p_v.y, z * p_v.z);
}
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index 4de4c48578..36914de0ba 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -118,6 +118,7 @@ Error MessageQueue::push_call(Object *p_object, const StringName &p_method, VARI
Error MessageQueue::push_notification(Object *p_object, int p_notification) {
return push_notification(p_object->get_instance_id(), p_notification);
}
+
Error MessageQueue::push_set(Object *p_object, const StringName &p_prop, const Variant &p_value) {
return push_set(p_object->get_instance_id(), p_prop, p_value);
}
diff --git a/core/method_bind.cpp b/core/method_bind.cpp
index 610111a3e8..a88e6e21b0 100644
--- a/core/method_bind.cpp
+++ b/core/method_bind.cpp
@@ -59,6 +59,7 @@ void MethodBind::_set_returns(bool p_returns) {
StringName MethodBind::get_name() const {
return name;
}
+
void MethodBind::set_name(const StringName &p_name) {
name = p_name;
}
@@ -67,6 +68,7 @@ void MethodBind::set_name(const StringName &p_name) {
void MethodBind::set_argument_names(const Vector<StringName> &p_names) {
arg_names = p_names;
}
+
Vector<StringName> MethodBind::get_argument_names() const {
return arg_names;
}
diff --git a/core/node_path.cpp b/core/node_path.cpp
index 0e4f2eeaf0..fd28815704 100644
--- a/core/node_path.cpp
+++ b/core/node_path.cpp
@@ -62,12 +62,14 @@ bool NodePath::is_absolute() const {
return data->absolute;
}
+
int NodePath::get_name_count() const {
if (!data)
return 0;
return data->path.size();
}
+
StringName NodePath::get_name(int p_idx) const {
ERR_FAIL_COND_V(!data, StringName());
ERR_FAIL_INDEX_V(p_idx, data->path.size(), StringName());
@@ -80,6 +82,7 @@ int NodePath::get_subname_count() const {
return data->subpath.size();
}
+
StringName NodePath::get_subname(int p_idx) const {
ERR_FAIL_COND_V(!data, StringName());
ERR_FAIL_INDEX_V(p_idx, data->subpath.size(), StringName());
@@ -133,6 +136,7 @@ bool NodePath::operator==(const NodePath &p_path) const {
return true;
}
+
bool NodePath::operator!=(const NodePath &p_path) const {
return (!(*this == p_path));
}
diff --git a/core/object.cpp b/core/object.cpp
index 50bf7d4d28..64b519f1b9 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -160,11 +160,13 @@ MethodInfo::MethodInfo(const String &p_name) :
name(p_name),
flags(METHOD_FLAG_NORMAL) {
}
+
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) :
name(p_name),
flags(METHOD_FLAG_NORMAL) {
arguments.push_back(p_param1);
}
+
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
name(p_name),
flags(METHOD_FLAG_NORMAL) {
@@ -209,12 +211,14 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name) :
flags(METHOD_FLAG_NORMAL) {
return_val.type = ret;
}
+
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1) :
name(p_name),
flags(METHOD_FLAG_NORMAL) {
return_val.type = ret;
arguments.push_back(p_param1);
}
+
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
name(p_name),
flags(METHOD_FLAG_NORMAL) {
@@ -320,6 +324,7 @@ bool Object::Connection::operator<(const Connection &p_conn) const {
return signal < p_conn.signal;
}
}
+
Object::Connection::Connection(const Variant &p_variant) {
Dictionary d = p_variant;
if (d.has("signal"))
@@ -349,6 +354,7 @@ void Object::_postinitialize() {
void Object::get_valid_parents_static(List<String> *p_parents) {
}
+
void Object::_get_valid_parents_static(List<String> *p_parents) {
}
@@ -739,6 +745,7 @@ Variant Object::getvar(const Variant &p_key, bool *r_valid) const {
*r_valid = false;
return Variant();
}
+
void Object::setvar(const Variant &p_key, const Variant &p_value, bool *r_valid) {
if (r_valid)
*r_valid = false;
@@ -997,6 +1004,7 @@ Vector<String> Object::_get_meta_list_bind() const {
return _metaret;
}
+
void Object::get_meta_list(List<String> *p_list) const {
List<Variant> keys;
metadata.get_key_list(&keys);
@@ -1318,6 +1326,7 @@ void Object::get_signals_connected_to_this(List<Connection> *p_connections) cons
Error Object::connect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds, uint32_t p_flags) {
return connect(p_signal, Callable(p_to_object, p_to_method), p_binds, p_flags);
}
+
Error Object::connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
ERR_FAIL_COND_V(p_callable.is_null(), ERR_INVALID_PARAMETER);
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index 520968c9a9..5763c74862 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -45,6 +45,7 @@ String DirAccess::_get_root_path() const {
return "";
}
}
+
String DirAccess::_get_root_string() const {
switch (_access_type) {
case ACCESS_RESOURCES:
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index f31842bcae..8b13e53812 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -170,6 +170,7 @@ uint16_t FileAccess::get_16() const {
return res;
}
+
uint32_t FileAccess::get_32() const {
uint32_t res;
uint16_t a, b;
@@ -187,6 +188,7 @@ uint32_t FileAccess::get_32() const {
return res;
}
+
uint64_t FileAccess::get_64() const {
uint64_t res;
uint32_t a, b;
@@ -394,6 +396,7 @@ void FileAccess::store_16(uint16_t p_dest) {
store_8(a);
store_8(b);
}
+
void FileAccess::store_32(uint32_t p_dest) {
uint16_t a, b;
@@ -407,6 +410,7 @@ void FileAccess::store_32(uint32_t p_dest) {
store_16(a);
store_16(b);
}
+
void FileAccess::store_64(uint64_t p_dest) {
uint32_t a, b;
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 7c00af8d1f..1ce49b544b 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -65,12 +65,14 @@ void MainLoop::init() {
if (get_script_instance())
get_script_instance()->call("_initialize");
}
+
bool MainLoop::iteration(float p_time) {
if (get_script_instance())
return get_script_instance()->call("_iteration", p_time);
return false;
}
+
bool MainLoop::idle(float p_time) {
if (get_script_instance())
return get_script_instance()->call("_idle", p_time);
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 02d1dfe895..4414b582bd 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -82,15 +82,18 @@ String OS::get_iso_date_time(bool local) const {
uint64_t OS::get_splash_tick_msec() const {
return _msec_splash;
}
+
uint64_t OS::get_unix_time() const {
return 0;
};
uint64_t OS::get_system_time_secs() const {
return 0;
}
+
uint64_t OS::get_system_time_msecs() const {
return 0;
}
+
void OS::debug_break(){
// something
@@ -224,6 +227,7 @@ bool OS::is_no_window_mode_enabled() const {
int OS::get_exit_code() const {
return _exit_code;
}
+
void OS::set_exit_code(int p_code) {
_exit_code = p_code;
}
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index b8f83f96a5..cbaf7e883b 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -329,6 +329,7 @@ Variant PackedDataContainer::_iter_init(const Array &p_iter) {
Variant PackedDataContainer::_iter_next(const Array &p_iter) {
return _iter_next_ofs(p_iter, 0);
}
+
Variant PackedDataContainer::_iter_get(const Variant &p_iter) {
return _iter_get_ofs(p_iter, 0);
}
@@ -354,6 +355,7 @@ Variant PackedDataContainerRef::_iter_init(const Array &p_iter) {
Variant PackedDataContainerRef::_iter_next(const Array &p_iter) {
return from->_iter_next_ofs(p_iter, offset);
}
+
Variant PackedDataContainerRef::_iter_get(const Variant &p_iter) {
return from->_iter_get_ofs(p_iter, offset);
}
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index 20b5edd412..63fd1d7bd1 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -491,6 +491,7 @@ void *PoolAllocator::get(ID p_mem) {
return ptr;
}
+
void PoolAllocator::unlock(ID p_mem) {
if (!needs_locking)
return;
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 42440c8085..fee9423a5e 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -114,6 +114,7 @@ void ProjectSettings::set_initial_value(const String &p_name, const Variant &p_v
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
props[p_name].initial = p_value;
}
+
void ProjectSettings::set_restart_if_changed(const String &p_name, bool p_restart) {
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
props[p_name].restart_if_changed = p_restart;
@@ -181,6 +182,7 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
return true;
}
+
bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_
diff --git a/core/resource.cpp b/core/resource.cpp
index 0d8a223b78..7d0e29d664 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -105,6 +105,7 @@ void Resource::set_name(const String &p_name) {
name = p_name;
_change_notify("resource_name");
}
+
String Resource::get_name() const {
return name;
}
@@ -444,6 +445,7 @@ bool ResourceCache::has(const String &p_path) {
return b;
}
+
Resource *ResourceCache::get(const String &p_path) {
lock->read_lock();
diff --git a/core/script_language.cpp b/core/script_language.cpp
index d7287d9532..6e5363e916 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -215,16 +215,20 @@ void ScriptServer::add_global_class(const StringName &p_class, const StringName
g.base = p_base;
global_classes[p_class] = g;
}
+
void ScriptServer::remove_global_class(const StringName &p_class) {
global_classes.erase(p_class);
}
+
bool ScriptServer::is_global_class(const StringName &p_class) {
return global_classes.has(p_class);
}
+
StringName ScriptServer::get_global_class_language(const StringName &p_class) {
ERR_FAIL_COND_V(!global_classes.has(p_class), StringName());
return global_classes[p_class].language;
}
+
String ScriptServer::get_global_class_path(const String &p_class) {
ERR_FAIL_COND_V(!global_classes.has(p_class), String());
return global_classes[p_class].path;
@@ -234,6 +238,7 @@ StringName ScriptServer::get_global_class_base(const String &p_class) {
ERR_FAIL_COND_V(!global_classes.has(p_class), String());
return global_classes[p_class].base;
}
+
StringName ScriptServer::get_global_class_native_base(const String &p_class) {
ERR_FAIL_COND_V(!global_classes.has(p_class), String());
String base = global_classes[p_class].base;
@@ -242,6 +247,7 @@ StringName ScriptServer::get_global_class_native_base(const String &p_class) {
}
return base;
}
+
void ScriptServer::get_global_class_list(List<StringName> *r_global_classes) {
const StringName *K = nullptr;
List<StringName> classes;
@@ -253,6 +259,7 @@ void ScriptServer::get_global_class_list(List<StringName> *r_global_classes) {
r_global_classes->push_back(E->get());
}
}
+
void ScriptServer::save_global_classes() {
List<StringName> gc;
get_global_class_list(&gc);
@@ -366,6 +373,7 @@ bool PlaceHolderScriptInstance::set(const StringName &p_name, const Variant &p_v
}
return false;
}
+
bool PlaceHolderScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
if (values.has(p_name)) {
r_ret = values[p_name];
@@ -431,6 +439,7 @@ void PlaceHolderScriptInstance::get_method_list(List<MethodInfo> *p_list) const
script->get_script_method_list(p_list);
}
}
+
bool PlaceHolderScriptInstance::has_method(const StringName &p_method) const {
if (script->is_placeholder_fallback_enabled())
return false;
diff --git a/core/string_name.cpp b/core/string_name.cpp
index 5e6d56e516..7f2da6151e 100644
--- a/core/string_name.cpp
+++ b/core/string_name.cpp
@@ -334,6 +334,7 @@ StringName StringName::search(const CharType *p_name) {
return StringName(); //does not exist
}
+
StringName StringName::search(const String &p_name) {
ERR_FAIL_COND_V(p_name == "", StringName());
diff --git a/core/translation.cpp b/core/translation.cpp
index a33cd48b88..2eaccc6c4e 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -851,6 +851,7 @@ void Translation::set_locale(const String &p_locale) {
void Translation::add_message(const StringName &p_src_text, const StringName &p_xlated_text) {
translation_map[p_src_text] = p_xlated_text;
}
+
StringName Translation::get_message(const StringName &p_src_text) const {
const Map<StringName, StringName>::Element *E = translation_map.find(p_src_text);
if (!E)
@@ -1011,6 +1012,7 @@ Vector<String> TranslationServer::get_all_locale_names() {
void TranslationServer::add_translation(const Ref<Translation> &p_translation) {
translations.insert(p_translation);
}
+
void TranslationServer::remove_translation(const Ref<Translation> &p_translation) {
translations.erase(p_translation);
}
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index da7c0ac248..d1a71a6b64 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -136,6 +136,7 @@ void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VAR
}
actions.write[current_action + 1].undo_ops.push_back(undo_op);
}
+
void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value) {
ERR_FAIL_COND(p_object == nullptr);
ERR_FAIL_COND(action_level <= 0);
@@ -150,6 +151,7 @@ void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, c
do_op.args[0] = p_value;
actions.write[current_action + 1].do_ops.push_back(do_op);
}
+
void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value) {
ERR_FAIL_COND(p_object == nullptr);
ERR_FAIL_COND(action_level <= 0);
@@ -169,6 +171,7 @@ void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property,
undo_op.args[0] = p_value;
actions.write[current_action + 1].undo_ops.push_back(undo_op);
}
+
void UndoRedo::add_do_reference(Object *p_object) {
ERR_FAIL_COND(p_object == nullptr);
ERR_FAIL_COND(action_level <= 0);
@@ -181,6 +184,7 @@ void UndoRedo::add_do_reference(Object *p_object) {
do_op.type = Operation::TYPE_REFERENCE;
actions.write[current_action + 1].do_ops.push_back(do_op);
}
+
void UndoRedo::add_undo_reference(Object *p_object) {
ERR_FAIL_COND(p_object == nullptr);
ERR_FAIL_COND(action_level <= 0);
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 249a61f3f9..a1a2280066 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -247,6 +247,7 @@ String String::operator+(CharType p_chr) const {
res+=p_chr;
return res;
}
+
*/
String &String::operator+=(const String &p_str) {
if (empty()) {
@@ -607,6 +608,7 @@ String String::get_with_code_lines() const {
}
return ret;
}
+
int String::get_slice_count(String p_splitter) const {
if (empty())
return 0;
@@ -959,6 +961,7 @@ String String::chr(CharType p_char) {
CharType c[2] = { p_char, 0 };
return String(c);
}
+
String String::num(double p_num, int p_decimals) {
#ifndef NO_USE_STDLIB
@@ -1522,6 +1525,7 @@ String::String(CharType p_char) {
shared=nullptr;
copy_from(p_char);
}
+
*/
String::String(const char *p_str) {
@@ -2073,6 +2077,7 @@ String operator+(const char *p_chr, const String &p_str) {
tmp += p_str;
return tmp;
}
+
String operator+(CharType p_chr, const String &p_str) {
return (String::chr(p_chr) + p_str);
}
@@ -2217,6 +2222,7 @@ String String::insert(int p_at_pos, const String &p_string) const {
return pre + p_string + post;
}
+
String String::substr(int p_from, int p_chars) const {
if (p_chars == -1)
p_chars = length() - p_from;
@@ -2467,6 +2473,7 @@ int String::rfind(const String &p_str, int p_from) const {
return -1;
}
+
int String::rfindn(const String &p_str, int p_from) const {
// establish a limit
int limit = length() - p_str.length();
@@ -2540,6 +2547,7 @@ bool String::begins_with(const String &p_string) const {
// only if i == l the p_string matches the beginning
return i == l;
}
+
bool String::begins_with(const char *p_string) const {
int l = length();
if (l == 0 || !p_string)
@@ -2846,6 +2854,7 @@ String String::replace_first(const String &p_key, const String &p_with) const {
return *this;
}
+
String String::replacen(const String &p_key, const String &p_with) const {
String new_string;
int search_from = 0;
@@ -3110,6 +3119,7 @@ String String::humanize_size(uint64_t p_size) {
return String::num(p_size / divisor).pad_decimals(digits) + " " + prefixes[prefix_idx];
}
+
bool String::is_abs_path() const {
if (length() > 1)
return (operator[](0) == '/' || operator[](0) == '\\' || find(":/") != -1 || find(":\\") != -1);
@@ -3742,6 +3752,7 @@ String String::percent_encode() const {
return encoded;
}
+
String String::percent_decode() const {
CharString pe;
@@ -3824,6 +3835,7 @@ String String::rpad(int min_length, const String &character) const {
return s;
}
+
// Left-pad with a character.
String String::lpad(int min_length, const String &character) const {
String s = *this;
diff --git a/core/variant.cpp b/core/variant.cpp
index b2bb7fe309..1098d031e5 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1374,6 +1374,7 @@ Variant::operator signed int() const {
}
}
}
+
Variant::operator unsigned int() const {
switch (type) {
case NIL:
@@ -1517,6 +1518,7 @@ Variant::operator signed short() const {
}
}
}
+
Variant::operator unsigned short() const {
switch (type) {
case NIL:
@@ -1534,6 +1536,7 @@ Variant::operator unsigned short() const {
}
}
}
+
Variant::operator signed char() const {
switch (type) {
case NIL:
@@ -1551,6 +1554,7 @@ Variant::operator signed char() const {
}
}
}
+
Variant::operator unsigned char() const {
switch (type) {
case NIL:
@@ -1590,6 +1594,7 @@ Variant::operator float() const {
}
}
}
+
Variant::operator double() const {
switch (type) {
case NIL:
@@ -1935,6 +1940,7 @@ Variant::operator Plane() const {
else
return Plane();
}
+
Variant::operator ::AABB() const {
if (type == AABB)
return *_data._aabb;
@@ -2077,6 +2083,7 @@ Variant::operator Node *() const {
else
return nullptr;
}
+
Variant::operator Control *() const {
if (type == OBJECT)
return Object::cast_to<Control>(_get_obj().obj);
@@ -2169,12 +2176,14 @@ Variant::operator Vector<uint8_t>() const {
else
return _convert_array_from_variant<Vector<uint8_t>>(*this);
}
+
Variant::operator Vector<int32_t>() const {
if (type == PACKED_INT32_ARRAY)
return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<int>>(*this);
}
+
Variant::operator Vector<int64_t>() const {
if (type == PACKED_INT64_ARRAY)
return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array;
@@ -2202,12 +2211,14 @@ Variant::operator Vector<String>() const {
else
return _convert_array_from_variant<Vector<String>>(*this);
}
+
Variant::operator Vector<Vector3>() const {
if (type == PACKED_VECTOR3_ARRAY)
return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<Vector3>>(*this);
}
+
Variant::operator Vector<Vector2>() const {
if (type == PACKED_VECTOR2_ARRAY)
return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array;
@@ -2280,6 +2291,7 @@ Variant::operator Vector<Variant>() const {
return variants;
}
+
Variant::operator Vector<StringName>() const {
Vector<String> from = operator Vector<String>();
Vector<StringName> to;
@@ -2294,6 +2306,7 @@ Variant::operator Vector<StringName>() const {
Variant::operator Margin() const {
return (Margin) operator int();
}
+
Variant::operator Orientation() const {
return (Orientation) operator int();
}
@@ -2326,6 +2339,7 @@ Variant::Variant(signed int p_int) {
type = INT;
_data._int = p_int;
}
+
Variant::Variant(unsigned int p_int) {
type = INT;
_data._int = p_int;
@@ -2337,6 +2351,7 @@ Variant::Variant(signed long p_int) {
type = INT;
_data._int = p_int;
}
+
Variant::Variant(unsigned long p_int) {
type = INT;
_data._int = p_int;
@@ -2357,22 +2372,27 @@ Variant::Variant(signed short p_short) {
type = INT;
_data._int = p_short;
}
+
Variant::Variant(unsigned short p_short) {
type = INT;
_data._int = p_short;
}
+
Variant::Variant(signed char p_char) {
type = INT;
_data._int = p_char;
}
+
Variant::Variant(unsigned char p_char) {
type = INT;
_data._int = p_char;
}
+
Variant::Variant(float p_float) {
type = FLOAT;
_data._float = p_float;
}
+
Variant::Variant(double p_double) {
type = FLOAT;
_data._float = p_double;
@@ -2387,6 +2407,7 @@ Variant::Variant(const StringName &p_string) {
type = STRING_NAME;
memnew_placement(_data._mem, StringName(p_string));
}
+
Variant::Variant(const String &p_string) {
type = STRING;
memnew_placement(_data._mem, String(p_string));
@@ -2401,10 +2422,12 @@ Variant::Variant(const CharType *p_wstring) {
type = STRING;
memnew_placement(_data._mem, String(p_wstring));
}
+
Variant::Variant(const Vector3 &p_vector3) {
type = VECTOR3;
memnew_placement(_data._mem, Vector3(p_vector3));
}
+
Variant::Variant(const Vector3i &p_vector3i) {
type = VECTOR3I;
memnew_placement(_data._mem, Vector3i(p_vector3i));
@@ -2434,6 +2457,7 @@ Variant::Variant(const Plane &p_plane) {
type = PLANE;
memnew_placement(_data._mem, Plane(p_plane));
}
+
Variant::Variant(const ::AABB &p_aabb) {
type = AABB;
_data._aabb = memnew(::AABB(p_aabb));
@@ -2448,6 +2472,7 @@ Variant::Variant(const Quat &p_quat) {
type = QUAT;
memnew_placement(_data._mem, Quat(p_quat));
}
+
Variant::Variant(const Transform &p_transform) {
type = TRANSFORM;
_data._transform = memnew(Transform(p_transform));
@@ -2457,6 +2482,7 @@ Variant::Variant(const Transform2D &p_transform) {
type = TRANSFORM2D;
_data._transform2d = memnew(Transform2D(p_transform));
}
+
Variant::Variant(const Color &p_color) {
type = COLOR;
memnew_placement(_data._mem, Color(p_color));
@@ -2499,6 +2525,7 @@ Variant::Variant(const Callable &p_callable) {
type = CALLABLE;
memnew_placement(_data._mem, Callable(p_callable));
}
+
Variant::Variant(const Signal &p_callable) {
type = SIGNAL;
memnew_placement(_data._mem, Signal(p_callable));
@@ -2543,6 +2570,7 @@ Variant::Variant(const Vector<uint8_t> &p_byte_array) {
_data.packed_array = PackedArrayRef<uint8_t>::create(p_byte_array);
}
+
Variant::Variant(const Vector<int32_t> &p_int32_array) {
type = PACKED_INT32_ARRAY;
_data.packed_array = PackedArrayRef<int32_t>::create(p_int32_array);
@@ -2567,6 +2595,7 @@ Variant::Variant(const Vector<String> &p_string_array) {
type = PACKED_STRING_ARRAY;
_data.packed_array = PackedArrayRef<String>::create(p_string_array);
}
+
Variant::Variant(const Vector<Vector3> &p_vector3_array) {
type = PACKED_VECTOR3_ARRAY;
_data.packed_array = PackedArrayRef<Vector3>::create(p_vector3_array);
@@ -2576,6 +2605,7 @@ Variant::Variant(const Vector<Vector2> &p_vector2_array) {
type = PACKED_VECTOR2_ARRAY;
_data.packed_array = PackedArrayRef<Vector2>::create(p_vector2_array);
}
+
Variant::Variant(const Vector<Color> &p_color_array) {
type = PACKED_COLOR_ARRAY;
_data.packed_array = PackedArrayRef<Color>::create(p_color_array);
@@ -3275,12 +3305,14 @@ Vector<Variant> varray(const Variant &p_arg1) {
v.push_back(p_arg1);
return v;
}
+
Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2) {
Vector<Variant> v;
v.push_back(p_arg1);
v.push_back(p_arg2);
return v;
}
+
Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3) {
Vector<Variant> v;
v.push_back(p_arg1);
@@ -3288,6 +3320,7 @@ Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2, const Varia
v.push_back(p_arg3);
return v;
}
+
Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4) {
Vector<Variant> v;
v.push_back(p_arg1);
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index b7678d8f43..1d75d52db0 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -115,6 +115,7 @@
TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY), \
TYPE(PREFIX, OP, PACKED_COLOR_ARRAY), \
}
+
/* clang-format on */
#define CASES(PREFIX) static const void *switch_table_##PREFIX[25][Variant::VARIANT_MAX] = { \
@@ -3536,6 +3537,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
valid = false;
return false;
}
+
bool Variant::iter_next(Variant &r_iter, bool &valid) const {
valid = true;
switch (type) {
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 0184de46ee..3a38720a27 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -42,6 +42,7 @@ CharType VariantParser::StreamFile::get_char() {
bool VariantParser::StreamFile::is_utf8() const {
return true;
}
+
bool VariantParser::StreamFile::is_eof() const {
return f->eof_reached();
}
@@ -62,6 +63,7 @@ CharType VariantParser::StreamString::get_char() {
bool VariantParser::StreamString::is_utf8() const {
return false;
}
+
bool VariantParser::StreamString::is_eof() const {
return pos > s.length();
}
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp
index b6e36d87a5..c92eb4cd11 100644
--- a/drivers/gles2/rasterizer_canvas_gles2.cpp
+++ b/drivers/gles2/rasterizer_canvas_gles2.cpp
@@ -1887,6 +1887,7 @@ void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, cons
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}
+
void RasterizerCanvasGLES2::reset_canvas() {
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);
@@ -1918,6 +1919,7 @@ void RasterizerCanvasGLES2::_bind_quad_buffer() {
glEnableVertexAttribArray(RS::ARRAY_VERTEX);
glVertexAttribPointer(RS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
}
+
void RasterizerCanvasGLES2::draw_generic_textured_rect(const Rect2 &p_rect, const Rect2 &p_src) {
state.canvas_shader.set_uniform(CanvasShaderGLES2::DST_RECT, Color(p_rect.position.x, p_rect.position.y, p_rect.size.x, p_rect.size.y));
state.canvas_shader.set_uniform(CanvasShaderGLES2::SRC_RECT, Color(p_src.position.x, p_src.position.y, p_src.size.x, p_src.size.y));
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 02e9d7d504..c66506f182 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -460,6 +460,7 @@ int RasterizerSceneGLES2::get_directional_light_shadow_size(RID p_light_intance)
return shadow_size;
}
+
//////////////////////////////////////////////////////
RID RasterizerSceneGLES2::reflection_atlas_create() {
@@ -840,6 +841,7 @@ void RasterizerSceneGLES2::environment_set_fog_height(RID p_env, bool p_enable,
env->fog_height_max = p_max_height;
env->fog_height_curve = p_height_curve;
}
+
bool RasterizerSceneGLES2::is_environment(RID p_env) {
return environment_owner.owns(p_env);
}
@@ -917,6 +919,7 @@ RID RasterizerSceneGLES2::gi_probe_instance_create() {
void RasterizerSceneGLES2::gi_probe_instance_set_light_data(RID p_probe, RID p_base, RID p_data) {
}
+
void RasterizerSceneGLES2::gi_probe_instance_set_transform_to_data(RID p_probe, const Transform &p_xform) {
}
@@ -965,6 +968,7 @@ void RasterizerSceneGLES2::_add_geometry(RasterizerStorageGLES2::Geometry *p_geo
_add_geometry_with_material(p_geometry, p_instance, p_owner, material, p_depth_pass, p_shadow_pass);
}
}
+
void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES2::GeometryOwner *p_owner, RasterizerStorageGLES2::Material *p_material, bool p_depth_pass, bool p_shadow_pass) {
bool has_base_alpha = (p_material->shader->spatial.uses_alpha && !p_material->shader->spatial.uses_alpha_scissor) || p_material->shader->spatial.uses_screen_texture || p_material->shader->spatial.uses_depth_texture;
bool has_blend_alpha = p_material->shader->spatial.blend_mode != RasterizerStorageGLES2::Shader::Spatial::BLEND_MODE_MIX;
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index 0636676ffa..6eef04b87f 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -2617,6 +2617,7 @@ Vector<Vector<uint8_t>> RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RI
return mesh->surfaces[p_surface]->blend_shape_data;
}
+
Vector<AABB> RasterizerStorageGLES2::mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND_V(!mesh, Vector<AABB>());
@@ -2782,6 +2783,7 @@ AABB RasterizerStorageGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
return aabb;
}
+
void RasterizerStorageGLES2::mesh_clear(RID p_mesh) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
@@ -3560,6 +3562,7 @@ Transform RasterizerStorageGLES2::skeleton_bone_get_transform(RID p_skeleton, in
return ret;
}
+
void RasterizerStorageGLES2::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) {
Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
ERR_FAIL_COND(!skeleton);
@@ -3987,6 +3990,7 @@ void RasterizerStorageGLES2::reflection_probe_set_max_distance(RID p_probe, floa
reflection_probe->max_distance = p_distance;
reflection_probe->instance_change_notify(true, false);
}
+
void RasterizerStorageGLES2::reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -3994,6 +3998,7 @@ void RasterizerStorageGLES2::reflection_probe_set_extents(RID p_probe, const Vec
reflection_probe->extents = p_extents;
reflection_probe->instance_change_notify(true, false);
}
+
void RasterizerStorageGLES2::reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -4009,6 +4014,7 @@ void RasterizerStorageGLES2::reflection_probe_set_as_interior(RID p_probe, bool
reflection_probe->interior = p_enable;
reflection_probe->instance_change_notify(true, false);
}
+
void RasterizerStorageGLES2::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -4023,6 +4029,7 @@ void RasterizerStorageGLES2::reflection_probe_set_enable_shadows(RID p_probe, bo
reflection_probe->enable_shadows = p_enable;
reflection_probe->instance_change_notify(true, false);
}
+
void RasterizerStorageGLES2::reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -4048,6 +4055,7 @@ AABB RasterizerStorageGLES2::reflection_probe_get_aabb(RID p_probe) const {
return aabb;
}
+
RS::ReflectionProbeUpdateMode RasterizerStorageGLES2::reflection_probe_get_update_mode(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, RS::REFLECTION_PROBE_UPDATE_ALWAYS);
@@ -4068,6 +4076,7 @@ Vector3 RasterizerStorageGLES2::reflection_probe_get_extents(RID p_probe) const
return reflection_probe->extents;
}
+
Vector3 RasterizerStorageGLES2::reflection_probe_get_origin_offset(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, Vector3());
@@ -4160,6 +4169,7 @@ void RasterizerStorageGLES2::gi_probe_set_compress(RID p_probe, bool p_enable) {
bool RasterizerStorageGLES2::gi_probe_is_compressed(RID p_probe) const {
return false;
}
+
float RasterizerStorageGLES2::gi_probe_get_energy(RID p_probe) const {
return 0;
}
@@ -4204,11 +4214,13 @@ void RasterizerStorageGLES2::lightmap_capture_set_bounds(RID p_capture, const AA
capture->bounds = p_bounds;
capture->instance_change_notify(true, false);
}
+
AABB RasterizerStorageGLES2::lightmap_capture_get_bounds(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND_V(!capture, AABB());
return capture->bounds;
}
+
void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {
LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND(!capture);
@@ -4223,6 +4235,7 @@ void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Ve
}
capture->instance_change_notify(true, false);
}
+
Vector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND_V(!capture, Vector<uint8_t>());
diff --git a/drivers/gles2/shaders/blend_shape.glsl b/drivers/gles2/shaders/blend_shape.glsl
index 7a0a7ebe99..e229da6f18 100644
--- a/drivers/gles2/shaders/blend_shape.glsl
+++ b/drivers/gles2/shaders/blend_shape.glsl
@@ -190,4 +190,5 @@ void main() {
void main() {
}
+
/* clang-format on */
diff --git a/drivers/gles2/shaders/particles.glsl b/drivers/gles2/shaders/particles.glsl
index 1575db701f..d762dade2f 100644
--- a/drivers/gles2/shaders/particles.glsl
+++ b/drivers/gles2/shaders/particles.glsl
@@ -257,4 +257,5 @@ FRAGMENT_SHADER_CODE
}
}
+
/* clang-format on */
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl
index d658ccd5cd..0311dc4742 100644
--- a/drivers/gles2/shaders/scene.glsl
+++ b/drivers/gles2/shaders/scene.glsl
@@ -1065,6 +1065,7 @@ float G_GGX_2cos(float cos_theta_m, float alpha) {
// float sin2 = (1.0 - cos2);
// return 1.0 / (cos_theta_m + sqrt(cos2 + alpha * alpha * sin2));
}
+
*/
// This approximates G_GGX_2cos(cos_theta_l, alpha) * G_GGX_2cos(cos_theta_v, alpha)
@@ -1087,6 +1088,7 @@ float G_GGX_anisotropic_2cos(float cos_theta_m, float alpha_x, float alpha_y, fl
float s_y = alpha_y * sin_phi;
return 1.0 / max(cos_theta_m + sqrt(cos2 + (s_x * s_x + s_y * s_y) * sin2), 0.001);
}
+
*/
// This approximates G_GGX_anisotropic_2cos(cos_theta_l, ...) * G_GGX_anisotropic_2cos(cos_theta_v, ...)
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 920d594ea1..3ba667b2f7 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -244,6 +244,7 @@ void OS_Unix::delay_usec(uint32_t p_usec) const {
while (nanosleep(&rem, &rem) == EINTR) {
}
}
+
uint64_t OS_Unix::get_ticks_usec() const {
#if defined(__APPLE__)
uint64_t longtime = mach_absolute_time() * _clock_scale;
diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp
index dda1edc3c3..16897883e8 100644
--- a/drivers/unix/thread_posix.cpp
+++ b/drivers/unix/thread_posix.cpp
@@ -87,6 +87,7 @@ Thread *ThreadPosix::create_func_posix(ThreadCreateCallback p_callback, void *p_
return tr;
}
+
Thread::ID ThreadPosix::get_thread_id_func_posix() {
void *value = pthread_getspecific(thread_id_key);
@@ -97,6 +98,7 @@ Thread::ID ThreadPosix::get_thread_id_func_posix() {
pthread_setspecific(thread_id_key, (void *)memnew(ID(new_id)));
return new_id;
}
+
void ThreadPosix::wait_to_finish_func_posix(Thread *p_thread) {
ThreadPosix *tp = static_cast<ThreadPosix *>(p_thread);
ERR_FAIL_COND(!tp);
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index f8b0eafcd0..ea99594810 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -2699,6 +2699,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
return OK;
}
+
Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID p_to_texture, bool p_sync_with_draw) {
_THREAD_SAFE_METHOD_
@@ -5323,12 +5324,14 @@ int RenderingDeviceVulkan::screen_get_width(DisplayServer::WindowID p_screen) co
ERR_FAIL_COND_V_MSG(local_device.is_valid(), -1, "Local devices have no screen");
return context->window_get_width(p_screen);
}
+
int RenderingDeviceVulkan::screen_get_height(DisplayServer::WindowID p_screen) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V_MSG(local_device.is_valid(), -1, "Local devices have no screen");
return context->window_get_height(p_screen);
}
+
RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::screen_get_framebuffer_format() const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V_MSG(local_device.is_valid(), INVALID_ID, "Local devices have no screen");
@@ -5978,6 +5981,7 @@ void RenderingDeviceVulkan::draw_list_bind_vertex_array(DrawListID p_list, RID p
dl->validation.vertex_array_size = vertex_array->vertex_count;
vkCmdBindVertexBuffers(dl->command_buffer, 0, vertex_array->buffers.size(), vertex_array->buffers.ptr(), vertex_array->offsets.ptr());
}
+
void RenderingDeviceVulkan::draw_list_bind_index_array(DrawListID p_list, RID p_index_array) {
DrawList *dl = _get_draw_list_ptr(p_list);
ERR_FAIL_COND(!dl);
@@ -6164,6 +6168,7 @@ void RenderingDeviceVulkan::draw_list_enable_scissor(DrawListID p_list, const Re
vkCmdSetScissor(dl->command_buffer, 0, 1, &scissor);
}
+
void RenderingDeviceVulkan::draw_list_disable_scissor(DrawListID p_list) {
DrawList *dl = _get_draw_list_ptr(p_list);
ERR_FAIL_COND(!dl);
@@ -6302,6 +6307,7 @@ void RenderingDeviceVulkan::compute_list_bind_compute_pipeline(ComputeListID p_l
cl->validation.pipeline_push_constant_size = pipeline->push_constant_size;
#endif
}
+
void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list, RID p_uniform_set, uint32_t p_index) {
ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);
@@ -6424,6 +6430,7 @@ void RenderingDeviceVulkan::compute_list_set_push_constant(ComputeListID p_list,
cl->validation.pipeline_push_constant_suppplied = true;
#endif
}
+
void RenderingDeviceVulkan::compute_list_dispatch(ComputeListID p_list, uint32_t p_x_groups, uint32_t p_y_groups, uint32_t p_z_groups) {
ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);
@@ -6646,6 +6653,7 @@ void RenderingDeviceVulkan::_free_internal(RID p_id) {
ERR_PRINT("Attempted to free invalid ID: " + itos(p_id.get_id()));
}
}
+
void RenderingDeviceVulkan::free(RID p_id) {
_THREAD_SAFE_METHOD_
@@ -7163,10 +7171,12 @@ uint64_t RenderingDeviceVulkan::get_captured_timestamp_gpu_time(uint32_t p_index
return l;
}
+
uint64_t RenderingDeviceVulkan::get_captured_timestamp_cpu_time(uint32_t p_index) const {
ERR_FAIL_UNSIGNED_INDEX_V(p_index, frames[frame].timestamp_result_count, 0);
return frames[frame].timestamp_cpu_result_values[p_index];
}
+
String RenderingDeviceVulkan::get_captured_timestamp_name(uint32_t p_index) const {
ERR_FAIL_UNSIGNED_INDEX_V(p_index, frames[frame].timestamp_result_count, String());
return frames[frame].timestamp_result_names[p_index];
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 875ace32a5..a8a29aaeea 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -1459,9 +1459,11 @@ VkDevice VulkanContext::get_device() {
VkPhysicalDevice VulkanContext::get_physical_device() {
return gpu;
}
+
int VulkanContext::get_swapchain_image_count() const {
return swapchainImageCount;
}
+
uint32_t VulkanContext::get_graphics_queue() const {
return graphics_queue_family_index;
}
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 52ba8527ab..d0f06ae4c4 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -101,9 +101,11 @@ void DirAccessWindows::list_dir_end() {
p->h = INVALID_HANDLE_VALUE;
}
}
+
int DirAccessWindows::get_drive_count() {
return drive_count;
}
+
String DirAccessWindows::get_drive(int p_drive) {
if (p_drive < 0 || p_drive >= drive_count)
return "";
@@ -298,6 +300,7 @@ Error DirAccessWindows::remove(String p_path) {
else
return ::_wunlink(p_path.c_str()) == 0 ? OK : FAILED;
}
+
/*
FileType DirAccessWindows::get_file_type(const String& p_file) const {
@@ -325,6 +328,7 @@ FileType DirAccessWindows::get_file_type(const String& p_file) const {
return (attr&FILE_ATTRIBUTE_DIRECTORY)?FILE_TYPE_
}
+
*/
size_t DirAccessWindows::get_space_left() {
uint64_t bytes = 0;
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index b74e89e2dc..50366d0b2d 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -188,6 +188,7 @@ String FileAccessWindows::get_path_absolute() const {
bool FileAccessWindows::is_open() const {
return (f != nullptr);
}
+
void FileAccessWindows::seek(size_t p_position) {
ERR_FAIL_COND(!f);
last_error = OK;
@@ -195,12 +196,14 @@ void FileAccessWindows::seek(size_t p_position) {
check_errors();
prev_op = 0;
}
+
void FileAccessWindows::seek_end(int64_t p_position) {
ERR_FAIL_COND(!f);
if (fseek(f, p_position, SEEK_END))
check_errors();
prev_op = 0;
}
+
size_t FileAccessWindows::get_position() const {
size_t aux_position = 0;
aux_position = ftell(f);
@@ -209,6 +212,7 @@ size_t FileAccessWindows::get_position() const {
};
return aux_position;
}
+
size_t FileAccessWindows::get_len() const {
ERR_FAIL_COND_V(!f, 0);
diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp
index adc3a9a019..ca7d936fac 100644
--- a/drivers/windows/thread_windows.cpp
+++ b/drivers/windows/thread_windows.cpp
@@ -66,9 +66,11 @@ Thread *ThreadWindows::create_func_windows(ThreadCreateCallback p_callback, void
return tr;
}
+
Thread::ID ThreadWindows::get_thread_id_func_windows() {
return (ID)GetCurrentThreadId(); //must implement
}
+
void ThreadWindows::wait_to_finish_func_windows(Thread *p_thread) {
ThreadWindows *tp = static_cast<ThreadWindows *>(p_thread);
ERR_FAIL_COND(!tp);
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp
index 9ff1030165..df7d2488fd 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.cpp
+++ b/drivers/xaudio2/audio_driver_xaudio2.cpp
@@ -150,6 +150,7 @@ void AudioDriverXAudio2::lock() {
return;
mutex.lock();
}
+
void AudioDriverXAudio2::unlock() {
if (!thread)
return;
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 893a3f62b1..dededfb617 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -509,6 +509,7 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed));
}
+
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
connect_compat("clear_selection", editor, "_clear_selection", varray(false));
@@ -541,6 +542,7 @@ void AnimationBezierTrackEdit::update_play_position() {
void AnimationBezierTrackEdit::set_root(Node *p_root) {
root = p_root;
}
+
void AnimationBezierTrackEdit::_zoom_changed() {
update();
}
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 92879fb193..0808946b16 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1684,6 +1684,7 @@ void AnimationTimelineEdit::set_use_fps(bool p_use_fps) {
update_values();
update();
}
+
bool AnimationTimelineEdit::is_using_fps() const {
return use_fps;
}
@@ -2066,6 +2067,7 @@ int AnimationTrackEdit::get_key_height() const {
return type_icon->get_height();
}
+
Rect2 AnimationTrackEdit::get_key_rect(int p_index, float p_pixels_sec) {
if (!animation.is_valid())
return Rect2();
@@ -2262,6 +2264,7 @@ void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline->connect("zoom_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
}
+
void AnimationTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
}
@@ -2761,6 +2764,7 @@ bool AnimationTrackEdit::can_drop_data(const Point2 &p_point, const Variant &p_d
return true;
}
+
void AnimationTrackEdit::drop_data(const Point2 &p_point, const Variant &p_data) {
Dictionary d = p_data;
if (!d.has("type")) {
@@ -2844,6 +2848,7 @@ void AnimationTrackEdit::cancel_drop() {
update();
}
}
+
void AnimationTrackEdit::set_in_group(bool p_enable) {
in_group = p_enable;
update();
@@ -3135,6 +3140,7 @@ void AnimationTrackEditor::update_keying() {
bool AnimationTrackEditor::has_keying() const {
return keying;
}
+
Dictionary AnimationTrackEditor::get_state() const {
Dictionary state;
state["fps_mode"] = timeline->is_using_fps();
@@ -3143,6 +3149,7 @@ Dictionary AnimationTrackEditor::get_state() const {
state["v_scroll"] = scroll->get_v_scrollbar()->get_value();
return state;
}
+
void AnimationTrackEditor::set_state(const Dictionary &p_state) {
if (p_state.has("fps_mode")) {
bool fps_mode = p_state["fps_mode"];
@@ -4076,6 +4083,7 @@ void AnimationTrackEditor::_update_step_spinbox() {
step->set_block_signals(false);
}
+
void AnimationTrackEditor::_animation_update() {
timeline->update();
timeline->update_values();
@@ -4752,6 +4760,7 @@ void AnimationTrackEditor::_move_selection_commit() {
_update_key_edit();
}
+
void AnimationTrackEditor::_move_selection_cancel() {
moving_selection = false;
for (int i = 0; i < track_edits.size(); i++) {
@@ -4762,6 +4771,7 @@ void AnimationTrackEditor::_move_selection_cancel() {
bool AnimationTrackEditor::is_moving_selection() const {
return moving_selection;
}
+
float AnimationTrackEditor::get_moving_selection_offset() const {
return moving_selection_offset;
}
@@ -4953,6 +4963,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
_update_key_edit();
}
}
+
void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
last_menu_track_opt = p_option;
switch (p_option) {
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 424c3db15f..ed64fb2415 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -44,6 +44,7 @@ int AnimationTrackEditBool::get_key_height() const {
Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox");
return checked->get_height();
}
+
Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) {
Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox");
return Rect2(-checked->get_width() / 2, 0, checked->get_width(), get_size().height);
@@ -52,6 +53,7 @@ Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) {
bool AnimationTrackEditBool::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditBool::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
bool checked = get_animation()->track_get_key_value(get_track(), p_index);
Ref<Texture2D> icon = get_theme_icon(checked ? "checked" : "unchecked", "CheckBox");
@@ -78,6 +80,7 @@ int AnimationTrackEditColor::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return font->get_height() * 0.8;
}
+
Rect2 AnimationTrackEditColor::get_key_rect(int p_index, float p_pixels_sec) {
Ref<Font> font = get_theme_font("font", "Label");
int fh = font->get_height() * 0.8;
@@ -177,6 +180,7 @@ int AnimationTrackEditAudio::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
+
Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
@@ -214,6 +218,7 @@ Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
bool AnimationTrackEditAudio::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
@@ -329,6 +334,7 @@ int AnimationTrackEditSpriteFrame::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 2);
}
+
Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
@@ -402,6 +408,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
bool AnimationTrackEditSpriteFrame::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
@@ -525,6 +532,7 @@ int AnimationTrackEditSubAnim::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
+
Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
@@ -558,6 +566,7 @@ Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
bool AnimationTrackEditSubAnim::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
@@ -750,6 +759,7 @@ int AnimationTrackEditTypeAudio::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
+
Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index);
@@ -783,6 +793,7 @@ Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec)
bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index);
@@ -928,6 +939,7 @@ bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Var
return AnimationTrackEdit::can_drop_data(p_point, p_data);
}
+
void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant &p_data) {
if (p_point.x > get_timeline()->get_name_limit() && p_point.x < get_size().width - get_timeline()->get_buttons_width()) {
Ref<AudioStream> stream;
@@ -1076,6 +1088,7 @@ int AnimationTrackEditTypeAnimation::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
+
Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
@@ -1109,6 +1122,7 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_
bool AnimationTrackEditTypeAnimation::is_key_selectable_by_distance() const {
return false;
}
+
void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index a239d2e909..3832a93360 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -50,6 +50,7 @@ Variant ArrayPropertyEdit::get_array() const {
void ArrayPropertyEdit::_notif_change() {
_change_notify();
}
+
void ArrayPropertyEdit::_notif_changev(const String &p_v) {
_change_notify(p_v.utf8().get_data());
}
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index e0891e808b..e0d5184aac 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -35,6 +35,7 @@
float AudioStreamPreview::get_length() const {
return length;
}
+
float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
if (length == 0)
return 0;
@@ -60,6 +61,7 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
return (vmax / 255.0) * 2.0 - 1.0;
}
+
float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
if (length == 0)
return 0;
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index cacf5c744f..5f693fdbb6 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -482,6 +482,7 @@ void CreateDialog::set_preferred_search_result_type(const String &p_preferred_ty
String CreateDialog::get_preferred_search_result_type() {
return preferred_search_result_type;
}
+
String CreateDialog::get_selected_type() {
TreeItem *selected = search_options->get_selected();
if (selected)
@@ -644,6 +645,7 @@ bool CreateDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
return false;
}
+
void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
Dictionary d = p_data;
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 3c9fd39069..76d1701372 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -549,41 +549,49 @@ void EditorDebuggerNode::set_live_debugging(bool p_enabled) {
dbg->set_live_debugging(p_enabled);
});
}
+
void EditorDebuggerNode::update_live_edit_root() {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->update_live_edit_root();
});
}
+
void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_create_node(p_parent, p_type, p_name);
});
}
+
void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_instance_node(p_parent, p_path, p_name);
});
}
+
void EditorDebuggerNode::live_debug_remove_node(const NodePath &p_at) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_remove_node(p_at);
});
}
+
void EditorDebuggerNode::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_remove_and_keep_node(p_at, p_keep_id);
});
}
+
void EditorDebuggerNode::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_restore_node(p_id, p_at, p_at_pos);
});
}
+
void EditorDebuggerNode::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_duplicate_node(p_at, p_new_name);
});
}
+
void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_reparent_node(p_at, p_new_place, p_new_name, p_at_pos);
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 5ac62bf0ba..867eef1c93 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -97,6 +97,7 @@ void ScriptEditorDebugger::debug_next() {
_put_msg("next", Array());
_clear_execution();
}
+
void ScriptEditorDebugger::debug_step() {
ERR_FAIL_COND(!breaked);
@@ -1243,6 +1244,7 @@ void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, co
_put_msg("scene:live_instance_node", msg);
}
}
+
void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
if (live_debug) {
Array msg;
@@ -1250,6 +1252,7 @@ void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
_put_msg("scene:live_remove_node", msg);
}
}
+
void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
if (live_debug) {
Array msg;
@@ -1258,6 +1261,7 @@ void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at,
_put_msg("scene:live_remove_and_keep_node", msg);
}
}
+
void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
if (live_debug) {
Array msg;
@@ -1267,6 +1271,7 @@ void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath
_put_msg("scene:live_restore_node", msg);
}
}
+
void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
if (live_debug) {
Array msg;
@@ -1275,6 +1280,7 @@ void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const
_put_msg("scene:live_duplicate_node", msg);
}
}
+
void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
if (live_debug) {
Array msg;
diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp
index 99ebf16697..d45c9f5ff5 100644
--- a/editor/doc_data.cpp
+++ b/editor/doc_data.cpp
@@ -771,6 +771,7 @@ Error DocData::load_classes(const String &p_dir) {
return OK;
}
+
Error DocData::erase_classes(const String &p_dir) {
Error err;
DirAccessRef da = DirAccess::open(p_dir, &err);
@@ -798,6 +799,7 @@ Error DocData::erase_classes(const String &p_dir) {
return OK;
}
+
Error DocData::_load(Ref<XMLParser> parser) {
Error err = OK;
diff --git a/editor/editor_atlas_packer.cpp b/editor/editor_atlas_packer.cpp
index c2df1fd82a..469a6c6de1 100644
--- a/editor/editor_atlas_packer.cpp
+++ b/editor/editor_atlas_packer.cpp
@@ -79,6 +79,7 @@ void EditorAtlasPacker::_plot_triangle(Ref<BitMap> p_bitmap, Vector2i *vertices)
xt += dx_low;
}
}
+
void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_height, int p_atlas_max_size, int p_cell_resolution) {
int divide_by = MIN(64, p_cell_resolution);
Vector<PlottedBitmap> bitmaps;
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 8b5658423b..1114ae9bb5 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -409,6 +409,7 @@ void EditorAudioBus::_solo_toggled() {
updating_bus = false;
}
+
void EditorAudioBus::_mute_toggled() {
updating_bus = true;
@@ -422,6 +423,7 @@ void EditorAudioBus::_mute_toggled() {
updating_bus = false;
}
+
void EditorAudioBus::_bypass_toggled() {
updating_bus = true;
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 6f6a863b70..45c44a3a2b 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -137,6 +137,7 @@ void EditorHistory::add_object(ObjectID p_object, int p_relevel) {
int EditorHistory::get_history_len() {
return history.size();
}
+
int EditorHistory::get_history_pos() {
return current;
}
@@ -156,6 +157,7 @@ ObjectID EditorHistory::get_history_obj(int p_obj) const {
bool EditorHistory::is_at_beginning() const {
return current <= 0;
}
+
bool EditorHistory::is_at_end() const {
return ((current + 1) >= history.size());
}
@@ -189,6 +191,7 @@ bool EditorHistory::is_current_inspector_only() const {
const History &h = history[current];
return h.path[h.level].inspector_only;
}
+
ObjectID EditorHistory::get_current() {
if (current < 0 || current >= history.size())
return ObjectID();
@@ -424,6 +427,7 @@ void EditorData::add_editor_plugin(EditorPlugin *p_plugin) {
int EditorData::get_editor_plugin_count() const {
return editor_plugins.size();
}
+
EditorPlugin *EditorData::get_editor_plugin(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, editor_plugins.size(), nullptr);
return editor_plugins[p_idx];
@@ -605,11 +609,13 @@ bool EditorData::check_and_update_scene(int p_idx) {
int EditorData::get_edited_scene() const {
return current_edited_scene;
}
+
void EditorData::set_edited_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
current_edited_scene = p_idx;
//swap
}
+
Node *EditorData::get_edited_scene_root(int p_idx) {
if (p_idx < 0) {
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), nullptr);
@@ -619,6 +625,7 @@ Node *EditorData::get_edited_scene_root(int p_idx) {
return edited_scene[p_idx].root;
}
}
+
void EditorData::set_edited_scene_root(Node *p_root) {
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
edited_scene.write[current_edited_scene].root = p_root;
@@ -658,6 +665,7 @@ uint64_t EditorData::get_edited_scene_version() const {
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), 0);
return edited_scene[current_edited_scene].version;
}
+
uint64_t EditorData::get_scene_version(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0);
return edited_scene[p_idx].version;
@@ -669,6 +677,7 @@ String EditorData::get_scene_type(int p_idx) const {
return "";
return edited_scene[p_idx].root->get_class();
}
+
void EditorData::move_edited_scene_to_index(int p_idx) {
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
ERR_FAIL_INDEX(p_idx, edited_scene.size());
@@ -735,6 +744,7 @@ void EditorData::set_edited_scene_live_edit_root(const NodePath &p_root) {
edited_scene.write[current_edited_scene].live_edit_root = p_root;
}
+
NodePath EditorData::get_edited_scene_live_edit_root() {
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), String());
@@ -962,6 +972,7 @@ void EditorSelection::remove_node(Node *p_node) {
p_node->disconnect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed));
//emit_signal("selection_changed");
}
+
bool EditorSelection::is_selected(Node *p_node) const {
return selection.has(p_node);
}
@@ -1068,6 +1079,7 @@ void EditorSelection::clear() {
changed = true;
nl_changed = true;
}
+
EditorSelection::EditorSelection() {
emitted = false;
changed = false;
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 476f9bcfea..46740a0f6d 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -190,6 +190,7 @@ void EditorExportPreset::set_patch(int p_index, const String &p_path) {
patches.write[p_index] = p_path;
EditorExport::singleton->save_presets();
}
+
String EditorExportPreset::get_patch(int p_index) {
ERR_FAIL_INDEX_V(p_index, patches.size(), String());
return patches[p_index];
@@ -1082,6 +1083,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
r_flags.push_back("--debug-navigation");
}
}
+
EditorExportPlatform::EditorExportPlatform() {
}
@@ -1375,6 +1377,7 @@ String EditorExportPlatformPC::get_name() const {
String EditorExportPlatformPC::get_os_name() const {
return os_name;
}
+
Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
return logo;
}
@@ -1534,9 +1537,11 @@ void EditorExportPlatformPC::set_release_64(const String &p_file) {
void EditorExportPlatformPC::set_release_32(const String &p_file) {
release_file_32 = p_file;
}
+
void EditorExportPlatformPC::set_debug_64(const String &p_file) {
debug_file_64 = p_file;
}
+
void EditorExportPlatformPC::set_debug_32(const String &p_file) {
debug_file_32 = p_file;
}
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 7c8d9ff08f..f8c1c490d5 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -100,6 +100,7 @@ void EditorFeatureProfile::set_disable_class_property(const StringName &p_class,
}
}
}
+
bool EditorFeatureProfile::is_class_property_disabled(const StringName &p_class, const StringName &p_property) const {
if (!disabled_properties.has(p_class)) {
return false;
@@ -120,6 +121,7 @@ void EditorFeatureProfile::set_disable_feature(Feature p_feature, bool p_disable
ERR_FAIL_INDEX(p_feature, FEATURE_MAX);
features_disabled[p_feature] = p_disable;
}
+
bool EditorFeatureProfile::is_feature_disabled(Feature p_feature) const {
ERR_FAIL_INDEX_V(p_feature, FEATURE_MAX, false);
return features_disabled[p_feature];
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 561ebb6298..3b1c4d380a 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -506,6 +506,7 @@ void EditorFileDialog::_push_history() {
dir_next->set_disabled(true);
}
}
+
void EditorFileDialog::_item_dc_selected(int p_item) {
int current = p_item;
if (current < 0 || current >= item_list->get_item_count())
@@ -877,6 +878,7 @@ void EditorFileDialog::clear_filters() {
update_filters();
invalidate();
}
+
void EditorFileDialog::add_filter(const String &p_filter) {
filters.push_back(p_filter);
update_filters();
@@ -886,12 +888,15 @@ void EditorFileDialog::add_filter(const String &p_filter) {
String EditorFileDialog::get_current_dir() const {
return dir_access->get_current_dir();
}
+
String EditorFileDialog::get_current_file() const {
return file->get_text();
}
+
String EditorFileDialog::get_current_path() const {
return dir_access->get_current_dir().plus_file(file->get_text());
}
+
void EditorFileDialog::set_current_dir(const String &p_dir) {
if (p_dir.is_rel_path())
dir_access->change_dir(OS::get_singleton()->get_resource_dir());
@@ -899,6 +904,7 @@ void EditorFileDialog::set_current_dir(const String &p_dir) {
update_dir();
invalidate();
}
+
void EditorFileDialog::set_current_file(const String &p_file) {
file->set_text(p_file);
update_dir();
@@ -912,6 +918,7 @@ void EditorFileDialog::set_current_file(const String &p_file) {
if (is_visible())
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
}
+
void EditorFileDialog::set_current_path(const String &p_path) {
if (!p_path.size())
return;
@@ -1110,6 +1117,7 @@ void EditorFileDialog::_favorite_move_up() {
update_file_list();
}
}
+
void EditorFileDialog::_favorite_move_down() {
int current = favorites->get_current();
@@ -1237,6 +1245,7 @@ void EditorFileDialog::_go_back() {
dir_prev->set_disabled(local_history_pos == 0);
dir_next->set_disabled(local_history_pos == local_history.size() - 1);
}
+
void EditorFileDialog::_go_forward() {
if (local_history_pos == local_history.size() - 1) {
return;
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index acfb554766..77ba5b3f1d 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -56,6 +56,7 @@ int EditorFileSystemDirectory::find_file_index(const String &p_file) const {
}
return -1;
}
+
int EditorFileSystemDirectory::find_dir_index(const String &p_dir) const {
for (int i = 0; i < subdirs.size(); i++) {
if (subdirs[i]->name == p_dir)
@@ -1110,6 +1111,7 @@ void EditorFileSystem::_notification(int p_what) {
bool EditorFileSystem::is_scanning() const {
return scanning || scanning_changes;
}
+
float EditorFileSystem::get_scanning_progress() const {
return scan_total;
}
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 270495ff55..a1d65ac739 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -127,6 +127,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
_fill_folds(p_root, p_node->get_child(i), p_folds, resource_folds, nodes_folded, resources);
}
}
+
void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) {
ERR_FAIL_NULL(p_scene);
@@ -150,6 +151,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path
file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
config->save(file);
}
+
void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
Ref<ConfigFile> config;
config.instance();
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 31eead83de..16e49ad4e1 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1474,6 +1474,7 @@ void EditorHelp::search_again(bool p_search_previous) {
int EditorHelp::get_scroll() const {
return class_desc->get_v_scroll()->get_value();
}
+
void EditorHelp::set_scroll(int p_scroll) {
class_desc->get_v_scroll()->set_value(p_scroll);
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index f7d92050e1..0e39d0f2ab 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -532,6 +532,7 @@ bool EditorProperty::use_keying_next() const {
return false;
}
+
void EditorProperty::set_checkable(bool p_checkable) {
checkable = p_checkable;
update();
@@ -737,9 +738,11 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
void EditorProperty::set_label_reference(Control *p_control) {
label_reference = p_control;
}
+
void EditorProperty::set_bottom_editor(Control *p_control) {
bottom_editor = p_control;
}
+
Variant EditorProperty::get_drag_data(const Point2 &p_point) {
if (property == StringName())
return Variant();
@@ -898,6 +901,7 @@ EditorProperty::EditorProperty() {
label_reference = nullptr;
bottom_editor = nullptr;
}
+
////////////////////////////////////////////////
////////////////////////////////////////////////
@@ -930,6 +934,7 @@ bool EditorInspectorPlugin::can_handle(Object *p_object) {
}
return false;
}
+
void EditorInspectorPlugin::parse_begin(Object *p_object) {
if (get_script_instance()) {
get_script_instance()->call("parse_begin", p_object);
@@ -956,6 +961,7 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ
}
return false;
}
+
void EditorInspectorPlugin::parse_end() {
if (get_script_instance()) {
get_script_instance()->call("parse_end");
@@ -1826,6 +1832,7 @@ void EditorInspector::update_tree() {
//see if this property exists and should be kept
}
+
void EditorInspector::update_property(const String &p_prop) {
if (!editor_property_map.has(p_prop))
return;
@@ -1884,6 +1891,7 @@ void EditorInspector::set_keying(bool p_active) {
keying = p_active;
update_tree();
}
+
void EditorInspector::set_read_only(bool p_read_only) {
read_only = p_read_only;
update_tree();
@@ -1892,6 +1900,7 @@ void EditorInspector::set_read_only(bool p_read_only) {
bool EditorInspector::is_capitalize_paths_enabled() const {
return capitalize_paths;
}
+
void EditorInspector::set_enable_capitalize_paths(bool p_capitalize) {
capitalize_paths = p_capitalize;
update_tree();
@@ -1910,14 +1919,17 @@ void EditorInspector::set_use_doc_hints(bool p_enable) {
use_doc_hints = p_enable;
update_tree();
}
+
void EditorInspector::set_hide_script(bool p_hide) {
hide_script = p_hide;
update_tree();
}
+
void EditorInspector::set_use_filter(bool p_use) {
use_filter = p_use;
update_tree();
}
+
void EditorInspector::register_text_enter(Node *p_line_edit) {
search_box = Object::cast_to<LineEdit>(p_line_edit);
if (search_box)
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b975d555af..c8f07f4b8d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3250,9 +3250,11 @@ ImportDock *EditorNode::get_import_dock() {
FileSystemDock *EditorNode::get_filesystem_dock() {
return filesystem_dock;
}
+
SceneTreeDock *EditorNode::get_scene_tree_dock() {
return scene_tree_dock;
}
+
InspectorDock *EditorNode::get_inspector_dock() {
return inspector_dock;
}
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 7bffdc5744..f731a87cef 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -553,6 +553,7 @@ void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay)
get_script_instance()->call("forward_spatial_force_draw_over_viewport", p_overlay);
}
}
+
String EditorPlugin::get_name() const {
if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) {
return get_script_instance()->call("get_plugin_name");
@@ -560,6 +561,7 @@ String EditorPlugin::get_name() const {
return String();
}
+
const Ref<Texture2D> EditorPlugin::get_icon() const {
if (get_script_instance() && get_script_instance()->has_method("get_plugin_icon")) {
return get_script_instance()->call("get_plugin_icon");
@@ -567,6 +569,7 @@ const Ref<Texture2D> EditorPlugin::get_icon() const {
return Ref<Texture2D>();
}
+
bool EditorPlugin::has_main_screen() const {
if (get_script_instance() && get_script_instance()->has_method("has_main_screen")) {
return get_script_instance()->call("has_main_screen");
@@ -574,6 +577,7 @@ bool EditorPlugin::has_main_screen() const {
return false;
}
+
void EditorPlugin::make_visible(bool p_visible) {
if (get_script_instance() && get_script_instance()->has_method("make_visible")) {
get_script_instance()->call("make_visible", p_visible);
@@ -597,6 +601,7 @@ bool EditorPlugin::handles(Object *p_object) const {
return false;
}
+
Dictionary EditorPlugin::get_state() const {
if (get_script_instance() && get_script_instance()->has_method("get_state")) {
return get_script_instance()->call("get_state");
@@ -638,6 +643,7 @@ void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
p_breakpoints->push_back(arr[i]);
}
}
+
bool EditorPlugin::get_remove_list(List<Node *> *p_list) {
return false;
}
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 9bb20122c6..e5ca5d95e8 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -82,6 +82,7 @@ void EditorPropertyText::update_property() {
void EditorPropertyText::set_string_name(bool p_enabled) {
string_name = p_enabled;
}
+
void EditorPropertyText::set_placeholder(const String &p_string) {
text->set_placeholder(p_string);
}
@@ -209,12 +210,14 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
add_focusable(options);
options->connect("item_selected", callable_mp(this, &EditorPropertyTextEnum::_option_selected));
}
+
///////////////////// PATH /////////////////////////
void EditorPropertyPath::_path_selected(const String &p_path) {
emit_changed(get_edited_property(), p_path);
update_property();
}
+
void EditorPropertyPath::_path_pressed() {
if (!dialog) {
dialog = memnew(EditorFileDialog);
@@ -1158,6 +1161,7 @@ void EditorPropertyRect2::update_property() {
spin[3]->set_value(val.size.y);
setting = false;
}
+
void EditorPropertyRect2::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1168,6 +1172,7 @@ void EditorPropertyRect2::_notification(int p_what) {
}
}
}
+
void EditorPropertyRect2::_bind_methods() {
}
@@ -1239,6 +1244,7 @@ void EditorPropertyVector3::update_property() {
spin[2]->set_value(val.z);
setting = false;
}
+
void EditorPropertyVector3::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1249,6 +1255,7 @@ void EditorPropertyVector3::_notification(int p_what) {
}
}
}
+
void EditorPropertyVector3::_bind_methods() {
}
@@ -1403,6 +1410,7 @@ void EditorPropertyRect2i::update_property() {
spin[3]->set_value(val.size.y);
setting = false;
}
+
void EditorPropertyRect2i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1413,6 +1421,7 @@ void EditorPropertyRect2i::_notification(int p_what) {
}
}
}
+
void EditorPropertyRect2i::_bind_methods() {
}
@@ -1484,6 +1493,7 @@ void EditorPropertyVector3i::update_property() {
spin[2]->set_value(val.z);
setting = false;
}
+
void EditorPropertyVector3i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1494,6 +1504,7 @@ void EditorPropertyVector3i::_notification(int p_what) {
}
}
}
+
void EditorPropertyVector3i::_bind_methods() {
}
@@ -1566,6 +1577,7 @@ void EditorPropertyPlane::update_property() {
spin[3]->set_value(val.d);
setting = false;
}
+
void EditorPropertyPlane::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1576,6 +1588,7 @@ void EditorPropertyPlane::_notification(int p_what) {
}
}
}
+
void EditorPropertyPlane::_bind_methods() {
}
@@ -1649,6 +1662,7 @@ void EditorPropertyQuat::update_property() {
spin[3]->set_value(val.w);
setting = false;
}
+
void EditorPropertyQuat::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1659,6 +1673,7 @@ void EditorPropertyQuat::_notification(int p_what) {
}
}
}
+
void EditorPropertyQuat::_bind_methods() {
}
@@ -1735,6 +1750,7 @@ void EditorPropertyAABB::update_property() {
setting = false;
}
+
void EditorPropertyAABB::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1745,6 +1761,7 @@ void EditorPropertyAABB::_notification(int p_what) {
}
}
}
+
void EditorPropertyAABB::_bind_methods() {
}
@@ -1808,6 +1825,7 @@ void EditorPropertyTransform2D::update_property() {
setting = false;
}
+
void EditorPropertyTransform2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1818,6 +1836,7 @@ void EditorPropertyTransform2D::_notification(int p_what) {
}
}
}
+
void EditorPropertyTransform2D::_bind_methods() {
}
@@ -1886,6 +1905,7 @@ void EditorPropertyBasis::update_property() {
setting = false;
}
+
void EditorPropertyBasis::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1896,6 +1916,7 @@ void EditorPropertyBasis::_notification(int p_what) {
}
}
}
+
void EditorPropertyBasis::_bind_methods() {
}
@@ -1970,6 +1991,7 @@ void EditorPropertyTransform::update_property() {
setting = false;
}
+
void EditorPropertyTransform::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
@@ -1980,6 +2002,7 @@ void EditorPropertyTransform::_notification(int p_what) {
}
}
}
+
void EditorPropertyTransform::_bind_methods() {
}
@@ -2913,6 +2936,7 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
bool EditorPropertyResource::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
return _is_drop_valid(p_data);
}
+
void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
ERR_FAIL_COND(!_is_drop_valid(p_data));
diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp
index 6a26cc6401..450de75328 100644
--- a/editor/editor_scale.cpp
+++ b/editor/editor_scale.cpp
@@ -37,6 +37,7 @@ static float scale = 1.0;
void editor_set_scale(float p_scale) {
scale = p_scale;
}
+
float editor_get_scale() {
return scale;
}
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 61860d2376..fb12c15913 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -382,6 +382,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
return;
}
}
+
void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
switch (p_status) {
case HTTPRequest::RESULT_CANT_RESOLVE: {
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 0f3faf4189..54b4dc2972 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -1607,9 +1607,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
uint32_t EditorSceneImporterCollada::get_import_flags() const {
return IMPORT_SCENE | IMPORT_ANIMATION;
}
+
void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("dae");
}
+
Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
ColladaImport state;
uint32_t flags = Collada::IMPORT_FLAG_SCENE;
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index c4bf9189f1..3c9f04322e 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -46,6 +46,7 @@
uint32_t EditorSceneImporterGLTF::get_import_flags() const {
return IMPORT_SCENE | IMPORT_ANIMATION;
}
+
void EditorSceneImporterGLTF::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("gltf");
r_extensions->push_back("glb");
@@ -874,6 +875,7 @@ Vector<Quat> EditorSceneImporterGLTF::_decode_accessor_as_quat(GLTFState &state,
}
return ret;
}
+
Vector<Transform2D> EditorSceneImporterGLTF::_decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Transform2D> ret;
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 05a3bfc386..5e52a95e4e 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -44,9 +44,11 @@ String ResourceImporterBitMap::get_importer_name() const {
String ResourceImporterBitMap::get_visible_name() const {
return "BitMap";
}
+
void ResourceImporterBitMap::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterBitMap::get_save_extension() const {
return "res";
}
@@ -62,6 +64,7 @@ bool ResourceImporterBitMap::get_option_visibility(const String &p_option, const
int ResourceImporterBitMap::get_preset_count() const {
return 0;
}
+
String ResourceImporterBitMap::get_preset_name(int p_idx) const {
return String();
}
diff --git a/editor/import/resource_importer_csv.cpp b/editor/import/resource_importer_csv.cpp
index e56cb1d3a1..d29ba28a96 100644
--- a/editor/import/resource_importer_csv.cpp
+++ b/editor/import/resource_importer_csv.cpp
@@ -40,6 +40,7 @@ String ResourceImporterCSV::get_importer_name() const {
String ResourceImporterCSV::get_visible_name() const {
return "CSV";
}
+
void ResourceImporterCSV::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("csv");
}
@@ -59,6 +60,7 @@ bool ResourceImporterCSV::get_option_visibility(const String &p_option, const Ma
int ResourceImporterCSV::get_preset_count() const {
return 0;
}
+
String ResourceImporterCSV::get_preset_name(int p_idx) const {
return "";
}
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 09f2d691f0..04e20dee86 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -42,6 +42,7 @@ String ResourceImporterCSVTranslation::get_importer_name() const {
String ResourceImporterCSVTranslation::get_visible_name() const {
return "CSV Translation";
}
+
void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("csv");
}
@@ -61,6 +62,7 @@ bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_optio
int ResourceImporterCSVTranslation::get_preset_count() const {
return 0;
}
+
String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const {
return "";
}
diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp
index 927d911e94..885b00865b 100644
--- a/editor/import/resource_importer_image.cpp
+++ b/editor/import/resource_importer_image.cpp
@@ -42,6 +42,7 @@ String ResourceImporterImage::get_importer_name() const {
String ResourceImporterImage::get_visible_name() const {
return "Image";
}
+
void ResourceImporterImage::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
@@ -61,6 +62,7 @@ bool ResourceImporterImage::get_option_visibility(const String &p_option, const
int ResourceImporterImage::get_preset_count() const {
return 0;
}
+
String ResourceImporterImage::get_preset_name(int p_idx) const {
return String();
}
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index 18c6dc149b..2c9e7dcd3b 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -76,9 +76,11 @@ String ResourceImporterLayeredTexture::get_visible_name() const {
ERR_FAIL_V("");
}
+
void ResourceImporterLayeredTexture::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterLayeredTexture::get_save_extension() const {
switch (mode) {
case MODE_CUBEMAP: {
@@ -126,6 +128,7 @@ bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_optio
int ResourceImporterLayeredTexture::get_preset_count() const {
return 0;
}
+
String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const {
return "";
}
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 73150c8516..4316a9b512 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -435,6 +435,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in
return scene;
}
+
Ref<Animation> EditorOBJImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
return Ref<Animation>();
}
@@ -445,20 +446,25 @@ void EditorOBJImporter::get_extensions(List<String> *r_extensions) const {
EditorOBJImporter::EditorOBJImporter() {
}
+
////////////////////////////////////////////////////
String ResourceImporterOBJ::get_importer_name() const {
return "wavefront_obj";
}
+
String ResourceImporterOBJ::get_visible_name() const {
return "OBJ As Mesh";
}
+
void ResourceImporterOBJ::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("obj");
}
+
String ResourceImporterOBJ::get_save_extension() const {
return "mesh";
}
+
String ResourceImporterOBJ::get_resource_type() const {
return "Mesh";
}
@@ -466,6 +472,7 @@ String ResourceImporterOBJ::get_resource_type() const {
int ResourceImporterOBJ::get_preset_count() const {
return 0;
}
+
String ResourceImporterOBJ::get_preset_name(int p_idx) const {
return "";
}
@@ -476,6 +483,7 @@ void ResourceImporterOBJ::get_import_options(List<ImportOption> *r_options, int
r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "offset_mesh"), Vector3(0, 0, 0)));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true));
}
+
bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
return true;
}
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 012e3e95a7..f4fb0f9f0c 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -53,6 +53,7 @@ uint32_t EditorSceneImporter::get_import_flags() const {
ERR_FAIL_V(0);
}
+
void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
if (get_script_instance()) {
Array arr = get_script_instance()->call("_get_extensions");
@@ -64,6 +65,7 @@ void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
ERR_FAIL();
}
+
Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
if (get_script_instance()) {
return get_script_instance()->call("_import_scene", p_path, p_flags, p_bake_fps);
@@ -202,6 +204,7 @@ bool ResourceImporterScene::get_option_visibility(const String &p_option, const
int ResourceImporterScene::get_preset_count() const {
return PRESET_MAX;
}
+
String ResourceImporterScene::get_preset_name(int p_idx) const {
switch (p_idx) {
case PRESET_SINGLE_SCENE:
@@ -1520,14 +1523,17 @@ ResourceImporterScene *ResourceImporterScene::singleton = nullptr;
ResourceImporterScene::ResourceImporterScene() {
singleton = this;
}
+
///////////////////////////////////////
uint32_t EditorSceneImporterESCN::get_import_flags() const {
return IMPORT_SCENE;
}
+
void EditorSceneImporterESCN::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("escn");
}
+
Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
Error error;
Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error);
@@ -1538,6 +1544,7 @@ Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_fla
return scene;
}
+
Ref<Animation> EditorSceneImporterESCN::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
ERR_FAIL_V(Ref<Animation>());
}
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index 0813bca6f1..a2e80dfa18 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -44,9 +44,11 @@ String ResourceImporterShaderFile::get_importer_name() const {
String ResourceImporterShaderFile::get_visible_name() const {
return "GLSL Shader File";
}
+
void ResourceImporterShaderFile::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("glsl");
}
+
String ResourceImporterShaderFile::get_save_extension() const {
return "res";
}
@@ -58,6 +60,7 @@ String ResourceImporterShaderFile::get_resource_type() const {
int ResourceImporterShaderFile::get_preset_count() const {
return 0;
}
+
String ResourceImporterShaderFile::get_preset_name(int p_idx) const {
return String();
}
@@ -68,6 +71,7 @@ void ResourceImporterShaderFile::get_import_options(List<ImportOption> *r_option
bool ResourceImporterShaderFile::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
return true;
}
+
static String _include_function(const String &p_path, void *userpointer) {
Error err;
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index aeeae36f5b..ab23ab6db6 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -140,9 +140,11 @@ String ResourceImporterTexture::get_importer_name() const {
String ResourceImporterTexture::get_visible_name() const {
return "Texture2D";
}
+
void ResourceImporterTexture::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterTexture::get_save_extension() const {
return "stex";
}
@@ -181,6 +183,7 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_option, cons
int ResourceImporterTexture::get_preset_count() const {
return 4;
}
+
String ResourceImporterTexture::get_preset_name(int p_idx) const {
static const char *preset_names[] = {
"2D, Detect 3D",
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 314c27b8e4..0ef5d84eca 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -45,6 +45,7 @@ String ResourceImporterTextureAtlas::get_importer_name() const {
String ResourceImporterTextureAtlas::get_visible_name() const {
return "TextureAtlas";
}
+
void ResourceImporterTextureAtlas::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
@@ -64,6 +65,7 @@ bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_option,
int ResourceImporterTextureAtlas::get_preset_count() const {
return 0;
}
+
String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const {
return String();
}
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 3ffc7b34af..eace84400a 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -45,9 +45,11 @@ String ResourceImporterWAV::get_importer_name() const {
String ResourceImporterWAV::get_visible_name() const {
return "Microsoft WAV";
}
+
void ResourceImporterWAV::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("wav");
}
+
String ResourceImporterWAV::get_save_extension() const {
return "sample";
}
@@ -67,6 +69,7 @@ bool ResourceImporterWAV::get_option_visibility(const String &p_option, const Ma
int ResourceImporterWAV::get_preset_count() const {
return 0;
}
+
String ResourceImporterWAV::get_preset_name(int p_idx) const {
return String();
}
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 2d8069acea..4a3011086f 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -384,6 +384,7 @@ static bool _find_owners(EditorFileSystemDirectory *efsd, const String &p_path)
return false;
}
+
void ImportDock::_reimport_attempt() {
bool need_restart = false;
bool used_in_resources = false;
@@ -484,6 +485,7 @@ void ImportDock::_property_toggled(const StringName &p_prop, bool p_checked) {
params->checked.erase(p_prop);
}
}
+
void ImportDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reimport"), &ImportDock::_reimport);
}
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index ab425aab40..8ada7e9ba5 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -287,6 +287,7 @@ void InspectorDock::_edit_forward() {
if (EditorNode::get_singleton()->get_editor_history()->next())
editor->edit_current();
}
+
void InspectorDock::_edit_back() {
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
if ((current && editor_history->previous()) || editor_history->get_path_size() == 1)
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index 2bdc0b12e9..20b84f9358 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -2117,6 +2117,7 @@ Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_g
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
return notifier->get_aabb();
}
+
void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
@@ -2302,10 +2303,12 @@ String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_giz
return "";
}
+
Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
return particles->get_visibility_aabb();
}
+
void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
@@ -2418,6 +2421,7 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_handles(handles, get_material("handles"));
p_gizmo->add_unscaled_billboard(icon, 0.05);
}
+
////
ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() {
@@ -2465,10 +2469,12 @@ String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gi
return "";
}
+
Variant ReflectionProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
return AABB(probe->get_extents(), probe->get_origin_offset());
}
+
void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
Transform gt = probe->get_global_transform();
@@ -2604,6 +2610,7 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_unscaled_billboard(icon, 0.05);
p_gizmo->add_handles(handles, get_material("handles"));
}
+
///////////////////////////////
////
@@ -2640,10 +2647,12 @@ String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p
return "";
}
+
Variant DecalGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
return decal->get_extents();
}
+
void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
Transform gt = decal->get_global_transform();
@@ -2778,10 +2787,12 @@ String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int
return "";
}
+
Variant GIProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
return probe->get_extents();
}
+
void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
@@ -2935,9 +2946,11 @@ BakedLightmapGizmoPlugin::BakedLightmapGizmoPlugin() {
String BakedLightmapGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
return "";
}
+
Variant BakedLightmapGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
return Variant();
}
+
void BakedLightmapGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
}
@@ -3102,6 +3115,7 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_mesh(mesh);
}
+
/////////
LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() {
@@ -3114,9 +3128,11 @@ LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() {
String LightmapProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
return "";
}
+
Variant LightmapProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
return Variant();
}
+
void LightmapProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
}
@@ -3195,6 +3211,7 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_lines(lines, material_lines);
}
+
////
CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() {
@@ -3282,6 +3299,7 @@ Variant CollisionShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo
return Variant();
}
+
void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3389,6 +3407,7 @@ void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_i
cs2->set_height(d * 2.0);
}
}
+
void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3490,6 +3509,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
ur->commit_action();
}
}
+
void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp
index 0f21a2af88..8cadc3925e 100644
--- a/editor/pane_drag.cpp
+++ b/editor/pane_drag.cpp
@@ -55,6 +55,7 @@ void PaneDrag::_notification(int p_what) {
break;
}
}
+
Size2 PaneDrag::get_minimum_size() const {
Ref<Texture2D> icon = get_theme_icon("PaneDrag", "EditorIcons");
if (!icon.is_null())
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index aba2d53eba..28d0e113d4 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -237,6 +237,7 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
//unstop
stop->set_pressed(false);
}
+
void AnimationPlayerEditor::_stop_pressed() {
if (!player) {
return;
@@ -305,6 +306,7 @@ void AnimationPlayerEditor::_animation_new() {
name->select_all();
name->grab_focus();
}
+
void AnimationPlayerEditor::_animation_rename() {
if (animation->get_item_count() == 0)
return;
@@ -318,6 +320,7 @@ void AnimationPlayerEditor::_animation_rename() {
name->select_all();
name->grab_focus();
}
+
void AnimationPlayerEditor::_animation_load() {
ERR_FAIL_COND(!player);
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
@@ -626,6 +629,7 @@ Dictionary AnimationPlayerEditor::get_state() const {
return d;
}
+
void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
if (!p_state.has("visible") || !p_state["visible"]) {
return;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index ce41be7f28..bcd393957c 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1166,6 +1166,7 @@ void AnimationNodeStateMachineEditor::_end_selected() {
state_machine_draw->update();
}
}
+
void AnimationNodeStateMachineEditor::_update_mode() {
if (tool_select->is_pressed()) {
tool_erase_hb->show();
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 5ec76d8471..ad2164b719 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -72,6 +72,7 @@ void EditorAssetLibraryItem::_asset_clicked() {
void EditorAssetLibraryItem::_category_clicked() {
emit_signal("category_selected", category_id);
}
+
void EditorAssetLibraryItem::_author_clicked() {
emit_signal("author_selected", author_id);
}
@@ -297,6 +298,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
get_ok()->set_text(TTR("Download"));
get_cancel()->set_text(TTR("Close"));
}
+
///////////////////////////////////////////////////////////////////////////////////
void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
@@ -437,6 +439,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
} break;
}
}
+
void EditorAssetLibraryItemDownload::_close() {
// Clean up downloaded file.
DirAccess::remove_file_or_error(download->get_download_file());
@@ -650,6 +653,7 @@ void EditorAssetLibrary::_select_category(int p_id) {
}
}
}
+
void EditorAssetLibrary::_select_asset(int p_id) {
_api_request("asset/" + itos(p_id), REQUESTING_ASSET);
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 0f794d0f48..2d7198bec8 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -4334,6 +4334,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
grid_snap_active = p_status;
viewport->update();
}
+
void CanvasItemEditor::_button_override_camera(bool p_pressed) {
EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
@@ -5762,6 +5763,7 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
Dictionary CanvasItemEditorPlugin::get_state() const {
return canvas_item_editor->get_state();
}
+
void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) {
canvas_item_editor->set_state(p_state);
}
diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
index 9619a97807..920a7f195a 100644
--- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
@@ -60,6 +60,7 @@ void CollisionPolygon3DEditor::_notification(int p_what) {
} break;
}
}
+
void CollisionPolygon3DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
node = nullptr;
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 4895696f36..0c0f014af6 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -183,6 +183,7 @@ EditorImagePreviewPlugin::EditorImagePreviewPlugin() {
bool EditorImagePreviewPlugin::generate_small_preview_automatically() const {
return true;
}
+
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////
bool EditorBitmapPreviewPlugin::handles(const String &p_type) const {
@@ -572,6 +573,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() {
}
+
///////////////////////////////////////////////////////////////////
bool EditorAudioStreamPreviewPlugin::handles(const String &p_type) const {
@@ -665,6 +667,7 @@ void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) {
void EditorMeshPreviewPlugin::_bind_methods() {
ClassDB::bind_method("_preview_done", &EditorMeshPreviewPlugin::_preview_done);
}
+
bool EditorMeshPreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Mesh"); //any Mesh
}
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 6c0ce699ac..1ccfeccf7a 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -37,6 +37,7 @@
Size2 GradientEditor::get_minimum_size() const {
return Size2(0, 60) * EDSCALE;
}
+
void GradientEditor::_gradient_changed() {
if (editing)
return;
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index 77f60b6677..2829b9bd5b 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -96,6 +96,7 @@ bool ItemListPlugin::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
+
void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < get_item_count(); i++) {
String base = itos(i) + "/";
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 2e61ff59fd..992f080cec 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -239,10 +239,12 @@ MaterialEditorPlugin::MaterialEditorPlugin(EditorNode *p_node) {
String StandardMaterial3DConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool StandardMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<StandardMaterial3D> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<StandardMaterial3D> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -281,10 +283,12 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p
String ParticlesMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<ParticlesMaterial> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<ParticlesMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -316,10 +320,12 @@ Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_
String CanvasItemMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool CanvasItemMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<CanvasItemMaterial> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<CanvasItemMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -351,10 +357,12 @@ Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p
String ProceduralSkyMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool ProceduralSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<ProceduralSkyMaterial> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<ProceduralSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -386,10 +394,12 @@ Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource>
String PanoramaSkyMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool PanoramaSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<PanoramaSkyMaterial> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<PanoramaSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -421,10 +431,12 @@ Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &
String PhysicalSkyMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
+
bool PhysicalSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<PhysicalSkyMaterial> mat = p_resource;
return mat.is_valid();
}
+
Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<PhysicalSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index fa600ad744..bfdd148e3f 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -395,9 +395,11 @@ int Node3DEditorViewport::get_selected_count() const {
float Node3DEditorViewport::get_znear() const {
return CLAMP(spatial_editor->get_znear(), MIN_Z, MAX_Z);
}
+
float Node3DEditorViewport::get_zfar() const {
return CLAMP(spatial_editor->get_zfar(), MIN_Z, MAX_Z);
}
+
float Node3DEditorViewport::get_fov() const {
return CLAMP(spatial_editor->get_fov(), MIN_FOV, MAX_FOV);
}
@@ -970,9 +972,11 @@ void Node3DEditorViewport::_surface_focus_enter() {
void Node3DEditorViewport::_surface_focus_exit() {
view_menu->set_disable_shortcuts(true);
}
+
bool Node3DEditorViewport ::_is_node_locked(const Node *p_node) {
return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_");
}
+
void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
_find_items_at_pos(b->get_position(), clicked_includes_current, selection_results, b->get_shift());
@@ -3011,6 +3015,7 @@ void Node3DEditorViewport::_finish_gizmo_instances() {
RS::get_singleton()->free(scale_plane_gizmo_instance[i]);
}
}
+
void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
ERR_FAIL_COND(p_activate && !preview);
ERR_FAIL_COND(!p_activate && !previewing);
@@ -4408,6 +4413,7 @@ Dictionary Node3DEditor::get_state() const {
return d;
}
+
void Node3DEditor::set_state(const Dictionary &p_state) {
Dictionary d = p_state;
@@ -5511,6 +5517,7 @@ void Node3DEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
}
+
void Node3DEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
tool_button[Node3DEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons"));
@@ -6116,6 +6123,7 @@ void Node3DEditorPlugin::make_visible(bool p_visible) {
spatial_editor->set_process(false);
}
}
+
void Node3DEditorPlugin::edit(Object *p_object) {
spatial_editor->edit(Object::cast_to<Node3D>(p_object));
}
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 41011343c8..d4f49100d6 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -49,6 +49,7 @@ void Path2DEditor::_notification(int p_what) {
} break;
}
}
+
void Path2DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
node = nullptr;
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 0ed7995914..0aee064c41 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -55,6 +55,7 @@ String Path3DGizmo::get_handle_name(int p_idx) const {
return n;
}
+
Variant Path3DGizmo::get_handle_value(int p_idx) {
Ref<Curve3D> c = path->get_curve();
if (c.is_null())
@@ -80,6 +81,7 @@ Variant Path3DGizmo::get_handle_value(int p_idx) {
return ofs;
}
+
void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Ref<Curve3D> c = path->get_curve();
if (c.is_null())
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index 12a2b4c2b7..37e779fbbb 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -268,6 +268,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
filters->connect("item_activated", callable_mp(this, &EditorPropertyRootMotion::_confirmed));
//filters->connect("item_edited", this, "_filter_edited");
}
+
//////////////////////////
bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index d1cadb6f67..e0748f5237 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -46,6 +46,7 @@
Ref<Shader> ShaderTextEditor::get_edited_shader() const {
return shader;
}
+
void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
if (shader == p_shader) {
return;
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 4162778fb9..d869f9fcbc 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -98,6 +98,7 @@ void SpriteFramesEditor::_sheet_preview_draw() {
split_sheet_dialog->get_ok()->set_disabled(false);
split_sheet_dialog->get_ok()->set_text(vformat(TTR("Add %d Frame(s)"), frames_selected.size()));
}
+
void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 333d95196e..0d957bb101 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -43,9 +43,11 @@ void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) {
preview->edit(sb);
add_custom_control(preview);
}
+
bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
return false; //do not want
}
+
void EditorInspectorPluginStyleBox::parse_end() {
}
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 7c5a290537..bc4b97d40a 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -134,6 +134,7 @@ TextureEditor::~TextureEditor() {
texture->remove_change_receptor(this);
}
}
+
//
bool EditorInspectorPluginTexture::can_handle(Object *p_object) {
return Object::cast_to<ImageTexture>(p_object) != nullptr || Object::cast_to<AtlasTexture>(p_object) != nullptr || Object::cast_to<StreamTexture2D>(p_object) != nullptr || Object::cast_to<LargeTexture>(p_object) != nullptr || Object::cast_to<AnimatedTexture>(p_object) != nullptr;
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 24a6103450..e0e5bdb407 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -249,6 +249,7 @@ TextureLayeredEditor::~TextureLayeredEditor() {
texture->remove_change_receptor(this);
}
}
+
//
bool EditorInspectorPluginLayeredTexture::can_handle(Object *p_object) {
return Object::cast_to<TextureLayered>(p_object) != nullptr;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index e096ed933e..9ab7e7ae8a 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -2358,6 +2358,7 @@ void TileSetEditor::_zoom_in() {
workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale);
}
}
+
void TileSetEditor::_zoom_out() {
float scale = workspace->get_scale().x;
if (scale > min_scale) {
@@ -2367,6 +2368,7 @@ void TileSetEditor::_zoom_out() {
workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale);
}
}
+
void TileSetEditor::_zoom_reset() {
workspace->set_scale(Vector2(1, 1));
workspace_container->set_custom_minimum_size(workspace->get_rect().size);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 2cf18a4d13..223cc249e1 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -3221,6 +3221,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, Variant::
void EditorInspectorShaderModePlugin::parse_end() {
//do none
}
+
//////////////////////////////////
void VisualShaderNodePortPreview::_shader_changed() {
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 6060ef44bb..8487a3d1d2 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -83,6 +83,7 @@ void BackgroundProgress::_task_step(const String &p_task, int p_step) {
else
t.progress->set_value(p_step);
}
+
void BackgroundProgress::_end_task(const String &p_task) {
_THREAD_SAFE_METHOD_
@@ -103,6 +104,7 @@ void BackgroundProgress::_bind_methods() {
void BackgroundProgress::add_task(const String &p_task, const String &p_label, int p_steps) {
MessageQueue::get_singleton()->push_call(this, "_add_task", p_task, p_label, p_steps);
}
+
void BackgroundProgress::task_step(const String &p_task, int p_step) {
//this code is weird, but it prevents deadlock.
bool no_updates = true;
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 3b115d7427..bc4a1ee118 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -55,6 +55,7 @@ void ProjectExportDialog::_theme_changed() {
if (panel)
panel->add_theme_style_override("panel", patches->get_theme_stylebox("bg", "Tree"));
}
+
void ProjectExportDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 60b9902f68..4f9c6c2cf3 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -575,6 +575,7 @@ void ProjectSettingsEditor::_edit_item(Ref<InputEvent> p_exiting_event) {
_add_item(ie_type, p_exiting_event);
}
+
void ProjectSettingsEditor::_action_activated() {
TreeItem *ti = input_editor->get_selected();
@@ -1259,6 +1260,7 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
void ProjectSettingsEditor::_translation_res_option_file_open() {
translation_res_option_file_open->popup_centered_ratio();
}
+
void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"));
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 37de0b51d9..870bf52a91 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -413,6 +413,7 @@ void PropertySelector::select_method_from_script(const Ref<Script> &p_script, co
search_box->grab_focus();
_update_search();
}
+
void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const String &p_current) {
ERR_FAIL_COND(p_type == Variant::NIL);
base_type = "";
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index cfcb5234dd..e5ae09f5ff 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -47,6 +47,7 @@ void ReparentDialog::_notification(int p_what) {
void ReparentDialog::_cancel() {
hide();
}
+
void ReparentDialog::_reparent() {
if (tree->get_selected()) {
emit_signal("reparent", tree->get_selected()->get_path(), keep_transform->is_pressed());
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index c113abb86d..e8c3c2065c 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -37,6 +37,7 @@ void RunSettingsDialog::popup_run_settings() {
void RunSettingsDialog::set_custom_arguments(const String &p_arguments) {
arguments->set_text(p_arguments);
}
+
String RunSettingsDialog::get_custom_arguments() const {
return arguments->get_text();
}
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 7344c2b37e..757dff2552 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -144,6 +144,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
NodeDock::singleton->show_groups();
}
}
+
void SceneTreeEditor::_toggle_visible(Node *p_node) {
if (p_node->has_method("is_visible") && p_node->has_method("set_visible")) {
bool v = bool(p_node->call("is_visible"));
@@ -774,6 +775,7 @@ void SceneTreeEditor::set_display_foreign_nodes(bool p_display) {
display_foreign = p_display;
_update_tree();
}
+
bool SceneTreeEditor::get_display_foreign_nodes() const {
return display_foreign;
}
@@ -961,6 +963,7 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
return String(d["type"]) == "nodes";
}
+
void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
if (!can_drop_data_fw(p_point, p_data, p_from))
return;
@@ -1145,6 +1148,7 @@ void SceneTreeDialog::_notification(int p_what) {
void SceneTreeDialog::_cancel() {
hide();
}
+
void SceneTreeDialog::_select() {
if (tree->get_selected()) {
emit_signal("selected", tree->get_selected()->get_path());
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 721384035f..d0346a6c3e 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -67,6 +67,7 @@ void ScriptCreateDialog::_theme_changed() {
parent_search_button->set_icon(gc->get_theme_icon("ClassList", "EditorIcons"));
status_panel->add_theme_style_override("panel", gc->get_theme_stylebox("bg", "Tree"));
}
+
void ScriptCreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index de7a98535f..aa88b0ef39 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -472,6 +472,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
interface = memnew(ShaderGlobalsEditorInterface);
interface->connect("var_changed", Callable(this, "_changed"));
}
+
ShaderGlobalsEditor::~ShaderGlobalsEditor() {
inspector->edit(nullptr);
memdelete(interface);
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index d95be7b218..ea6fcee1c0 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -991,6 +991,7 @@ MainLoop *test(TestType p_type) {
return nullptr;
}
+
} // namespace TestGDScript
#else
@@ -1001,6 +1002,7 @@ MainLoop *test(TestType p_type) {
ERR_PRINT("The GDScript module is disabled, therefore GDScript tests cannot be used.");
return nullptr;
}
+
} // namespace TestGDScript
#endif
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp
index 14bc13ff61..d46a13d2c0 100644
--- a/main/tests/test_gui.cpp
+++ b/main/tests/test_gui.cpp
@@ -265,6 +265,7 @@ public:
MainLoop *test() {
return memnew(TestMainLoop);
}
+
} // namespace TestGUI
#endif
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index 33589e37af..14ae81ad26 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -695,4 +695,5 @@ MainLoop *test() {
return nullptr;
}
+
} // namespace TestMath
diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp
index b14fda15c4..27792c48e6 100644
--- a/main/tests/test_oa_hash_map.cpp
+++ b/main/tests/test_oa_hash_map.cpp
@@ -152,4 +152,5 @@ MainLoop *test() {
return nullptr;
}
+
} // namespace TestOAHashMap
diff --git a/main/tests/test_ordered_hash_map.cpp b/main/tests/test_ordered_hash_map.cpp
index 12d9e7906c..aba222fbba 100644
--- a/main/tests/test_ordered_hash_map.cpp
+++ b/main/tests/test_ordered_hash_map.cpp
@@ -169,4 +169,5 @@ MainLoop *test() {
return nullptr;
}
+
} // namespace TestOrderedHashMap
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 7bb6dfedc9..9b37033354 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -402,4 +402,5 @@ namespace TestPhysics2D {
MainLoop *test() {
return memnew(TestPhysics2DMainLoop);
}
+
} // namespace TestPhysics2D
diff --git a/main/tests/test_physics_3d.cpp b/main/tests/test_physics_3d.cpp
index 0552db86a2..fe54ece98e 100644
--- a/main/tests/test_physics_3d.cpp
+++ b/main/tests/test_physics_3d.cpp
@@ -409,4 +409,5 @@ namespace TestPhysics3D {
MainLoop *test() {
return memnew(TestPhysics3DMainLoop);
}
+
} // namespace TestPhysics3D
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index b512a17e55..adae0283e5 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -235,4 +235,5 @@ public:
MainLoop *test() {
return memnew(TestMainLoop);
}
+
} // namespace TestRender
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp
index 42d4841ecf..707a25699f 100644
--- a/main/tests/test_shader_lang.cpp
+++ b/main/tests/test_shader_lang.cpp
@@ -353,4 +353,5 @@ MainLoop *test() {
return nullptr;
}
+
} // namespace TestShaderLang
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index aa59b74371..ca66ef1cf7 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -1169,4 +1169,5 @@ MainLoop *test() {
return nullptr;
}
+
} // namespace TestString
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index a861b39537..7f0e27b0ee 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -817,6 +817,7 @@ void EditorSceneImporterAssimp::_import_animation(ImportState &state, int p_anim
state.animation_player->add_animation(name, animation);
}
}
+
//
// Mesh Generation from indices ? why do we need so much mesh code
// [debt needs looked into]
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 69a81f6f15..f263893287 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -555,6 +555,7 @@ void RigidBodyBullet::set_mode(PhysicsServer3D::BodyMode p_mode) {
btBody->setAngularVelocity(btVector3(0, 0, 0));
btBody->setLinearVelocity(btVector3(0, 0, 0));
}
+
PhysicsServer3D::BodyMode RigidBodyBullet::get_mode() const {
return mode;
}
diff --git a/modules/bullet/slider_joint_bullet.cpp b/modules/bullet/slider_joint_bullet.cpp
index c248b78acf..6d5d95d07a 100644
--- a/modules/bullet/slider_joint_bullet.cpp
+++ b/modules/bullet/slider_joint_bullet.cpp
@@ -119,6 +119,7 @@ real_t SliderJointBullet::getLowerLinLimit() const {
void SliderJointBullet::setLowerLinLimit(real_t lowerLimit) {
sliderConstraint->setLowerLinLimit(lowerLimit);
}
+
real_t SliderJointBullet::getUpperLinLimit() const {
return sliderConstraint->getUpperLinLimit();
}
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index ad04d9941b..c9569a6d9c 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -70,6 +70,7 @@ String CSGShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo,
return "";
}
+
Variant CSGShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
@@ -102,6 +103,7 @@ Variant CSGShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int
return Variant();
}
+
void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
@@ -200,6 +202,7 @@ void CSGShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Ca
s->set_outer_radius(d);
}
}
+
void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_spatial_node());
@@ -303,6 +306,7 @@ void CSGShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
ur->commit_action();
}
}
+
bool CSGShape3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<CSGSphere3D>(p_spatial) || Object::cast_to<CSGBox3D>(p_spatial) || Object::cast_to<CSGCylinder3D>(p_spatial) || Object::cast_to<CSGTorus3D>(p_spatial) || Object::cast_to<CSGMesh3D>(p_spatial) || Object::cast_to<CSGPolygon3D>(p_spatial);
}
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 8a0e1097c2..a5ebb1f437 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -443,6 +443,7 @@ void CSGShape3D::_update_shape() {
set_base(root_mesh->get_rid());
}
+
AABB CSGShape3D::get_aabb() const {
return node_aabb;
}
@@ -564,6 +565,7 @@ Array CSGShape3D::get_meshes() const {
return Array();
}
+
void CSGShape3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_shape"), &CSGShape3D::_update_shape);
ClassDB::bind_method(D_METHOD("is_root_shape"), &CSGShape3D::is_root_shape);
@@ -627,6 +629,7 @@ CSGShape3D::~CSGShape3D() {
brush = nullptr;
}
}
+
//////////////////////////////////
CSGBrush *CSGCombiner3D::_build_brush() {
@@ -2335,6 +2338,7 @@ void CSGPolygon3D::set_path_interval(float p_interval) {
_make_dirty();
update_gizmo();
}
+
float CSGPolygon3D::get_path_interval() const {
return path_interval;
}
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 0ff747c6d8..a53c2a2364 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -36,6 +36,7 @@
void NetworkedMultiplayerENet::set_transfer_mode(TransferMode p_mode) {
transfer_mode = p_mode;
}
+
NetworkedMultiplayerPeer::TransferMode NetworkedMultiplayerENet::get_transfer_mode() const {
return transfer_mode;
}
@@ -113,6 +114,7 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int
connection_status = CONNECTION_CONNECTED;
return OK;
}
+
Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_port, int p_in_bandwidth, int p_out_bandwidth, int p_client_port) {
ERR_FAIL_COND_V_MSG(active, ERR_ALREADY_IN_USE, "The multiplayer instance is already active.");
ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The server port number must be set between 0 and 65535 (inclusive).");
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp
index 4cb55900b0..a22af89edc 100644
--- a/modules/gdnative/gdnative/string.cpp
+++ b/modules/gdnative/gdnative/string.cpp
@@ -137,6 +137,7 @@ signed char GDAPI godot_string_nocasecmp_to(const godot_string *p_self, const go
return self->nocasecmp_to(*str);
}
+
signed char GDAPI godot_string_naturalnocasecmp_to(const godot_string *p_self, const godot_string *p_str) {
const String *self = (const String *)p_self;
const String *str = (const String *)p_str;
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 70a651be1e..fe9496702a 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -817,6 +817,7 @@ bool NativeScriptInstance::set(const StringName &p_name, const Variant &p_value)
}
return false;
}
+
bool NativeScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
NativeScriptDesc *script_data = GET_SCRIPT_DESC();
@@ -1267,22 +1268,29 @@ void NativeScriptLanguage::init() {
EditorNode::add_init_callback(&_add_reload_node);
#endif
}
+
String NativeScriptLanguage::get_type() const {
return "NativeScript";
}
+
String NativeScriptLanguage::get_extension() const {
return "gdns";
}
+
Error NativeScriptLanguage::execute_file(const String &p_path) {
return OK; // Qué?
}
+
void NativeScriptLanguage::finish() {
_unload_stuff();
}
+
void NativeScriptLanguage::get_reserved_words(List<String> *p_words) const {
}
+
void NativeScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const {
}
+
void NativeScriptLanguage::get_string_delimiters(List<String> *p_delimiters) const {
}
@@ -1291,6 +1299,7 @@ Ref<Script> NativeScriptLanguage::get_template(const String &p_class_name, const
s->set_class_name(p_class_name);
return Ref<NativeScript>(s);
}
+
bool NativeScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const {
return true;
}
@@ -1299,20 +1308,26 @@ Script *NativeScriptLanguage::create_script() const {
NativeScript *script = memnew(NativeScript);
return script;
}
+
bool NativeScriptLanguage::has_named_classes() const {
return true;
}
+
bool NativeScriptLanguage::supports_builtin_mode() const {
return true;
}
+
int NativeScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
}
+
String NativeScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
return "";
}
+
void NativeScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {
}
+
void NativeScriptLanguage::add_global_constant(const StringName &p_variable, const Variant &p_value) {
}
@@ -1320,27 +1335,36 @@ void NativeScriptLanguage::add_global_constant(const StringName &p_variable, con
String NativeScriptLanguage::debug_get_error() const {
return "";
}
+
int NativeScriptLanguage::debug_get_stack_level_count() const {
return -1;
}
+
int NativeScriptLanguage::debug_get_stack_level_line(int p_level) const {
return -1;
}
+
String NativeScriptLanguage::debug_get_stack_level_function(int p_level) const {
return "";
}
+
String NativeScriptLanguage::debug_get_stack_level_source(int p_level) const {
return "";
}
+
void NativeScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
}
+
void NativeScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
}
+
void NativeScriptLanguage::debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
}
+
String NativeScriptLanguage::debug_parse_stack_level_expression(int p_level, const String &p_expression, int p_max_subitems, int p_max_depth) {
return "";
}
+
// Debugging stuff end.
void NativeScriptLanguage::reload_all_scripts() {
@@ -1348,6 +1372,7 @@ void NativeScriptLanguage::reload_all_scripts() {
void NativeScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft_reload) {
}
+
void NativeScriptLanguage::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("gdns");
}
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index d42fdb1e04..1d26e2148e 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -321,9 +321,11 @@ bool GDScript::instance_has(const Object *p_this) const {
bool GDScript::has_source_code() const {
return source != "";
}
+
String GDScript::get_source_code() const {
return source;
}
+
void GDScript::set_source_code(const String &p_code) {
if (source == p_code)
return;
@@ -708,6 +710,7 @@ bool GDScript::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
bool GDScript::_set(const StringName &p_name, const Variant &p_value) {
if (p_name == GDScriptLanguage::get_singleton()->strings._script_source) {
set_source_code(p_value);
@@ -884,6 +887,7 @@ bool GDScript::has_script_signal(const StringName &p_signal) const {
#endif
return false;
}
+
void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
for (const Map<StringName, Vector<StringName>>::Element *E = _signals.front(); E; E = E->next()) {
MethodInfo mi;
@@ -1242,6 +1246,7 @@ bool GDScriptInstance::has_method(const StringName &p_method) const {
return false;
}
+
Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
GDScript *sptr = script.ptr();
while (sptr) {
@@ -1493,13 +1498,16 @@ void GDScriptLanguage::init() {
String GDScriptLanguage::get_type() const {
return "GDScript";
}
+
String GDScriptLanguage::get_extension() const {
return "gd";
}
+
Error GDScriptLanguage::execute_file(const String &p_path) {
// ??
return OK;
}
+
void GDScriptLanguage::finish() {
}
@@ -2275,6 +2283,7 @@ void ResourceFormatSaverGDScript::get_recognized_extensions(const RES &p_resourc
p_extensions->push_back("gd");
}
}
+
bool ResourceFormatSaverGDScript::recognize(const RES &p_resource) const {
return Object::cast_to<GDScript>(*p_resource) != nullptr;
}
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index c227d4098c..deb725ea81 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2115,9 +2115,11 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri
String GDScriptCompiler::get_error() const {
return error;
}
+
int GDScriptCompiler::get_error_line() const {
return err_line;
}
+
int GDScriptCompiler::get_error_column() const {
return err_column;
}
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index fc6f9b5419..8aa7809347 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -237,6 +237,7 @@ int GDScriptLanguage::debug_get_stack_level_count() const {
return _debug_call_stack_pos;
}
+
int GDScriptLanguage::debug_get_stack_level_line(int p_level) const {
if (_debug_parse_err_line >= 0)
return _debug_parse_err_line;
@@ -247,6 +248,7 @@ int GDScriptLanguage::debug_get_stack_level_line(int p_level) const {
return *(_call_stack[l].line);
}
+
String GDScriptLanguage::debug_get_stack_level_function(int p_level) const {
if (_debug_parse_err_line >= 0)
return "";
@@ -255,6 +257,7 @@ String GDScriptLanguage::debug_get_stack_level_function(int p_level) const {
int l = _debug_call_stack_pos - p_level - 1;
return _call_stack[l].function->get_name();
}
+
String GDScriptLanguage::debug_get_stack_level_source(int p_level) const {
if (_debug_parse_err_line >= 0)
return _debug_parse_err_file;
@@ -263,6 +266,7 @@ String GDScriptLanguage::debug_get_stack_level_source(int p_level) const {
int l = _debug_call_stack_pos - p_level - 1;
return _call_stack[l].function->get_source();
}
+
void GDScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_debug_parse_err_line >= 0)
return;
@@ -280,6 +284,7 @@ void GDScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p
p_values->push_back(_call_stack[l].stack[E->get().second]);
}
}
+
void GDScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_debug_parse_err_line >= 0)
return;
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 5ad8c2d367..aa2ea149f5 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -1566,6 +1566,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
const int *GDScriptFunction::get_code() const {
return _code_ptr;
}
+
int GDScriptFunction::get_code_size() const {
return _code_size;
}
@@ -1583,6 +1584,7 @@ StringName GDScriptFunction::get_global_name(int p_idx) const {
int GDScriptFunction::get_default_argument_count() const {
return _default_arg_count;
}
+
int GDScriptFunction::get_default_argument_addr(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, default_arguments.size(), -1);
return default_arguments[p_idx];
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 1c07efaa3a..09f5b13e22 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -8466,6 +8466,7 @@ String GDScriptParser::get_error() const {
int GDScriptParser::get_error_line() const {
return error_line;
}
+
int GDScriptParser::get_error_column() const {
return error_column;
}
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index f532a6b797..9854b8d185 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -387,6 +387,7 @@ void GDScriptTokenizerText::_make_token(Token p_type) {
tk_rb_pos = (tk_rb_pos + 1) % TK_RB_SIZE;
}
+
void GDScriptTokenizerText::_make_identifier(const StringName &p_identifier) {
TokenData &tk = tk_rb[tk_rb_pos];
@@ -408,6 +409,7 @@ void GDScriptTokenizerText::_make_built_in_func(GDScriptFunctions::Function p_fu
tk_rb_pos = (tk_rb_pos + 1) % TK_RB_SIZE;
}
+
void GDScriptTokenizerText::_make_constant(const Variant &p_constant) {
TokenData &tk = tk_rb[tk_rb_pos];
@@ -1445,6 +1447,7 @@ int GDScriptTokenizerBuffer::get_token_line(int p_offset) const {
uint32_t l = lines.getv(pos);
return l & TOKEN_LINE_MASK;
}
+
int GDScriptTokenizerBuffer::get_token_column(int p_offset) const {
int offset = token + p_offset;
int pos = lines.find_nearest(offset);
@@ -1456,11 +1459,13 @@ int GDScriptTokenizerBuffer::get_token_column(int p_offset) const {
uint32_t l = lines.getv(pos);
return l >> TOKEN_LINE_BITS;
}
+
int GDScriptTokenizerBuffer::get_token_line_indent(int p_offset) const {
int offset = token + p_offset;
ERR_FAIL_INDEX_V(offset, tokens.size(), 0);
return tokens[offset] >> TOKEN_BITS;
}
+
const Variant &GDScriptTokenizerBuffer::get_token_constant(int p_offset) const {
int offset = token + p_offset;
ERR_FAIL_INDEX_V(offset, tokens.size(), nil);
@@ -1468,6 +1473,7 @@ const Variant &GDScriptTokenizerBuffer::get_token_constant(int p_offset) const {
ERR_FAIL_UNSIGNED_INDEX_V(constant, (uint32_t)constants.size(), nil);
return constants[constant];
}
+
String GDScriptTokenizerBuffer::get_token_error(int p_offset) const {
ERR_FAIL_V(String());
}
@@ -1476,6 +1482,7 @@ void GDScriptTokenizerBuffer::advance(int p_amount) {
ERR_FAIL_INDEX(p_amount + token, tokens.size());
token += p_amount;
}
+
GDScriptTokenizerBuffer::GDScriptTokenizerBuffer() {
token = 0;
}
diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp
index 736c85eb0b..dd28c4ad4a 100644
--- a/modules/glslang/register_types.cpp
+++ b/modules/glslang/register_types.cpp
@@ -238,6 +238,7 @@ void preregister_glslang_types() {
void register_glslang_types() {
}
+
void unregister_glslang_types() {
glslang::FinalizeProcess();
}
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index cf14447232..02258d706a 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -197,6 +197,7 @@ void GridMap::set_cell_size(const Vector3 &p_size) {
_recreate_octant_data();
emit_signal("cell_size_changed", cell_size);
}
+
Vector3 GridMap::get_cell_size() const {
return cell_size;
}
@@ -206,6 +207,7 @@ void GridMap::set_octant_size(int p_size) {
octant_size = p_size;
_recreate_octant_data();
}
+
int GridMap::get_octant_size() const {
return octant_size;
}
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index cf54754a16..b55c73e9bc 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -64,6 +64,7 @@ void LightmapperRD::add_directional_light(bool p_static, const Vector3 &p_direct
l.size = p_angular_distance;
lights.push_back(l);
}
+
void LightmapperRD::add_omni_light(bool p_static, const Vector3 &p_position, const Color &p_color, float p_energy, float p_range, float p_attenuation, float p_size) {
Light l;
l.type = LIGHT_TYPE_OMNI;
@@ -80,6 +81,7 @@ void LightmapperRD::add_omni_light(bool p_static, const Vector3 &p_position, con
l.size = p_size;
lights.push_back(l);
}
+
void LightmapperRD::add_spot_light(bool p_static, const Vector3 &p_position, const Vector3 p_direction, const Color &p_color, float p_energy, float p_range, float p_attenuation, float p_spot_angle, float p_spot_attenuation, float p_size) {
Light l;
l.type = LIGHT_TYPE_SPOT;
@@ -1700,17 +1702,21 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
int LightmapperRD::get_bake_texture_count() const {
return bake_textures.size();
}
+
Ref<Image> LightmapperRD::get_bake_texture(int p_index) const {
ERR_FAIL_INDEX_V(p_index, bake_textures.size(), Ref<Image>());
return bake_textures[p_index];
}
+
int LightmapperRD::get_bake_mesh_count() const {
return mesh_instances.size();
}
+
Variant LightmapperRD::get_bake_mesh_userdata(int p_index) const {
ERR_FAIL_INDEX_V(p_index, mesh_instances.size(), Variant());
return mesh_instances[p_index].data.userdata;
}
+
Rect2 LightmapperRD::get_bake_mesh_uv_scale(int p_index) const {
ERR_FAIL_COND_V(bake_textures.size() == 0, Rect2());
Rect2 uv_ofs;
@@ -1719,6 +1725,7 @@ Rect2 LightmapperRD::get_bake_mesh_uv_scale(int p_index) const {
uv_ofs.size = Vector2(mesh_instances[p_index].data.albedo_on_uv2->get_width(), mesh_instances[p_index].data.albedo_on_uv2->get_height()) / atlas_size;
return uv_ofs;
}
+
int LightmapperRD::get_bake_mesh_texture_slice(int p_index) const {
ERR_FAIL_INDEX_V(p_index, mesh_instances.size(), Variant());
return mesh_instances[p_index].slice;
diff --git a/modules/lightmapper_rd/lm_common_inc.glsl b/modules/lightmapper_rd/lm_common_inc.glsl
index 0ff455936e..15946d5327 100644
--- a/modules/lightmapper_rd/lm_common_inc.glsl
+++ b/modules/lightmapper_rd/lm_common_inc.glsl
@@ -11,6 +11,7 @@ struct Vertex {
layout(set = 0, binding = 1, std430) restrict readonly buffer Vertices {
Vertex data[];
}
+
vertices;
struct Triangle {
@@ -21,6 +22,7 @@ struct Triangle {
layout(set = 0, binding = 2, std430) restrict readonly buffer Triangles {
Triangle data[];
}
+
triangles;
struct Box {
@@ -33,11 +35,13 @@ struct Box {
layout(set = 0, binding = 3, std430) restrict readonly buffer Boxes {
Box data[];
}
+
boxes;
layout(set = 0, binding = 4, std430) restrict readonly buffer GridIndices {
uint data[];
}
+
grid_indices;
#define LIGHT_TYPE_DIRECTIONAL 0
@@ -66,6 +70,7 @@ struct Light {
layout(set = 0, binding = 5, std430) restrict readonly buffer Lights {
Light data[];
}
+
lights;
struct Seam {
@@ -76,11 +81,13 @@ struct Seam {
layout(set = 0, binding = 6, std430) restrict readonly buffer Seams {
Seam data[];
}
+
seams;
layout(set = 0, binding = 7, std430) restrict readonly buffer Probes {
vec4 data[];
}
+
probe_positions;
layout(set = 0, binding = 8) uniform utexture3D grid;
diff --git a/modules/lightmapper_rd/lm_compute.glsl b/modules/lightmapper_rd/lm_compute.glsl
index 5a1f1ceda3..a442016969 100644
--- a/modules/lightmapper_rd/lm_compute.glsl
+++ b/modules/lightmapper_rd/lm_compute.glsl
@@ -36,6 +36,7 @@ layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
layout(set = 1, binding = 0, std430) restrict buffer LightProbeData {
vec4 data[];
}
+
light_probes;
layout(set = 1, binding = 1) uniform texture2DArray source_light;
@@ -93,6 +94,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
mat3x4 env_transform;
}
+
params;
//check it, but also return distance and barycentric coords (for uv lookup)
diff --git a/modules/lightmapper_rd/lm_raster.glsl b/modules/lightmapper_rd/lm_raster.glsl
index 41b3e89a3f..36b706bcd5 100644
--- a/modules/lightmapper_rd/lm_raster.glsl
+++ b/modules/lightmapper_rd/lm_raster.glsl
@@ -26,6 +26,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
ivec3 grid_size;
uint pad2;
}
+
params;
/* clang-format on */
diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp
index 0be473b97e..c6b0846716 100644
--- a/modules/mbedtls/stream_peer_mbedtls.cpp
+++ b/modules/mbedtls/stream_peer_mbedtls.cpp
@@ -141,6 +141,7 @@ Error StreamPeerMbedTLS::accept_stream(Ref<StreamPeer> p_base, Ref<CryptoKey> p_
status = STATUS_CONNECTED;
return OK;
}
+
Error StreamPeerMbedTLS::put_data(const uint8_t *p_data, int p_bytes) {
ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_UNCONFIGURED);
@@ -267,6 +268,7 @@ int StreamPeerMbedTLS::get_available_bytes() const {
return mbedtls_ssl_get_bytes_avail(&(ssl_ctx->ssl));
}
+
StreamPeerMbedTLS::StreamPeerMbedTLS() {
ssl_ctx.instance();
status = STATUS_DISCONNECTED;
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index a9c6ec19e0..080f366692 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -467,6 +467,7 @@ uint64_t get_editor_api_hash() {
uint32_t get_bindings_version() {
GD_UNREACHABLE();
}
+
uint32_t get_cs_glue_version() {
GD_UNREACHABLE();
}
diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h
index caf0c792b7..a7ca46f012 100644
--- a/modules/mono/mono_gd/gd_mono_utils.h
+++ b/modules/mono/mono_gd/gd_mono_utils.h
@@ -134,6 +134,7 @@ extern thread_local int current_invoke_count;
_FORCE_INLINE_ int get_runtime_invoke_count() {
return current_invoke_count;
}
+
_FORCE_INLINE_ int &get_runtime_invoke_count_ref() {
return current_invoke_count;
}
diff --git a/modules/mono/mono_gd/support/android_support.cpp b/modules/mono/mono_gd/support/android_support.cpp
index 8bcdeec9dd..8bcdeec9dd 100755..100644
--- a/modules/mono/mono_gd/support/android_support.cpp
+++ b/modules/mono/mono_gd/support/android_support.cpp
diff --git a/modules/mono/mono_gd/support/ios_support.mm b/modules/mono/mono_gd/support/ios_support.mm
index e3d1a647fd..e3d1a647fd 100755..100644
--- a/modules/mono/mono_gd/support/ios_support.mm
+++ b/modules/mono/mono_gd/support/ios_support.mm
diff --git a/modules/mono/utils/mono_reg_utils.cpp b/modules/mono/utils/mono_reg_utils.cpp
index eff2c7335d..1b4fe68582 100644
--- a/modules/mono/utils/mono_reg_utils.cpp
+++ b/modules/mono/utils/mono_reg_utils.cpp
@@ -226,6 +226,7 @@ cleanup:
return msbuild_tools_path;
}
+
} // namespace MonoRegUtils
#endif // WINDOWS_ENABLED
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index 76d0b9bc9b..da1b719d99 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -81,6 +81,7 @@ int sfind(const String &p_text, int p_from) {
return -1;
}
+
} // namespace
String sformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) {
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 6e5cc04f6d..20f46e1f7a 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -169,9 +169,11 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
void ResourceFormatPVR::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("pvr");
}
+
bool ResourceFormatPVR::handles_type(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Texture2D");
}
+
String ResourceFormatPVR::get_resource_type(const String &p_path) const {
if (p_path.get_extension().to_lower() == "pvr")
return "Texture2D";
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 40dc24e317..775a2f23c7 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -88,6 +88,7 @@ void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
void AudioStreamPlaybackOGGVorbis::stop() {
active = false;
}
+
bool AudioStreamPlaybackOGGVorbis::is_playing() const {
return active;
}
@@ -99,6 +100,7 @@ int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
return float(frames_mixed) / vorbis_stream->sample_rate;
}
+
void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
if (!active)
return;
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 269b7a9d33..d68d050d34 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -41,6 +41,7 @@ String ResourceImporterOGGVorbis::get_importer_name() const {
String ResourceImporterOGGVorbis::get_visible_name() const {
return "OGGVorbis";
}
+
void ResourceImporterOGGVorbis::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("ogg");
}
@@ -60,6 +61,7 @@ bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_option, co
int ResourceImporterOGGVorbis::get_preset_count() const {
return 0;
}
+
String ResourceImporterOGGVorbis::get_preset_name(int p_idx) const {
return String();
}
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index db3622ef96..8ca4452ac9 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -40,6 +40,7 @@ void SVGRasterizer::rasterize(NSVGimage *p_image, float p_tx, float p_ty, float
SVGRasterizer::SVGRasterizer() {
rasterizer = nsvgCreateRasterizer();
}
+
SVGRasterizer::~SVGRasterizer() {
nsvgDeleteRasterizer(rasterizer);
}
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 79516fa1ba..4d5e5200b6 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -178,6 +178,7 @@ void VisualScript::add_function(const StringName &p_name) {
bool VisualScript::has_function(const StringName &p_name) const {
return functions.has(p_name);
}
+
void VisualScript::remove_function(const StringName &p_name) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!functions.has(p_name));
@@ -581,10 +582,12 @@ void VisualScript::set_variable_default_value(const StringName &p_name, const Va
_update_placeholders();
#endif
}
+
Variant VisualScript::get_variable_default_value(const StringName &p_name) const {
ERR_FAIL_COND_V(!variables.has(p_name), Variant());
return variables[p_name].default_value;
}
+
void VisualScript::set_variable_info(const StringName &p_name, const PropertyInfo &p_info) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!variables.has(p_name));
@@ -595,6 +598,7 @@ void VisualScript::set_variable_info(const StringName &p_name, const PropertyInf
_update_placeholders();
#endif
}
+
PropertyInfo VisualScript::get_variable_info(const StringName &p_name) const {
ERR_FAIL_COND_V(!variables.has(p_name), PropertyInfo());
return variables[p_name].info;
@@ -702,6 +706,7 @@ void VisualScript::add_custom_signal(const StringName &p_name) {
bool VisualScript::has_custom_signal(const StringName &p_name) const {
return custom_signals.has(p_name);
}
+
void VisualScript::custom_signal_add_argument(const StringName &p_func, Variant::Type p_type, const String &p_name, int p_index) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
@@ -713,28 +718,33 @@ void VisualScript::custom_signal_add_argument(const StringName &p_func, Variant:
else
custom_signals[p_func].insert(0, arg);
}
+
void VisualScript::custom_signal_set_argument_type(const StringName &p_func, int p_argidx, Variant::Type p_type) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
ERR_FAIL_INDEX(p_argidx, custom_signals[p_func].size());
custom_signals[p_func].write[p_argidx].type = p_type;
}
+
Variant::Type VisualScript::custom_signal_get_argument_type(const StringName &p_func, int p_argidx) const {
ERR_FAIL_COND_V(!custom_signals.has(p_func), Variant::NIL);
ERR_FAIL_INDEX_V(p_argidx, custom_signals[p_func].size(), Variant::NIL);
return custom_signals[p_func][p_argidx].type;
}
+
void VisualScript::custom_signal_set_argument_name(const StringName &p_func, int p_argidx, const String &p_name) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
ERR_FAIL_INDEX(p_argidx, custom_signals[p_func].size());
custom_signals[p_func].write[p_argidx].name = p_name;
}
+
String VisualScript::custom_signal_get_argument_name(const StringName &p_func, int p_argidx) const {
ERR_FAIL_COND_V(!custom_signals.has(p_func), String());
ERR_FAIL_INDEX_V(p_argidx, custom_signals[p_func].size(), String());
return custom_signals[p_func][p_argidx].name;
}
+
void VisualScript::custom_signal_remove_argument(const StringName &p_func, int p_argidx) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
@@ -746,6 +756,7 @@ int VisualScript::custom_signal_get_argument_count(const StringName &p_func) con
ERR_FAIL_COND_V(!custom_signals.has(p_func), 0);
return custom_signals[p_func].size();
}
+
void VisualScript::custom_signal_swap_argument(const StringName &p_func, int p_argidx, int p_with_argidx) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
@@ -754,6 +765,7 @@ void VisualScript::custom_signal_swap_argument(const StringName &p_func, int p_a
SWAP(custom_signals[p_func].write[p_argidx], custom_signals[p_func].write[p_with_argidx]);
}
+
void VisualScript::remove_custom_signal(const StringName &p_name) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_name));
@@ -934,6 +946,7 @@ bool VisualScript::get_property_default_value(const StringName &p_property, Vari
r_value = variables[p_property].default_value;
return true;
}
+
void VisualScript::get_script_method_list(List<MethodInfo> *p_list) const {
for (Map<StringName, Function>::Element *E = functions.front(); E; E = E->next()) {
MethodInfo mi;
@@ -957,6 +970,7 @@ void VisualScript::get_script_method_list(List<MethodInfo> *p_list) const {
bool VisualScript::has_method(const StringName &p_method) const {
return functions.has(p_method);
}
+
MethodInfo VisualScript::get_method_info(const StringName &p_method) const {
const Map<StringName, Function>::Element *E = functions.find(p_method);
if (!E)
@@ -1392,6 +1406,7 @@ bool VisualScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
r_ret = E->get();
return true;
}
+
void VisualScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const {
for (const Map<StringName, VisualScript::Variable>::Element *E = script->variables.front(); E; E = E->next()) {
if (!E->get()._export)
@@ -1402,6 +1417,7 @@ void VisualScriptInstance::get_property_list(List<PropertyInfo> *p_properties) c
p_properties->push_back(p);
}
}
+
Variant::Type VisualScriptInstance::get_property_type(const StringName &p_name, bool *r_is_valid) const {
const Map<StringName, VisualScript::Variable>::Element *E = script->variables.find(p_name);
if (!E) {
@@ -1444,6 +1460,7 @@ void VisualScriptInstance::get_method_list(List<MethodInfo> *p_list) const {
p_list->push_back(mi);
}
}
+
bool VisualScriptInstance::has_method(const StringName &p_method) const {
if (p_method == script->get_default_func())
return false;
@@ -2369,25 +2386,32 @@ String VisualScriptLanguage::get_name() const {
/* LANGUAGE FUNCTIONS */
void VisualScriptLanguage::init() {
}
+
String VisualScriptLanguage::get_type() const {
return "VisualScript";
}
+
String VisualScriptLanguage::get_extension() const {
return "vs";
}
+
Error VisualScriptLanguage::execute_file(const String &p_path) {
return OK;
}
+
void VisualScriptLanguage::finish() {
}
/* EDITOR FUNCTIONS */
void VisualScriptLanguage::get_reserved_words(List<String> *p_words) const {
}
+
void VisualScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const {
}
+
void VisualScriptLanguage::get_string_delimiters(List<String> *p_delimiters) const {
}
+
Ref<Script> VisualScriptLanguage::get_template(const String &p_class_name, const String &p_base_class_name) const {
Ref<VisualScript> script;
script.instance();
@@ -2407,24 +2431,30 @@ void VisualScriptLanguage::make_template(const String &p_class_name, const Strin
bool VisualScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const {
return false;
}
+
Script *VisualScriptLanguage::create_script() const {
return memnew(VisualScript);
}
+
bool VisualScriptLanguage::has_named_classes() const {
return false;
}
+
bool VisualScriptLanguage::supports_builtin_mode() const {
return true;
}
+
int VisualScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
}
+
String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
return String();
}
void VisualScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {
}
+
void VisualScriptLanguage::add_global_constant(const StringName &p_variable, const Variant &p_value) {
}
@@ -2466,6 +2496,7 @@ int VisualScriptLanguage::debug_get_stack_level_count() const {
return _debug_call_stack_pos;
}
+
int VisualScriptLanguage::debug_get_stack_level_line(int p_level) const {
if (_debug_parse_err_node >= 0)
return _debug_parse_err_node;
@@ -2476,6 +2507,7 @@ int VisualScriptLanguage::debug_get_stack_level_line(int p_level) const {
return *(_call_stack[l].current_id);
}
+
String VisualScriptLanguage::debug_get_stack_level_function(int p_level) const {
if (_debug_parse_err_node >= 0)
return "";
@@ -2484,6 +2516,7 @@ String VisualScriptLanguage::debug_get_stack_level_function(int p_level) const {
int l = _debug_call_stack_pos - p_level - 1;
return *_call_stack[l].function;
}
+
String VisualScriptLanguage::debug_get_stack_level_source(int p_level) const {
if (_debug_parse_err_node >= 0)
return _debug_parse_err_file;
@@ -2492,6 +2525,7 @@ String VisualScriptLanguage::debug_get_stack_level_source(int p_level) const {
int l = _debug_call_stack_pos - p_level - 1;
return _call_stack[l].instance->get_script_ptr()->get_path();
}
+
void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_debug_parse_err_node >= 0)
return;
@@ -2565,6 +2599,7 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
}
*/
}
+
void VisualScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_debug_parse_err_node >= 0)
return;
@@ -2590,26 +2625,32 @@ void VisualScriptLanguage::debug_get_stack_level_members(int p_level, List<Strin
void VisualScriptLanguage::debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
//no globals are really reachable in gdscript
}
+
String VisualScriptLanguage::debug_parse_stack_level_expression(int p_level, const String &p_expression, int p_max_subitems, int p_max_depth) {
return "";
}
void VisualScriptLanguage::reload_all_scripts() {
}
+
void VisualScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft_reload) {
}
+
/* LOADER FUNCTIONS */
void VisualScriptLanguage::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("vs");
}
+
void VisualScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) const {
}
+
void VisualScriptLanguage::get_public_constants(List<Pair<String, Variant>> *p_constants) const {
}
void VisualScriptLanguage::profiling_start() {
}
+
void VisualScriptLanguage::profiling_stop() {
}
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index d4218318d3..953d9a5fed 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -223,6 +223,7 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
int VisualScriptBuiltinFunc::get_input_value_port_count() const {
return get_func_argument_count(func);
}
+
int VisualScriptBuiltinFunc::get_output_value_port_count() const {
switch (func) {
case MATH_RANDOMIZE:
@@ -627,6 +628,7 @@ String VisualScriptBuiltinFunc::get_caption() const {
return "BuiltinFunc";
}
+
*/
String VisualScriptBuiltinFunc::get_caption() const {
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index f7e9e30ed6..fb8aac9a01 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1002,6 +1002,7 @@ void VisualScriptEditor::_update_node_size(int p_id) {
if (Object::cast_to<Control>(node))
Object::cast_to<Control>(node)->set_size(Vector2(1, 1)); //shrink if text is smaller
}
+
void VisualScriptEditor::_port_name_focus_out(const Node *p_name_box, int p_id, int p_port, bool is_input) {
StringName func = _get_function_of_node(p_id);
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index e8fd3ef681..ee166082bd 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -129,6 +129,7 @@ bool VisualScriptExpression::_get(const StringName &p_name, Variant &r_ret) cons
return false;
}
+
void VisualScriptExpression::_get_property_list(List<PropertyInfo> *p_list) const {
String argt = "Any";
for (int i = 1; i < Variant::VARIANT_MAX; i++) {
@@ -149,6 +150,7 @@ void VisualScriptExpression::_get_property_list(List<PropertyInfo> *p_list) cons
int VisualScriptExpression::get_output_sequence_port_count() const {
return sequenced ? 1 : 0;
}
+
bool VisualScriptExpression::has_input_sequence_port() const {
return sequenced;
}
@@ -160,6 +162,7 @@ String VisualScriptExpression::get_output_sequence_port_text(int p_port) const {
int VisualScriptExpression::get_input_value_port_count() const {
return inputs.size();
}
+
int VisualScriptExpression::get_output_value_port_count() const {
return 1;
}
@@ -167,6 +170,7 @@ int VisualScriptExpression::get_output_value_port_count() const {
PropertyInfo VisualScriptExpression::get_input_value_port_info(int p_idx) const {
return PropertyInfo(inputs[p_idx].type, inputs[p_idx].name);
}
+
PropertyInfo VisualScriptExpression::get_output_value_port_info(int p_idx) const {
return PropertyInfo(output_type, "result");
}
@@ -174,6 +178,7 @@ PropertyInfo VisualScriptExpression::get_output_value_port_info(int p_idx) const
String VisualScriptExpression::get_caption() const {
return "Expression";
}
+
String VisualScriptExpression::get_text() const {
return expression;
}
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 1f04ea8301..96616c281e 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -49,6 +49,7 @@ bool VisualScriptReturn::has_input_sequence_port() const {
int VisualScriptReturn::get_input_value_port_count() const {
return with_value ? 1 : 0;
}
+
int VisualScriptReturn::get_output_value_port_count() const {
return 0;
}
@@ -63,6 +64,7 @@ PropertyInfo VisualScriptReturn::get_input_value_port_info(int p_idx) const {
pinfo.type = type;
return pinfo;
}
+
PropertyInfo VisualScriptReturn::get_output_value_port_info(int p_idx) const {
return PropertyInfo();
}
@@ -170,6 +172,7 @@ bool VisualScriptCondition::has_input_sequence_port() const {
int VisualScriptCondition::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptCondition::get_output_value_port_count() const {
return 0;
}
@@ -189,6 +192,7 @@ PropertyInfo VisualScriptCondition::get_input_value_port_info(int p_idx) const {
pinfo.type = Variant::BOOL;
return pinfo;
}
+
PropertyInfo VisualScriptCondition::get_output_value_port_info(int p_idx) const {
return PropertyInfo();
}
@@ -248,6 +252,7 @@ bool VisualScriptWhile::has_input_sequence_port() const {
int VisualScriptWhile::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptWhile::get_output_value_port_count() const {
return 0;
}
@@ -265,6 +270,7 @@ PropertyInfo VisualScriptWhile::get_input_value_port_info(int p_idx) const {
pinfo.type = Variant::BOOL;
return pinfo;
}
+
PropertyInfo VisualScriptWhile::get_output_value_port_info(int p_idx) const {
return PropertyInfo();
}
@@ -305,6 +311,7 @@ VisualScriptNodeInstance *VisualScriptWhile::instance(VisualScriptInstance *p_in
instance->instance = p_instance;
return instance;
}
+
VisualScriptWhile::VisualScriptWhile() {
}
@@ -323,6 +330,7 @@ bool VisualScriptIterator::has_input_sequence_port() const {
int VisualScriptIterator::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptIterator::get_output_value_port_count() const {
return 1;
}
@@ -340,12 +348,14 @@ PropertyInfo VisualScriptIterator::get_input_value_port_info(int p_idx) const {
pinfo.type = Variant::NIL;
return pinfo;
}
+
PropertyInfo VisualScriptIterator::get_output_value_port_info(int p_idx) const {
PropertyInfo pinfo;
pinfo.name = "elem";
pinfo.type = Variant::NIL;
return pinfo;
}
+
String VisualScriptIterator::get_caption() const {
return "Iterator";
}
@@ -441,6 +451,7 @@ bool VisualScriptSequence::has_input_sequence_port() const {
int VisualScriptSequence::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptSequence::get_output_value_port_count() const {
return 1;
}
@@ -452,9 +463,11 @@ String VisualScriptSequence::get_output_sequence_port_text(int p_port) const {
PropertyInfo VisualScriptSequence::get_input_value_port_info(int p_idx) const {
return PropertyInfo();
}
+
PropertyInfo VisualScriptSequence::get_output_value_port_info(int p_idx) const {
return PropertyInfo(Variant::INT, "current");
}
+
String VisualScriptSequence::get_caption() const {
return "Sequence";
}
@@ -518,6 +531,7 @@ VisualScriptNodeInstance *VisualScriptSequence::instance(VisualScriptInstance *p
instance->steps = steps;
return instance;
}
+
VisualScriptSequence::VisualScriptSequence() {
steps = 1;
}
@@ -537,6 +551,7 @@ bool VisualScriptSwitch::has_input_sequence_port() const {
int VisualScriptSwitch::get_input_value_port_count() const {
return case_values.size() + 1;
}
+
int VisualScriptSwitch::get_output_value_port_count() const {
return 0;
}
@@ -636,6 +651,7 @@ bool VisualScriptSwitch::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void VisualScriptSwitch::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "case_count", PROPERTY_HINT_RANGE, "0,128"));
@@ -670,6 +686,7 @@ bool VisualScriptTypeCast::has_input_sequence_port() const {
int VisualScriptTypeCast::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptTypeCast::get_output_value_port_count() const {
return 1;
}
@@ -718,6 +735,7 @@ void VisualScriptTypeCast::set_base_script(const String &p_path) {
_change_notify();
ports_changed_notify();
}
+
String VisualScriptTypeCast::get_base_script() const {
return script;
}
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 4ba0c27ec0..e7cb2f5473 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -134,6 +134,7 @@ int VisualScriptFunctionCall::get_input_value_port_count() const {
return method_cache.arguments.size() + (call_mode == CALL_MODE_INSTANCE ? 1 : 0) + (rpc_call_mode >= RPC_RELIABLE_TO_ID ? 1 : 0) - defaulted_args;
}
}
+
int VisualScriptFunctionCall::get_output_value_port_count() const {
if (call_mode == CALL_MODE_BASIC_TYPE) {
bool returns = false;
@@ -410,6 +411,7 @@ void VisualScriptFunctionCall::set_function(const StringName &p_type) {
_change_notify();
ports_changed_notify();
}
+
StringName VisualScriptFunctionCall::get_function() const {
return function;
}
@@ -435,6 +437,7 @@ void VisualScriptFunctionCall::set_call_mode(CallMode p_mode) {
_change_notify();
ports_changed_notify();
}
+
VisualScriptFunctionCall::CallMode VisualScriptFunctionCall::get_call_mode() const {
return call_mode;
}
@@ -927,6 +930,7 @@ int VisualScriptPropertySet::get_input_value_port_count() const {
return pc;
}
+
int VisualScriptPropertySet::get_output_value_port_count() const {
return (call_mode == CALL_MODE_BASIC_TYPE || call_mode == CALL_MODE_INSTANCE) ? 1 : 0;
}
@@ -1022,6 +1026,7 @@ void VisualScriptPropertySet::_update_base_type() {
}
}
}
+
void VisualScriptPropertySet::set_basic_type(Variant::Type p_type) {
if (basic_type == p_type)
return;
@@ -1149,6 +1154,7 @@ void VisualScriptPropertySet::set_property(const StringName &p_type) {
_change_notify();
ports_changed_notify();
}
+
StringName VisualScriptPropertySet::get_property() const {
return property;
}
@@ -1176,6 +1182,7 @@ void VisualScriptPropertySet::set_call_mode(CallMode p_mode) {
_change_notify();
ports_changed_notify();
}
+
VisualScriptPropertySet::CallMode VisualScriptPropertySet::get_call_mode() const {
return call_mode;
}
@@ -1550,6 +1557,7 @@ VisualScriptPropertySet::TypeGuess VisualScriptPropertySet::guess_output_type(Ty
return VisualScriptNode::guess_output_type(p_inputs, p_output);
}
+
VisualScriptPropertySet::VisualScriptPropertySet() {
assign_op = ASSIGN_OP_NONE;
call_mode = CALL_MODE_SELF;
@@ -1576,6 +1584,7 @@ int VisualScriptPropertyGet::get_output_sequence_port_count() const {
bool VisualScriptPropertyGet::has_input_sequence_port() const {
return false; //(call_mode==CALL_MODE_SELF || call_mode==CALL_MODE_NODE_PATH)?false:true;
}
+
void VisualScriptPropertyGet::_update_base_type() {
//cache it because this information may not be available on load
if (call_mode == CALL_MODE_NODE_PATH) {
@@ -1589,6 +1598,7 @@ void VisualScriptPropertyGet::_update_base_type() {
}
}
}
+
Node *VisualScriptPropertyGet::_get_base_node() const {
#ifdef TOOLS_ENABLED
Ref<Script> script = get_visual_script();
@@ -1639,6 +1649,7 @@ StringName VisualScriptPropertyGet::_get_base_type() const {
int VisualScriptPropertyGet::get_input_value_port_count() const {
return (call_mode == CALL_MODE_BASIC_TYPE || call_mode == CALL_MODE_INSTANCE) ? 1 : 0;
}
+
int VisualScriptPropertyGet::get_output_value_port_count() const {
return 1;
}
@@ -1806,6 +1817,7 @@ void VisualScriptPropertyGet::set_property(const StringName &p_type) {
_change_notify();
ports_changed_notify();
}
+
StringName VisualScriptPropertyGet::get_property() const {
return property;
}
@@ -1833,6 +1845,7 @@ void VisualScriptPropertyGet::set_call_mode(CallMode p_mode) {
_update_base_type();
ports_changed_notify();
}
+
VisualScriptPropertyGet::CallMode VisualScriptPropertyGet::get_call_mode() const {
return call_mode;
}
@@ -2144,6 +2157,7 @@ int VisualScriptEmitSignal::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptEmitSignal::get_output_value_port_count() const {
return 0;
}
@@ -2181,6 +2195,7 @@ void VisualScriptEmitSignal::set_signal(const StringName &p_type) {
_change_notify();
ports_changed_notify();
}
+
StringName VisualScriptEmitSignal::get_signal() const {
return name;
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 8ae50c3b48..8d35da2685 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -143,6 +143,7 @@ bool VisualScriptFunction::_get(const StringName &p_name, Variant &r_ret) const
return false;
}
+
void VisualScriptFunction::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "argument_count", PROPERTY_HINT_RANGE, "0,256"));
String argt = "Any";
@@ -175,6 +176,7 @@ bool VisualScriptFunction::has_input_sequence_port() const {
int VisualScriptFunction::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptFunction::get_output_value_port_count() const {
return arguments.size();
}
@@ -186,6 +188,7 @@ String VisualScriptFunction::get_output_sequence_port_text(int p_port) const {
PropertyInfo VisualScriptFunction::get_input_value_port_info(int p_idx) const {
ERR_FAIL_V(PropertyInfo());
}
+
PropertyInfo VisualScriptFunction::get_output_value_port_info(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, arguments.size(), PropertyInfo());
PropertyInfo out;
@@ -217,26 +220,31 @@ void VisualScriptFunction::add_argument(Variant::Type p_type, const String &p_na
ports_changed_notify();
}
+
void VisualScriptFunction::set_argument_type(int p_argidx, Variant::Type p_type) {
ERR_FAIL_INDEX(p_argidx, arguments.size());
arguments.write[p_argidx].type = p_type;
ports_changed_notify();
}
+
Variant::Type VisualScriptFunction::get_argument_type(int p_argidx) const {
ERR_FAIL_INDEX_V(p_argidx, arguments.size(), Variant::NIL);
return arguments[p_argidx].type;
}
+
void VisualScriptFunction::set_argument_name(int p_argidx, const String &p_name) {
ERR_FAIL_INDEX(p_argidx, arguments.size());
arguments.write[p_argidx].name = p_name;
ports_changed_notify();
}
+
String VisualScriptFunction::get_argument_name(int p_argidx) const {
ERR_FAIL_INDEX_V(p_argidx, arguments.size(), String());
return arguments[p_argidx].name;
}
+
void VisualScriptFunction::remove_argument(int p_argidx) {
ERR_FAIL_INDEX(p_argidx, arguments.size());
@@ -335,6 +343,7 @@ int VisualScriptLists::get_output_sequence_port_count() const {
return 1;
return 0;
}
+
bool VisualScriptLists::has_input_sequence_port() const {
return sequenced;
}
@@ -346,6 +355,7 @@ String VisualScriptLists::get_output_sequence_port_text(int p_port) const {
int VisualScriptLists::get_input_value_port_count() const {
return inputports.size();
}
+
int VisualScriptLists::get_output_value_port_count() const {
return outputports.size();
}
@@ -358,6 +368,7 @@ PropertyInfo VisualScriptLists::get_input_value_port_info(int p_idx) const {
pi.type = inputports[p_idx].type;
return pi;
}
+
PropertyInfo VisualScriptLists::get_output_value_port_info(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, outputports.size(), PropertyInfo());
@@ -370,9 +381,11 @@ PropertyInfo VisualScriptLists::get_output_value_port_info(int p_idx) const {
bool VisualScriptLists::is_input_port_editable() const {
return ((flags & INPUT_EDITABLE) == INPUT_EDITABLE);
}
+
bool VisualScriptLists::is_input_port_name_editable() const {
return ((flags & INPUT_NAME_EDITABLE) == INPUT_NAME_EDITABLE);
}
+
bool VisualScriptLists::is_input_port_type_editable() const {
return ((flags & INPUT_TYPE_EDITABLE) == INPUT_TYPE_EDITABLE);
}
@@ -380,9 +393,11 @@ bool VisualScriptLists::is_input_port_type_editable() const {
bool VisualScriptLists::is_output_port_editable() const {
return ((flags & OUTPUT_EDITABLE) == OUTPUT_EDITABLE);
}
+
bool VisualScriptLists::is_output_port_name_editable() const {
return ((flags & INPUT_NAME_EDITABLE) == INPUT_NAME_EDITABLE);
}
+
bool VisualScriptLists::is_output_port_type_editable() const {
return ((flags & INPUT_TYPE_EDITABLE) == INPUT_TYPE_EDITABLE);
}
@@ -467,6 +482,7 @@ bool VisualScriptLists::_set(const StringName &p_name, const Variant &p_value) {
return false;
}
+
bool VisualScriptLists::_get(const StringName &p_name, Variant &r_ret) const {
if (p_name == "input_count" && is_input_port_editable()) {
r_ret = inputports.size();
@@ -511,6 +527,7 @@ bool VisualScriptLists::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void VisualScriptLists::_get_property_list(List<PropertyInfo> *p_list) const {
if (is_input_port_editable()) {
p_list->push_back(PropertyInfo(Variant::INT, "input_count", PROPERTY_HINT_RANGE, "0,256"));
@@ -556,6 +573,7 @@ void VisualScriptLists::add_input_data_port(Variant::Type p_type, const String &
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::set_input_data_port_type(int p_idx, Variant::Type p_type) {
if (!is_input_port_type_editable())
return;
@@ -566,6 +584,7 @@ void VisualScriptLists::set_input_data_port_type(int p_idx, Variant::Type p_type
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::set_input_data_port_name(int p_idx, const String &p_name) {
if (!is_input_port_name_editable())
return;
@@ -576,6 +595,7 @@ void VisualScriptLists::set_input_data_port_name(int p_idx, const String &p_name
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::remove_input_data_port(int p_argidx) {
if (!is_input_port_editable())
return;
@@ -604,6 +624,7 @@ void VisualScriptLists::add_output_data_port(Variant::Type p_type, const String
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::set_output_data_port_type(int p_idx, Variant::Type p_type) {
if (!is_output_port_type_editable())
return;
@@ -614,6 +635,7 @@ void VisualScriptLists::set_output_data_port_type(int p_idx, Variant::Type p_typ
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::set_output_data_port_name(int p_idx, const String &p_name) {
if (!is_output_port_name_editable())
return;
@@ -624,6 +646,7 @@ void VisualScriptLists::set_output_data_port_name(int p_idx, const String &p_nam
ports_changed_notify();
_change_notify();
}
+
void VisualScriptLists::remove_output_data_port(int p_argidx) {
if (!is_output_port_editable())
return;
@@ -643,6 +666,7 @@ void VisualScriptLists::set_sequenced(bool p_enable) {
sequenced = p_enable;
ports_changed_notify();
}
+
bool VisualScriptLists::is_sequenced() const {
return sequenced;
}
@@ -674,6 +698,7 @@ int VisualScriptComposeArray::get_output_sequence_port_count() const {
return 1;
return 0;
}
+
bool VisualScriptComposeArray::has_input_sequence_port() const {
return sequenced;
}
@@ -685,6 +710,7 @@ String VisualScriptComposeArray::get_output_sequence_port_text(int p_port) const
int VisualScriptComposeArray::get_input_value_port_count() const {
return inputports.size();
}
+
int VisualScriptComposeArray::get_output_value_port_count() const {
return 1;
}
@@ -697,6 +723,7 @@ PropertyInfo VisualScriptComposeArray::get_input_value_port_info(int p_idx) cons
pi.type = inputports[p_idx].type;
return pi;
}
+
PropertyInfo VisualScriptComposeArray::get_output_value_port_info(int p_idx) const {
PropertyInfo pi;
pi.name = "out";
@@ -707,6 +734,7 @@ PropertyInfo VisualScriptComposeArray::get_output_value_port_info(int p_idx) con
String VisualScriptComposeArray::get_caption() const {
return "Compose Array";
}
+
String VisualScriptComposeArray::get_text() const {
return "";
}
@@ -757,6 +785,7 @@ bool VisualScriptOperator::has_input_sequence_port() const {
int VisualScriptOperator::get_input_value_port_count() const {
return (op == Variant::OP_BIT_NEGATE || op == Variant::OP_NOT || op == Variant::OP_NEGATE || op == Variant::OP_POSITIVE) ? 1 : 2;
}
+
int VisualScriptOperator::get_output_value_port_count() const {
return 1;
}
@@ -807,6 +836,7 @@ PropertyInfo VisualScriptOperator::get_input_value_port_info(int p_idx) const {
pinfo.type = typed;
return pinfo;
}
+
PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
static const Variant::Type port_types[Variant::OP_MAX] = {
//comparison
@@ -1030,6 +1060,7 @@ bool VisualScriptSelect::has_input_sequence_port() const {
int VisualScriptSelect::get_input_value_port_count() const {
return 3;
}
+
int VisualScriptSelect::get_output_value_port_count() const {
return 1;
}
@@ -1047,6 +1078,7 @@ PropertyInfo VisualScriptSelect::get_input_value_port_info(int p_idx) const {
return PropertyInfo(typed, "b");
}
}
+
PropertyInfo VisualScriptSelect::get_output_value_port_info(int p_idx) const {
return PropertyInfo(typed, "out");
}
@@ -1122,6 +1154,7 @@ bool VisualScriptVariableGet::has_input_sequence_port() const {
int VisualScriptVariableGet::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptVariableGet::get_output_value_port_count() const {
return 1;
}
@@ -1149,6 +1182,7 @@ PropertyInfo VisualScriptVariableGet::get_output_value_port_info(int p_idx) cons
String VisualScriptVariableGet::get_caption() const {
return "Get " + variable;
}
+
void VisualScriptVariableGet::set_variable(StringName p_variable) {
if (variable == p_variable)
return;
@@ -1209,6 +1243,7 @@ VisualScriptNodeInstance *VisualScriptVariableGet::instance(VisualScriptInstance
instance->variable = variable;
return instance;
}
+
VisualScriptVariableGet::VisualScriptVariableGet() {
}
@@ -1227,6 +1262,7 @@ bool VisualScriptVariableSet::has_input_sequence_port() const {
int VisualScriptVariableSet::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptVariableSet::get_output_value_port_count() const {
return 0;
}
@@ -1317,6 +1353,7 @@ VisualScriptNodeInstance *VisualScriptVariableSet::instance(VisualScriptInstance
instance->variable = variable;
return instance;
}
+
VisualScriptVariableSet::VisualScriptVariableSet() {
}
@@ -1335,6 +1372,7 @@ bool VisualScriptConstant::has_input_sequence_port() const {
int VisualScriptConstant::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptConstant::get_output_value_port_count() const {
return 1;
}
@@ -1380,6 +1418,7 @@ void VisualScriptConstant::set_constant_value(Variant p_value) {
value = p_value;
ports_changed_notify();
}
+
Variant VisualScriptConstant::get_constant_value() const {
return value;
}
@@ -1444,6 +1483,7 @@ bool VisualScriptPreload::has_input_sequence_port() const {
int VisualScriptPreload::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptPreload::get_output_value_port_count() const {
return 1;
}
@@ -1534,6 +1574,7 @@ bool VisualScriptIndexGet::has_input_sequence_port() const {
int VisualScriptIndexGet::get_input_value_port_count() const {
return 2;
}
+
int VisualScriptIndexGet::get_output_value_port_count() const {
return 1;
}
@@ -1578,6 +1619,7 @@ VisualScriptNodeInstance *VisualScriptIndexGet::instance(VisualScriptInstance *p
VisualScriptNodeInstanceIndexGet *instance = memnew(VisualScriptNodeInstanceIndexGet);
return instance;
}
+
VisualScriptIndexGet::VisualScriptIndexGet() {
}
@@ -1596,6 +1638,7 @@ bool VisualScriptIndexSet::has_input_sequence_port() const {
int VisualScriptIndexSet::get_input_value_port_count() const {
return 3;
}
+
int VisualScriptIndexSet::get_output_value_port_count() const {
return 0;
}
@@ -1644,6 +1687,7 @@ VisualScriptNodeInstance *VisualScriptIndexSet::instance(VisualScriptInstance *p
VisualScriptNodeInstanceIndexSet *instance = memnew(VisualScriptNodeInstanceIndexSet);
return instance;
}
+
VisualScriptIndexSet::VisualScriptIndexSet() {
}
@@ -1662,6 +1706,7 @@ bool VisualScriptGlobalConstant::has_input_sequence_port() const {
int VisualScriptGlobalConstant::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptGlobalConstant::get_output_value_port_count() const {
return 1;
}
@@ -1743,6 +1788,7 @@ bool VisualScriptClassConstant::has_input_sequence_port() const {
int VisualScriptClassConstant::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptClassConstant::get_output_value_port_count() const {
return 1;
}
@@ -1871,6 +1917,7 @@ bool VisualScriptBasicTypeConstant::has_input_sequence_port() const {
int VisualScriptBasicTypeConstant::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptBasicTypeConstant::get_output_value_port_count() const {
return 1;
}
@@ -2035,6 +2082,7 @@ bool VisualScriptMathConstant::has_input_sequence_port() const {
int VisualScriptMathConstant::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptMathConstant::get_output_value_port_count() const {
return 1;
}
@@ -2125,6 +2173,7 @@ bool VisualScriptEngineSingleton::has_input_sequence_port() const {
int VisualScriptEngineSingleton::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptEngineSingleton::get_output_value_port_count() const {
return 1;
}
@@ -2232,6 +2281,7 @@ bool VisualScriptSceneNode::has_input_sequence_port() const {
int VisualScriptSceneNode::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptSceneNode::get_output_value_port_count() const {
return 1;
}
@@ -2411,6 +2461,7 @@ bool VisualScriptSceneTree::has_input_sequence_port() const {
int VisualScriptSceneTree::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptSceneTree::get_output_value_port_count() const {
return 1;
}
@@ -2497,6 +2548,7 @@ bool VisualScriptResourcePath::has_input_sequence_port() const {
int VisualScriptResourcePath::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptResourcePath::get_output_value_port_count() const {
return 1;
}
@@ -2571,6 +2623,7 @@ bool VisualScriptSelf::has_input_sequence_port() const {
int VisualScriptSelf::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptSelf::get_output_value_port_count() const {
return 1;
}
@@ -2660,6 +2713,7 @@ int VisualScriptCustomNode::get_input_value_port_count() const {
}
return 0;
}
+
int VisualScriptCustomNode::get_output_value_port_count() const {
if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_count")) {
return get_script_instance()->call("_get_output_value_port_count");
@@ -2869,6 +2923,7 @@ int VisualScriptSubCall::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptSubCall::get_output_value_port_count() const {
return 1;
}
@@ -2973,6 +3028,7 @@ bool VisualScriptComment::has_input_sequence_port() const {
int VisualScriptComment::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptComment::get_output_value_port_count() const {
return 0;
}
@@ -3014,6 +3070,7 @@ void VisualScriptComment::set_description(const String &p_description) {
description = p_description;
ports_changed_notify();
}
+
String VisualScriptComment::get_description() const {
return description;
}
@@ -3024,6 +3081,7 @@ void VisualScriptComment::set_size(const Size2 &p_size) {
size = p_size;
ports_changed_notify();
}
+
Size2 VisualScriptComment::get_size() const {
return size;
}
@@ -3084,6 +3142,7 @@ bool VisualScriptConstructor::has_input_sequence_port() const {
int VisualScriptConstructor::get_input_value_port_count() const {
return constructor.arguments.size();
}
+
int VisualScriptConstructor::get_output_value_port_count() const {
return 1;
}
@@ -3199,6 +3258,7 @@ bool VisualScriptLocalVar::has_input_sequence_port() const {
int VisualScriptLocalVar::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptLocalVar::get_output_value_port_count() const {
return 1;
}
@@ -3210,6 +3270,7 @@ String VisualScriptLocalVar::get_output_sequence_port_text(int p_port) const {
PropertyInfo VisualScriptLocalVar::get_input_value_port_info(int p_idx) const {
return PropertyInfo();
}
+
PropertyInfo VisualScriptLocalVar::get_output_value_port_info(int p_idx) const {
return PropertyInfo(type, name);
}
@@ -3299,6 +3360,7 @@ bool VisualScriptLocalVarSet::has_input_sequence_port() const {
int VisualScriptLocalVarSet::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptLocalVarSet::get_output_value_port_count() const {
return 1;
}
@@ -3310,6 +3372,7 @@ String VisualScriptLocalVarSet::get_output_sequence_port_text(int p_port) const
PropertyInfo VisualScriptLocalVarSet::get_input_value_port_info(int p_idx) const {
return PropertyInfo(type, "set");
}
+
PropertyInfo VisualScriptLocalVarSet::get_output_value_port_info(int p_idx) const {
return PropertyInfo(type, "get");
}
@@ -3404,6 +3467,7 @@ bool VisualScriptInputAction::has_input_sequence_port() const {
int VisualScriptInputAction::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptInputAction::get_output_value_port_count() const {
return 1;
}
@@ -3415,6 +3479,7 @@ String VisualScriptInputAction::get_output_sequence_port_text(int p_port) const
PropertyInfo VisualScriptInputAction::get_input_value_port_info(int p_idx) const {
return PropertyInfo();
}
+
PropertyInfo VisualScriptInputAction::get_output_value_port_info(int p_idx) const {
String mstr;
switch (mode) {
@@ -3462,6 +3527,7 @@ void VisualScriptInputAction::set_action_mode(Mode p_mode) {
mode = p_mode;
ports_changed_notify();
}
+
VisualScriptInputAction::Mode VisualScriptInputAction::get_action_mode() const {
return mode;
}
@@ -3569,6 +3635,7 @@ bool VisualScriptDeconstruct::has_input_sequence_port() const {
int VisualScriptDeconstruct::get_input_value_port_count() const {
return 1;
}
+
int VisualScriptDeconstruct::get_output_value_port_count() const {
return elements.size();
}
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index e87f42c6e9..a035efd25d 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -50,6 +50,7 @@ bool VisualScriptYield::has_input_sequence_port() const {
int VisualScriptYield::get_input_value_port_count() const {
return 0;
}
+
int VisualScriptYield::get_output_value_port_count() const {
return 0;
}
@@ -288,6 +289,7 @@ int VisualScriptYieldSignal::get_input_value_port_count() const {
else
return 0;
}
+
int VisualScriptYieldSignal::get_output_value_port_count() const {
MethodInfo sr;
@@ -357,6 +359,7 @@ void VisualScriptYieldSignal::set_signal(const StringName &p_type) {
_change_notify();
ports_changed_notify();
}
+
StringName VisualScriptYieldSignal::get_signal() const {
return signal;
}
@@ -543,6 +546,7 @@ VisualScriptNodeInstance *VisualScriptYieldSignal::instance(VisualScriptInstance
instance->output_args = get_output_value_port_count();
return instance;
}
+
VisualScriptYieldSignal::VisualScriptYieldSignal() {
call_mode = CALL_MODE_SELF;
base_type = "Object";
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 897900249e..47c54b61e9 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -147,6 +147,7 @@ void VideoStreamPlaybackWebm::stop() {
time = 0.0;
playing = false;
}
+
void VideoStreamPlaybackWebm::play() {
stop();
@@ -163,6 +164,7 @@ bool VideoStreamPlaybackWebm::is_playing() const {
void VideoStreamPlaybackWebm::set_paused(bool p_paused) {
paused = p_paused;
}
+
bool VideoStreamPlaybackWebm::is_paused() const {
return paused;
}
@@ -170,6 +172,7 @@ bool VideoStreamPlaybackWebm::is_paused() const {
void VideoStreamPlaybackWebm::set_loop(bool p_enable) {
//Empty
}
+
bool VideoStreamPlaybackWebm::has_loop() const {
return false;
}
@@ -183,6 +186,7 @@ float VideoStreamPlaybackWebm::get_length() const {
float VideoStreamPlaybackWebm::get_playback_position() const {
return video_pos;
}
+
void VideoStreamPlaybackWebm::seek(float p_time) {
//Not implemented
}
@@ -319,11 +323,13 @@ void VideoStreamPlaybackWebm::set_mix_callback(VideoStreamPlayback::AudioMixCall
mix_callback = p_callback;
mix_udata = p_userdata;
}
+
int VideoStreamPlaybackWebm::get_channels() const {
if (audio)
return webm->getChannels();
return 0;
}
+
int VideoStreamPlaybackWebm::get_mix_rate() const {
if (audio)
return webm->getSampleRate();
@@ -386,6 +392,7 @@ Ref<VideoStreamPlayback> VideoStreamWebm::instance_playback() {
void VideoStreamWebm::set_file(const String &p_file) {
file = p_file;
}
+
String VideoStreamWebm::get_file() {
return file;
}
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 57f577dca1..e0462c74a1 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -67,6 +67,7 @@ int WebSocketMultiplayerPeer::_gen_unique_id() const {
return hash;
}
+
void WebSocketMultiplayerPeer::_clear() {
_peer_map.clear();
if (_current_packet.data != nullptr)
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index 4095be00ab..df8b57fd3a 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -123,6 +123,7 @@ uint8_t FileAccessJAndroid::get_8() const {
get_buffer(&byte, 1);
return byte;
}
+
int FileAccessJAndroid::get_buffer(uint8_t *p_dst, int p_length) const {
ERR_FAIL_COND_V_MSG(!is_open(), 0, "File must be opened before use.");
if (p_length == 0)
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index 343af744d5..c768274b1f 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -282,6 +282,7 @@ Error ICloud::synchronize_key_values() {
return FAILED;
}
}
+
/*
Error ICloud::initial_sync() {
//you sometimes have to write something to the store to get it to download new data. go apple!
@@ -296,6 +297,7 @@ Error ICloud::initial_sync() {
}
return synchronize();
}
+
*/
ICloud::ICloud() {
ERR_FAIL_COND(instance != NULL);
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index f3e8ff141b..a2efd6691b 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -57,6 +57,7 @@ NSMutableDictionary *pending_transactions = [NSMutableDictionary dictionary];
[numberFormatter release];
return formattedString;
}
+
@end
InAppStore *InAppStore::instance = NULL;
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index 758e48ce81..b95674efc3 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -673,6 +673,7 @@ bool DisplayServerJavaScript::is_joy_known(int p_device) {
return Input::get_singleton()->is_joy_mapped(p_device);
}
+
String DisplayServerJavaScript::get_joy_guid(int p_device) const {
return Input::get_singleton()->get_joy_guid_remapped(p_device);
@@ -1076,6 +1077,7 @@ void DisplayServerJavaScript::window_set_current_screen(int p_screen, WindowID p
Point2i DisplayServerJavaScript::window_get_position(WindowID p_window) const {
return Point2i(); // TODO Does this need implementation?
}
+
void DisplayServerJavaScript::window_set_position(const Point2i &p_position, WindowID p_window) {
// Not supported.
}
diff --git a/platform/linuxbsd/context_gl_x11.cpp b/platform/linuxbsd/context_gl_x11.cpp
index c9b95b41a3..71dc9602b3 100644
--- a/platform/linuxbsd/context_gl_x11.cpp
+++ b/platform/linuxbsd/context_gl_x11.cpp
@@ -227,6 +227,7 @@ void ContextGL_X11::set_use_vsync(bool p_use) {
return;
use_vsync = p_use;
}
+
bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index e2f0a53f0f..813acc5b0e 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -127,6 +127,7 @@ bool DisplayServerX11::has_feature(Feature p_feature) const {
return false;
}
+
String DisplayServerX11::get_name() const {
return "X11";
}
@@ -400,6 +401,7 @@ void DisplayServerX11::mouse_set_mode(MouseMode p_mode) {
XFlush(x11_display);
}
+
DisplayServerX11::MouseMode DisplayServerX11::mouse_get_mode() const {
return mouse_mode;
}
@@ -547,6 +549,7 @@ int DisplayServerX11::get_screen_count() const {
XFree(xsi);
return count;
}
+
Point2i DisplayServerX11::screen_get_position(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -644,6 +647,7 @@ int DisplayServerX11::screen_get_dpi(int p_screen) const {
//could not get dpi
return 96;
}
+
bool DisplayServerX11::screen_is_touchscreen(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -760,6 +764,7 @@ void DisplayServerX11::window_set_input_event_callback(const Callable &p_callabl
WindowData &wd = windows[p_window];
wd.input_event_callback = p_callable;
}
+
void DisplayServerX11::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -795,6 +800,7 @@ int DisplayServerX11::window_get_current_screen(WindowID p_window) const {
}
return 0;
}
+
void DisplayServerX11::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -926,6 +932,7 @@ void DisplayServerX11::window_set_max_size(const Size2i p_size, WindowID p_windo
XFlush(x11_display);
}
}
+
Size2i DisplayServerX11::window_get_max_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -967,6 +974,7 @@ void DisplayServerX11::window_set_min_size(const Size2i p_size, WindowID p_windo
XFlush(x11_display);
}
}
+
Size2i DisplayServerX11::window_get_min_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1037,6 +1045,7 @@ void DisplayServerX11::window_set_size(const Size2i p_size, WindowID p_window) {
usleep(10000);
}
}
+
Size2i DisplayServerX11::window_get_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1044,6 +1053,7 @@ Size2i DisplayServerX11::window_get_size(WindowID p_window) const {
const WindowData &wd = windows[p_window];
return wd.size;
}
+
Size2i DisplayServerX11::window_get_real_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1533,6 +1543,7 @@ void DisplayServerX11::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo
}
}
}
+
bool DisplayServerX11::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1627,6 +1638,7 @@ bool DisplayServerX11::window_can_draw(WindowID p_window) const {
//this seems to be all that is provided by X11
return window_get_mode(p_window) != WINDOW_MODE_MINIMIZED;
}
+
bool DisplayServerX11::can_any_window_draw() const {
_THREAD_SAFE_METHOD_
@@ -1657,6 +1669,7 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win
XUnsetICFocus(wd.xic);
}
}
+
void DisplayServerX11::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1699,9 +1712,11 @@ void DisplayServerX11::cursor_set_shape(CursorShape p_shape) {
current_cursor = p_shape;
}
+
DisplayServerX11::CursorShape DisplayServerX11::cursor_get_shape() const {
return current_cursor;
}
+
void DisplayServerX11::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
_THREAD_SAFE_METHOD_
@@ -2277,6 +2292,7 @@ void DisplayServerX11::_send_window_event(const WindowData &wd, WindowEvent p_ev
wd.event_callback.call((const Variant **)&eventp, 1, ret, ce);
}
}
+
void DisplayServerX11::process_events() {
_THREAD_SAFE_METHOD_
@@ -2958,6 +2974,7 @@ void DisplayServerX11::_update_context(WindowData &wd) {
XFree(classHint);
}
}
+
void DisplayServerX11::set_context(Context p_context) {
_THREAD_SAFE_METHOD_
@@ -2967,6 +2984,7 @@ void DisplayServerX11::set_context(Context p_context) {
_update_context(E->get());
}
}
+
void DisplayServerX11::set_native_icon(const String &p_filename) {
WARN_PRINT("Native icon not supported by this display server.");
}
@@ -3712,6 +3730,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
r_error = OK;
}
+
DisplayServerX11::~DisplayServerX11() {
//destroy all windows
for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) {
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 46ddc23d8a..1cdcdbcaf5 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -149,6 +149,7 @@ static NSCursor *_cursorFromSelector(SEL selector, SEL fallback = nil) {
Variant meta;
bool checkable;
}
+
@end
@implementation GlobalMenuItem
@@ -1422,6 +1423,7 @@ inline void sendPanEvent(DisplayServer::WindowID window_id, double dx, double dy
@interface GodotWindow : NSWindow {
}
+
@end
@implementation GodotWindow
diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp
index 52cceae3fd..d342d30097 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/osx/joypad_osx.cpp
@@ -98,6 +98,7 @@ int joypad::get_hid_element_state(rec_element *p_element) const {
}
return value;
}
+
void joypad::add_hid_element(IOHIDElementRef p_element) {
const CFTypeID elementTypeID = p_element ? CFGetTypeID(p_element) : 0;
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index bcf0deeba9..fbe526ef6d 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -44,6 +44,7 @@
int OS_Server::get_video_driver_count() const {
return 1;
}
+
const char *OS_Server::get_video_driver_name(int p_driver) const {
return "Dummy";
}
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index c99ce5ee16..6090d13854 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -396,6 +396,7 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
os->queue_key_event(ke);
}
+
void App::OnKeyDown(CoreWindow ^ sender, KeyEventArgs ^ args) {
key_event(sender, true, args);
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 2104cacb6e..7e4d17f5e7 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -444,9 +444,11 @@ void OS_UWP::set_window_title(const String &p_title) {
void OS_UWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
video_mode = p_video_mode;
}
+
OS::VideoMode OS_UWP::get_video_mode(int p_screen) const {
return video_mode;
}
+
void OS_UWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
@@ -469,6 +471,7 @@ OS::Date OS_UWP::get_date(bool utc) const {
date.dst = false;
return date;
}
+
OS::Time OS_UWP::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -529,6 +532,7 @@ void OS_UWP::delay_usec(uint32_t p_usec) const {
// no Sleep()
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
}
+
uint64_t OS_UWP::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 2637702fab..114b64855e 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -110,6 +110,7 @@ void DisplayServerWindows::_set_mouse_mode_impl(MouseMode p_mode) {
cursor_set_shape(c);
}
}
+
void DisplayServerWindows::mouse_set_mode(MouseMode p_mode) {
_THREAD_SAFE_METHOD_
@@ -120,6 +121,7 @@ void DisplayServerWindows::mouse_set_mode(MouseMode p_mode) {
mouse_mode = p_mode;
}
+
DisplayServer::MouseMode DisplayServerWindows::mouse_get_mode() const {
return mouse_mode;
}
@@ -143,12 +145,14 @@ void DisplayServerWindows::mouse_warp_to_position(const Point2i &p_to) {
SetCursorPos(p.x, p.y);
}
}
+
Point2i DisplayServerWindows::mouse_get_position() const {
POINT p;
GetCursorPos(&p);
return Point2i(p.x, p.y);
//return Point2(old_x, old_y);
}
+
int DisplayServerWindows::mouse_get_button_state() const {
return last_button_state;
}
@@ -192,6 +196,7 @@ void DisplayServerWindows::clipboard_set(const String &p_text) {
CloseClipboard();
}
+
String DisplayServerWindows::clipboard_get() const {
_THREAD_SAFE_METHOD_
@@ -276,6 +281,7 @@ static BOOL CALLBACK _MonitorEnumProcPos(HMONITOR hMonitor, HDC hdcMonitor, LPRE
data->count++;
return TRUE;
}
+
Point2i DisplayServerWindows::screen_get_position(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -416,6 +422,7 @@ int DisplayServerWindows::screen_get_dpi(int p_screen) const {
EnumDisplayMonitors(nullptr, nullptr, _MonitorEnumProcDpi, (LPARAM)&data);
return data.dpi;
}
+
bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
#ifndef _MSC_VER
#warning touchscreen not working
@@ -425,12 +432,14 @@ bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
void DisplayServerWindows::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
}
+
DisplayServer::ScreenOrientation DisplayServerWindows::screen_get_orientation(int p_screen) const {
return SCREEN_LANDSCAPE;
}
void DisplayServerWindows::screen_set_keep_on(bool p_enable) {
}
+
bool DisplayServerWindows::screen_is_kept_on() const {
return false;
}
@@ -489,6 +498,7 @@ DisplayServer::WindowID DisplayServerWindows::create_sub_window(WindowMode p_mod
return window_id;
}
+
void DisplayServerWindows::delete_sub_window(WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -546,12 +556,14 @@ void DisplayServerWindows::window_set_window_event_callback(const Callable &p_ca
ERR_FAIL_COND(!windows.has(p_window));
windows[p_window].event_callback = p_callable;
}
+
void DisplayServerWindows::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
windows[p_window].input_event_callback = p_callable;
}
+
void DisplayServerWindows::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -582,6 +594,7 @@ int DisplayServerWindows::window_get_current_screen(WindowID p_window) const {
EnumDisplayMonitors(nullptr, nullptr, _MonitorEnumProcScreen, (LPARAM)&data);
return data.screen;
}
+
void DisplayServerWindows::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -617,6 +630,7 @@ Point2i DisplayServerWindows::window_get_position(WindowID p_window) const {
return Point2(r.left, r.top);
#endif
}
+
void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
POINT mouse_pos;
if (GetCursorPos(&mouse_pos) && ScreenToClient(windows[p_window].hWnd, &mouse_pos)) {
@@ -628,6 +642,7 @@ void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
}
}
}
+
void DisplayServerWindows::window_set_position(const Point2i &p_position, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -716,6 +731,7 @@ void DisplayServerWindows::window_set_max_size(const Size2i p_size, WindowID p_w
}
wd.max_size = p_size;
}
+
Size2i DisplayServerWindows::window_get_max_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -736,6 +752,7 @@ void DisplayServerWindows::window_set_min_size(const Size2i p_size, WindowID p_w
}
wd.min_size = p_size;
}
+
Size2i DisplayServerWindows::window_get_min_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -788,6 +805,7 @@ void DisplayServerWindows::window_set_size(const Size2i p_size, WindowID p_windo
ClipCursor(&crect);
}
}
+
Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -804,6 +822,7 @@ Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
}
return Size2();
}
+
Size2i DisplayServerWindows::window_get_real_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -938,6 +957,7 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
MoveWindow(wd.hWnd, pos.x, pos.y, size.width, size.height, TRUE);
}
}
+
DisplayServer::WindowMode DisplayServerWindows::window_get_mode(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1038,6 +1058,7 @@ void DisplayServerWindows::window_request_attention(WindowID p_window) {
info.uCount = 2;
FlashWindowEx(&info);
}
+
void DisplayServerWindows::window_move_to_foreground(WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1081,6 +1102,7 @@ void DisplayServerWindows::window_set_ime_active(const bool p_active, WindowID p
ImmAssociateContext(wd.hWnd, (HIMC)0);
}
}
+
void DisplayServerWindows::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1109,6 +1131,7 @@ void DisplayServerWindows::console_set_visible(bool p_enabled) {
ShowWindow(GetConsoleWindow(), p_enabled ? SW_SHOW : SW_HIDE);
console_visible = p_enabled;
}
+
bool DisplayServerWindows::is_console_visible() const {
return console_visible;
}
@@ -1154,6 +1177,7 @@ void DisplayServerWindows::cursor_set_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
+
DisplayServer::CursorShape DisplayServerWindows::cursor_get_shape() const {
return cursor_shape;
}
@@ -1444,8 +1468,10 @@ void DisplayServerWindows::force_process_and_drop_events() {
void DisplayServerWindows::release_rendering_thread() {
}
+
void DisplayServerWindows::make_rendering_thread() {
}
+
void DisplayServerWindows::swap_buffers() {
}
@@ -1542,6 +1568,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
memdelete(f);
memdelete(icon_dir);
}
+
void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
_THREAD_SAFE_METHOD_
@@ -1595,6 +1622,7 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
void DisplayServerWindows::vsync_set_use_via_compositor(bool p_enable) {
}
+
bool DisplayServerWindows::vsync_is_using_via_compositor() const {
return false;
}
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp
index 38a4065ef9..0cff12ca8c 100644
--- a/platform/windows/joypad_windows.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -45,6 +45,7 @@
DWORD WINAPI _xinput_get_state(DWORD dwUserIndex, XINPUT_STATE *pState) {
return ERROR_DEVICE_NOT_CONNECTED;
}
+
DWORD WINAPI _xinput_set_state(DWORD dwUserIndex, XINPUT_VIBRATION *pVibration) {
return ERROR_DEVICE_NOT_CONNECTED;
}
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 76e23820aa..7c06e93a8a 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -309,6 +309,7 @@ OS::Date OS_Windows::get_date(bool utc) const {
date.dst = false;
return date;
}
+
OS::Time OS_Windows::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -399,6 +400,7 @@ void OS_Windows::delay_usec(uint32_t p_usec) const {
else
Sleep(p_usec / 1000);
}
+
uint64_t OS_Windows::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 842740aa5e..54477758f4 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -128,6 +128,7 @@ void SpriteFrames::remove_frame(const StringName &p_anim, int p_idx) {
E->get().frames.remove(p_idx);
emit_changed();
}
+
void SpriteFrames::clear(const StringName &p_anim) {
Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist.");
@@ -152,6 +153,7 @@ void SpriteFrames::add_animation(const StringName &p_anim) {
bool SpriteFrames::has_animation(const StringName &p_anim) const {
return animations.has(p_anim);
}
+
void SpriteFrames::remove_animation(const StringName &p_anim) {
animations.erase(p_anim);
}
@@ -199,6 +201,7 @@ void SpriteFrames::set_animation_speed(const StringName &p_anim, float p_fps) {
ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist.");
E->get().speed = p_fps;
}
+
float SpriteFrames::get_animation_speed(const StringName &p_anim) const {
const Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist.");
@@ -210,6 +213,7 @@ void SpriteFrames::set_animation_loop(const StringName &p_anim, bool p_loop) {
ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist.");
E->get().loop = p_loop;
}
+
bool SpriteFrames::get_animation_loop(const StringName &p_anim) const {
const Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_V_MSG(!E, false, "Animation '" + String(p_anim) + "' doesn't exist.");
@@ -225,6 +229,7 @@ void SpriteFrames::_set_frames(const Array &p_frames) {
for (int i = 0; i < E->get().frames.size(); i++)
E->get().frames.write[i] = p_frames[i];
}
+
Array SpriteFrames::_get_frames() const {
return Array();
}
@@ -246,6 +251,7 @@ Array SpriteFrames::_get_animations() const {
return anims;
}
+
void SpriteFrames::_set_animations(const Array &p_animations) {
animations.clear();
for (int i = 0; i < p_animations.size(); i++) {
@@ -489,6 +495,7 @@ void AnimatedSprite2D::set_frame(int p_frame) {
_change_notify("frame");
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
+
int AnimatedSprite2D::get_frame() const {
return frame;
}
@@ -523,6 +530,7 @@ void AnimatedSprite2D::set_offset(const Point2 &p_offset) {
item_rect_changed();
_change_notify("offset");
}
+
Point2 AnimatedSprite2D::get_offset() const {
return offset;
}
@@ -531,6 +539,7 @@ void AnimatedSprite2D::set_flip_h(bool p_flip) {
hflip = p_flip;
update();
}
+
bool AnimatedSprite2D::is_flipped_h() const {
return hflip;
}
@@ -539,6 +548,7 @@ void AnimatedSprite2D::set_flip_v(bool p_flip) {
vflip = p_flip;
update();
}
+
bool AnimatedSprite2D::is_flipped_v() const {
return vflip;
}
@@ -613,6 +623,7 @@ void AnimatedSprite2D::set_animation(const StringName &p_animation) {
_change_notify();
update();
}
+
StringName AnimatedSprite2D::get_animation() const {
return animation;
}
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 90af1ff274..9a3b6c2611 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -38,6 +38,7 @@ void Area2D::set_space_override_mode(SpaceOverride p_mode) {
space_override = p_mode;
PhysicsServer2D::get_singleton()->area_set_space_override_mode(get_rid(), PhysicsServer2D::AreaSpaceOverrideMode(p_mode));
}
+
Area2D::SpaceOverride Area2D::get_space_override_mode() const {
return space_override;
}
@@ -46,6 +47,7 @@ void Area2D::set_gravity_is_point(bool p_enabled) {
gravity_is_point = p_enabled;
PhysicsServer2D::get_singleton()->area_set_param(get_rid(), PhysicsServer2D::AREA_PARAM_GRAVITY_IS_POINT, p_enabled);
}
+
bool Area2D::is_gravity_a_point() const {
return gravity_is_point;
}
@@ -63,6 +65,7 @@ void Area2D::set_gravity_vector(const Vector2 &p_vec) {
gravity_vec = p_vec;
PhysicsServer2D::get_singleton()->area_set_param(get_rid(), PhysicsServer2D::AREA_PARAM_GRAVITY_VECTOR, p_vec);
}
+
Vector2 Area2D::get_gravity_vector() const {
return gravity_vec;
}
@@ -71,6 +74,7 @@ void Area2D::set_gravity(real_t p_gravity) {
gravity = p_gravity;
PhysicsServer2D::get_singleton()->area_set_param(get_rid(), PhysicsServer2D::AREA_PARAM_GRAVITY, p_gravity);
}
+
real_t Area2D::get_gravity() const {
return gravity;
}
@@ -79,6 +83,7 @@ void Area2D::set_linear_damp(real_t p_linear_damp) {
linear_damp = p_linear_damp;
PhysicsServer2D::get_singleton()->area_set_param(get_rid(), PhysicsServer2D::AREA_PARAM_LINEAR_DAMP, p_linear_damp);
}
+
real_t Area2D::get_linear_damp() const {
return linear_damp;
}
@@ -96,6 +101,7 @@ void Area2D::set_priority(real_t p_priority) {
priority = p_priority;
PhysicsServer2D::get_singleton()->area_set_param(get_rid(), PhysicsServer2D::AREA_PARAM_PRIORITY, p_priority);
}
+
real_t Area2D::get_priority() const {
return priority;
}
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index b1ca2912e9..eca48406ce 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -288,6 +288,7 @@ Ref<AudioStream> AudioStreamPlayer2D::get_stream() const {
void AudioStreamPlayer2D::set_volume_db(float p_volume) {
volume_db = p_volume;
}
+
float AudioStreamPlayer2D::get_volume_db() const {
return volume_db;
}
@@ -296,6 +297,7 @@ void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
}
+
float AudioStreamPlayer2D::get_pitch_scale() const {
return pitch_scale;
}
@@ -350,6 +352,7 @@ void AudioStreamPlayer2D::set_bus(const StringName &p_bus) {
bus = p_bus;
AudioServer::get_singleton()->unlock();
}
+
StringName AudioStreamPlayer2D::get_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == bus) {
@@ -362,6 +365,7 @@ StringName AudioStreamPlayer2D::get_bus() const {
void AudioStreamPlayer2D::set_autoplay(bool p_enable) {
autoplay = p_enable;
}
+
bool AudioStreamPlayer2D::is_autoplay_enabled() {
return autoplay;
}
@@ -372,6 +376,7 @@ void AudioStreamPlayer2D::_set_playing(bool p_enable) {
else
stop();
}
+
bool AudioStreamPlayer2D::_is_active() const {
return active;
}
@@ -406,6 +411,7 @@ float AudioStreamPlayer2D::get_max_distance() const {
void AudioStreamPlayer2D::set_attenuation(float p_curve) {
attenuation = p_curve;
}
+
float AudioStreamPlayer2D::get_attenuation() const {
return attenuation;
}
diff --git a/scene/2d/back_buffer_copy.cpp b/scene/2d/back_buffer_copy.cpp
index 0bcb42e563..a36e0a86e1 100644
--- a/scene/2d/back_buffer_copy.cpp
+++ b/scene/2d/back_buffer_copy.cpp
@@ -72,6 +72,7 @@ void BackBufferCopy::set_copy_mode(CopyMode p_mode) {
copy_mode = p_mode;
_update_copy_mode();
}
+
BackBufferCopy::CopyMode BackBufferCopy::get_copy_mode() const {
return copy_mode;
}
@@ -96,5 +97,6 @@ BackBufferCopy::BackBufferCopy() {
copy_mode = COPY_MODE_RECT;
_update_copy_mode();
}
+
BackBufferCopy::~BackBufferCopy() {
}
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index eeb87a7396..fc691c9ca6 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -517,6 +517,7 @@ void Camera2D::set_h_offset(float p_offset) {
h_offset_changed = true;
_update_scroll();
}
+
float Camera2D::get_h_offset() const {
return h_ofs;
}
diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp
index 2ed2eaef42..41db3f771a 100644
--- a/scene/2d/canvas_modulate.cpp
+++ b/scene/2d/canvas_modulate.cpp
@@ -68,6 +68,7 @@ void CanvasModulate::set_color(const Color &p_color) {
RS::get_singleton()->canvas_set_modulate(get_canvas(), color);
}
}
+
Color CanvasModulate::get_color() const {
return color;
}
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 2f20a48139..aa1c107dea 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -206,6 +206,7 @@ void CollisionObject2D::shape_owner_set_transform(uint32_t p_owner, const Transf
}
}
}
+
Transform2D CollisionObject2D::shape_owner_get_transform(uint32_t p_owner) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), Transform2D());
@@ -235,17 +236,20 @@ void CollisionObject2D::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape2
total_subshapes++;
}
+
int CollisionObject2D::shape_owner_get_shape_count(uint32_t p_owner) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), 0);
return shapes[p_owner].shapes.size();
}
+
Ref<Shape2D> CollisionObject2D::shape_owner_get_shape(uint32_t p_owner, int p_shape) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), Ref<Shape2D>());
ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), Ref<Shape2D>());
return shapes[p_owner].shapes[p_shape].shape;
}
+
int CollisionObject2D::shape_owner_get_shape_index(uint32_t p_owner, int p_shape) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), -1);
ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), -1);
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index e5acfafa21..ebbda63e7b 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -270,6 +270,7 @@ void CollisionPolygon2D::set_one_way_collision_margin(float p_margin) {
float CollisionPolygon2D::get_one_way_collision_margin() const {
return one_way_collision_margin;
}
+
void CollisionPolygon2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_polygon", "polygon"), &CollisionPolygon2D::set_polygon);
ClassDB::bind_method(D_METHOD("get_polygon"), &CollisionPolygon2D::get_polygon);
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index ecc78809e7..e7129f39e7 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -62,6 +62,7 @@ void CPUParticles2D::set_amount(int p_amount) {
particle_order.resize(p_amount);
}
+
void CPUParticles2D::set_lifetime(float p_lifetime) {
ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0.");
lifetime = p_lifetime;
@@ -74,15 +75,19 @@ void CPUParticles2D::set_one_shot(bool p_one_shot) {
void CPUParticles2D::set_pre_process_time(float p_time) {
pre_process_time = p_time;
}
+
void CPUParticles2D::set_explosiveness_ratio(float p_ratio) {
explosiveness_ratio = p_ratio;
}
+
void CPUParticles2D::set_randomness_ratio(float p_ratio) {
randomness_ratio = p_ratio;
}
+
void CPUParticles2D::set_lifetime_randomness(float p_random) {
lifetime_randomness = p_random;
}
+
void CPUParticles2D::set_use_local_coordinates(bool p_enable) {
local_coords = p_enable;
set_notify_transform(!p_enable);
@@ -95,12 +100,15 @@ void CPUParticles2D::set_speed_scale(float p_scale) {
bool CPUParticles2D::is_emitting() const {
return emitting;
}
+
int CPUParticles2D::get_amount() const {
return particles.size();
}
+
float CPUParticles2D::get_lifetime() const {
return lifetime;
}
+
bool CPUParticles2D::get_one_shot() const {
return one_shot;
}
@@ -108,12 +116,15 @@ bool CPUParticles2D::get_one_shot() const {
float CPUParticles2D::get_pre_process_time() const {
return pre_process_time;
}
+
float CPUParticles2D::get_explosiveness_ratio() const {
return explosiveness_ratio;
}
+
float CPUParticles2D::get_randomness_ratio() const {
return randomness_ratio;
}
+
float CPUParticles2D::get_lifetime_randomness() const {
return lifetime_randomness;
}
@@ -294,6 +305,7 @@ void CPUParticles2D::set_param(Parameter p_param, float p_value) {
parameters[p_param] = p_value;
}
+
float CPUParticles2D::get_param(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -305,6 +317,7 @@ void CPUParticles2D::set_param_randomness(Parameter p_param, float p_value) {
randomness[p_param] = p_value;
}
+
float CPUParticles2D::get_param_randomness(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -363,6 +376,7 @@ void CPUParticles2D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
}
}
}
+
Ref<Curve> CPUParticles2D::get_param_curve(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, Ref<Curve>());
@@ -424,12 +438,15 @@ void CPUParticles2D::set_emission_colors(const Vector<Color> &p_colors) {
float CPUParticles2D::get_emission_sphere_radius() const {
return emission_sphere_radius;
}
+
Vector2 CPUParticles2D::get_emission_rect_extents() const {
return emission_rect_extents;
}
+
Vector<Vector2> CPUParticles2D::get_emission_points() const {
return emission_points;
}
+
Vector<Vector2> CPUParticles2D::get_emission_normals() const {
return emission_normals;
}
@@ -441,6 +458,7 @@ Vector<Color> CPUParticles2D::get_emission_colors() const {
CPUParticles2D::EmissionShape CPUParticles2D::get_emission_shape() const {
return emission_shape;
}
+
void CPUParticles2D::set_gravity(const Vector2 &p_gravity) {
gravity = p_gravity;
}
diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp
index a76114a6c3..dc50ea8f19 100644
--- a/scene/2d/gpu_particles_2d.cpp
+++ b/scene/2d/gpu_particles_2d.cpp
@@ -53,6 +53,7 @@ void GPUParticles2D::set_amount(int p_amount) {
amount = p_amount;
RS::get_singleton()->particles_set_amount(particles, amount);
}
+
void GPUParticles2D::set_lifetime(float p_lifetime) {
ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0.");
lifetime = p_lifetime;
@@ -72,18 +73,22 @@ void GPUParticles2D::set_one_shot(bool p_enable) {
if (!one_shot)
set_process_internal(false);
}
+
void GPUParticles2D::set_pre_process_time(float p_time) {
pre_process_time = p_time;
RS::get_singleton()->particles_set_pre_process_time(particles, pre_process_time);
}
+
void GPUParticles2D::set_explosiveness_ratio(float p_ratio) {
explosiveness_ratio = p_ratio;
RS::get_singleton()->particles_set_explosiveness_ratio(particles, explosiveness_ratio);
}
+
void GPUParticles2D::set_randomness_ratio(float p_ratio) {
randomness_ratio = p_ratio;
RS::get_singleton()->particles_set_randomness_ratio(particles, randomness_ratio);
}
+
void GPUParticles2D::set_visibility_rect(const Rect2 &p_visibility_rect) {
visibility_rect = p_visibility_rect;
AABB aabb;
@@ -97,6 +102,7 @@ void GPUParticles2D::set_visibility_rect(const Rect2 &p_visibility_rect) {
_change_notify("visibility_rect");
update();
}
+
void GPUParticles2D::set_use_local_coordinates(bool p_enable) {
local_coords = p_enable;
RS::get_singleton()->particles_set_use_local_coordinates(particles, local_coords);
@@ -140,9 +146,11 @@ void GPUParticles2D::set_speed_scale(float p_scale) {
bool GPUParticles2D::is_emitting() const {
return RS::get_singleton()->particles_get_emitting(particles);
}
+
int GPUParticles2D::get_amount() const {
return amount;
}
+
float GPUParticles2D::get_lifetime() const {
return lifetime;
}
@@ -150,21 +158,27 @@ float GPUParticles2D::get_lifetime() const {
bool GPUParticles2D::get_one_shot() const {
return one_shot;
}
+
float GPUParticles2D::get_pre_process_time() const {
return pre_process_time;
}
+
float GPUParticles2D::get_explosiveness_ratio() const {
return explosiveness_ratio;
}
+
float GPUParticles2D::get_randomness_ratio() const {
return randomness_ratio;
}
+
Rect2 GPUParticles2D::get_visibility_rect() const {
return visibility_rect;
}
+
bool GPUParticles2D::get_use_local_coordinates() const {
return local_coords;
}
+
Ref<Material> GPUParticles2D::get_process_material() const {
return process_material;
}
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 07a6926d4f..a67b951155 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -91,6 +91,7 @@ void Joint2D::set_node_b(const NodePath &p_node_b) {
b = p_node_b;
_update_joint();
}
+
NodePath Joint2D::get_node_b() const {
return b;
}
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index ed69a4544e..2bae6bbd48 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -149,6 +149,7 @@ void Light2D::set_color(const Color &p_color) {
color = p_color;
RS::get_singleton()->canvas_light_set_color(canvas_light, color);
}
+
Color Light2D::get_color() const {
return color;
}
@@ -189,6 +190,7 @@ void Light2D::set_z_range_min(int p_min_z) {
z_min = p_min_z;
RS::get_singleton()->canvas_light_set_z_range(canvas_light, z_min, z_max);
}
+
int Light2D::get_z_range_min() const {
return z_min;
}
@@ -197,6 +199,7 @@ void Light2D::set_z_range_max(int p_max_z) {
z_max = p_max_z;
RS::get_singleton()->canvas_light_set_z_range(canvas_light, z_min, z_max);
}
+
int Light2D::get_z_range_max() const {
return z_max;
}
@@ -205,6 +208,7 @@ void Light2D::set_layer_range_min(int p_min_layer) {
layer_min = p_min_layer;
RS::get_singleton()->canvas_light_set_layer_range(canvas_light, layer_min, layer_max);
}
+
int Light2D::get_layer_range_min() const {
return layer_min;
}
@@ -213,6 +217,7 @@ void Light2D::set_layer_range_max(int p_max_layer) {
layer_max = p_max_layer;
RS::get_singleton()->canvas_light_set_layer_range(canvas_light, layer_min, layer_max);
}
+
int Light2D::get_layer_range_max() const {
return layer_max;
}
@@ -248,6 +253,7 @@ void Light2D::set_shadow_enabled(bool p_enabled) {
shadow = p_enabled;
RS::get_singleton()->canvas_light_set_shadow_enabled(canvas_light, shadow);
}
+
bool Light2D::is_shadow_enabled() const {
return shadow;
}
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 29f23050da..1ab414c7ea 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -148,10 +148,12 @@ void NavigationPolygon::add_outline_at_index(const Vector<Vector2> &p_outline, i
int NavigationPolygon::get_polygon_count() const {
return polygons.size();
}
+
Vector<int> NavigationPolygon::get_polygon(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, polygons.size(), Vector<int>());
return polygons[p_idx].indices;
}
+
void NavigationPolygon::clear_polygons() {
polygons.clear();
{
@@ -216,6 +218,7 @@ void NavigationPolygon::clear_outlines() {
outlines.clear();
rect_cache_dirty = true;
}
+
void NavigationPolygon::make_polygons_from_outlines() {
{
MutexLock lock(navmesh_generation);
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index b500266620..388d64334d 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -219,6 +219,7 @@ float Node2D::get_rotation_degrees() const {
float Node2D::get_skew_degrees() const {
return Math::rad2deg(get_skew());
}
+
Size2 Node2D::get_scale() const {
if (_xform_dirty)
((Node2D *)this)->_update_xform_values();
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 23da6ced5b..0225fd55c2 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -102,6 +102,7 @@ void PhysicsBody2D::set_collision_mask_bit(int p_bit, bool p_value) {
mask &= ~(1 << p_bit);
set_collision_mask(mask);
}
+
bool PhysicsBody2D::get_collision_mask_bit(int p_bit) const {
return get_collision_mask() & (1 << p_bit);
}
@@ -168,6 +169,7 @@ void StaticBody2D::set_constant_angular_velocity(real_t p_vel) {
Vector2 StaticBody2D::get_constant_linear_velocity() const {
return constant_linear_velocity;
}
+
real_t StaticBody2D::get_constant_angular_velocity() const {
return constant_angular_velocity;
}
@@ -468,6 +470,7 @@ void RigidBody2D::set_mass(real_t p_mass) {
_change_notify("weight");
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_MASS, mass);
}
+
real_t RigidBody2D::get_mass() const {
return mass;
}
@@ -512,6 +515,7 @@ void RigidBody2D::set_gravity_scale(real_t p_gravity_scale) {
gravity_scale = p_gravity_scale;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_GRAVITY_SCALE, gravity_scale);
}
+
real_t RigidBody2D::get_gravity_scale() const {
return gravity_scale;
}
@@ -521,6 +525,7 @@ void RigidBody2D::set_linear_damp(real_t p_linear_damp) {
linear_damp = p_linear_damp;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_LINEAR_DAMP, linear_damp);
}
+
real_t RigidBody2D::get_linear_damp() const {
return linear_damp;
}
@@ -530,6 +535,7 @@ void RigidBody2D::set_angular_damp(real_t p_angular_damp) {
angular_damp = p_angular_damp;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_ANGULAR_DAMP, angular_damp);
}
+
real_t RigidBody2D::get_angular_damp() const {
return angular_damp;
}
@@ -567,6 +573,7 @@ void RigidBody2D::set_angular_velocity(real_t p_velocity) {
else
PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
}
+
real_t RigidBody2D::get_angular_velocity() const {
return angular_velocity;
}
@@ -578,6 +585,7 @@ void RigidBody2D::set_use_custom_integrator(bool p_enable) {
custom_integrator = p_enable;
PhysicsServer2D::get_singleton()->body_set_omit_force_integration(get_rid(), p_enable);
}
+
bool RigidBody2D::is_using_custom_integrator() {
return custom_integrator;
}
@@ -1105,9 +1113,11 @@ Vector2 KinematicBody2D::move_and_slide_with_snap(const Vector2 &p_linear_veloci
bool KinematicBody2D::is_on_floor() const {
return on_floor;
}
+
bool KinematicBody2D::is_on_wall() const {
return on_wall;
}
+
bool KinematicBody2D::is_on_ceiling() const {
return on_ceiling;
}
@@ -1217,6 +1227,7 @@ void KinematicBody2D::_notification(int p_what) {
set_notify_local_transform(true);
}
}
+
void KinematicBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "infinite_inertia", "exclude_raycast_shapes", "test_only"), &KinematicBody2D::_move, DEFVAL(true), DEFVAL(true), DEFVAL(false));
ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody2D::move_and_slide, DEFVAL(Vector2(0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)), DEFVAL(true));
@@ -1254,6 +1265,7 @@ KinematicBody2D::KinematicBody2D() :
on_wall = false;
sync_to_physics = false;
}
+
KinematicBody2D::~KinematicBody2D() {
if (motion_cache.is_valid()) {
motion_cache->owner = nullptr;
@@ -1271,15 +1283,19 @@ KinematicBody2D::~KinematicBody2D() {
Vector2 KinematicCollision2D::get_position() const {
return collision.collision;
}
+
Vector2 KinematicCollision2D::get_normal() const {
return collision.normal;
}
+
Vector2 KinematicCollision2D::get_travel() const {
return collision.travel;
}
+
Vector2 KinematicCollision2D::get_remainder() const {
return collision.remainder;
}
+
Object *KinematicCollision2D::get_local_shape() const {
if (!owner)
return nullptr;
@@ -1294,9 +1310,11 @@ Object *KinematicCollision2D::get_collider() const {
return nullptr;
}
+
ObjectID KinematicCollision2D::get_collider_id() const {
return collision.collider;
}
+
Object *KinematicCollision2D::get_collider_shape() const {
Object *collider = get_collider();
if (collider) {
@@ -1309,12 +1327,15 @@ Object *KinematicCollision2D::get_collider_shape() const {
return nullptr;
}
+
int KinematicCollision2D::get_collider_shape_index() const {
return collision.collider_shape;
}
+
Vector2 KinematicCollision2D::get_collider_velocity() const {
return collision.collider_vel;
}
+
Variant KinematicCollision2D::get_collider_metadata() const {
return Variant();
}
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index c05bbb3cd4..b4e3b9bc40 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -379,6 +379,7 @@ void Polygon2D::set_color(const Color &p_color) {
color = p_color;
update();
}
+
Color Polygon2D::get_color() const {
return color;
}
@@ -387,6 +388,7 @@ void Polygon2D::set_vertex_colors(const Vector<Color> &p_colors) {
vertex_colors = p_colors;
update();
}
+
Vector<Color> Polygon2D::get_vertex_colors() const {
return vertex_colors;
}
@@ -404,6 +406,7 @@ void Polygon2D::set_texture(const Ref<Texture2D> &p_texture) {
}*/
update();
}
+
Ref<Texture2D> Polygon2D::get_texture() const {
return texture;
}
@@ -448,6 +451,7 @@ void Polygon2D::set_texture_offset(const Vector2 &p_offset) {
tex_ofs = p_offset;
update();
}
+
Vector2 Polygon2D::get_texture_offset() const {
return tex_ofs;
}
@@ -456,6 +460,7 @@ void Polygon2D::set_texture_rotation(float p_rot) {
tex_rot = p_rot;
update();
}
+
float Polygon2D::get_texture_rotation() const {
return tex_rot;
}
@@ -463,6 +468,7 @@ float Polygon2D::get_texture_rotation() const {
void Polygon2D::set_texture_rotation_degrees(float p_rot) {
set_texture_rotation(Math::deg2rad(p_rot));
}
+
float Polygon2D::get_texture_rotation_degrees() const {
return Math::rad2deg(get_texture_rotation());
}
@@ -471,6 +477,7 @@ void Polygon2D::set_texture_scale(const Size2 &p_scale) {
tex_scale = p_scale;
update();
}
+
Size2 Polygon2D::get_texture_scale() const {
return tex_scale;
}
@@ -479,6 +486,7 @@ void Polygon2D::set_invert(bool p_invert) {
invert = p_invert;
update();
}
+
bool Polygon2D::get_invert() const {
return invert;
}
@@ -487,6 +495,7 @@ void Polygon2D::set_antialiased(bool p_antialiased) {
antialiased = p_antialiased;
update();
}
+
bool Polygon2D::get_antialiased() const {
return antialiased;
}
@@ -495,6 +504,7 @@ void Polygon2D::set_invert_border(float p_invert_border) {
invert_border = p_invert_border;
update();
}
+
float Polygon2D::get_invert_border() const {
return invert_border;
}
@@ -516,17 +526,21 @@ void Polygon2D::add_bone(const NodePath &p_path, const Vector<float> &p_weights)
bone.weights = p_weights;
bone_weights.push_back(bone);
}
+
int Polygon2D::get_bone_count() const {
return bone_weights.size();
}
+
NodePath Polygon2D::get_bone_path(int p_index) const {
ERR_FAIL_INDEX_V(p_index, bone_weights.size(), NodePath());
return bone_weights[p_index].path;
}
+
Vector<float> Polygon2D::get_bone_weights(int p_index) const {
ERR_FAIL_INDEX_V(p_index, bone_weights.size(), Vector<float>());
return bone_weights[p_index].weights;
}
+
void Polygon2D::erase_bone(int p_idx) {
ERR_FAIL_INDEX(p_idx, bone_weights.size());
bone_weights.remove(p_idx);
@@ -541,6 +555,7 @@ void Polygon2D::set_bone_weights(int p_index, const Vector<float> &p_weights) {
bone_weights.write[p_index].weights = p_weights;
update();
}
+
void Polygon2D::set_bone_path(int p_index, const NodePath &p_path) {
ERR_FAIL_INDEX(p_index, bone_weights.size());
bone_weights.write[p_index].path = p_path;
@@ -555,6 +570,7 @@ Array Polygon2D::_get_bones() const {
}
return bones;
}
+
void Polygon2D::_set_bones(const Array &p_bones) {
ERR_FAIL_COND(p_bones.size() & 1);
clear_bones();
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 707b6da67d..50d437f78b 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -69,6 +69,7 @@ bool RayCast2D::get_collision_mask_bit(int p_bit) const {
bool RayCast2D::is_colliding() const {
return collided;
}
+
Object *RayCast2D::get_collider() const {
if (against.is_null())
return nullptr;
@@ -79,9 +80,11 @@ Object *RayCast2D::get_collider() const {
int RayCast2D::get_collider_shape() const {
return against_shape;
}
+
Vector2 RayCast2D::get_collision_point() const {
return collision_point;
}
+
Vector2 RayCast2D::get_collision_normal() const {
return collision_normal;
}
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index e21f7ff836..2c041f7449 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -77,6 +77,7 @@ void Bone2D::_notification(int p_what) {
parent_bone = nullptr;
}
}
+
void Bone2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rest", "rest"), &Bone2D::set_rest);
ClassDB::bind_method(D_METHOD("get_rest"), &Bone2D::get_rest);
@@ -128,6 +129,7 @@ int Bone2D::get_index_in_skeleton() const {
skeleton->_update_bone_setup();
return skeleton_index;
}
+
String Bone2D::get_configuration_warning() const {
String warning = Node2D::get_configuration_warning();
if (!skeleton) {
@@ -268,6 +270,7 @@ void Skeleton2D::_notification(int p_what) {
RID Skeleton2D::get_skeleton() const {
return skeleton;
}
+
void Skeleton2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_bone_setup"), &Skeleton2D::_update_bone_setup);
ClassDB::bind_method(D_METHOD("_update_transform"), &Skeleton2D::_update_transform);
diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp
index 4df66057f0..ce350f167e 100644
--- a/scene/2d/sprite_2d.cpp
+++ b/scene/2d/sprite_2d.cpp
@@ -206,6 +206,7 @@ void Sprite2D::set_offset(const Point2 &p_offset) {
item_rect_changed();
_change_notify("offset");
}
+
Point2 Sprite2D::get_offset() const {
return offset;
}
@@ -214,6 +215,7 @@ void Sprite2D::set_flip_h(bool p_flip) {
hflip = p_flip;
update();
}
+
bool Sprite2D::is_flipped_h() const {
return hflip;
}
@@ -222,6 +224,7 @@ void Sprite2D::set_flip_v(bool p_flip) {
vflip = p_flip;
update();
}
+
bool Sprite2D::is_flipped_v() const {
return vflip;
}
@@ -298,6 +301,7 @@ void Sprite2D::set_vframes(int p_amount) {
item_rect_changed();
_change_notify();
}
+
int Sprite2D::get_vframes() const {
return vframes;
}
@@ -309,6 +313,7 @@ void Sprite2D::set_hframes(int p_amount) {
item_rect_changed();
_change_notify();
}
+
int Sprite2D::get_hframes() const {
return hframes;
}
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index fa66a2af22..7af3acd83e 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1014,6 +1014,7 @@ int TileMap::get_cell(int p_x, int p_y) const {
return E->get().id;
}
+
bool TileMap::is_cell_x_flipped(int p_x, int p_y) const {
PosKey pk(p_x, p_y);
@@ -1024,6 +1025,7 @@ bool TileMap::is_cell_x_flipped(int p_x, int p_y) const {
return E->get().flip_h;
}
+
bool TileMap::is_cell_y_flipped(int p_x, int p_y) const {
PosKey pk(p_x, p_y);
@@ -1034,6 +1036,7 @@ bool TileMap::is_cell_y_flipped(int p_x, int p_y) const {
return E->get().flip_v;
}
+
bool TileMap::is_cell_transposed(int p_x, int p_y) const {
PosKey pk(p_x, p_y);
@@ -1311,6 +1314,7 @@ void TileMap::set_collision_bounce(float p_bounce) {
}
}
}
+
float TileMap::get_collision_bounce() const {
return bounce;
}
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 6b03d86e8b..1f250bbdf6 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -333,6 +333,7 @@ void VisibilityEnabler2D::set_enabler(Enabler p_enabler, bool p_enable) {
ERR_FAIL_INDEX(p_enabler, ENABLER_MAX);
enabler[p_enabler] = p_enable;
}
+
bool VisibilityEnabler2D::is_enabler_enabled(Enabler p_enabler) const {
ERR_FAIL_INDEX_V(p_enabler, ENABLER_MAX, false);
return enabler[p_enabler];
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp
index 4592b12bf8..3b5b6c0dd6 100644
--- a/scene/3d/area_3d.cpp
+++ b/scene/3d/area_3d.cpp
@@ -38,6 +38,7 @@ void Area3D::set_space_override_mode(SpaceOverride p_mode) {
space_override = p_mode;
PhysicsServer3D::get_singleton()->area_set_space_override_mode(get_rid(), PhysicsServer3D::AreaSpaceOverrideMode(p_mode));
}
+
Area3D::SpaceOverride Area3D::get_space_override_mode() const {
return space_override;
}
@@ -46,6 +47,7 @@ void Area3D::set_gravity_is_point(bool p_enabled) {
gravity_is_point = p_enabled;
PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY_IS_POINT, p_enabled);
}
+
bool Area3D::is_gravity_a_point() const {
return gravity_is_point;
}
@@ -63,6 +65,7 @@ void Area3D::set_gravity_vector(const Vector3 &p_vec) {
gravity_vec = p_vec;
PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY_VECTOR, p_vec);
}
+
Vector3 Area3D::get_gravity_vector() const {
return gravity_vec;
}
@@ -71,13 +74,16 @@ void Area3D::set_gravity(real_t p_gravity) {
gravity = p_gravity;
PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY, p_gravity);
}
+
real_t Area3D::get_gravity() const {
return gravity;
}
+
void Area3D::set_linear_damp(real_t p_linear_damp) {
linear_damp = p_linear_damp;
PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_LINEAR_DAMP, p_linear_damp);
}
+
real_t Area3D::get_linear_damp() const {
return linear_damp;
}
@@ -95,6 +101,7 @@ void Area3D::set_priority(real_t p_priority) {
priority = p_priority;
PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_PRIORITY, p_priority);
}
+
real_t Area3D::get_priority() const {
return priority;
}
@@ -251,6 +258,7 @@ void Area3D::_clear_monitoring() {
}
}
}
+
void Area3D::_notification(int p_what) {
if (p_what == NOTIFICATION_EXIT_TREE) {
_clear_monitoring();
@@ -439,6 +447,7 @@ bool Area3D::overlaps_body(Node *p_body) const {
return false;
return E->get().in_tree;
}
+
void Area3D::set_collision_mask(uint32_t p_mask) {
collision_mask = p_mask;
PhysicsServer3D::get_singleton()->area_set_collision_mask(get_rid(), p_mask);
@@ -447,6 +456,7 @@ void Area3D::set_collision_mask(uint32_t p_mask) {
uint32_t Area3D::get_collision_mask() const {
return collision_mask;
}
+
void Area3D::set_collision_layer(uint32_t p_layer) {
collision_layer = p_layer;
PhysicsServer3D::get_singleton()->area_set_collision_layer(get_rid(), p_layer);
@@ -493,6 +503,7 @@ bool Area3D::is_overriding_audio_bus() const {
void Area3D::set_audio_bus(const StringName &p_audio_bus) {
audio_bus = p_audio_bus;
}
+
StringName Area3D::get_audio_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == audio_bus) {
@@ -505,6 +516,7 @@ StringName Area3D::get_audio_bus() const {
void Area3D::set_use_reverb_bus(bool p_enable) {
use_reverb_bus = p_enable;
}
+
bool Area3D::is_using_reverb_bus() const {
return use_reverb_bus;
}
@@ -512,6 +524,7 @@ bool Area3D::is_using_reverb_bus() const {
void Area3D::set_reverb_bus(const StringName &p_audio_bus) {
reverb_bus = p_audio_bus;
}
+
StringName Area3D::get_reverb_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == reverb_bus) {
@@ -524,6 +537,7 @@ StringName Area3D::get_reverb_bus() const {
void Area3D::set_reverb_amount(float p_amount) {
reverb_amount = p_amount;
}
+
float Area3D::get_reverb_amount() const {
return reverb_amount;
}
@@ -531,6 +545,7 @@ float Area3D::get_reverb_amount() const {
void Area3D::set_reverb_uniformity(float p_uniformity) {
reverb_uniformity = p_uniformity;
}
+
float Area3D::get_reverb_uniformity() const {
return reverb_uniformity;
}
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 83cf5b0142..4f37087d7e 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -645,6 +645,7 @@ Ref<AudioStream> AudioStreamPlayer3D::get_stream() const {
void AudioStreamPlayer3D::set_unit_db(float p_volume) {
unit_db = p_volume;
}
+
float AudioStreamPlayer3D::get_unit_db() const {
return unit_db;
}
@@ -652,6 +653,7 @@ float AudioStreamPlayer3D::get_unit_db() const {
void AudioStreamPlayer3D::set_unit_size(float p_volume) {
unit_size = p_volume;
}
+
float AudioStreamPlayer3D::get_unit_size() const {
return unit_size;
}
@@ -659,6 +661,7 @@ float AudioStreamPlayer3D::get_unit_size() const {
void AudioStreamPlayer3D::set_max_db(float p_boost) {
max_db = p_boost;
}
+
float AudioStreamPlayer3D::get_max_db() const {
return max_db;
}
@@ -667,6 +670,7 @@ void AudioStreamPlayer3D::set_pitch_scale(float p_pitch_scale) {
ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
}
+
float AudioStreamPlayer3D::get_pitch_scale() const {
return pitch_scale;
}
@@ -721,6 +725,7 @@ void AudioStreamPlayer3D::set_bus(const StringName &p_bus) {
bus = p_bus;
AudioServer::get_singleton()->unlock();
}
+
StringName AudioStreamPlayer3D::get_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == bus) {
@@ -733,6 +738,7 @@ StringName AudioStreamPlayer3D::get_bus() const {
void AudioStreamPlayer3D::set_autoplay(bool p_enable) {
autoplay = p_enable;
}
+
bool AudioStreamPlayer3D::is_autoplay_enabled() {
return autoplay;
}
@@ -743,6 +749,7 @@ void AudioStreamPlayer3D::_set_playing(bool p_enable) {
else
stop();
}
+
bool AudioStreamPlayer3D::_is_active() const {
return active;
}
@@ -813,6 +820,7 @@ float AudioStreamPlayer3D::get_emission_angle_filter_attenuation_db() const {
void AudioStreamPlayer3D::set_attenuation_filter_cutoff_hz(float p_hz) {
attenuation_filter_cutoff_hz = p_hz;
}
+
float AudioStreamPlayer3D::get_attenuation_filter_cutoff_hz() const {
return attenuation_filter_cutoff_hz;
}
@@ -820,6 +828,7 @@ float AudioStreamPlayer3D::get_attenuation_filter_cutoff_hz() const {
void AudioStreamPlayer3D::set_attenuation_filter_db(float p_db) {
attenuation_filter_db = p_db;
}
+
float AudioStreamPlayer3D::get_attenuation_filter_db() const {
return attenuation_filter_db;
}
@@ -1014,5 +1023,6 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() {
AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer3D::_bus_layout_changed));
set_disable_scale(true);
}
+
AudioStreamPlayer3D::~AudioStreamPlayer3D() {
}
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 8838295e93..33db919d49 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -52,6 +52,7 @@ void BakedLightmapData::add_user(const NodePath &p_path, const Rect2 &p_uv_scale
int BakedLightmapData::get_user_count() const {
return users.size();
}
+
NodePath BakedLightmapData::get_user_path(int p_user) const {
ERR_FAIL_INDEX_V(p_user, users.size(), NodePath());
return users[p_user].path;
@@ -142,9 +143,11 @@ void BakedLightmapData::set_capture_data(const AABB &p_bounds, bool p_interior,
PackedVector3Array BakedLightmapData::get_capture_points() const {
return RS::get_singleton()->lightmap_get_probe_capture_points(lightmap);
}
+
PackedColorArray BakedLightmapData::get_capture_sh() const {
return RS::get_singleton()->lightmap_get_probe_capture_sh(lightmap);
}
+
PackedInt32Array BakedLightmapData::get_capture_tetrahedra() const {
return RS::get_singleton()->lightmap_get_probe_capture_tetrahedra(lightmap);
}
@@ -181,6 +184,7 @@ Dictionary BakedLightmapData::_get_probe_data() const {
d["interior"] = is_interior();
return d;
}
+
void BakedLightmapData::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_user_data", "data"), &BakedLightmapData::_set_user_data);
ClassDB::bind_method(D_METHOD("_get_user_data"), &BakedLightmapData::_get_user_data);
@@ -569,6 +573,7 @@ void BakedLightmap::_plot_triangle_into_octree(GenProbesOctree *p_cell, float p_
}
}
}
+
void BakedLightmap::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, float p_cell_size, const Vector<Vector3> &probe_positions, LocalVector<Vector3> &new_probe_positions, HashMap<Vector3i, bool, Vector3iHash> &positions_used, const AABB &p_bounds) {
for (int i = 0; i < 8; i++) {
Vector3i pos = p_cell->offset;
@@ -608,6 +613,7 @@ void BakedLightmap::_gen_new_positions_from_octree(const GenProbesOctree *p_cell
}
}
}
+
BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, String p_image_data_path, Lightmapper::BakeStepFunc p_bake_step, void *p_bake_userdata) {
if (p_image_data_path == "" && (get_light_data().is_null() || !get_light_data()->get_path().is_resource_file())) {
return BAKE_ERROR_NO_SAVE_PATH;
@@ -1262,6 +1268,7 @@ BakedLightmap::BakeQuality BakedLightmap::get_bake_quality() const {
AABB BakedLightmap::get_aabb() const {
return AABB();
}
+
Vector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
@@ -1285,6 +1292,7 @@ bool BakedLightmap::is_directional() const {
void BakedLightmap::set_interior(bool p_enable) {
interior = p_enable;
}
+
bool BakedLightmap::is_interior() const {
return interior;
}
@@ -1309,6 +1317,7 @@ Ref<Sky> BakedLightmap::get_environment_custom_sky() const {
void BakedLightmap::set_environment_custom_color(const Color &p_color) {
environment_custom_color = p_color;
}
+
Color BakedLightmap::get_environment_custom_color() const {
return environment_custom_color;
}
@@ -1316,6 +1325,7 @@ Color BakedLightmap::get_environment_custom_color() const {
void BakedLightmap::set_environment_custom_energy(float p_energy) {
environment_custom_energy = p_energy;
}
+
float BakedLightmap::get_environment_custom_energy() const {
return environment_custom_energy;
}
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 0f7aa28bf3..99d3b68996 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -166,6 +166,7 @@ void Camera3D::set_perspective(float p_fovy_degrees, float p_z_near, float p_z_f
update_gizmo();
force_change = false;
}
+
void Camera3D::set_orthogonal(float p_size, float p_z_near, float p_z_far) {
if (!force_change && size == p_size && p_z_near == near && p_z_far == far && mode == PROJECTION_ORTHOGONAL)
return;
@@ -632,6 +633,7 @@ Vector3 Camera3D::get_doppler_tracked_velocity() const {
return Vector3();
}
}
+
Camera3D::Camera3D() {
camera = RenderingServer::get_singleton()->camera_create();
size = 1;
@@ -665,9 +667,11 @@ Camera3D::~Camera3D() {
void ClippedCamera3D::set_margin(float p_margin) {
margin = p_margin;
}
+
float ClippedCamera3D::get_margin() const {
return margin;
}
+
void ClippedCamera3D::set_process_mode(ProcessMode p_mode) {
if (process_mode == p_mode) {
return;
@@ -676,6 +680,7 @@ void ClippedCamera3D::set_process_mode(ProcessMode p_mode) {
set_process_internal(process_mode == CLIP_PROCESS_IDLE);
set_physics_process_internal(process_mode == CLIP_PROCESS_PHYSICS);
}
+
ClippedCamera3D::ProcessMode ClippedCamera3D::get_process_mode() const {
return process_mode;
}
@@ -855,6 +860,7 @@ void ClippedCamera3D::_bind_methods() {
BIND_ENUM_CONSTANT(CLIP_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(CLIP_PROCESS_IDLE);
}
+
ClippedCamera3D::ClippedCamera3D() {
margin = 0;
clip_offset = 0;
@@ -867,6 +873,7 @@ ClippedCamera3D::ClippedCamera3D() {
clip_to_areas = false;
clip_to_bodies = true;
}
+
ClippedCamera3D::~ClippedCamera3D() {
PhysicsServer3D::get_singleton()->free(pyramid_shape);
}
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index 9aaa182a13..f1ca3770e0 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -218,6 +218,7 @@ void CollisionObject3D::shape_owner_set_transform(uint32_t p_owner, const Transf
}
}
}
+
Transform CollisionObject3D::shape_owner_get_transform(uint32_t p_owner) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), Transform());
@@ -247,17 +248,20 @@ void CollisionObject3D::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape3
total_subshapes++;
}
+
int CollisionObject3D::shape_owner_get_shape_count(uint32_t p_owner) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), 0);
return shapes[p_owner].shapes.size();
}
+
Ref<Shape3D> CollisionObject3D::shape_owner_get_shape(uint32_t p_owner, int p_shape) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), Ref<Shape3D>());
ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), Ref<Shape3D>());
return shapes[p_owner].shapes[p_shape].shape;
}
+
int CollisionObject3D::shape_owner_get_shape_index(uint32_t p_owner, int p_shape) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), -1);
ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), -1);
diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp
index bf123fa417..4a87ce0def 100644
--- a/scene/3d/collision_polygon_3d.cpp
+++ b/scene/3d/collision_polygon_3d.cpp
@@ -165,6 +165,7 @@ String CollisionPolygon3D::get_configuration_warning() const {
bool CollisionPolygon3D::_is_editable_3d_polygon() const {
return true;
}
+
void CollisionPolygon3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_depth", "depth"), &CollisionPolygon3D::set_depth);
ClassDB::bind_method(D_METHOD("get_depth"), &CollisionPolygon3D::get_depth);
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index 631ab4e0f7..cd80607692 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -38,6 +38,7 @@
AABB CPUParticles3D::get_aabb() const {
return AABB();
}
+
Vector<Face3> CPUParticles3D::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
@@ -74,6 +75,7 @@ void CPUParticles3D::set_amount(int p_amount) {
particle_order.resize(p_amount);
}
+
void CPUParticles3D::set_lifetime(float p_lifetime) {
ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0.");
lifetime = p_lifetime;
@@ -86,18 +88,23 @@ void CPUParticles3D::set_one_shot(bool p_one_shot) {
void CPUParticles3D::set_pre_process_time(float p_time) {
pre_process_time = p_time;
}
+
void CPUParticles3D::set_explosiveness_ratio(float p_ratio) {
explosiveness_ratio = p_ratio;
}
+
void CPUParticles3D::set_randomness_ratio(float p_ratio) {
randomness_ratio = p_ratio;
}
+
void CPUParticles3D::set_lifetime_randomness(float p_random) {
lifetime_randomness = p_random;
}
+
void CPUParticles3D::set_use_local_coordinates(bool p_enable) {
local_coords = p_enable;
}
+
void CPUParticles3D::set_speed_scale(float p_scale) {
speed_scale = p_scale;
}
@@ -105,12 +112,15 @@ void CPUParticles3D::set_speed_scale(float p_scale) {
bool CPUParticles3D::is_emitting() const {
return emitting;
}
+
int CPUParticles3D::get_amount() const {
return particles.size();
}
+
float CPUParticles3D::get_lifetime() const {
return lifetime;
}
+
bool CPUParticles3D::get_one_shot() const {
return one_shot;
}
@@ -118,12 +128,15 @@ bool CPUParticles3D::get_one_shot() const {
float CPUParticles3D::get_pre_process_time() const {
return pre_process_time;
}
+
float CPUParticles3D::get_explosiveness_ratio() const {
return explosiveness_ratio;
}
+
float CPUParticles3D::get_randomness_ratio() const {
return randomness_ratio;
}
+
float CPUParticles3D::get_lifetime_randomness() const {
return lifetime_randomness;
}
@@ -246,6 +259,7 @@ float CPUParticles3D::get_spread() const {
void CPUParticles3D::set_flatness(float p_flatness) {
flatness = p_flatness;
}
+
float CPUParticles3D::get_flatness() const {
return flatness;
}
@@ -255,6 +269,7 @@ void CPUParticles3D::set_param(Parameter p_param, float p_value) {
parameters[p_param] = p_value;
}
+
float CPUParticles3D::get_param(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -266,6 +281,7 @@ void CPUParticles3D::set_param_randomness(Parameter p_param, float p_value) {
randomness[p_param] = p_value;
}
+
float CPUParticles3D::get_param_randomness(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -324,6 +340,7 @@ void CPUParticles3D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
}
}
}
+
Ref<Curve> CPUParticles3D::get_param_curve(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, Ref<Curve>());
@@ -387,12 +404,15 @@ void CPUParticles3D::set_emission_colors(const Vector<Color> &p_colors) {
float CPUParticles3D::get_emission_sphere_radius() const {
return emission_sphere_radius;
}
+
Vector3 CPUParticles3D::get_emission_box_extents() const {
return emission_box_extents;
}
+
Vector<Vector3> CPUParticles3D::get_emission_points() const {
return emission_points;
}
+
Vector<Vector3> CPUParticles3D::get_emission_normals() const {
return emission_normals;
}
@@ -404,6 +424,7 @@ Vector<Color> CPUParticles3D::get_emission_colors() const {
CPUParticles3D::EmissionShape CPUParticles3D::get_emission_shape() const {
return emission_shape;
}
+
void CPUParticles3D::set_gravity(const Vector3 &p_gravity) {
gravity = p_gravity;
}
diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp
index b97859f44a..fb72e10171 100644
--- a/scene/3d/decal.cpp
+++ b/scene/3d/decal.cpp
@@ -47,6 +47,7 @@ void Decal::set_texture(DecalTexture p_type, const Ref<Texture2D> &p_texture) {
RID texture_rid = p_texture.is_valid() ? p_texture->get_rid() : RID();
RS::get_singleton()->decal_set_texture(decal, RS::DecalTexture(p_type), texture_rid);
}
+
Ref<Texture2D> Decal::get_texture(DecalTexture p_type) const {
ERR_FAIL_INDEX_V(p_type, TEXTURE_MAX, Ref<Texture2D>());
return textures[p_type];
@@ -56,6 +57,7 @@ void Decal::set_emission_energy(float p_energy) {
emission_energy = p_energy;
RS::get_singleton()->decal_set_emission_energy(decal, emission_energy);
}
+
float Decal::get_emission_energy() const {
return emission_energy;
}
@@ -64,6 +66,7 @@ void Decal::set_albedo_mix(float p_mix) {
albedo_mix = p_mix;
RS::get_singleton()->decal_set_albedo_mix(decal, albedo_mix);
}
+
float Decal::get_albedo_mix() const {
return albedo_mix;
}
@@ -72,6 +75,7 @@ void Decal::set_upper_fade(float p_fade) {
upper_fade = p_fade;
RS::get_singleton()->decal_set_fade(decal, upper_fade, lower_fade);
}
+
float Decal::get_upper_fade() const {
return upper_fade;
}
@@ -80,6 +84,7 @@ void Decal::set_lower_fade(float p_fade) {
lower_fade = p_fade;
RS::get_singleton()->decal_set_fade(decal, upper_fade, lower_fade);
}
+
float Decal::get_lower_fade() const {
return lower_fade;
}
@@ -88,6 +93,7 @@ void Decal::set_normal_fade(float p_fade) {
normal_fade = p_fade;
RS::get_singleton()->decal_set_normal_fade(decal, normal_fade);
}
+
float Decal::get_normal_fade() const {
return normal_fade;
}
@@ -105,6 +111,7 @@ void Decal::set_enable_distance_fade(bool p_enable) {
distance_fade_enabled = p_enable;
RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length);
}
+
bool Decal::is_distance_fade_enabled() const {
return distance_fade_enabled;
}
@@ -113,6 +120,7 @@ void Decal::set_distance_fade_begin(float p_distance) {
distance_fade_begin = p_distance;
RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length);
}
+
float Decal::get_distance_fade_begin() const {
return distance_fade_begin;
}
@@ -121,6 +129,7 @@ void Decal::set_distance_fade_length(float p_length) {
distance_fade_length = p_length;
RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length);
}
+
float Decal::get_distance_fade_length() const {
return distance_fade_length;
}
@@ -129,6 +138,7 @@ void Decal::set_cull_mask(uint32_t p_layers) {
cull_mask = p_layers;
RS::get_singleton()->decal_set_cull_mask(decal, cull_mask);
}
+
uint32_t Decal::get_cull_mask() const {
return cull_mask;
}
@@ -139,6 +149,7 @@ AABB Decal::get_aabb() const {
aabb.size = extents * 2.0;
return aabb;
}
+
Vector<Face3> Decal::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 0ba1b3d984..97040f55ef 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -101,15 +101,19 @@ void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb,
AABB GIProbeData::get_bounds() const {
return bounds;
}
+
Vector3 GIProbeData::get_octree_size() const {
return octree_size;
}
+
Vector<uint8_t> GIProbeData::get_octree_cells() const {
return RS::get_singleton()->gi_probe_get_octree_cells(probe);
}
+
Vector<uint8_t> GIProbeData::get_data_cells() const {
return RS::get_singleton()->gi_probe_get_data_cells(probe);
}
+
Vector<uint8_t> GIProbeData::get_distance_field() const {
return RS::get_singleton()->gi_probe_get_distance_field(probe);
}
@@ -117,6 +121,7 @@ Vector<uint8_t> GIProbeData::get_distance_field() const {
Vector<int> GIProbeData::get_level_counts() const {
return RS::get_singleton()->gi_probe_get_level_counts(probe);
}
+
Transform GIProbeData::get_to_cell_xform() const {
return to_cell_xform;
}
@@ -417,6 +422,7 @@ Vector3i GIProbe::get_estimated_cell_size() const {
return Vector3i(axis_cell_size[0], axis_cell_size[1], axis_cell_size[2]);
}
+
void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
static const int subdiv_value[SUBDIV_MAX] = { 6, 7, 8, 9 };
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp
index 1ce25f1e6e..a87b57bd4d 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -38,6 +38,7 @@
AABB GPUParticles3D::get_aabb() const {
return AABB();
}
+
Vector<Face3> GPUParticles3D::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
@@ -57,6 +58,7 @@ void GPUParticles3D::set_amount(int p_amount) {
amount = p_amount;
RS::get_singleton()->particles_set_amount(particles, amount);
}
+
void GPUParticles3D::set_lifetime(float p_lifetime) {
ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0.");
lifetime = p_lifetime;
@@ -81,24 +83,29 @@ void GPUParticles3D::set_pre_process_time(float p_time) {
pre_process_time = p_time;
RS::get_singleton()->particles_set_pre_process_time(particles, pre_process_time);
}
+
void GPUParticles3D::set_explosiveness_ratio(float p_ratio) {
explosiveness_ratio = p_ratio;
RS::get_singleton()->particles_set_explosiveness_ratio(particles, explosiveness_ratio);
}
+
void GPUParticles3D::set_randomness_ratio(float p_ratio) {
randomness_ratio = p_ratio;
RS::get_singleton()->particles_set_randomness_ratio(particles, randomness_ratio);
}
+
void GPUParticles3D::set_visibility_aabb(const AABB &p_aabb) {
visibility_aabb = p_aabb;
RS::get_singleton()->particles_set_custom_aabb(particles, visibility_aabb);
update_gizmo();
_change_notify("visibility_aabb");
}
+
void GPUParticles3D::set_use_local_coordinates(bool p_enable) {
local_coords = p_enable;
RS::get_singleton()->particles_set_use_local_coordinates(particles, local_coords);
}
+
void GPUParticles3D::set_process_material(const Ref<Material> &p_material) {
process_material = p_material;
RID material_rid;
@@ -117,12 +124,15 @@ void GPUParticles3D::set_speed_scale(float p_scale) {
bool GPUParticles3D::is_emitting() const {
return RS::get_singleton()->particles_get_emitting(particles);
}
+
int GPUParticles3D::get_amount() const {
return amount;
}
+
float GPUParticles3D::get_lifetime() const {
return lifetime;
}
+
bool GPUParticles3D::get_one_shot() const {
return one_shot;
}
@@ -130,18 +140,23 @@ bool GPUParticles3D::get_one_shot() const {
float GPUParticles3D::get_pre_process_time() const {
return pre_process_time;
}
+
float GPUParticles3D::get_explosiveness_ratio() const {
return explosiveness_ratio;
}
+
float GPUParticles3D::get_randomness_ratio() const {
return randomness_ratio;
}
+
AABB GPUParticles3D::get_visibility_aabb() const {
return visibility_aabb;
}
+
bool GPUParticles3D::get_use_local_coordinates() const {
return local_coords;
}
+
Ref<Material> GPUParticles3D::get_process_material() const {
return process_material;
}
@@ -165,6 +180,7 @@ void GPUParticles3D::set_draw_passes(int p_count) {
RS::get_singleton()->particles_set_draw_passes(particles, p_count);
_change_notify();
}
+
int GPUParticles3D::get_draw_passes() const {
return draw_passes.size();
}
diff --git a/scene/3d/immediate_geometry_3d.cpp b/scene/3d/immediate_geometry_3d.cpp
index 0d0ce1505f..7f90176271 100644
--- a/scene/3d/immediate_geometry_3d.cpp
+++ b/scene/3d/immediate_geometry_3d.cpp
@@ -80,6 +80,7 @@ void ImmediateGeometry3D::clear() {
AABB ImmediateGeometry3D::get_aabb() const {
return aabb;
}
+
Vector<Face3> ImmediateGeometry3D::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp
index 1fa50b6872..e1ac562e94 100644
--- a/scene/3d/light_3d.cpp
+++ b/scene/3d/light_3d.cpp
@@ -70,6 +70,7 @@ void Light3D::set_shadow(bool p_enable) {
update_configuration_warning();
}
}
+
bool Light3D::has_shadow() const {
return shadow;
}
@@ -78,6 +79,7 @@ void Light3D::set_negative(bool p_enable) {
negative = p_enable;
RS::get_singleton()->light_set_negative(light, p_enable);
}
+
bool Light3D::is_negative() const {
return negative;
}
@@ -86,6 +88,7 @@ void Light3D::set_cull_mask(uint32_t p_cull_mask) {
cull_mask = p_cull_mask;
RS::get_singleton()->light_set_cull_mask(light, p_cull_mask);
}
+
uint32_t Light3D::get_cull_mask() const {
return cull_mask;
}
@@ -96,6 +99,7 @@ void Light3D::set_color(const Color &p_color) {
// The gizmo color depends on the light color, so update it.
update_gizmo();
}
+
Color Light3D::get_color() const {
return color;
}
@@ -355,6 +359,7 @@ Light3D::~Light3D() {
if (light.is_valid())
RenderingServer::get_singleton()->free(light);
}
+
/////////////////////////////////////////
void DirectionalLight3D::set_shadow_mode(ShadowMode p_mode) {
diff --git a/scene/3d/listener_3d.cpp b/scene/3d/listener_3d.cpp
index 6a5307565b..2015662401 100644
--- a/scene/3d/listener_3d.cpp
+++ b/scene/3d/listener_3d.cpp
@@ -51,6 +51,7 @@ bool Listener3D::_set(const StringName &p_name, const Variant &p_value) {
return true;
}
+
bool Listener3D::_get(const StringName &p_name, Variant &r_ret) const {
if (p_name == "current") {
if (is_inside_tree() && get_tree()->is_node_being_edited(this)) {
diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index 08a2426e1c..2e79f08bcd 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -133,6 +133,7 @@ void MeshInstance3D::set_mesh(const Ref<Mesh> &p_mesh) {
_change_notify();
}
+
Ref<Mesh> MeshInstance3D::get_mesh() const {
return mesh;
}
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index c823e7e532..2a1b35ae39 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -89,6 +89,7 @@ void Node3D::_update_local_transform() const {
data.dirty &= ~DIRTY_LOCAL;
}
+
void Node3D::_propagate_transform_changed(Node3D *p_origin) {
if (!is_inside_tree()) {
return;
@@ -246,6 +247,7 @@ Transform Node3D::get_transform() const {
return data.local_transform;
}
+
Transform Node3D::get_global_transform() const {
ERR_FAIL_COND_V(!is_inside_tree(), Transform());
@@ -560,6 +562,7 @@ void Node3D::rotate_y(float p_angle) {
t.basis.rotate(Vector3(0, 1, 0), p_angle);
set_transform(t);
}
+
void Node3D::rotate_z(float p_angle) {
Transform t = get_transform();
t.basis.rotate(Vector3(0, 0, 1), p_angle);
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index 01e456debc..68a13f5612 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -47,6 +47,7 @@
Vector3 PhysicsBody3D::get_linear_velocity() const {
return Vector3();
}
+
Vector3 PhysicsBody3D::get_angular_velocity() const {
return Vector3();
}
@@ -195,6 +196,7 @@ void StaticBody3D::set_constant_angular_velocity(const Vector3 &p_vel) {
Vector3 StaticBody3D::get_constant_linear_velocity() const {
return constant_linear_velocity;
}
+
Vector3 StaticBody3D::get_constant_angular_velocity() const {
return constant_angular_velocity;
}
@@ -486,6 +488,7 @@ void RigidBody3D::set_mass(real_t p_mass) {
_change_notify("weight");
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_MASS, mass);
}
+
real_t RigidBody3D::get_mass() const {
return mass;
}
@@ -493,6 +496,7 @@ real_t RigidBody3D::get_mass() const {
void RigidBody3D::set_weight(real_t p_weight) {
set_mass(p_weight / real_t(GLOBAL_DEF("physics/3d/default_gravity", 9.8)));
}
+
real_t RigidBody3D::get_weight() const {
return mass * real_t(GLOBAL_DEF("physics/3d/default_gravity", 9.8));
}
@@ -520,6 +524,7 @@ void RigidBody3D::set_gravity_scale(real_t p_gravity_scale) {
gravity_scale = p_gravity_scale;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_GRAVITY_SCALE, gravity_scale);
}
+
real_t RigidBody3D::get_gravity_scale() const {
return gravity_scale;
}
@@ -529,6 +534,7 @@ void RigidBody3D::set_linear_damp(real_t p_linear_damp) {
linear_damp = p_linear_damp;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_LINEAR_DAMP, linear_damp);
}
+
real_t RigidBody3D::get_linear_damp() const {
return linear_damp;
}
@@ -538,6 +544,7 @@ void RigidBody3D::set_angular_damp(real_t p_angular_damp) {
angular_damp = p_angular_damp;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_ANGULAR_DAMP, angular_damp);
}
+
real_t RigidBody3D::get_angular_damp() const {
return angular_damp;
}
@@ -574,6 +581,7 @@ void RigidBody3D::set_angular_velocity(const Vector3 &p_velocity) {
else
PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
}
+
Vector3 RigidBody3D::get_angular_velocity() const {
return angular_velocity;
}
@@ -585,6 +593,7 @@ void RigidBody3D::set_use_custom_integrator(bool p_enable) {
custom_integrator = p_enable;
PhysicsServer3D::get_singleton()->body_set_omit_force_integration(get_rid(), p_enable);
}
+
bool RigidBody3D::is_using_custom_integrator() {
return custom_integrator;
}
@@ -1058,6 +1067,7 @@ bool KinematicBody3D::is_on_floor() const {
bool KinematicBody3D::is_on_wall() const {
return on_wall;
}
+
bool KinematicBody3D::is_on_ceiling() const {
return on_ceiling;
}
@@ -1128,6 +1138,7 @@ void KinematicBody3D::set_safe_margin(float p_margin) {
float KinematicBody3D::get_safe_margin() const {
return margin;
}
+
int KinematicBody3D::get_slide_count() const {
return colliders.size();
}
@@ -1216,6 +1227,7 @@ KinematicBody3D::KinematicBody3D() :
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
}
+
KinematicBody3D::~KinematicBody3D() {
if (motion_cache.is_valid()) {
motion_cache->owner = nullptr;
@@ -1227,20 +1239,25 @@ KinematicBody3D::~KinematicBody3D() {
}
}
}
+
///////////////////////////////////////
Vector3 KinematicCollision3D::get_position() const {
return collision.collision;
}
+
Vector3 KinematicCollision3D::get_normal() const {
return collision.normal;
}
+
Vector3 KinematicCollision3D::get_travel() const {
return collision.travel;
}
+
Vector3 KinematicCollision3D::get_remainder() const {
return collision.remainder;
}
+
Object *KinematicCollision3D::get_local_shape() const {
if (!owner)
return nullptr;
@@ -1255,9 +1272,11 @@ Object *KinematicCollision3D::get_collider() const {
return nullptr;
}
+
ObjectID KinematicCollision3D::get_collider_id() const {
return collision.collider;
}
+
Object *KinematicCollision3D::get_collider_shape() const {
Object *collider = get_collider();
if (collider) {
@@ -1270,12 +1289,15 @@ Object *KinematicCollision3D::get_collider_shape() const {
return nullptr;
}
+
int KinematicCollision3D::get_collider_shape_index() const {
return collision.collider_shape;
}
+
Vector3 KinematicCollision3D::get_collider_velocity() const {
return collision.collider_vel;
}
+
Variant KinematicCollision3D::get_collider_metadata() const {
return Variant();
}
diff --git a/scene/3d/physics_joint_3d.cpp b/scene/3d/physics_joint_3d.cpp
index d1a26f33bf..99d0473d9b 100644
--- a/scene/3d/physics_joint_3d.cpp
+++ b/scene/3d/physics_joint_3d.cpp
@@ -88,6 +88,7 @@ void Joint3D::set_node_b(const NodePath &p_node_b) {
b = p_node_b;
_update_joint();
}
+
NodePath Joint3D::get_node_b() const {
return b;
}
@@ -173,6 +174,7 @@ void PinJoint3D::set_param(Param p_param, float p_value) {
if (get_joint().is_valid())
PhysicsServer3D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer3D::PinJointParam(p_param), p_value);
}
+
float PinJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, 3, 0);
return params[p_param];
@@ -270,6 +272,7 @@ void HingeJoint3D::set_param(Param p_param, float p_value) {
update_gizmo();
}
+
float HingeJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
@@ -283,6 +286,7 @@ void HingeJoint3D::set_flag(Flag p_flag, bool p_value) {
update_gizmo();
}
+
bool HingeJoint3D::get_flag(Flag p_flag) const {
ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false);
return flags[p_flag];
@@ -416,6 +420,7 @@ void SliderJoint3D::set_param(Param p_param, float p_value) {
PhysicsServer3D::get_singleton()->slider_joint_set_param(get_joint(), PhysicsServer3D::SliderJointParam(p_param), p_value);
update_gizmo();
}
+
float SliderJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
@@ -521,6 +526,7 @@ void ConeTwistJoint3D::set_param(Param p_param, float p_value) {
update_gizmo();
}
+
float ConeTwistJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
@@ -781,6 +787,7 @@ void Generic6DOFJoint3D::set_param_x(Param p_param, float p_value) {
update_gizmo();
}
+
float Generic6DOFJoint3D::get_param_x(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_x[p_param];
@@ -793,6 +800,7 @@ void Generic6DOFJoint3D::set_param_y(Param p_param, float p_value) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
update_gizmo();
}
+
float Generic6DOFJoint3D::get_param_y(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_y[p_param];
@@ -805,6 +813,7 @@ void Generic6DOFJoint3D::set_param_z(Param p_param, float p_value) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
update_gizmo();
}
+
float Generic6DOFJoint3D::get_param_z(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_z[p_param];
@@ -817,6 +826,7 @@ void Generic6DOFJoint3D::set_flag_x(Flag p_flag, bool p_enabled) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
update_gizmo();
}
+
bool Generic6DOFJoint3D::get_flag_x(Flag p_flag) const {
ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false);
return flags_x[p_flag];
@@ -829,6 +839,7 @@ void Generic6DOFJoint3D::set_flag_y(Flag p_flag, bool p_enabled) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
update_gizmo();
}
+
bool Generic6DOFJoint3D::get_flag_y(Flag p_flag) const {
ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false);
return flags_y[p_flag];
@@ -841,6 +852,7 @@ void Generic6DOFJoint3D::set_flag_z(Flag p_flag, bool p_enabled) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
update_gizmo();
}
+
bool Generic6DOFJoint3D::get_flag_z(Flag p_flag) const {
ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false);
return flags_z[p_flag];
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp
index 7693906f6f..1b91e58f8f 100644
--- a/scene/3d/ray_cast_3d.cpp
+++ b/scene/3d/ray_cast_3d.cpp
@@ -71,6 +71,7 @@ bool RayCast3D::get_collision_mask_bit(int p_bit) const {
bool RayCast3D::is_colliding() const {
return collided;
}
+
Object *RayCast3D::get_collider() const {
if (against.is_null())
return nullptr;
@@ -81,9 +82,11 @@ Object *RayCast3D::get_collider() const {
int RayCast3D::get_collider_shape() const {
return against_shape;
}
+
Vector3 RayCast3D::get_collision_point() const {
return collision_point;
}
+
Vector3 RayCast3D::get_collision_normal() const {
return collision_normal;
}
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 2cc7913d1c..b1f19053d9 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -70,6 +70,7 @@ void ReflectionProbe::set_max_distance(float p_distance) {
max_distance = p_distance;
RS::get_singleton()->reflection_probe_set_max_distance(probe, p_distance);
}
+
float ReflectionProbe::get_max_distance() const {
return max_distance;
}
@@ -93,6 +94,7 @@ void ReflectionProbe::set_extents(const Vector3 &p_extents) {
_change_notify("extents");
update_gizmo();
}
+
Vector3 ReflectionProbe::get_extents() const {
return extents;
}
@@ -111,6 +113,7 @@ void ReflectionProbe::set_origin_offset(const Vector3 &p_extents) {
_change_notify("origin_offset");
update_gizmo();
}
+
Vector3 ReflectionProbe::get_origin_offset() const {
return origin_offset;
}
@@ -119,6 +122,7 @@ void ReflectionProbe::set_enable_box_projection(bool p_enable) {
box_projection = p_enable;
RS::get_singleton()->reflection_probe_set_enable_box_projection(probe, p_enable);
}
+
bool ReflectionProbe::is_box_projection_enabled() const {
return box_projection;
}
@@ -137,6 +141,7 @@ void ReflectionProbe::set_enable_shadows(bool p_enable) {
enable_shadows = p_enable;
RS::get_singleton()->reflection_probe_set_enable_shadows(probe, p_enable);
}
+
bool ReflectionProbe::are_shadows_enabled() const {
return enable_shadows;
}
@@ -145,6 +150,7 @@ void ReflectionProbe::set_cull_mask(uint32_t p_layers) {
cull_mask = p_layers;
RS::get_singleton()->reflection_probe_set_cull_mask(probe, p_layers);
}
+
uint32_t ReflectionProbe::get_cull_mask() const {
return cull_mask;
}
@@ -164,6 +170,7 @@ AABB ReflectionProbe::get_aabb() const {
aabb.size = origin_offset + extents;
return aabb;
}
+
Vector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index c834dad2d0..899579fdbc 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -150,6 +150,7 @@ bool Skeleton3D::_get(const StringName &p_path, Variant &r_ret) const {
return true;
}
+
void Skeleton3D::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < bones.size(); i++) {
String prep = "bones/" + itos(i) + "/";
@@ -407,6 +408,7 @@ void Skeleton3D::add_bone(const String &p_name) {
_make_dirty();
update_gizmo();
}
+
int Skeleton3D::find_bone(const String &p_name) const {
for (int i = 0; i < bones.size(); i++) {
if (bones[i].name == p_name)
@@ -415,6 +417,7 @@ int Skeleton3D::find_bone(const String &p_name) const {
return -1;
}
+
String Skeleton3D::get_bone_name(int p_bone) const {
ERR_FAIL_INDEX_V(p_bone, bones.size(), "");
@@ -485,6 +488,7 @@ void Skeleton3D::set_bone_rest(int p_bone, const Transform &p_rest) {
bones.write[p_bone].rest = p_rest;
_make_dirty();
}
+
Transform Skeleton3D::get_bone_rest(int p_bone) const {
ERR_FAIL_INDEX_V(p_bone, bones.size(), Transform());
@@ -497,6 +501,7 @@ void Skeleton3D::set_bone_enabled(int p_bone, bool p_enabled) {
bones.write[p_bone].enabled = p_enabled;
_make_dirty();
}
+
bool Skeleton3D::is_bone_enabled(int p_bone) const {
ERR_FAIL_INDEX_V(p_bone, bones.size(), false);
return bones[p_bone].enabled;
@@ -515,6 +520,7 @@ void Skeleton3D::bind_child_node_to_bone(int p_bone, Node *p_node) {
bones.write[p_bone].nodes_bound.push_back(id);
}
+
void Skeleton3D::unbind_child_node_from_bone(int p_bone, Node *p_node) {
ERR_FAIL_NULL(p_node);
ERR_FAIL_INDEX(p_bone, bones.size());
@@ -522,6 +528,7 @@ void Skeleton3D::unbind_child_node_from_bone(int p_bone, Node *p_node) {
ObjectID id = p_node->get_instance_id();
bones.write[p_bone].nodes_bound.erase(id);
}
+
void Skeleton3D::get_bound_child_nodes_to_bone(int p_bone, List<Node *> *p_bound) const {
ERR_FAIL_INDEX(p_bone, bones.size());
@@ -549,6 +556,7 @@ void Skeleton3D::set_bone_pose(int p_bone, const Transform &p_pose) {
_make_dirty();
}
}
+
Transform Skeleton3D::get_bone_pose(int p_bone) const {
ERR_FAIL_INDEX_V(p_bone, bones.size(), Transform());
return bones[p_bone].pose;
diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp
index ea89f07266..47c568e9b4 100644
--- a/scene/3d/soft_body_3d.cpp
+++ b/scene/3d/soft_body_3d.cpp
@@ -495,6 +495,7 @@ void SoftBody3D::set_collision_mask(uint32_t p_mask) {
uint32_t SoftBody3D::get_collision_mask() const {
return collision_mask;
}
+
void SoftBody3D::set_collision_layer(uint32_t p_layer) {
collision_layer = p_layer;
PhysicsServer3D::get_singleton()->soft_body_set_collision_layer(physics_rid, p_layer);
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 9764bf77c5..b6f71fcbf8 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -95,6 +95,7 @@ void SpriteBase3D::set_offset(const Point2 &p_offset) {
offset = p_offset;
_queue_update();
}
+
Point2 SpriteBase3D::get_offset() const {
return offset;
}
@@ -103,6 +104,7 @@ void SpriteBase3D::set_flip_h(bool p_flip) {
hflip = p_flip;
_queue_update();
}
+
bool SpriteBase3D::is_flipped_h() const {
return hflip;
}
@@ -111,6 +113,7 @@ void SpriteBase3D::set_flip_v(bool p_flip) {
vflip = p_flip;
_queue_update();
}
+
bool SpriteBase3D::is_flipped_v() const {
return vflip;
}
@@ -129,6 +132,7 @@ void SpriteBase3D::set_pixel_size(float p_amount) {
pixel_size = p_amount;
_queue_update();
}
+
float SpriteBase3D::get_pixel_size() const {
return pixel_size;
}
@@ -137,6 +141,7 @@ void SpriteBase3D::set_opacity(float p_amount) {
opacity = p_amount;
_queue_update();
}
+
float SpriteBase3D::get_opacity() const {
return opacity;
}
@@ -146,6 +151,7 @@ void SpriteBase3D::set_axis(Vector3::Axis p_axis) {
axis = p_axis;
_queue_update();
}
+
Vector3::Axis SpriteBase3D::get_axis() const {
return axis;
}
@@ -170,6 +176,7 @@ void SpriteBase3D::_queue_update() {
AABB SpriteBase3D::get_aabb() const {
return aabb;
}
+
Vector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
@@ -562,6 +569,7 @@ void Sprite3D::set_vframes(int p_amount) {
_queue_update();
_change_notify();
}
+
int Sprite3D::get_vframes() const {
return vframes;
}
@@ -572,6 +580,7 @@ void Sprite3D::set_hframes(int p_amount) {
_queue_update();
_change_notify();
}
+
int Sprite3D::get_hframes() const {
return hframes;
}
@@ -931,6 +940,7 @@ void AnimatedSprite3D::set_frame(int p_frame) {
_change_notify("frame");
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
+
int AnimatedSprite3D::get_frame() const {
return frame;
}
@@ -1016,6 +1026,7 @@ void AnimatedSprite3D::set_animation(const StringName &p_animation) {
_change_notify();
_queue_update();
}
+
StringName AnimatedSprite3D::get_animation() const {
return animation;
}
diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp
index 186bb48744..1e70b30d66 100644
--- a/scene/3d/vehicle_body_3d.cpp
+++ b/scene/3d/vehicle_body_3d.cpp
@@ -153,6 +153,7 @@ void VehicleWheel3D::set_suspension_rest_length(float p_length) {
m_suspensionRestLength = p_length;
update_gizmo();
}
+
float VehicleWheel3D::get_suspension_rest_length() const {
return m_suspensionRestLength;
}
@@ -160,6 +161,7 @@ float VehicleWheel3D::get_suspension_rest_length() const {
void VehicleWheel3D::set_suspension_travel(float p_length) {
m_maxSuspensionTravelCm = p_length / 0.01;
}
+
float VehicleWheel3D::get_suspension_travel() const {
return m_maxSuspensionTravelCm * 0.01;
}
@@ -167,6 +169,7 @@ float VehicleWheel3D::get_suspension_travel() const {
void VehicleWheel3D::set_suspension_stiffness(float p_value) {
m_suspensionStiffness = p_value;
}
+
float VehicleWheel3D::get_suspension_stiffness() const {
return m_suspensionStiffness;
}
@@ -174,6 +177,7 @@ float VehicleWheel3D::get_suspension_stiffness() const {
void VehicleWheel3D::set_suspension_max_force(float p_value) {
m_maxSuspensionForce = p_value;
}
+
float VehicleWheel3D::get_suspension_max_force() const {
return m_maxSuspensionForce;
}
@@ -181,6 +185,7 @@ float VehicleWheel3D::get_suspension_max_force() const {
void VehicleWheel3D::set_damping_compression(float p_value) {
m_wheelsDampingCompression = p_value;
}
+
float VehicleWheel3D::get_damping_compression() const {
return m_wheelsDampingCompression;
}
@@ -188,6 +193,7 @@ float VehicleWheel3D::get_damping_compression() const {
void VehicleWheel3D::set_damping_relaxation(float p_value) {
m_wheelsDampingRelaxation = p_value;
}
+
float VehicleWheel3D::get_damping_relaxation() const {
return m_wheelsDampingRelaxation;
}
@@ -195,6 +201,7 @@ float VehicleWheel3D::get_damping_relaxation() const {
void VehicleWheel3D::set_friction_slip(float p_value) {
m_frictionSlip = p_value;
}
+
float VehicleWheel3D::get_friction_slip() const {
return m_frictionSlip;
}
@@ -292,6 +299,7 @@ float VehicleWheel3D::get_engine_force() const {
void VehicleWheel3D::set_brake(float p_brake) {
m_brake = p_brake;
}
+
float VehicleWheel3D::get_brake() const {
return m_brake;
}
@@ -299,6 +307,7 @@ float VehicleWheel3D::get_brake() const {
void VehicleWheel3D::set_steering(float p_steering) {
m_steering = p_steering;
}
+
float VehicleWheel3D::get_steering() const {
return m_steering;
}
@@ -892,6 +901,7 @@ void VehicleBody3D::set_brake(float p_brake) {
wheelInfo.m_brake = p_brake;
}
}
+
float VehicleBody3D::get_brake() const {
return brake;
}
@@ -904,6 +914,7 @@ void VehicleBody3D::set_steering(float p_steering) {
wheelInfo.m_steering = p_steering;
}
}
+
float VehicleBody3D::get_steering() const {
return m_steeringValue;
}
diff --git a/scene/3d/velocity_tracker_3d.cpp b/scene/3d/velocity_tracker_3d.cpp
index f4f3c7a200..216330939a 100644
--- a/scene/3d/velocity_tracker_3d.cpp
+++ b/scene/3d/velocity_tracker_3d.cpp
@@ -38,6 +38,7 @@ void VelocityTracker3D::set_track_physics_step(bool p_track_physics_step) {
bool VelocityTracker3D::is_tracking_physics_step() const {
return physics_step;
}
+
void VelocityTracker3D::update_position(const Vector3 &p_position) {
PositionHistory ph;
ph.position = p_position;
@@ -56,6 +57,7 @@ void VelocityTracker3D::update_position(const Vector3 &p_position) {
position_history.write[0] = ph;
}
+
Vector3 VelocityTracker3D::get_tracked_linear_velocity() const {
Vector3 linear_velocity;
diff --git a/scene/3d/visibility_notifier_3d.cpp b/scene/3d/visibility_notifier_3d.cpp
index 9c2035f1d8..afc7293b13 100644
--- a/scene/3d/visibility_notifier_3d.cpp
+++ b/scene/3d/visibility_notifier_3d.cpp
@@ -232,6 +232,7 @@ void VisibilityEnabler3D::set_enabler(Enabler p_enabler, bool p_enable) {
ERR_FAIL_INDEX(p_enabler, ENABLER_MAX);
enabler[p_enabler] = p_enable;
}
+
bool VisibilityEnabler3D::is_enabler_enabled(Enabler p_enabler) const {
ERR_FAIL_INDEX_V(p_enabler, ENABLER_MAX, false);
return enabler[p_enabler];
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp
index 3af0c0dff0..cf67ba71c9 100644
--- a/scene/3d/visual_instance_3d.cpp
+++ b/scene/3d/visual_instance_3d.cpp
@@ -235,6 +235,7 @@ bool GeometryInstance3D::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void GeometryInstance3D::_get_property_list(List<PropertyInfo> *p_list) const {
List<PropertyInfo> pinfo;
RS::get_singleton()->instance_geometry_get_shader_parameter_list(get_instance(), &pinfo);
@@ -290,6 +291,7 @@ void GeometryInstance3D::set_shader_instance_uniform(const StringName &p_uniform
Variant GeometryInstance3D::get_shader_instance_uniform(const StringName &p_uniform) const {
return RS::get_singleton()->instance_geometry_get_shader_parameter(get_instance(), p_uniform);
}
+
void GeometryInstance3D::set_custom_aabb(AABB aabb) {
RS::get_singleton()->instance_set_custom_aabb(get_instance(), aabb);
}
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index 333c486165..886ec89c28 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -664,9 +664,11 @@ void Voxelizer::end_bake() {
int Voxelizer::get_gi_probe_octree_depth() const {
return cell_subdiv;
}
+
Vector3i Voxelizer::get_giprobe_octree_size() const {
return Vector3i(axis_cell_size[0], axis_cell_size[1], axis_cell_size[2]);
}
+
int Voxelizer::get_giprobe_cell_count() const {
return bake_cells.size();
}
@@ -690,6 +692,7 @@ Vector<uint8_t> Voxelizer::get_giprobe_octree_cells() const {
return data;
}
+
Vector<uint8_t> Voxelizer::get_giprobe_data_cells() const {
Vector<uint8_t> data;
data.resize((4 * 4) * bake_cells.size()); //8 uint32t values
@@ -989,6 +992,7 @@ Ref<MultiMesh> Voxelizer::create_debug_multimesh() {
Transform Voxelizer::get_to_cell_space_xform() const {
return to_cell_space;
}
+
Voxelizer::Voxelizer() {
sorted = false;
color_scan_cell_width = 4;
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 22477f452c..e426e98def 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -33,6 +33,7 @@
void AnimationNodeBlendSpace1D::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, blend_position));
}
+
Variant AnimationNodeBlendSpace1D::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index a43619b9f3..436ff553ec 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -37,6 +37,7 @@ void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) c
r_list->push_back(PropertyInfo(Variant::INT, closest, PROPERTY_HINT_NONE, "", 0));
r_list->push_back(PropertyInfo(Variant::FLOAT, length_internal, PROPERTY_HINT_NONE, "", 0));
}
+
Variant AnimationNodeBlendSpace2D::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == closest) {
return -1;
@@ -91,6 +92,7 @@ void AnimationNodeBlendSpace2D::set_blend_point_position(int p_point, const Vect
blend_points[p_point].position = p_position;
_queue_auto_triangles();
}
+
void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<AnimationRootNode> &p_node) {
ERR_FAIL_INDEX(p_point, blend_points_used);
ERR_FAIL_COND(p_node.is_null());
@@ -103,14 +105,17 @@ void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<Anim
emit_signal("tree_changed");
}
+
Vector2 AnimationNodeBlendSpace2D::get_blend_point_position(int p_point) const {
ERR_FAIL_INDEX_V(p_point, blend_points_used, Vector2());
return blend_points[p_point].position;
}
+
Ref<AnimationRootNode> AnimationNodeBlendSpace2D::get_blend_point_node(int p_point) const {
ERR_FAIL_INDEX_V(p_point, blend_points_used, Ref<AnimationRootNode>());
return blend_points[p_point].node;
}
+
void AnimationNodeBlendSpace2D::remove_blend_point(int p_point) {
ERR_FAIL_INDEX(p_point, blend_points_used);
@@ -205,6 +210,7 @@ void AnimationNodeBlendSpace2D::add_triangle(int p_x, int p_y, int p_z, int p_at
triangles.insert(p_at_index, t);
}
}
+
int AnimationNodeBlendSpace2D::get_triangle_point(int p_triangle, int p_point) {
_update_triangles();
@@ -212,6 +218,7 @@ int AnimationNodeBlendSpace2D::get_triangle_point(int p_triangle, int p_point) {
ERR_FAIL_INDEX_V(p_triangle, triangles.size(), -1);
return triangles[p_triangle].points[p_point];
}
+
void AnimationNodeBlendSpace2D::remove_triangle(int p_triangle) {
ERR_FAIL_INDEX(p_triangle, triangles.size());
@@ -231,6 +238,7 @@ void AnimationNodeBlendSpace2D::set_min_space(const Vector2 &p_min) {
min_space.y = max_space.y - 1;
}
}
+
Vector2 AnimationNodeBlendSpace2D::get_min_space() const {
return min_space;
}
@@ -244,6 +252,7 @@ void AnimationNodeBlendSpace2D::set_max_space(const Vector2 &p_max) {
max_space.y = min_space.y + 1;
}
}
+
Vector2 AnimationNodeBlendSpace2D::get_max_space() const {
return max_space;
}
@@ -251,6 +260,7 @@ Vector2 AnimationNodeBlendSpace2D::get_max_space() const {
void AnimationNodeBlendSpace2D::set_snap(const Vector2 &p_snap) {
snap = p_snap;
}
+
Vector2 AnimationNodeBlendSpace2D::get_snap() const {
return snap;
}
@@ -258,6 +268,7 @@ Vector2 AnimationNodeBlendSpace2D::get_snap() const {
void AnimationNodeBlendSpace2D::set_x_label(const String &p_label) {
x_label = p_label;
}
+
String AnimationNodeBlendSpace2D::get_x_label() const {
return x_label;
}
@@ -265,6 +276,7 @@ String AnimationNodeBlendSpace2D::get_x_label() const {
void AnimationNodeBlendSpace2D::set_y_label(const String &p_label) {
y_label = p_label;
}
+
String AnimationNodeBlendSpace2D::get_y_label() const {
return y_label;
}
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 671e86ab3b..2fa9aaa4da 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -46,6 +46,7 @@ Vector<String> (*AnimationNodeAnimation::get_editable_animation_list)() = nullpt
void AnimationNodeAnimation::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
}
+
void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const {
if (property.name == "animation" && get_editable_animation_list) {
Vector<String> names = get_editable_animation_list();
@@ -160,6 +161,7 @@ void AnimationNodeOneShot::set_fadeout_time(float p_time) {
float AnimationNodeOneShot::get_fadein_time() const {
return fade_in;
}
+
float AnimationNodeOneShot::get_fadeout_time() const {
return fade_out;
}
@@ -167,9 +169,11 @@ float AnimationNodeOneShot::get_fadeout_time() const {
void AnimationNodeOneShot::set_autorestart(bool p_active) {
autorestart = p_active;
}
+
void AnimationNodeOneShot::set_autorestart_delay(float p_time) {
autorestart_delay = p_time;
}
+
void AnimationNodeOneShot::set_autorestart_random_delay(float p_time) {
autorestart_random_delay = p_time;
}
@@ -177,9 +181,11 @@ void AnimationNodeOneShot::set_autorestart_random_delay(float p_time) {
bool AnimationNodeOneShot::has_autorestart() const {
return autorestart;
}
+
float AnimationNodeOneShot::get_autorestart_delay() const {
return autorestart_delay;
}
+
float AnimationNodeOneShot::get_autorestart_random_delay() const {
return autorestart_random_delay;
}
@@ -187,6 +193,7 @@ float AnimationNodeOneShot::get_autorestart_random_delay() const {
void AnimationNodeOneShot::set_mix_mode(MixMode p_mix) {
mix = p_mix;
}
+
AnimationNodeOneShot::MixMode AnimationNodeOneShot::get_mix_mode() const {
return mix;
}
@@ -285,6 +292,7 @@ float AnimationNodeOneShot::process(float p_time, bool p_seek) {
return MAX(main_rem, remaining);
}
+
void AnimationNodeOneShot::set_use_sync(bool p_sync) {
sync = p_sync;
}
@@ -356,6 +364,7 @@ AnimationNodeOneShot::AnimationNodeOneShot() {
void AnimationNodeAdd2::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
+
Variant AnimationNodeAdd2::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
}
@@ -363,6 +372,7 @@ Variant AnimationNodeAdd2::get_parameter_default_value(const StringName &p_param
String AnimationNodeAdd2::get_caption() const {
return "Add2";
}
+
void AnimationNodeAdd2::set_use_sync(bool p_sync) {
sync = p_sync;
}
@@ -402,6 +412,7 @@ AnimationNodeAdd2::AnimationNodeAdd2() {
void AnimationNodeAdd3::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
+
Variant AnimationNodeAdd3::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
}
@@ -409,6 +420,7 @@ Variant AnimationNodeAdd3::get_parameter_default_value(const StringName &p_param
String AnimationNodeAdd3::get_caption() const {
return "Add3";
}
+
void AnimationNodeAdd3::set_use_sync(bool p_sync) {
sync = p_sync;
}
@@ -444,11 +456,13 @@ AnimationNodeAdd3::AnimationNodeAdd3() {
add_input("+add");
sync = false;
}
+
/////////////////////////////////////////////
void AnimationNodeBlend2::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
+
Variant AnimationNodeBlend2::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
}
@@ -477,12 +491,14 @@ bool AnimationNodeBlend2::is_using_sync() const {
bool AnimationNodeBlend2::has_filter() const {
return true;
}
+
void AnimationNodeBlend2::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeBlend2::set_use_sync);
ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeBlend2::is_using_sync);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync");
}
+
AnimationNodeBlend2::AnimationNodeBlend2() {
blend_amount = "blend_amount";
add_input("in");
@@ -495,6 +511,7 @@ AnimationNodeBlend2::AnimationNodeBlend2() {
void AnimationNodeBlend3::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
+
Variant AnimationNodeBlend3::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
}
@@ -526,6 +543,7 @@ void AnimationNodeBlend3::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync");
}
+
AnimationNodeBlend3::AnimationNodeBlend3() {
blend_amount = "blend_amount";
add_input("-blend");
@@ -539,6 +557,7 @@ AnimationNodeBlend3::AnimationNodeBlend3() {
void AnimationNodeTimeScale::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater"));
}
+
Variant AnimationNodeTimeScale::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
}
@@ -558,6 +577,7 @@ float AnimationNodeTimeScale::process(float p_time, bool p_seek) {
void AnimationNodeTimeScale::_bind_methods() {
}
+
AnimationNodeTimeScale::AnimationNodeTimeScale() {
scale = "scale";
add_input("in");
@@ -568,6 +588,7 @@ AnimationNodeTimeScale::AnimationNodeTimeScale() {
void AnimationNodeTimeSeek::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::FLOAT, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater"));
}
+
Variant AnimationNodeTimeSeek::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
}
@@ -615,6 +636,7 @@ void AnimationNodeTransition::get_parameter_list(List<PropertyInfo> *r_list) con
r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
r_list->push_back(PropertyInfo(Variant::FLOAT, prev_xfading, PROPERTY_HINT_NONE, "", 0));
}
+
Variant AnimationNodeTransition::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == time || p_parameter == prev_xfading) {
return 0.0;
@@ -878,10 +900,12 @@ void AnimationNodeBlendTree::get_child_nodes(List<ChildNode> *r_child_nodes) {
bool AnimationNodeBlendTree::has_node(const StringName &p_name) const {
return nodes.has(p_name);
}
+
Vector<StringName> AnimationNodeBlendTree::get_node_connection_array(const StringName &p_name) const {
ERR_FAIL_COND_V(!nodes.has(p_name), Vector<StringName>());
return nodes[p_name].connections;
}
+
void AnimationNodeBlendTree::remove_node(const StringName &p_name) {
ERR_FAIL_COND(!nodes.has(p_name));
ERR_FAIL_COND(p_name == SceneStringNames::get_singleton()->output); //can't delete output
@@ -1110,6 +1134,7 @@ bool AnimationNodeBlendTree::_get(const StringName &p_name, Variant &r_ret) cons
return false;
}
+
void AnimationNodeBlendTree::_get_property_list(List<PropertyInfo> *p_list) const {
List<StringName> names;
for (Map<StringName, Node>::Element *E = nodes.front(); E; E = E->next()) {
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index 4a387772a8..7c4f84b373 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -150,24 +150,31 @@ void AnimationNodeStateMachinePlayback::start(const StringName &p_state) {
start_request = p_state;
stop_request = false;
}
+
void AnimationNodeStateMachinePlayback::stop() {
stop_request = true;
}
+
bool AnimationNodeStateMachinePlayback::is_playing() const {
return playing;
}
+
StringName AnimationNodeStateMachinePlayback::get_current_node() const {
return current;
}
+
StringName AnimationNodeStateMachinePlayback::get_blend_from_node() const {
return fading_from;
}
+
Vector<StringName> AnimationNodeStateMachinePlayback::get_travel_path() const {
return path;
}
+
float AnimationNodeStateMachinePlayback::get_current_play_pos() const {
return pos_current;
}
+
float AnimationNodeStateMachinePlayback::get_current_length() const {
return len_current;
}
@@ -605,6 +612,7 @@ void AnimationNodeStateMachine::get_child_nodes(List<ChildNode> *r_child_nodes)
bool AnimationNodeStateMachine::has_node(const StringName &p_name) const {
return states.has(p_name);
}
+
void AnimationNodeStateMachine::remove_node(const StringName &p_name) {
ERR_FAIL_COND(!states.has(p_name));
@@ -728,10 +736,12 @@ Ref<AnimationNodeStateMachineTransition> AnimationNodeStateMachine::get_transiti
ERR_FAIL_INDEX_V(p_transition, transitions.size(), Ref<AnimationNodeStateMachineTransition>());
return transitions[p_transition].transition;
}
+
StringName AnimationNodeStateMachine::get_transition_from(int p_transition) const {
ERR_FAIL_INDEX_V(p_transition, transitions.size(), StringName());
return transitions[p_transition].from;
}
+
StringName AnimationNodeStateMachine::get_transition_to(int p_transition) const {
ERR_FAIL_INDEX_V(p_transition, transitions.size(), StringName());
return transitions[p_transition].to;
@@ -740,6 +750,7 @@ StringName AnimationNodeStateMachine::get_transition_to(int p_transition) const
int AnimationNodeStateMachine::get_transition_count() const {
return transitions.size();
}
+
void AnimationNodeStateMachine::remove_transition(const StringName &p_from, const StringName &p_to) {
for (int i = 0; i < transitions.size(); i++) {
if (transitions[i].from == p_from && transitions[i].to == p_to) {
@@ -893,6 +904,7 @@ bool AnimationNodeStateMachine::_get(const StringName &p_name, Variant &r_ret) c
return false;
}
+
void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) const {
List<StringName> names;
for (Map<StringName, State>::Element *E = states.front(); E; E = E->next()) {
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index c6bd1fc531..b8d7cbc823 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -766,6 +766,7 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f
_animation_process_animation(cd.from, cd.pos, delta, p_blend, &cd == &playback.current, p_seeked, p_started);
}
+
void AnimationPlayer::_animation_process2(float p_delta, bool p_started) {
Playback &c = playback;
@@ -997,6 +998,7 @@ void AnimationPlayer::rename_animation(const StringName &p_name, const StringNam
bool AnimationPlayer::has_animation(const StringName &p_name) const {
return animation_set.has(p_name);
}
+
Ref<Animation> AnimationPlayer::get_animation(const StringName &p_name) const {
ERR_FAIL_COND_V(!animation_set.has(p_name), Ref<Animation>());
@@ -1004,6 +1006,7 @@ Ref<Animation> AnimationPlayer::get_animation(const StringName &p_name) const {
return data.animation;
}
+
void AnimationPlayer::get_animation_list(List<StringName> *p_animations) const {
List<String> anims;
@@ -1199,9 +1202,11 @@ void AnimationPlayer::stop(bool p_reset) {
void AnimationPlayer::set_speed_scale(float p_speed) {
speed_scale = p_speed;
}
+
float AnimationPlayer::get_speed_scale() const {
return speed_scale;
}
+
float AnimationPlayer::get_playing_speed() const {
if (!playing) {
return 0;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 81575b7f48..671c87eb58 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -289,6 +289,7 @@ float AnimationNode::_blend_node(const StringName &p_subpath, const Vector<Strin
int AnimationNode::get_input_count() const {
return inputs.size();
}
+
String AnimationNode::get_input_name(int p_input) {
ERR_FAIL_INDEX_V(p_input, inputs.size(), String());
return inputs[p_input].name;
@@ -368,6 +369,7 @@ Array AnimationNode::_get_filters() const {
return paths;
}
+
void AnimationNode::_set_filters(const Array &p_filters) {
filter.clear();
for (int i = 0; i < p_filters.size(); i++) {
@@ -1260,6 +1262,7 @@ NodePath AnimationTree::get_animation_player() const {
bool AnimationTree::is_state_invalid() const {
return !state.valid;
}
+
String AnimationTree::get_invalid_state_reason() const {
return state.invalid_reasons;
}
@@ -1420,6 +1423,7 @@ bool AnimationTree::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void AnimationTree::_get_property_list(List<PropertyInfo> *p_list) const {
if (properties_dirty) {
const_cast<AnimationTree *>(this)->_update_properties();
diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp
index bbfec588f4..cbf2e4a6ff 100644
--- a/scene/animation/root_motion_view.cpp
+++ b/scene/animation/root_motion_view.cpp
@@ -159,6 +159,7 @@ void RootMotionView::_notification(int p_what) {
AABB RootMotionView::get_aabb() const {
return AABB(Vector3(-radius, 0, -radius), Vector3(radius * 2, 0.001, radius * 2));
}
+
Vector<Face3> RootMotionView::get_faces(uint32_t p_usage_flags) const {
return Vector<Face3>();
}
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 6cd4914519..660d148516 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -219,6 +219,7 @@ Ref<AudioStream> AudioStreamPlayer::get_stream() const {
void AudioStreamPlayer::set_volume_db(float p_volume) {
volume_db = p_volume;
}
+
float AudioStreamPlayer::get_volume_db() const {
return volume_db;
}
@@ -227,6 +228,7 @@ void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
}
+
float AudioStreamPlayer::get_pitch_scale() const {
return pitch_scale;
}
@@ -276,6 +278,7 @@ void AudioStreamPlayer::set_bus(const StringName &p_bus) {
bus = p_bus;
AudioServer::get_singleton()->unlock();
}
+
StringName AudioStreamPlayer::get_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == bus) {
@@ -288,6 +291,7 @@ StringName AudioStreamPlayer::get_bus() const {
void AudioStreamPlayer::set_autoplay(bool p_enable) {
autoplay = p_enable;
}
+
bool AudioStreamPlayer::is_autoplay_enabled() {
return autoplay;
}
@@ -306,6 +310,7 @@ void AudioStreamPlayer::_set_playing(bool p_enable) {
else
stop();
}
+
bool AudioStreamPlayer::_is_active() const {
return active;
}
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index 965dd2c8a3..879f891cc9 100644
--- a/scene/debugger/scene_debugger.cpp
+++ b/scene/debugger/scene_debugger.cpp
@@ -224,6 +224,7 @@ void SceneDebugger::add_to_cache(const String &p_filename, Node *p_node) {
debugger->live_scene_edit_cache[p_filename].insert(p_node);
}
}
+
void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) {
LiveEditor *debugger = LiveEditor::get_singleton();
if (!debugger)
@@ -537,6 +538,7 @@ void LiveEditor::_node_set_res_func(int p_id, const StringName &p_prop, const St
return;
_node_set_func(p_id, p_prop, r);
}
+
void LiveEditor::_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -566,6 +568,7 @@ void LiveEditor::_node_call_func(int p_id, const StringName &p_method, VARIANT_A
n2->call(p_method, VARIANT_ARG_PASS);
}
}
+
void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value) {
if (!live_edit_resource_cache.has(p_id))
return;
@@ -581,12 +584,14 @@ void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant
r->set(p_prop, p_value);
}
+
void LiveEditor::_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) {
RES r = ResourceLoader::load(p_value);
if (!r.is_valid())
return;
_res_set_func(p_id, p_prop, r);
}
+
void LiveEditor::_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
if (!live_edit_resource_cache.has(p_id))
return;
@@ -640,6 +645,7 @@ void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_typ
n2->add_child(no);
}
}
+
void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -677,6 +683,7 @@ void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_p
n2->add_child(no);
}
}
+
void LiveEditor::_remove_node_func(const NodePath &p_at) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -707,6 +714,7 @@ void LiveEditor::_remove_node_func(const NodePath &p_at) {
F = N;
}
}
+
void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -740,6 +748,7 @@ void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_kee
F = N;
}
}
+
void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -785,6 +794,7 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a
F = N;
}
}
+
void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_name) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
@@ -817,6 +827,7 @@ void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_
n2->get_parent()->add_child(dup);
}
}
+
void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
SceneTree *scene_tree = SceneTree::get_singleton();
if (!scene_tree)
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index cf1ff059bf..e761b2bf40 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -230,6 +230,7 @@ void Button::set_text(const String &p_text) {
_change_notify("text");
minimum_size_changed();
}
+
String Button::get_text() const {
return text;
}
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 1730df6bb3..f150028c47 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -909,6 +909,7 @@ void ColorPickerButton::set_pick_color(const Color &p_color) {
update();
}
+
Color ColorPickerButton::get_pick_color() const {
return color;
}
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 3dbdd4dfab..02be8f23fb 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -326,6 +326,7 @@ bool Control::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
+
void Control::_get_property_list(List<PropertyInfo> *p_list) const {
Ref<Theme> theme = Theme::get_default();
/* Using the default theme since the properties below are meant for editor only
@@ -593,6 +594,7 @@ bool Control::clips_input() const {
}
return false;
}
+
bool Control::has_point(const Point2 &p_point) const {
if (get_script_instance()) {
Variant v = p_point;
@@ -658,6 +660,7 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const
return Variant();
}
+
void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
if (data.drag_owner.is_valid()) {
Object *obj = ObjectDB::get_instance(data.drag_owner);
@@ -1017,6 +1020,7 @@ bool Control::has_theme_shader(const StringName &p_name, const StringName &p_typ
return has_shaders(data.theme_owner, data.theme_owner_window, p_name, type);
}
+
bool Control::has_shaders(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_type) {
if (_has_theme_item(p_theme_owner, p_theme_owner_window, &Theme::has_shader, p_name, p_type)) {
return true;
@@ -1064,6 +1068,7 @@ bool Control::has_theme_font(const StringName &p_name, const StringName &p_type)
return has_fonts(data.theme_owner, data.theme_owner_window, p_name, type);
}
+
bool Control::has_fonts(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_type) {
if (_has_theme_item(p_theme_owner, p_theme_owner_window, &Theme::has_font, p_name, p_type)) {
return true;
@@ -1087,6 +1092,7 @@ bool Control::has_theme_color(const StringName &p_name, const StringName &p_type
return has_colors(data.theme_owner, data.theme_owner_window, p_name, type);
}
+
bool Control::has_colors(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_type) {
if (_has_theme_item(p_theme_owner, p_theme_owner_window, &Theme::has_color, p_name, p_type)) {
return true;
@@ -1540,6 +1546,7 @@ float Control::get_margin(Margin p_margin) const {
Size2 Control::get_begin() const {
return Size2(data.margin[0], data.margin[1]);
}
+
Size2 Control::get_end() const {
return Size2(data.margin[2], data.margin[3]);
}
@@ -1706,6 +1713,7 @@ void Control::add_theme_shader_override(const StringName &p_name, const Ref<Shad
}
notification(NOTIFICATION_THEME_CHANGED);
}
+
void Control::add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {
if (data.style_override.has(p_name)) {
data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
@@ -1739,10 +1747,12 @@ void Control::add_theme_font_override(const StringName &p_name, const Ref<Font>
}
notification(NOTIFICATION_THEME_CHANGED);
}
+
void Control::add_theme_color_override(const StringName &p_name, const Color &p_color) {
data.color_override[p_name] = p_color;
notification(NOTIFICATION_THEME_CHANGED);
}
+
void Control::add_theme_constant_override(const StringName &p_name, int p_constant) {
data.constant_override[p_name] = p_constant;
notification(NOTIFICATION_THEME_CHANGED);
@@ -1926,6 +1936,7 @@ Control *Control::find_prev_valid_focus() const {
Control::FocusMode Control::get_focus_mode() const {
return data.focus_mode;
}
+
bool Control::has_focus() const {
return is_inside_tree() && get_viewport()->_gui_control_has_focus(this);
}
@@ -2051,6 +2062,7 @@ void Control::set_tooltip(const String &p_tooltip) {
String Control::get_tooltip(const Point2 &p_pos) const {
return data.tooltip;
}
+
Control *Control::make_custom_tooltip(const String &p_text) const {
if (get_script_instance()) {
return const_cast<Control *>(this)->call("_make_custom_tooltip", p_text);
@@ -2067,6 +2079,7 @@ void Control::set_default_cursor_shape(CursorShape p_shape) {
Control::CursorShape Control::get_default_cursor_shape() const {
return data.default_cursor;
}
+
Control::CursorShape Control::get_cursor_shape(const Point2 &p_pos) const {
return data.default_cursor;
}
@@ -2247,6 +2260,7 @@ void Control::set_h_size_flags(int p_flags) {
int Control::get_h_size_flags() const {
return data.h_size_flags;
}
+
void Control::set_v_size_flags(int p_flags) {
if (data.v_size_flags == p_flags)
return;
@@ -2387,6 +2401,7 @@ void Control::set_scale(const Vector2 &p_scale) {
update();
_notify_transform();
}
+
Vector2 Control::get_scale() const {
return data.scale;
}
@@ -2495,6 +2510,7 @@ void Control::set_v_grow_direction(GrowDirection p_direction) {
data.v_grow = p_direction;
_size_changed();
}
+
Control::GrowDirection Control::get_v_grow_direction() const {
return data.v_grow;
}
@@ -2772,6 +2788,7 @@ void Control::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_point", PropertyInfo(Variant::VECTOR2, "point")));
}
+
Control::Control() {
data.parent = nullptr;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 3e1a72beb7..37d6784e35 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -127,6 +127,7 @@ void AcceptDialog::_cancel_pressed() {
String AcceptDialog::get_text() const {
return label->get_text();
}
+
void AcceptDialog::set_text(String p_text) {
label->set_text(p_text);
child_controls_changed();
@@ -138,6 +139,7 @@ void AcceptDialog::set_text(String p_text) {
void AcceptDialog::set_hide_on_ok(bool p_hide) {
hide_on_ok = p_hide;
}
+
bool AcceptDialog::get_hide_on_ok() const {
return hide_on_ok;
}
@@ -145,6 +147,7 @@ bool AcceptDialog::get_hide_on_ok() const {
void AcceptDialog::set_autowrap(bool p_autowrap) {
label->set_autowrap(p_autowrap);
}
+
bool AcceptDialog::has_autowrap() {
return label->has_autowrap();
}
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index adf67bc7df..158662e0fc 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -541,6 +541,7 @@ void FileDialog::clear_filters() {
update_filters();
invalidate();
}
+
void FileDialog::add_filter(const String &p_filter) {
filters.push_back(p_filter);
update_filters();
@@ -560,17 +561,21 @@ Vector<String> FileDialog::get_filters() const {
String FileDialog::get_current_dir() const {
return dir->get_text();
}
+
String FileDialog::get_current_file() const {
return file->get_text();
}
+
String FileDialog::get_current_path() const {
return dir->get_text().plus_file(file->get_text());
}
+
void FileDialog::set_current_dir(const String &p_dir) {
dir_access->change_dir(p_dir);
update_dir();
invalidate();
}
+
void FileDialog::set_current_file(const String &p_file) {
file->set_text(p_file);
update_dir();
@@ -582,6 +587,7 @@ void FileDialog::set_current_file(const String &p_file) {
file->grab_focus();
}
}
+
void FileDialog::set_current_path(const String &p_path) {
if (!p_path.size())
return;
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 2129ae6126..02363e909c 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1105,6 +1105,7 @@ Array GraphEdit::_get_connection_list() const {
void GraphEdit::_zoom_minus() {
set_zoom(zoom / ZOOM_SCALE);
}
+
void GraphEdit::_zoom_reset() {
set_zoom(1);
}
@@ -1155,6 +1156,7 @@ void GraphEdit::set_snap(int p_snap) {
snap_amount->set_value(p_snap);
update();
}
+
void GraphEdit::_snap_toggled() {
update();
}
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index efac874462..c2203364d0 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -92,6 +92,7 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
+
void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const {
int idx = 0;
for (int i = 0; i < get_child_count(); i++) {
@@ -305,11 +306,13 @@ void GraphNode::clear_slot(int p_idx) {
update();
connpos_dirty = true;
}
+
void GraphNode::clear_all_slots() {
slot_info.clear();
update();
connpos_dirty = true;
}
+
bool GraphNode::is_slot_enabled_left(int p_idx) const {
if (!slot_info.has(p_idx))
return false;
@@ -428,6 +431,7 @@ void GraphNode::set_show_close_button(bool p_enable) {
show_close = p_enable;
update();
}
+
bool GraphNode::is_close_button_visible() const {
return show_close;
}
@@ -487,6 +491,7 @@ int GraphNode::get_connection_input_count() {
return conn_input_cache.size();
}
+
int GraphNode::get_connection_output_count() {
if (connpos_dirty)
_connpos_update();
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 86daa47c36..06a4534e22 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -190,6 +190,7 @@ void ItemList::set_item_tag_icon(int p_idx, const Ref<Texture2D> &p_tag_icon) {
update();
shape_changed = true;
}
+
Ref<Texture2D> ItemList::get_item_tag_icon(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, items.size(), Ref<Texture2D>());
@@ -231,6 +232,7 @@ Variant ItemList::get_item_metadata(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, items.size(), Variant());
return items[p_idx].metadata;
}
+
void ItemList::select(int p_idx, bool p_single) {
ERR_FAIL_INDEX(p_idx, items.size());
@@ -252,6 +254,7 @@ void ItemList::select(int p_idx, bool p_single) {
}
update();
}
+
void ItemList::unselect(int p_idx) {
ERR_FAIL_INDEX(p_idx, items.size());
@@ -315,6 +318,7 @@ void ItemList::move_item(int p_from_idx, int p_to_idx) {
int ItemList::get_item_count() const {
return items.size();
}
+
void ItemList::remove_item(int p_idx) {
ERR_FAIL_INDEX(p_idx, items.size());
@@ -339,6 +343,7 @@ void ItemList::set_fixed_column_width(int p_size) {
update();
shape_changed = true;
}
+
int ItemList::get_fixed_column_width() const {
return fixed_column_width;
}
@@ -348,6 +353,7 @@ void ItemList::set_same_column_width(bool p_enable) {
update();
shape_changed = true;
}
+
bool ItemList::is_same_column_width() const {
return same_column_width;
}
@@ -358,6 +364,7 @@ void ItemList::set_max_text_lines(int p_lines) {
update();
shape_changed = true;
}
+
int ItemList::get_max_text_lines() const {
return max_text_lines;
}
@@ -368,6 +375,7 @@ void ItemList::set_max_columns(int p_amount) {
update();
shape_changed = true;
}
+
int ItemList::get_max_columns() const {
return max_columns;
}
@@ -400,6 +408,7 @@ void ItemList::set_fixed_icon_size(const Size2 &p_size) {
Size2 ItemList::get_fixed_icon_size() const {
return fixed_icon_size;
}
+
Size2 ItemList::Item::get_icon_size() const {
if (icon.is_null())
return Size2();
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 5f84dbe34b..f5487a49be 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -47,6 +47,7 @@ void Label::set_autowrap(bool p_autowrap) {
minimum_size_changed();
}
}
+
bool Label::has_autowrap() const {
return autowrap;
}
@@ -56,6 +57,7 @@ void Label::set_uppercase(bool p_uppercase) {
word_cache_dirty = true;
update();
}
+
bool Label::is_uppercase() const {
return uppercase;
}
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index c1cfef0381..fa08f6f512 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -590,9 +590,11 @@ Variant LineEdit::get_drag_data(const Point2 &p_point) {
return Variant();
}
+
bool LineEdit::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
return p_data.get_type() == Variant::STRING;
}
+
void LineEdit::drop_data(const Point2 &p_point, const Variant &p_data) {
if (p_data.get_type() == Variant::STRING) {
set_cursor_at_pixel_pos(p_point.x);
diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp
index a65edefa5f..4d94bbf5d9 100644
--- a/scene/gui/nine_patch_rect.cpp
+++ b/scene/gui/nine_patch_rect.cpp
@@ -50,6 +50,7 @@ void NinePatchRect::_notification(int p_what) {
Size2 NinePatchRect::get_minimum_size() const {
return Size2(margin[MARGIN_LEFT] + margin[MARGIN_RIGHT], margin[MARGIN_TOP] + margin[MARGIN_BOTTOM]);
}
+
void NinePatchRect::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_texture", "texture"), &NinePatchRect::set_texture);
ClassDB::bind_method(D_METHOD("get_texture"), &NinePatchRect::get_texture);
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index b3c024bd1d..bc4eec5ba3 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -112,6 +112,7 @@ void OptionButton::add_icon_item(const Ref<Texture2D> &p_icon, const String &p_l
if (popup->get_item_count() == 1)
select(0);
}
+
void OptionButton::add_item(const String &p_label, int p_id) {
popup->add_radio_check_item(p_label, p_id);
if (popup->get_item_count() == 1)
@@ -124,12 +125,14 @@ void OptionButton::set_item_text(int p_idx, const String &p_text) {
if (current == p_idx)
set_text(p_text);
}
+
void OptionButton::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) {
popup->set_item_icon(p_idx, p_icon);
if (current == p_idx)
set_icon(p_icon);
}
+
void OptionButton::set_item_id(int p_idx, int p_id) {
popup->set_item_id(p_idx, p_id);
}
@@ -220,6 +223,7 @@ int OptionButton::get_selected_id() const {
return 0;
return get_item_id(current);
}
+
Variant OptionButton::get_selected_metadata() const {
int idx = get_selected();
if (idx < 0)
@@ -247,6 +251,7 @@ Array OptionButton::_get_items() const {
return items;
}
+
void OptionButton::_set_items(const Array &p_items) {
ERR_FAIL_COND(p_items.size() % 5);
clear();
diff --git a/scene/gui/panel.cpp b/scene/gui/panel.cpp
index a13d8a0cdd..d8d9beca2b 100644
--- a/scene/gui/panel.cpp
+++ b/scene/gui/panel.cpp
@@ -44,6 +44,7 @@ void Panel::set_mode(Mode p_mode) {
mode = p_mode;
update();
}
+
Panel::Mode Panel::get_mode() const {
return mode;
}
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 7068e2e1e2..e1fcb8c2fc 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -44,6 +44,7 @@ void Popup::_input_from_window(const Ref<InputEvent> &p_event) {
void Popup::_parent_focused() {
_close_pressed();
}
+
void Popup::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
@@ -94,6 +95,7 @@ void Popup::_close_pressed() {
void Popup::set_as_minsize() {
set_size(get_contents_minimum_size());
}
+
void Popup::_bind_methods() {
ADD_SIGNAL(MethodInfo("popup_hide"));
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 52fe991f83..c5c6305315 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -757,6 +757,7 @@ void PopupMenu::set_item_text(int p_idx, const String &p_text) {
control->update();
child_controls_changed();
}
+
void PopupMenu::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) {
ERR_FAIL_INDEX(p_idx, items.size());
items.write[p_idx].icon = p_icon;
@@ -764,6 +765,7 @@ void PopupMenu::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) {
control->update();
child_controls_changed();
}
+
void PopupMenu::set_item_checked(int p_idx, bool p_checked) {
ERR_FAIL_INDEX(p_idx, items.size());
@@ -772,6 +774,7 @@ void PopupMenu::set_item_checked(int p_idx, bool p_checked) {
control->update();
child_controls_changed();
}
+
void PopupMenu::set_item_id(int p_idx, int p_id) {
ERR_FAIL_INDEX(p_idx, items.size());
items.write[p_idx].id = p_id;
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 2260a5a97c..9e30063c5b 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -94,6 +94,7 @@ void Range::set_value(double p_val) {
shared->emit_value_changed();
}
+
void Range::set_min(double p_min) {
shared->min = p_min;
set_value(shared->val);
@@ -102,16 +103,19 @@ void Range::set_min(double p_min) {
update_configuration_warning();
}
+
void Range::set_max(double p_max) {
shared->max = p_max;
set_value(shared->val);
shared->emit_changed("max");
}
+
void Range::set_step(double p_step) {
shared->step = p_step;
shared->emit_changed("step");
}
+
void Range::set_page(double p_page) {
shared->page = p_page;
set_value(shared->val);
@@ -122,15 +126,19 @@ void Range::set_page(double p_page) {
double Range::get_value() const {
return shared->val;
}
+
double Range::get_min() const {
return shared->min;
}
+
double Range::get_max() const {
return shared->max;
}
+
double Range::get_step() const {
return shared->step;
}
+
double Range::get_page() const {
return shared->page;
}
@@ -154,6 +162,7 @@ void Range::set_as_ratio(double p_value) {
v = CLAMP(v, get_min(), get_max());
set_value(v);
}
+
double Range::get_as_ratio() const {
ERR_FAIL_COND_V_MSG(Math::is_equal_approx(get_max(), get_min()), 0.0, "Cannot get ratio when minimum and maximum value are equal.");
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index baf8c53fef..d73c61f0f2 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2684,6 +2684,7 @@ void RichTextLabel::set_visible_characters(int p_visible) {
int RichTextLabel::get_visible_characters() const {
return visible_characters;
}
+
int RichTextLabel::get_total_character_count() const {
int tc = 0;
for (int i = 0; i < current_frame->lines.size(); i++)
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 2f54ece449..0b00883a71 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -470,6 +470,7 @@ bool ScrollContainer::is_v_scroll_enabled() const {
int ScrollContainer::get_v_scroll() const {
return v_scroll->get_value();
}
+
void ScrollContainer::set_v_scroll(int p_pos) {
v_scroll->set_value(p_pos);
_cancel_drag();
@@ -478,6 +479,7 @@ void ScrollContainer::set_v_scroll(int p_pos) {
int ScrollContainer::get_h_scroll() const {
return h_scroll->get_value();
}
+
void ScrollContainer::set_h_scroll(int p_pos) {
h_scroll->set_value(p_pos);
_cancel_drag();
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 501e50e7f7..4d861f380d 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -796,6 +796,7 @@ void TabContainer::set_tab_icon(int p_tab, const Ref<Texture2D> &p_icon) {
child->set_meta("_tab_icon", p_icon);
update();
}
+
Ref<Texture2D> TabContainer::get_tab_icon(int p_tab) const {
Control *child = _get_tab(p_tab);
ERR_FAIL_COND_V(!child, Ref<Texture2D>());
@@ -912,6 +913,7 @@ void TabContainer::set_drag_to_rearrange_enabled(bool p_enabled) {
bool TabContainer::get_drag_to_rearrange_enabled() const {
return drag_to_rearrange_enabled;
}
+
void TabContainer::set_tabs_rearrange_group(int p_group_id) {
tabs_rearrange_group = p_group_id;
}
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 2dce34daf0..4c3fa2f038 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -435,6 +435,7 @@ void Tabs::set_tab_disabled(int p_tab, bool p_disabled) {
tabs.write[p_tab].disabled = p_disabled;
update();
}
+
bool Tabs::get_tab_disabled(int p_tab) const {
ERR_FAIL_INDEX_V(p_tab, tabs.size(), false);
return tabs[p_tab].disabled;
@@ -447,6 +448,7 @@ void Tabs::set_tab_right_button(int p_tab, const Ref<Texture2D> &p_right_button)
update();
minimum_size_changed();
}
+
Ref<Texture2D> Tabs::get_tab_right_button(int p_tab) const {
ERR_FAIL_INDEX_V(p_tab, tabs.size(), Ref<Texture2D>());
return tabs[p_tab].right_button;
@@ -866,6 +868,7 @@ void Tabs::set_drag_to_rearrange_enabled(bool p_enabled) {
bool Tabs::get_drag_to_rearrange_enabled() const {
return drag_to_rearrange_enabled;
}
+
void Tabs::set_tabs_rearrange_group(int p_group_id) {
tabs_rearrange_group = p_group_id;
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index ee1391806e..c5067c9efd 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -296,6 +296,7 @@ void TextEdit::Text::insert(int p_at, const String &p_text) {
line.data = p_text;
text.insert(p_at, line);
}
+
void TextEdit::Text::remove(int p_at) {
text.remove(p_at);
}
@@ -5166,27 +5167,33 @@ void TextEdit::select(int p_from_line, int p_from_column, int p_to_line, int p_t
update();
}
+
void TextEdit::swap_lines(int line1, int line2) {
String tmp = get_line(line1);
String tmp2 = get_line(line2);
set_line(line2, tmp);
set_line(line1, tmp2);
}
+
bool TextEdit::is_selection_active() const {
return selection.active;
}
+
int TextEdit::get_selection_from_line() const {
ERR_FAIL_COND_V(!selection.active, -1);
return selection.from_line;
}
+
int TextEdit::get_selection_from_column() const {
ERR_FAIL_COND_V(!selection.active, -1);
return selection.from_column;
}
+
int TextEdit::get_selection_to_line() const {
ERR_FAIL_COND_V(!selection.active, -1);
return selection.to_line;
}
+
int TextEdit::get_selection_to_column() const {
ERR_FAIL_COND_V(!selection.active, -1);
return selection.to_column;
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 325b9d00ed..0cc0e50a00 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -270,14 +270,17 @@ void TextureButton::set_pressed_texture(const Ref<Texture2D> &p_pressed) {
pressed = p_pressed;
update();
}
+
void TextureButton::set_hover_texture(const Ref<Texture2D> &p_hover) {
hover = p_hover;
update();
}
+
void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
disabled = p_disabled;
update();
}
+
void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
click_mask = p_click_mask;
update();
@@ -286,15 +289,19 @@ void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
Ref<Texture2D> TextureButton::get_normal_texture() const {
return normal;
}
+
Ref<Texture2D> TextureButton::get_pressed_texture() const {
return pressed;
}
+
Ref<Texture2D> TextureButton::get_hover_texture() const {
return hover;
}
+
Ref<Texture2D> TextureButton::get_disabled_texture() const {
return disabled;
}
+
Ref<BitMap> TextureButton::get_click_mask() const {
return click_mask;
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index c0bdc3923b..df4420ca8c 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -249,6 +249,7 @@ bool TreeItem::is_range_exponential(int p_column) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), false);
return cells[p_column].expr;
}
+
void TreeItem::set_range_config(int p_column, double p_min, double p_max, double p_step, bool p_exp) {
ERR_FAIL_INDEX(p_column, cells.size());
cells.write[p_column].min = p_min;
@@ -481,21 +482,25 @@ int TreeItem::get_button_count(int p_column) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), -1);
return cells[p_column].buttons.size();
}
+
Ref<Texture2D> TreeItem::get_button(int p_column, int p_idx) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), Ref<Texture2D>());
ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), Ref<Texture2D>());
return cells[p_column].buttons[p_idx].texture;
}
+
String TreeItem::get_button_tooltip(int p_column, int p_idx) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), String());
ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), String());
return cells[p_column].buttons[p_idx].tooltip;
}
+
int TreeItem::get_button_id(int p_column, int p_idx) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), -1);
ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), -1);
return cells[p_column].buttons[p_idx].id;
}
+
void TreeItem::erase_button(int p_column, int p_idx) {
ERR_FAIL_INDEX(p_column, cells.size());
ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size());
@@ -560,12 +565,14 @@ void TreeItem::set_custom_color(int p_column, const Color &p_color) {
cells.write[p_column].color = p_color;
_changed_notify(p_column);
}
+
Color TreeItem::get_custom_color(int p_column) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), Color());
if (!cells[p_column].custom_color)
return Color();
return cells[p_column].color;
}
+
void TreeItem::clear_custom_color(int p_column) {
ERR_FAIL_INDEX(p_column, cells.size());
cells.write[p_column].custom_color = false;
@@ -1435,6 +1442,7 @@ int Tree::_count_selected_items(TreeItem *p_from) const {
return count;
}
+
void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_col, TreeItem *p_prev, bool *r_in_range, bool p_force_deselect) {
TreeItem::Cell &selected_cell = p_selected->cells.write[p_col];
@@ -2891,6 +2899,7 @@ TreeItem *Tree::create_item(TreeItem *p_parent, int p_idx) {
TreeItem *Tree::get_root() {
return root;
}
+
TreeItem *Tree::get_last_item() {
TreeItem *last = root;
@@ -3009,6 +3018,7 @@ void Tree::set_column_min_width(int p_column, int p_min_width) {
columns.write[p_column].min_width = p_min_width;
update();
}
+
void Tree::set_column_expand(int p_column, bool p_expand) {
ERR_FAIL_INDEX(p_column, columns.size());
@@ -3457,6 +3467,7 @@ int Tree::get_drop_section_at_position(const Point2 &p_pos) const {
return -100;
}
+
TreeItem *Tree::get_item_at_position(const Point2 &p_pos) const {
if (root) {
Point2 pos = p_pos;
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 8ca33eaf96..24a9d24e0e 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -180,6 +180,7 @@ bool CanvasItemMaterial::_is_shader_dirty() const {
return element.in_list();
}
+
void CanvasItemMaterial::set_blend_mode(BlendMode p_blend_mode) {
blend_mode = p_blend_mode;
_queue_shader_change();
@@ -216,6 +217,7 @@ void CanvasItemMaterial::set_particles_anim_h_frames(int p_frames) {
int CanvasItemMaterial::get_particles_anim_h_frames() const {
return particles_anim_h_frames;
}
+
void CanvasItemMaterial::set_particles_anim_v_frames(int p_frames) {
particles_anim_v_frames = p_frames;
RS::get_singleton()->material_set_param(_get_material(), shader_names->particles_anim_v_frames, p_frames);
@@ -645,6 +647,7 @@ void CanvasItem::set_modulate(const Color &p_modulate) {
modulate = p_modulate;
RenderingServer::get_singleton()->canvas_item_set_modulate(canvas_item, modulate);
}
+
Color CanvasItem::get_modulate() const {
return modulate;
}
@@ -681,6 +684,7 @@ void CanvasItem::set_self_modulate(const Color &p_self_modulate) {
self_modulate = p_self_modulate;
RenderingServer::get_singleton()->canvas_item_set_self_modulate(canvas_item, self_modulate);
}
+
Color CanvasItem::get_self_modulate() const {
return self_modulate;
}
@@ -815,6 +819,7 @@ void CanvasItem::draw_texture_rect(const Ref<Texture2D> &p_texture, const Rect2
ERR_FAIL_COND(p_texture.is_null());
p_texture->draw_rect(canvas_item, p_rect, p_tile, p_modulate, p_transpose, p_normal_map, p_specular_map, p_specular_color_shininess, RS::CanvasItemTextureFilter(p_texture_filter), RS::CanvasItemTextureRepeat(p_texture_repeat));
}
+
void CanvasItem::draw_texture_rect_region(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, bool p_clip_uv, TextureFilter p_texture_filter, TextureRepeat p_texture_repeat) {
ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
ERR_FAIL_COND(p_texture.is_null());
@@ -828,6 +833,7 @@ void CanvasItem::draw_style_box(const Ref<StyleBox> &p_style_box, const Rect2 &p
p_style_box->draw(canvas_item, p_rect);
}
+
void CanvasItem::draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, Ref<Texture2D> p_texture, float p_width, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, TextureFilter p_texture_filter, TextureRepeat p_texture_repeat) {
ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
@@ -837,6 +843,7 @@ void CanvasItem::draw_primitive(const Vector<Point2> &p_points, const Vector<Col
RenderingServer::get_singleton()->canvas_item_add_primitive(canvas_item, p_points, p_colors, p_uvs, rid, p_width, rid_normal, rid_specular, p_specular_color_shininess, RS::CanvasItemTextureFilter(p_texture_filter), RS::CanvasItemTextureRepeat(p_texture_repeat));
}
+
void CanvasItem::draw_set_transform(const Point2 &p_offset, float p_rot, const Size2 &p_scale) {
ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
@@ -881,6 +888,7 @@ void CanvasItem::draw_mesh(const Ref<Mesh> &p_mesh, const Ref<Texture2D> &p_text
RenderingServer::get_singleton()->canvas_item_add_mesh(canvas_item, p_mesh->get_rid(), p_transform, p_modulate, texture_rid, normal_map_rid, specular_map_rid, p_specular_color_shininess, RS::CanvasItemTextureFilter(p_texture_filter), RS::CanvasItemTextureRepeat(p_texture_repeat));
}
+
void CanvasItem::draw_multimesh(const Ref<MultiMesh> &p_multimesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, TextureFilter p_texture_filter, TextureRepeat p_texture_repeat) {
ERR_FAIL_COND(p_multimesh.is_null());
RID texture_rid = p_texture.is_valid() ? p_texture->get_rid() : RID();
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index d9280a96d2..1603ad66be 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -454,6 +454,7 @@ int HTTPRequest::get_max_redirects() const {
int HTTPRequest::get_downloaded_bytes() const {
return downloaded;
}
+
int HTTPRequest::get_body_size() const {
return body_len;
}
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 0f71606c0e..4e08057577 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1276,6 +1276,7 @@ void Node::remove_child(Node *p_child) {
int Node::get_child_count() const {
return data.children.size();
}
+
Node *Node::get_child(int p_index) const {
ERR_FAIL_INDEX_V(p_index, data.children.size(), nullptr);
@@ -1516,6 +1517,7 @@ void Node::set_owner(Node *p_owner) {
_set_owner_nocheck(p_owner);
}
+
Node *Node::get_owner() const {
return data.owner;
}
@@ -1685,6 +1687,7 @@ int Node::get_persistent_group_count() const {
return count;
}
+
void Node::_print_tree_pretty(const String &prefix, const bool last) {
String new_prefix = last ? String::utf8(" â”–â•´") : String::utf8(" â” â•´");
print_line(prefix + new_prefix + String(get_name()));
@@ -1814,6 +1817,7 @@ void Node::remove_and_skip() {
void Node::set_filename(const String &p_filename) {
data.filename = p_filename;
}
+
String Node::get_filename() const {
return data.filename;
}
@@ -1821,6 +1825,7 @@ String Node::get_filename() const {
void Node::set_editor_description(const String &p_editor_description) {
set_meta("_editor_description_", p_editor_description);
}
+
String Node::get_editor_description() const {
if (has_meta("_editor_description_")) {
return get_meta("_editor_description_");
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index 758523caf6..c1d4435687 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -100,6 +100,7 @@ void ResourcePreloader::remove_resource(const StringName &p_name) {
ERR_FAIL_COND(!resources.has(p_name));
resources.erase(p_name);
}
+
void ResourcePreloader::rename_resource(const StringName &p_from_name, const StringName &p_to_name) {
ERR_FAIL_COND(!resources.has(p_from_name));
@@ -112,6 +113,7 @@ void ResourcePreloader::rename_resource(const StringName &p_from_name, const Str
bool ResourcePreloader::has_resource(const StringName &p_name) const {
return resources.has(p_name);
}
+
RES ResourcePreloader::get_resource(const StringName &p_name) const {
ERR_FAIL_COND_V(!resources.has(p_name), RES());
return resources[p_name];
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 018d08d9fc..41fc830f48 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -530,6 +530,7 @@ void SceneTree::_main_window_close() {
_quit = true;
}
}
+
void SceneTree::_main_window_go_back() {
if (quit_on_go_back) {
_quit = true;
@@ -660,6 +661,7 @@ Ref<Material> SceneTree::get_debug_navigation_disabled_material() {
return navigation_disabled_material;
}
+
Ref<Material> SceneTree::get_debug_collision_material() {
if (collision_material.is_valid())
return collision_material;
@@ -792,6 +794,7 @@ void SceneMainLoop::_update_listener_2d() {
}
}
+
*/
void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input, Viewport *p_viewport) {
@@ -835,6 +838,7 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p
if (call_lock == 0)
call_skip.clear();
}
+
Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
r_error.error = Callable::CallError::CALL_OK;
@@ -878,6 +882,7 @@ Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable:
int64_t SceneTree::get_frame() const {
return current_frame;
}
+
int64_t SceneTree::get_event_count() const {
return current_event;
}
@@ -906,6 +911,7 @@ Array SceneTree::_get_nodes_in_group(const StringName &p_group) {
bool SceneTree::has_group(const StringName &p_identifier) const {
return group_map.has(p_identifier);
}
+
void SceneTree::get_nodes_in_group(const StringName &p_group, List<Node *> *p_list) {
Map<StringName, Group>::Element *E = group_map.find(p_group);
if (!E)
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp
index ebfc34b9c7..726dcb58de 100644
--- a/scene/main/shader_globals_override.cpp
+++ b/scene/main/shader_globals_override.cpp
@@ -48,6 +48,7 @@ StringName *ShaderGlobalsOverride::_remap(const StringName &p_name) const {
return r;
}
+
bool ShaderGlobalsOverride::_set(const StringName &p_name, const Variant &p_value) {
StringName *r = _remap(p_name);
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 81ab7e3391..286f332ba5 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -80,6 +80,7 @@ void Timer::set_wait_time(float p_time) {
ERR_FAIL_COND_MSG(p_time <= 0, "Time should be greater than zero.");
wait_time = p_time;
}
+
float Timer::get_wait_time() const {
return wait_time;
}
@@ -87,6 +88,7 @@ float Timer::get_wait_time() const {
void Timer::set_one_shot(bool p_one_shot) {
one_shot = p_one_shot;
}
+
bool Timer::is_one_shot() const {
return one_shot;
}
@@ -94,6 +96,7 @@ bool Timer::is_one_shot() const {
void Timer::set_autostart(bool p_start) {
autostart = p_start;
}
+
bool Timer::has_autostart() const {
return autostart;
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 6fcf0ace7a..8d22ebb7ae 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -104,14 +104,17 @@ int ViewportTexture::get_width() const {
ERR_FAIL_COND_V_MSG(!vp, 0, "Viewport Texture must be set to use it.");
return vp->size.width;
}
+
int ViewportTexture::get_height() const {
ERR_FAIL_COND_V_MSG(!vp, 0, "Viewport Texture must be set to use it.");
return vp->size.height;
}
+
Size2 ViewportTexture::get_size() const {
ERR_FAIL_COND_V_MSG(!vp, Size2(), "Viewport Texture must be set to use it.");
return vp->size;
}
+
RID ViewportTexture::get_rid() const {
//ERR_FAIL_COND_V_MSG(!vp, RID(), "Viewport Texture must be set to use it.");
if (proxy.is_null()) {
@@ -124,6 +127,7 @@ RID ViewportTexture::get_rid() const {
bool ViewportTexture::has_alpha() const {
return false;
}
+
Ref<Image> ViewportTexture::get_data() const {
ERR_FAIL_COND_V_MSG(!vp, Ref<Image>(), "Viewport Texture must be set to use it.");
return RS::get_singleton()->texture_2d_get(vp->texture_rid);
@@ -852,9 +856,11 @@ void Viewport::_set_size(const Size2i &p_size, const Size2i &p_size_2d_override,
Size2i Viewport::_get_size() const {
return size;
}
+
Size2i Viewport::_get_size_2d_override() const {
return size_2d_override;
}
+
bool Viewport::_is_size_allocated() const {
return size_allocated;
}
@@ -1382,6 +1388,7 @@ void Viewport::set_shadow_atlas_quadrant_subdiv(int p_quadrant, ShadowAtlasQuadr
RS::get_singleton()->viewport_set_shadow_atlas_quadrant_subdivision(viewport, p_quadrant, subdiv[p_subdiv]);
}
+
Viewport::ShadowAtlasQuadrantSubdiv Viewport::get_shadow_atlas_quadrant_subdiv(int p_quadrant) const {
ERR_FAIL_INDEX_V(p_quadrant, 4, SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
return shadow_atlas_quadrant_subdiv[p_quadrant];
@@ -1604,6 +1611,7 @@ void Viewport::_gui_call_notification(Control *p_control, int p_what) {
//_unblock();
}
+
Control *Viewport::_gui_find_control(const Point2 &p_global) {
//aca va subwindows
_gui_sort_roots();
@@ -2507,6 +2515,7 @@ void Viewport::input_text(const String &p_text) {
gui.key_focus->call("set_text", p_text);
}
}
+
Viewport::SubWindowResize Viewport::_sub_window_get_resize_margin(Window *p_subwindow, const Point2 &p_point) {
if (p_subwindow->get_flag(Window::FLAG_BORDERLESS)) {
return SUB_WINDOW_RESIZE_DISABLED;
@@ -2570,6 +2579,7 @@ Viewport::SubWindowResize Viewport::_sub_window_get_resize_margin(Window *p_subw
return SUB_WINDOW_RESIZE_DISABLED;
}
+
bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
if (gui.subwindow_drag != SUB_WINDOW_DRAG_DISABLED) {
ERR_FAIL_COND_V(gui.subwindow_focused == nullptr, false);
@@ -2950,6 +2960,7 @@ String Viewport::get_configuration_warning() const {
void Viewport::gui_reset_canvas_sort_index() {
gui.canvas_sort_index = 0;
}
+
int Viewport::gui_get_canvas_sort_index() {
return gui.canvas_sort_index++;
}
@@ -2977,6 +2988,7 @@ void Viewport::set_screen_space_aa(ScreenSpaceAA p_screen_space_aa) {
Viewport::ScreenSpaceAA Viewport::get_screen_space_aa() const {
return screen_space_aa;
}
+
void Viewport::set_debug_draw(DebugDraw p_debug_draw) {
debug_draw = p_debug_draw;
RS::get_singleton()->viewport_set_debug_draw(viewport, RS::ViewportDebugDraw(p_debug_draw));
@@ -3070,6 +3082,7 @@ void Viewport::set_default_canvas_item_texture_repeat(DefaultCanvasItemTextureRe
default_canvas_item_texture_repeat = p_repeat;
_propagate_update_default_repeat(this);
}
+
Viewport::DefaultCanvasItemTextureRepeat Viewport::get_default_canvas_item_texture_repeat() const {
return default_canvas_item_texture_repeat;
}
@@ -3112,9 +3125,11 @@ Viewport *Viewport::get_parent_viewport() const {
void Viewport::set_embed_subwindows_hint(bool p_embed) {
gui.embed_subwindows_hint = p_embed;
}
+
bool Viewport::get_embed_subwindows_hint() const {
return gui.embed_subwindows_hint;
}
+
bool Viewport::is_embedding_subwindows() const {
return gui.embed_subwindows_hint;
}
@@ -3423,6 +3438,7 @@ bool SubViewport::is_using_xr() {
void SubViewport::set_size(const Size2i &p_size) {
_set_size(p_size, _get_size_2d_override(), Rect2i(), _stretch_transform(), true);
}
+
Size2i SubViewport::get_size() const {
return _get_size();
}
@@ -3430,6 +3446,7 @@ Size2i SubViewport::get_size() const {
void SubViewport::set_size_2d_override(const Size2i &p_size) {
_set_size(_get_size(), p_size, Rect2i(), _stretch_transform(), true);
}
+
Size2i SubViewport::get_size_2d_override() const {
return _get_size_2d_override();
}
@@ -3442,6 +3459,7 @@ void SubViewport::set_size_2d_override_stretch(bool p_enable) {
size_2d_override_stretch = p_enable;
_set_size(_get_size(), _get_size_2d_override(), Rect2i(), _stretch_transform(), true);
}
+
bool SubViewport::is_size_2d_override_stretch_enabled() const {
return size_2d_override_stretch;
}
@@ -3450,6 +3468,7 @@ void SubViewport::set_update_mode(UpdateMode p_mode) {
update_mode = p_mode;
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::ViewportUpdateMode(p_mode));
}
+
SubViewport::UpdateMode SubViewport::get_update_mode() const {
return update_mode;
}
@@ -3458,6 +3477,7 @@ void SubViewport::set_clear_mode(ClearMode p_mode) {
clear_mode = p_mode;
RS::get_singleton()->viewport_set_clear_mode(get_viewport_rid(), RS::ViewportClearMode(p_mode));
}
+
SubViewport::ClearMode SubViewport::get_clear_mode() const {
return clear_mode;
}
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index ea2a2083be..0a38df5769 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -46,6 +46,7 @@ void Window::set_title(const String &p_title) {
DisplayServer::get_singleton()->window_set_title(p_title, window_id);
}
}
+
String Window::get_title() const {
return title;
}
@@ -56,6 +57,7 @@ void Window::set_current_screen(int p_screen) {
return;
DisplayServer::get_singleton()->window_set_current_screen(p_screen, window_id);
}
+
int Window::get_current_screen() const {
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
current_screen = DisplayServer::get_singleton()->window_get_current_screen(window_id);
@@ -73,6 +75,7 @@ void Window::set_position(const Point2i &p_position) {
DisplayServer::get_singleton()->window_set_position(p_position, window_id);
}
}
+
Point2i Window::get_position() const {
return position;
}
@@ -81,6 +84,7 @@ void Window::set_size(const Size2i &p_size) {
size = p_size;
_update_window_size();
}
+
Size2i Window::get_size() const {
return size;
}
@@ -172,6 +176,7 @@ void Window::request_attention() {
DisplayServer::get_singleton()->window_request_attention(window_id);
}
}
+
void Window::move_to_foreground() {
if (embedder) {
embedder->_sub_window_grab_focus(this);
@@ -197,6 +202,7 @@ void Window::set_ime_active(bool p_active) {
DisplayServer::get_singleton()->window_set_ime_active(p_active, window_id);
}
}
+
void Window::set_ime_position(const Point2i &p_pos) {
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_ime_position(p_pos, window_id);
@@ -241,6 +247,7 @@ void Window::_make_window() {
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_WHEN_VISIBLE);
}
+
void Window::_update_from_window() {
ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID);
mode = (Mode)DisplayServer::get_singleton()->window_get_mode(window_id);
@@ -338,6 +345,7 @@ void Window::_event_callback(DisplayServer::WindowEvent p_event) {
void Window::show() {
set_visible(true);
}
+
void Window::hide() {
set_visible(false);
}
@@ -459,6 +467,7 @@ void Window::set_transient(bool p_transient) {
_clear_transient();
}
}
+
bool Window::is_transient() const {
return transient;
}
@@ -519,6 +528,7 @@ void Window::_update_window_size() {
//update the viewport
_update_viewport_size();
}
+
void Window::_update_viewport_size() {
//update the viewport part
@@ -774,6 +784,7 @@ void Window::set_content_scale_mode(ContentScaleMode p_mode) {
content_scale_mode = p_mode;
_update_viewport_size();
}
+
Window::ContentScaleMode Window::get_content_scale_mode() const {
return content_scale_mode;
}
@@ -782,6 +793,7 @@ void Window::set_content_scale_aspect(ContentScaleAspect p_aspect) {
content_scale_aspect = p_aspect;
_update_viewport_size();
}
+
Window::ContentScaleAspect Window::get_content_scale_aspect() const {
return content_scale_aspect;
}
@@ -793,6 +805,7 @@ void Window::set_use_font_oversampling(bool p_oversampling) {
use_font_oversampling = p_oversampling;
_update_viewport_size();
}
+
bool Window::is_using_font_oversampling() const {
return use_font_oversampling;
}
@@ -828,6 +841,7 @@ Size2 Window::_get_contents_minimum_size() const {
return max;
}
+
void Window::_update_child_controls() {
if (!updating_child_controls) {
return;
@@ -837,6 +851,7 @@ void Window::_update_child_controls() {
updating_child_controls = false;
}
+
void Window::child_controls_changed() {
if (!is_inside_tree() || !visible || updating_child_controls) {
return;
@@ -870,9 +885,11 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) {
unhandled_input(p_ev);
}
}
+
void Window::_window_input_text(const String &p_text) {
input_text(p_text);
}
+
void Window::_window_drop_files(const Vector<String> &p_files) {
emit_signal("files_dropped", p_files, current_screen);
}
@@ -1102,6 +1119,7 @@ void Window::set_theme(const Ref<Theme> &p_theme) {
}
}
}
+
Ref<Theme> Window::get_theme() const {
return theme;
}
@@ -1110,22 +1128,27 @@ Ref<Texture2D> Window::get_theme_icon(const StringName &p_name, const StringName
StringName type = p_type ? p_type : get_class_name();
return Control::get_icons(theme_owner, theme_owner_window, p_name, type);
}
+
Ref<Shader> Window::get_theme_shader(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::get_shaders(theme_owner, theme_owner_window, p_name, type);
}
+
Ref<StyleBox> Window::get_theme_stylebox(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::get_styleboxs(theme_owner, theme_owner_window, p_name, type);
}
+
Ref<Font> Window::get_theme_font(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::get_fonts(theme_owner, theme_owner_window, p_name, type);
}
+
Color Window::get_theme_color(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::get_colors(theme_owner, theme_owner_window, p_name, type);
}
+
int Window::get_theme_constant(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::get_constants(theme_owner, theme_owner_window, p_name, type);
@@ -1135,22 +1158,27 @@ bool Window::has_theme_icon(const StringName &p_name, const StringName &p_type)
StringName type = p_type ? p_type : get_class_name();
return Control::has_icons(theme_owner, theme_owner_window, p_name, type);
}
+
bool Window::has_theme_shader(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::has_shaders(theme_owner, theme_owner_window, p_name, type);
}
+
bool Window::has_theme_stylebox(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::has_styleboxs(theme_owner, theme_owner_window, p_name, type);
}
+
bool Window::has_theme_font(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::has_fonts(theme_owner, theme_owner_window, p_name, type);
}
+
bool Window::has_theme_color(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::has_colors(theme_owner, theme_owner_window, p_name, type);
}
+
bool Window::has_theme_constant(const StringName &p_name, const StringName &p_type) const {
StringName type = p_type ? p_type : get_class_name();
return Control::has_constants(theme_owner, theme_owner_window, p_name, type);
@@ -1354,5 +1382,6 @@ Window::Window() {
content_scale_aspect = CONTENT_SCALE_ASPECT_IGNORE;
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_DISABLED);
}
+
Window::~Window() {
}
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 44aa3f8319..fb22b99b26 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -732,6 +732,7 @@ int Animation::_insert_pos(float p_time, T& p_keys) {
}
}
+
*/
template <class T, class V>
int Animation::_insert(float p_time, T &p_keys, const V &p_value) {
@@ -1421,9 +1422,11 @@ Animation::TransformKey Animation::_interpolate(const Animation::TransformKey &p
Vector3 Animation::_interpolate(const Vector3 &p_a, const Vector3 &p_b, float p_c) const {
return p_a.lerp(p_b, p_c);
}
+
Quat Animation::_interpolate(const Quat &p_a, const Quat &p_b, float p_c) const {
return p_a.slerp(p_b, p_c);
}
+
Variant Animation::_interpolate(const Variant &p_a, const Variant &p_b, float p_c) const {
Variant dst;
Variant::interpolate(p_a, p_b, p_c, dst);
@@ -1443,12 +1446,15 @@ Animation::TransformKey Animation::_cubic_interpolate(const Animation::Transform
return tk;
}
+
Vector3 Animation::_cubic_interpolate(const Vector3 &p_pre_a, const Vector3 &p_a, const Vector3 &p_b, const Vector3 &p_post_b, float p_c) const {
return p_a.cubic_interpolate(p_b, p_pre_a, p_post_b, p_c);
}
+
Quat Animation::_cubic_interpolate(const Quat &p_pre_a, const Quat &p_a, const Quat &p_b, const Quat &p_post_b, float p_c) const {
return p_a.cubic_slerp(p_b, p_pre_a, p_post_b, p_c);
}
+
Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a, const Variant &p_b, const Variant &p_post_b, float p_c) const {
Variant::Type type_a = p_a.get_type();
Variant::Type type_b = p_b.get_type();
@@ -1533,6 +1539,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a
}
}
}
+
float Animation::_cubic_interpolate(const float &p_pre_a, const float &p_a, const float &p_b, const float &p_post_b, float p_c) const {
return _interpolate(p_a, p_b, p_c);
}
@@ -2008,6 +2015,7 @@ void Animation::method_track_get_key_indices(int p_track, float p_time, float p_
_method_track_get_key_indices_in_range(mt, from_time, to_time, p_indices);
}
+
Vector<Variant> Animation::method_track_get_params(int p_track, int p_key_idx) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), Vector<Variant>());
Track *t = tracks[p_track];
@@ -2021,6 +2029,7 @@ Vector<Variant> Animation::method_track_get_params(int p_track, int p_key_idx) c
return mk.params;
}
+
StringName Animation::method_track_get_name(int p_track, int p_key_idx) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), StringName());
Track *t = tracks[p_track];
@@ -2087,6 +2096,7 @@ void Animation::bezier_track_set_key_in_handle(int p_track, int p_index, const V
}
emit_changed();
}
+
void Animation::bezier_track_set_key_out_handle(int p_track, int p_index, const Vector2 &p_handle) {
ERR_FAIL_INDEX(p_track, tracks.size());
Track *t = tracks[p_track];
@@ -2102,6 +2112,7 @@ void Animation::bezier_track_set_key_out_handle(int p_track, int p_index, const
}
emit_changed();
}
+
float Animation::bezier_track_get_key_value(int p_track, int p_index) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), 0);
Track *t = tracks[p_track];
@@ -2113,6 +2124,7 @@ float Animation::bezier_track_get_key_value(int p_track, int p_index) const {
return bt->values[p_index].value.value;
}
+
Vector2 Animation::bezier_track_get_key_in_handle(int p_track, int p_index) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), Vector2());
Track *t = tracks[p_track];
@@ -2124,6 +2136,7 @@ Vector2 Animation::bezier_track_get_key_in_handle(int p_track, int p_index) cons
return bt->values[p_index].value.in_handle;
}
+
Vector2 Animation::bezier_track_get_key_out_handle(int p_track, int p_index) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), Vector2());
Track *t = tracks[p_track];
@@ -2296,6 +2309,7 @@ RES Animation::audio_track_get_key_stream(int p_track, int p_key) const {
return at->values[p_key].value.stream;
}
+
float Animation::audio_track_get_key_start_offset(int p_track, int p_key) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), 0);
const Track *t = tracks[p_track];
@@ -2307,6 +2321,7 @@ float Animation::audio_track_get_key_start_offset(int p_track, int p_key) const
return at->values[p_key].value.start_offset;
}
+
float Animation::audio_track_get_key_end_offset(int p_track, int p_key) const {
ERR_FAIL_INDEX_V(p_track, tracks.size(), 0);
const Track *t = tracks[p_track];
@@ -2372,6 +2387,7 @@ void Animation::set_length(float p_length) {
length = p_length;
emit_changed();
}
+
float Animation::get_length() const {
return length;
}
@@ -2380,6 +2396,7 @@ void Animation::set_loop(bool p_enabled) {
loop = p_enabled;
emit_changed();
}
+
bool Animation::has_loop() const {
return loop;
}
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index b6608b47d0..dafcf12183 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -70,6 +70,7 @@ int AudioStreamPlaybackSample::get_loop_count() const {
float AudioStreamPlaybackSample::get_playback_position() const {
return float(offset >> MIX_FRAC_BITS) / base->mix_rate;
}
+
void AudioStreamPlaybackSample::seek(float p_time) {
if (base->format == AudioStreamSample::FORMAT_IMA_ADPCM)
return; //no seeking in ima-adpcm
@@ -404,6 +405,7 @@ AudioStreamSample::Format AudioStreamSample::get_format() const {
void AudioStreamSample::set_loop_mode(LoopMode p_loop_mode) {
loop_mode = p_loop_mode;
}
+
AudioStreamSample::LoopMode AudioStreamSample::get_loop_mode() const {
return loop_mode;
}
@@ -411,6 +413,7 @@ AudioStreamSample::LoopMode AudioStreamSample::get_loop_mode() const {
void AudioStreamSample::set_loop_begin(int p_frame) {
loop_begin = p_frame;
}
+
int AudioStreamSample::get_loop_begin() const {
return loop_begin;
}
@@ -418,6 +421,7 @@ int AudioStreamSample::get_loop_begin() const {
void AudioStreamSample::set_loop_end(int p_frame) {
loop_end = p_frame;
}
+
int AudioStreamSample::get_loop_end() const {
return loop_end;
}
@@ -426,12 +430,15 @@ void AudioStreamSample::set_mix_rate(int p_hz) {
ERR_FAIL_COND(p_hz == 0);
mix_rate = p_hz;
}
+
int AudioStreamSample::get_mix_rate() const {
return mix_rate;
}
+
void AudioStreamSample::set_stereo(bool p_enable) {
stereo = p_enable;
}
+
bool AudioStreamSample::is_stereo() const {
return stereo;
}
@@ -478,6 +485,7 @@ void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) {
AudioServer::get_singleton()->unlock();
}
+
Vector<uint8_t> AudioStreamSample::get_data() const {
Vector<uint8_t> pv;
diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp
index 27a5fee934..e23e3f4c4d 100644
--- a/scene/resources/bit_map.cpp
+++ b/scene/resources/bit_map.cpp
@@ -623,6 +623,7 @@ Ref<Image> BitMap::convert_to_image() const {
return image;
}
+
void BitMap::blit(const Vector2 &p_pos, const Ref<BitMap> &p_bitmap) {
int x = p_pos.x;
int y = p_pos.y;
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index d8f0640242..9c3e5ad437 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -529,6 +529,7 @@ void Curve::_bind_methods() {
int Curve2D::get_point_count() const {
return points.size();
}
+
void Curve2D::add_point(const Vector2 &p_pos, const Vector2 &p_in, const Vector2 &p_out, int p_atpos) {
Point n;
n.pos = p_pos;
@@ -550,6 +551,7 @@ void Curve2D::set_point_position(int p_index, const Vector2 &p_pos) {
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
Vector2 Curve2D::get_point_position(int p_index) const {
ERR_FAIL_INDEX_V(p_index, points.size(), Vector2());
return points[p_index].pos;
@@ -562,6 +564,7 @@ void Curve2D::set_point_in(int p_index, const Vector2 &p_in) {
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
Vector2 Curve2D::get_point_in(int p_index) const {
ERR_FAIL_INDEX_V(p_index, points.size(), Vector2());
return points[p_index].in;
@@ -727,6 +730,7 @@ float Curve2D::get_baked_length() const {
return baked_max_ofs;
}
+
Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const {
if (baked_cache_dirty)
_bake();
@@ -876,6 +880,7 @@ Dictionary Curve2D::_get_data() const {
return dc;
}
+
void Curve2D::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(!p_data.has("points"));
@@ -979,6 +984,7 @@ Curve2D::Curve2D() {
int Curve3D::get_point_count() const {
return points.size();
}
+
void Curve3D::add_point(const Vector3 &p_pos, const Vector3 &p_in, const Vector3 &p_out, int p_atpos) {
Point n;
n.pos = p_pos;
@@ -992,6 +998,7 @@ void Curve3D::add_point(const Vector3 &p_pos, const Vector3 &p_in, const Vector3
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
void Curve3D::set_point_position(int p_index, const Vector3 &p_pos) {
ERR_FAIL_INDEX(p_index, points.size());
@@ -999,6 +1006,7 @@ void Curve3D::set_point_position(int p_index, const Vector3 &p_pos) {
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
Vector3 Curve3D::get_point_position(int p_index) const {
ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
return points[p_index].pos;
@@ -1011,6 +1019,7 @@ void Curve3D::set_point_tilt(int p_index, float p_tilt) {
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
float Curve3D::get_point_tilt(int p_index) const {
ERR_FAIL_INDEX_V(p_index, points.size(), 0);
return points[p_index].tilt;
@@ -1023,6 +1032,7 @@ void Curve3D::set_point_in(int p_index, const Vector3 &p_in) {
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
+
Vector3 Curve3D::get_point_in(int p_index) const {
ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
return points[p_index].in;
@@ -1246,6 +1256,7 @@ float Curve3D::get_baked_length() const {
return baked_max_ofs;
}
+
Vector3 Curve3D::interpolate_baked(float p_offset, bool p_cubic) const {
if (baked_cache_dirty)
_bake();
@@ -1501,6 +1512,7 @@ Dictionary Curve3D::_get_data() const {
return dc;
}
+
void Curve3D::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(!p_data.has("points"));
ERR_FAIL_COND(!p_data.has("tilts"));
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 5d2d690084..3581fffdba 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -226,6 +226,7 @@ float DynamicFontAtSize::get_height() const {
float DynamicFontAtSize::get_ascent() const {
return ascent;
}
+
float DynamicFontAtSize::get_descent() const {
return descent;
}
@@ -348,6 +349,7 @@ unsigned long DynamicFontAtSize::_ft_stream_io(FT_Stream stream, unsigned long o
return f->get_buffer(buffer, count);
}
+
void DynamicFontAtSize::_ft_stream_close(FT_Stream stream) {
FileAccess *f = (FileAccess *)stream->descriptor.pointer;
f->close();
@@ -859,11 +861,13 @@ void DynamicFont::add_fallback(const Ref<DynamicFontData> &p_data) {
int DynamicFont::get_fallback_count() const {
return fallbacks.size();
}
+
Ref<DynamicFontData> DynamicFont::get_fallback(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, fallbacks.size(), Ref<DynamicFontData>());
return fallbacks[p_idx];
}
+
void DynamicFont::remove_fallback(int p_idx) {
ERR_FAIL_INDEX(p_idx, fallbacks.size());
fallbacks.remove(p_idx);
@@ -913,6 +917,7 @@ bool DynamicFont::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void DynamicFont::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < fallbacks.size(); i++) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "fallback/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "DynamicFontData"));
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 87d070db6f..5356b5bea2 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -57,26 +57,32 @@ void Environment::set_sky_custom_fov(float p_scale) {
bg_sky_custom_fov = p_scale;
RS::get_singleton()->environment_set_sky_custom_fov(environment, p_scale);
}
+
void Environment::set_bg_color(const Color &p_color) {
bg_color = p_color;
RS::get_singleton()->environment_set_bg_color(environment, p_color);
}
+
void Environment::set_bg_energy(float p_energy) {
bg_energy = p_energy;
RS::get_singleton()->environment_set_bg_energy(environment, p_energy);
}
+
void Environment::set_canvas_max_layer(int p_max_layer) {
bg_canvas_max_layer = p_max_layer;
RS::get_singleton()->environment_set_canvas_max_layer(environment, p_max_layer);
}
+
void Environment::set_ambient_light_color(const Color &p_color) {
ambient_color = p_color;
RS::get_singleton()->environment_set_ambient_light(environment, ambient_color, RS::EnvironmentAmbientSource(ambient_source), ambient_energy, ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source), ao_color);
}
+
void Environment::set_ambient_light_energy(float p_energy) {
ambient_energy = p_energy;
RS::get_singleton()->environment_set_ambient_light(environment, ambient_color, RS::EnvironmentAmbientSource(ambient_source), ambient_energy, ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source), ao_color);
}
+
void Environment::set_ambient_light_sky_contribution(float p_energy) {
ambient_sky_contribution = p_energy;
RS::get_singleton()->environment_set_ambient_light(environment, ambient_color, RS::EnvironmentAmbientSource(ambient_source), ambient_energy, ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source), ao_color);
@@ -98,10 +104,12 @@ void Environment::set_ambient_source(AmbientSource p_source) {
Environment::AmbientSource Environment::get_ambient_source() const {
return ambient_source;
}
+
void Environment::set_reflection_source(ReflectionSource p_source) {
reflection_source = p_source;
RS::get_singleton()->environment_set_ambient_light(environment, ambient_color, RS::EnvironmentAmbientSource(ambient_source), ambient_energy, ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source), ao_color);
}
+
Environment::ReflectionSource Environment::get_reflection_source() const {
return reflection_source;
}
@@ -109,6 +117,7 @@ Environment::ReflectionSource Environment::get_reflection_source() const {
Environment::BGMode Environment::get_background() const {
return bg_mode;
}
+
Ref<Sky> Environment::get_sky() const {
return bg_sky;
}
@@ -129,21 +138,27 @@ Vector3 Environment::get_sky_rotation() const {
Color Environment::get_bg_color() const {
return bg_color;
}
+
float Environment::get_bg_energy() const {
return bg_energy;
}
+
int Environment::get_canvas_max_layer() const {
return bg_canvas_max_layer;
}
+
Color Environment::get_ambient_light_color() const {
return ambient_color;
}
+
float Environment::get_ambient_light_energy() const {
return ambient_energy;
}
+
float Environment::get_ambient_light_sky_contribution() const {
return ambient_sky_contribution;
}
+
int Environment::get_camera_feed_id() const {
return camera_feed_id;
}
@@ -170,6 +185,7 @@ void Environment::set_tonemap_white(float p_white) {
tonemap_white = p_white;
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
}
+
float Environment::get_tonemap_white() const {
return tonemap_white;
}
@@ -179,6 +195,7 @@ void Environment::set_tonemap_auto_exposure(bool p_enabled) {
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
_change_notify();
}
+
bool Environment::get_tonemap_auto_exposure() const {
return tonemap_auto_exposure;
}
@@ -187,6 +204,7 @@ void Environment::set_tonemap_auto_exposure_max(float p_auto_exposure_max) {
tonemap_auto_exposure_max = p_auto_exposure_max;
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
}
+
float Environment::get_tonemap_auto_exposure_max() const {
return tonemap_auto_exposure_max;
}
@@ -195,6 +213,7 @@ void Environment::set_tonemap_auto_exposure_min(float p_auto_exposure_min) {
tonemap_auto_exposure_min = p_auto_exposure_min;
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
}
+
float Environment::get_tonemap_auto_exposure_min() const {
return tonemap_auto_exposure_min;
}
@@ -203,6 +222,7 @@ void Environment::set_tonemap_auto_exposure_speed(float p_auto_exposure_speed) {
tonemap_auto_exposure_speed = p_auto_exposure_speed;
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
}
+
float Environment::get_tonemap_auto_exposure_speed() const {
return tonemap_auto_exposure_speed;
}
@@ -211,6 +231,7 @@ void Environment::set_tonemap_auto_exposure_grey(float p_auto_exposure_grey) {
tonemap_auto_exposure_grey = p_auto_exposure_grey;
RS::get_singleton()->environment_set_tonemap(environment, RS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey);
}
+
float Environment::get_tonemap_auto_exposure_grey() const {
return tonemap_auto_exposure_grey;
}
@@ -229,6 +250,7 @@ void Environment::set_adjustment_brightness(float p_brightness) {
adjustment_brightness = p_brightness;
RS::get_singleton()->environment_set_adjustment(environment, adjustment_enabled, adjustment_brightness, adjustment_contrast, adjustment_saturation, adjustment_color_correction.is_valid() ? adjustment_color_correction->get_rid() : RID());
}
+
float Environment::get_adjustment_brightness() const {
return adjustment_brightness;
}
@@ -237,6 +259,7 @@ void Environment::set_adjustment_contrast(float p_contrast) {
adjustment_contrast = p_contrast;
RS::get_singleton()->environment_set_adjustment(environment, adjustment_enabled, adjustment_brightness, adjustment_contrast, adjustment_saturation, adjustment_color_correction.is_valid() ? adjustment_color_correction->get_rid() : RID());
}
+
float Environment::get_adjustment_contrast() const {
return adjustment_contrast;
}
@@ -245,6 +268,7 @@ void Environment::set_adjustment_saturation(float p_saturation) {
adjustment_saturation = p_saturation;
RS::get_singleton()->environment_set_adjustment(environment, adjustment_enabled, adjustment_brightness, adjustment_contrast, adjustment_saturation, adjustment_color_correction.is_valid() ? adjustment_color_correction->get_rid() : RID());
}
+
float Environment::get_adjustment_saturation() const {
return adjustment_saturation;
}
@@ -253,6 +277,7 @@ void Environment::set_adjustment_color_correction(const Ref<Texture2D> &p_ramp)
adjustment_color_correction = p_ramp;
RS::get_singleton()->environment_set_adjustment(environment, adjustment_enabled, adjustment_brightness, adjustment_contrast, adjustment_saturation, adjustment_color_correction.is_valid() ? adjustment_color_correction->get_rid() : RID());
}
+
Ref<Texture2D> Environment::get_adjustment_color_correction() const {
return adjustment_color_correction;
}
@@ -352,6 +377,7 @@ void Environment::set_ssr_max_steps(int p_steps) {
ssr_max_steps = p_steps;
RS::get_singleton()->environment_set_ssr(environment, ssr_enabled, ssr_max_steps, ssr_fade_in, ssr_fade_out, ssr_depth_tolerance);
}
+
int Environment::get_ssr_max_steps() const {
return ssr_max_steps;
}
@@ -360,6 +386,7 @@ void Environment::set_ssr_fade_in(float p_fade_in) {
ssr_fade_in = p_fade_in;
RS::get_singleton()->environment_set_ssr(environment, ssr_enabled, ssr_max_steps, ssr_fade_in, ssr_fade_out, ssr_depth_tolerance);
}
+
float Environment::get_ssr_fade_in() const {
return ssr_fade_in;
}
@@ -368,6 +395,7 @@ void Environment::set_ssr_fade_out(float p_fade_out) {
ssr_fade_out = p_fade_out;
RS::get_singleton()->environment_set_ssr(environment, ssr_enabled, ssr_max_steps, ssr_fade_in, ssr_fade_out, ssr_depth_tolerance);
}
+
float Environment::get_ssr_fade_out() const {
return ssr_fade_out;
}
@@ -376,6 +404,7 @@ void Environment::set_ssr_depth_tolerance(float p_depth_tolerance) {
ssr_depth_tolerance = p_depth_tolerance;
RS::get_singleton()->environment_set_ssr(environment, ssr_enabled, ssr_max_steps, ssr_fade_in, ssr_fade_out, ssr_depth_tolerance);
}
+
float Environment::get_ssr_depth_tolerance() const {
return ssr_depth_tolerance;
}
@@ -394,6 +423,7 @@ void Environment::set_ssao_radius(float p_radius) {
ssao_radius = p_radius;
RS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_bias, ssao_direct_light_affect, ssao_ao_channel_affect, RS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
+
float Environment::get_ssao_radius() const {
return ssao_radius;
}
@@ -411,6 +441,7 @@ void Environment::set_ssao_bias(float p_bias) {
ssao_bias = p_bias;
RS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_bias, ssao_direct_light_affect, ssao_ao_channel_affect, RS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
+
float Environment::get_ssao_bias() const {
return ssao_bias;
}
@@ -419,6 +450,7 @@ void Environment::set_ssao_direct_light_affect(float p_direct_light_affect) {
ssao_direct_light_affect = p_direct_light_affect;
RS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_bias, ssao_direct_light_affect, ssao_ao_channel_affect, RS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
+
float Environment::get_ssao_direct_light_affect() const {
return ssao_direct_light_affect;
}
@@ -427,6 +459,7 @@ void Environment::set_ssao_ao_channel_affect(float p_ao_channel_affect) {
ssao_ao_channel_affect = p_ao_channel_affect;
RS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_bias, ssao_direct_light_affect, ssao_ao_channel_affect, RS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
+
float Environment::get_ssao_ao_channel_affect() const {
return ssao_ao_channel_affect;
}
@@ -444,6 +477,7 @@ void Environment::set_ssao_blur(SSAOBlur p_blur) {
ssao_blur = p_blur;
RS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_bias, ssao_direct_light_affect, ssao_ao_channel_affect, RS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
+
Environment::SSAOBlur Environment::get_ssao_blur() const {
return ssao_blur;
}
@@ -477,6 +511,7 @@ void Environment::set_glow_level(int p_level, bool p_enabled) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
bool Environment::is_glow_level_enabled(int p_level) const {
ERR_FAIL_INDEX_V(p_level, RS::MAX_GLOW_LEVELS, false);
@@ -488,6 +523,7 @@ void Environment::set_glow_intensity(float p_intensity) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_intensity() const {
return glow_intensity;
}
@@ -496,6 +532,7 @@ void Environment::set_glow_strength(float p_strength) {
glow_strength = p_strength;
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_strength() const {
return glow_strength;
}
@@ -504,6 +541,7 @@ void Environment::set_glow_mix(float p_mix) {
glow_mix = p_mix;
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_mix() const {
return glow_mix;
}
@@ -513,6 +551,7 @@ void Environment::set_glow_bloom(float p_threshold) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_bloom() const {
return glow_bloom;
}
@@ -523,6 +562,7 @@ void Environment::set_glow_blend_mode(GlowBlendMode p_mode) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
_change_notify();
}
+
Environment::GlowBlendMode Environment::get_glow_blend_mode() const {
return glow_blend_mode;
}
@@ -532,6 +572,7 @@ void Environment::set_glow_hdr_bleed_threshold(float p_threshold) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_hdr_bleed_threshold() const {
return glow_hdr_bleed_threshold;
}
@@ -541,6 +582,7 @@ void Environment::set_glow_hdr_luminance_cap(float p_amount) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_hdr_luminance_cap() const {
return glow_hdr_luminance_cap;
}
@@ -550,6 +592,7 @@ void Environment::set_glow_hdr_bleed_scale(float p_scale) {
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}
+
float Environment::get_glow_hdr_bleed_scale() const {
return glow_hdr_bleed_scale;
}
@@ -568,6 +611,7 @@ void Environment::set_fog_color(const Color &p_color) {
fog_color = p_color;
RS::get_singleton()->environment_set_fog(environment, fog_enabled, fog_color, fog_sun_color, fog_sun_amount);
}
+
Color Environment::get_fog_color() const {
return fog_color;
}
@@ -576,6 +620,7 @@ void Environment::set_fog_sun_color(const Color &p_color) {
fog_sun_color = p_color;
RS::get_singleton()->environment_set_fog(environment, fog_enabled, fog_color, fog_sun_color, fog_sun_amount);
}
+
Color Environment::get_fog_sun_color() const {
return fog_sun_color;
}
@@ -584,6 +629,7 @@ void Environment::set_fog_sun_amount(float p_amount) {
fog_sun_amount = p_amount;
RS::get_singleton()->environment_set_fog(environment, fog_enabled, fog_color, fog_sun_color, fog_sun_amount);
}
+
float Environment::get_fog_sun_amount() const {
return fog_sun_amount;
}
@@ -592,6 +638,7 @@ void Environment::set_fog_depth_enabled(bool p_enabled) {
fog_depth_enabled = p_enabled;
RS::get_singleton()->environment_set_fog_depth(environment, fog_depth_enabled, fog_depth_begin, fog_depth_end, fog_depth_curve, fog_transmit_enabled, fog_transmit_curve);
}
+
bool Environment::is_fog_depth_enabled() const {
return fog_depth_enabled;
}
@@ -600,6 +647,7 @@ void Environment::set_fog_depth_begin(float p_distance) {
fog_depth_begin = p_distance;
RS::get_singleton()->environment_set_fog_depth(environment, fog_depth_enabled, fog_depth_begin, fog_depth_end, fog_depth_curve, fog_transmit_enabled, fog_transmit_curve);
}
+
float Environment::get_fog_depth_begin() const {
return fog_depth_begin;
}
@@ -617,6 +665,7 @@ void Environment::set_fog_depth_curve(float p_curve) {
fog_depth_curve = p_curve;
RS::get_singleton()->environment_set_fog_depth(environment, fog_depth_enabled, fog_depth_begin, fog_depth_end, fog_depth_curve, fog_transmit_enabled, fog_transmit_curve);
}
+
float Environment::get_fog_depth_curve() const {
return fog_depth_curve;
}
@@ -625,6 +674,7 @@ void Environment::set_fog_transmit_enabled(bool p_enabled) {
fog_transmit_enabled = p_enabled;
RS::get_singleton()->environment_set_fog_depth(environment, fog_depth_enabled, fog_depth_begin, fog_depth_end, fog_depth_curve, fog_transmit_enabled, fog_transmit_curve);
}
+
bool Environment::is_fog_transmit_enabled() const {
return fog_transmit_enabled;
}
@@ -633,6 +683,7 @@ void Environment::set_fog_transmit_curve(float p_curve) {
fog_transmit_curve = p_curve;
RS::get_singleton()->environment_set_fog_depth(environment, fog_depth_enabled, fog_depth_begin, fog_depth_end, fog_depth_curve, fog_transmit_enabled, fog_transmit_curve);
}
+
float Environment::get_fog_transmit_curve() const {
return fog_transmit_curve;
}
@@ -641,6 +692,7 @@ void Environment::set_fog_height_enabled(bool p_enabled) {
fog_height_enabled = p_enabled;
RS::get_singleton()->environment_set_fog_height(environment, fog_height_enabled, fog_height_min, fog_height_max, fog_height_curve);
}
+
bool Environment::is_fog_height_enabled() const {
return fog_height_enabled;
}
@@ -649,6 +701,7 @@ void Environment::set_fog_height_min(float p_distance) {
fog_height_min = p_distance;
RS::get_singleton()->environment_set_fog_height(environment, fog_height_enabled, fog_height_min, fog_height_max, fog_height_curve);
}
+
float Environment::get_fog_height_min() const {
return fog_height_min;
}
@@ -657,6 +710,7 @@ void Environment::set_fog_height_max(float p_distance) {
fog_height_max = p_distance;
RS::get_singleton()->environment_set_fog_height(environment, fog_height_enabled, fog_height_min, fog_height_max, fog_height_curve);
}
+
float Environment::get_fog_height_max() const {
return fog_height_max;
}
@@ -665,6 +719,7 @@ void Environment::set_fog_height_curve(float p_distance) {
fog_height_curve = p_distance;
RS::get_singleton()->environment_set_fog_height(environment, fog_height_enabled, fog_height_min, fog_height_max, fog_height_curve);
}
+
float Environment::get_fog_height_curve() const {
return fog_height_curve;
}
@@ -1092,6 +1147,7 @@ void CameraEffects::set_dof_blur_far_distance(float p_distance) {
dof_blur_far_distance = p_distance;
RS::get_singleton()->camera_effects_set_dof_blur(camera_effects, dof_blur_far_enabled, dof_blur_far_distance, dof_blur_far_transition, dof_blur_near_enabled, dof_blur_near_distance, dof_blur_near_transition, dof_blur_amount);
}
+
float CameraEffects::get_dof_blur_far_distance() const {
return dof_blur_far_distance;
}
@@ -1100,6 +1156,7 @@ void CameraEffects::set_dof_blur_far_transition(float p_distance) {
dof_blur_far_transition = p_distance;
RS::get_singleton()->camera_effects_set_dof_blur(camera_effects, dof_blur_far_enabled, dof_blur_far_distance, dof_blur_far_transition, dof_blur_near_enabled, dof_blur_near_distance, dof_blur_near_transition, dof_blur_amount);
}
+
float CameraEffects::get_dof_blur_far_transition() const {
return dof_blur_far_transition;
}
@@ -1136,6 +1193,7 @@ void CameraEffects::set_dof_blur_amount(float p_amount) {
dof_blur_amount = p_amount;
RS::get_singleton()->camera_effects_set_dof_blur(camera_effects, dof_blur_far_enabled, dof_blur_far_distance, dof_blur_far_transition, dof_blur_near_enabled, dof_blur_near_distance, dof_blur_near_transition, dof_blur_amount);
}
+
float CameraEffects::get_dof_blur_amount() const {
return dof_blur_amount;
}
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index c67a300580..e0cd1be456 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -316,6 +316,7 @@ Error BitmapFont::create_from_fnt(const String &p_file) {
void BitmapFont::set_height(float p_height) {
height = p_height;
}
+
float BitmapFont::get_height() const {
return height;
}
@@ -323,9 +324,11 @@ float BitmapFont::get_height() const {
void BitmapFont::set_ascent(float p_ascent) {
ascent = p_ascent;
}
+
float BitmapFont::get_ascent() const {
return ascent;
}
+
float BitmapFont::get_descent() const {
return height - ascent;
}
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index cc7108e92e..22dd426295 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -67,6 +67,7 @@ void LineShape2D::set_distance(real_t p_distance) {
Vector2 LineShape2D::get_normal() const {
return normal;
}
+
real_t LineShape2D::get_distance() const {
return distance;
}
@@ -79,6 +80,7 @@ void LineShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Vector2 l2[2] = { point, point + get_normal() * 30 };
RS::get_singleton()->canvas_item_add_line(p_to_rid, l2[0], l2[1], p_color, 3);
}
+
Rect2 LineShape2D::get_rect() const {
Vector2 point = get_distance() * get_normal();
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index aa5f7677c7..3a3fb77f02 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -71,6 +71,7 @@ int Material::get_render_priority() const {
RID Material::get_rid() const {
return material;
}
+
void Material::_validate_property(PropertyInfo &property) const {
if (!_can_do_next_pass() && property.name == "next_pass") {
property.usage = 0;
@@ -1179,6 +1180,7 @@ bool BaseMaterial3D::_is_shader_dirty() const {
return element.in_list();
}
+
void BaseMaterial3D::set_albedo(const Color &p_albedo) {
albedo = p_albedo;
@@ -1220,6 +1222,7 @@ void BaseMaterial3D::set_emission(const Color &p_emission) {
emission = p_emission;
RS::get_singleton()->material_set_param(_get_material(), shader_names->emission, p_emission);
}
+
Color BaseMaterial3D::get_emission() const {
return emission;
}
@@ -1228,6 +1231,7 @@ void BaseMaterial3D::set_emission_energy(float p_emission_energy) {
emission_energy = p_emission_energy;
RS::get_singleton()->material_set_param(_get_material(), shader_names->emission_energy, p_emission_energy);
}
+
float BaseMaterial3D::get_emission_energy() const {
return emission_energy;
}
@@ -1236,6 +1240,7 @@ void BaseMaterial3D::set_normal_scale(float p_normal_scale) {
normal_scale = p_normal_scale;
RS::get_singleton()->material_set_param(_get_material(), shader_names->normal_scale, p_normal_scale);
}
+
float BaseMaterial3D::get_normal_scale() const {
return normal_scale;
}
@@ -1244,6 +1249,7 @@ void BaseMaterial3D::set_rim(float p_rim) {
rim = p_rim;
RS::get_singleton()->material_set_param(_get_material(), shader_names->rim, p_rim);
}
+
float BaseMaterial3D::get_rim() const {
return rim;
}
@@ -1252,6 +1258,7 @@ void BaseMaterial3D::set_rim_tint(float p_rim_tint) {
rim_tint = p_rim_tint;
RS::get_singleton()->material_set_param(_get_material(), shader_names->rim_tint, p_rim_tint);
}
+
float BaseMaterial3D::get_rim_tint() const {
return rim_tint;
}
@@ -1260,6 +1267,7 @@ void BaseMaterial3D::set_ao_light_affect(float p_ao_light_affect) {
ao_light_affect = p_ao_light_affect;
RS::get_singleton()->material_set_param(_get_material(), shader_names->ao_light_affect, p_ao_light_affect);
}
+
float BaseMaterial3D::get_ao_light_affect() const {
return ao_light_affect;
}
@@ -1286,6 +1294,7 @@ void BaseMaterial3D::set_anisotropy(float p_anisotropy) {
anisotropy = p_anisotropy;
RS::get_singleton()->material_set_param(_get_material(), shader_names->anisotropy, p_anisotropy);
}
+
float BaseMaterial3D::get_anisotropy() const {
return anisotropy;
}
@@ -1321,6 +1330,7 @@ void BaseMaterial3D::set_transmittance_depth(float p_depth) {
transmittance_depth = p_depth;
RS::get_singleton()->material_set_param(_get_material(), shader_names->transmittance_depth, p_depth);
}
+
float BaseMaterial3D::get_transmittance_depth() const {
return transmittance_depth;
}
@@ -1329,6 +1339,7 @@ void BaseMaterial3D::set_transmittance_curve(float p_curve) {
transmittance_curve = p_curve;
RS::get_singleton()->material_set_param(_get_material(), shader_names->transmittance_curve, p_curve);
}
+
float BaseMaterial3D::get_transmittance_curve() const {
return transmittance_curve;
}
@@ -1337,6 +1348,7 @@ void BaseMaterial3D::set_transmittance_boost(float p_boost) {
transmittance_boost = p_boost;
RS::get_singleton()->material_set_param(_get_material(), shader_names->transmittance_boost, p_boost);
}
+
float BaseMaterial3D::get_transmittance_boost() const {
return transmittance_boost;
}
@@ -1366,6 +1378,7 @@ void BaseMaterial3D::set_detail_uv(DetailUV p_detail_uv) {
detail_uv = p_detail_uv;
_queue_shader_change();
}
+
BaseMaterial3D::DetailUV BaseMaterial3D::get_detail_uv() const {
return detail_uv;
}
@@ -1377,6 +1390,7 @@ void BaseMaterial3D::set_blend_mode(BlendMode p_mode) {
blend_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::BlendMode BaseMaterial3D::get_blend_mode() const {
return blend_mode;
}
@@ -1385,6 +1399,7 @@ void BaseMaterial3D::set_detail_blend_mode(BlendMode p_mode) {
detail_blend_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::BlendMode BaseMaterial3D::get_detail_blend_mode() const {
return detail_blend_mode;
}
@@ -1424,6 +1439,7 @@ void BaseMaterial3D::set_depth_draw_mode(DepthDrawMode p_mode) {
depth_draw_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::DepthDrawMode BaseMaterial3D::get_depth_draw_mode() const {
return depth_draw_mode;
}
@@ -1435,6 +1451,7 @@ void BaseMaterial3D::set_cull_mode(CullMode p_mode) {
cull_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::CullMode BaseMaterial3D::get_cull_mode() const {
return cull_mode;
}
@@ -1446,6 +1463,7 @@ void BaseMaterial3D::set_diffuse_mode(DiffuseMode p_mode) {
diffuse_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::DiffuseMode BaseMaterial3D::get_diffuse_mode() const {
return diffuse_mode;
}
@@ -1457,6 +1475,7 @@ void BaseMaterial3D::set_specular_mode(SpecularMode p_mode) {
specular_mode = p_mode;
_queue_shader_change();
}
+
BaseMaterial3D::SpecularMode BaseMaterial3D::get_specular_mode() const {
return specular_mode;
}
@@ -1670,6 +1689,7 @@ void BaseMaterial3D::set_uv1_offset(const Vector3 &p_offset) {
uv1_offset = p_offset;
RS::get_singleton()->material_set_param(_get_material(), shader_names->uv1_offset, p_offset);
}
+
Vector3 BaseMaterial3D::get_uv1_offset() const {
return uv1_offset;
}
@@ -1728,6 +1748,7 @@ void BaseMaterial3D::set_particles_anim_h_frames(int p_frames) {
int BaseMaterial3D::get_particles_anim_h_frames() const {
return particles_anim_h_frames;
}
+
void BaseMaterial3D::set_particles_anim_v_frames(int p_frames) {
particles_anim_v_frames = p_frames;
RS::get_singleton()->material_set_param(_get_material(), shader_names->particles_anim_v_frames, p_frames);
@@ -1760,6 +1781,7 @@ void BaseMaterial3D::set_heightmap_deep_parallax_min_layers(int p_layer) {
deep_parallax_min_layers = p_layer;
RS::get_singleton()->material_set_param(_get_material(), shader_names->heightmap_min_layers, p_layer);
}
+
int BaseMaterial3D::get_heightmap_deep_parallax_min_layers() const {
return deep_parallax_min_layers;
}
@@ -1768,6 +1790,7 @@ void BaseMaterial3D::set_heightmap_deep_parallax_max_layers(int p_layer) {
deep_parallax_max_layers = p_layer;
RS::get_singleton()->material_set_param(_get_material(), shader_names->heightmap_max_layers, p_layer);
}
+
int BaseMaterial3D::get_heightmap_deep_parallax_max_layers() const {
return deep_parallax_max_layers;
}
@@ -1929,6 +1952,7 @@ void BaseMaterial3D::set_proximity_fade_distance(float p_distance) {
proximity_fade_distance = p_distance;
RS::get_singleton()->material_set_param(_get_material(), shader_names->proximity_fade_distance, p_distance);
}
+
float BaseMaterial3D::get_proximity_fade_distance() const {
return proximity_fade_distance;
}
@@ -1938,6 +1962,7 @@ void BaseMaterial3D::set_distance_fade(DistanceFadeMode p_mode) {
_queue_shader_change();
_change_notify();
}
+
BaseMaterial3D::DistanceFadeMode BaseMaterial3D::get_distance_fade() const {
return distance_fade;
}
@@ -1946,6 +1971,7 @@ void BaseMaterial3D::set_distance_fade_max_distance(float p_distance) {
distance_fade_max_distance = p_distance;
RS::get_singleton()->material_set_param(_get_material(), shader_names->distance_fade_max, distance_fade_max_distance);
}
+
float BaseMaterial3D::get_distance_fade_max_distance() const {
return distance_fade_max_distance;
}
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 9c641cf6d8..e293a421b9 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -133,6 +133,7 @@ void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) {
r_lines = debug_lines;
}
+
void Mesh::generate_debug_mesh_indices(Vector<Vector3> &r_points) {
Ref<TriangleMesh> tm = generate_triangle_mesh();
if (tm.is_null())
@@ -1107,10 +1108,12 @@ Array ArrayMesh::surface_get_arrays(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array());
return RenderingServer::get_singleton()->mesh_surface_get_arrays(mesh, p_surface);
}
+
Array ArrayMesh::surface_get_blend_shape_arrays(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array());
return RenderingServer::get_singleton()->mesh_surface_get_blend_shape_arrays(mesh, p_surface);
}
+
Dictionary ArrayMesh::surface_get_lods(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Dictionary());
return RenderingServer::get_singleton()->mesh_surface_get_lods(mesh, p_surface);
@@ -1140,10 +1143,12 @@ void ArrayMesh::add_blend_shape(const StringName &p_name) {
int ArrayMesh::get_blend_shape_count() const {
return blend_shapes.size();
}
+
StringName ArrayMesh::get_blend_shape_name(int p_index) const {
ERR_FAIL_INDEX_V(p_index, blend_shapes.size(), StringName());
return blend_shapes[p_index];
}
+
void ArrayMesh::clear_blend_shapes() {
ERR_FAIL_COND_MSG(surfaces.size(), "Can't set shape key count if surfaces are already created.");
@@ -1235,6 +1240,7 @@ RID ArrayMesh::get_rid() const {
_create_if_empty();
return mesh;
}
+
AABB ArrayMesh::get_aabb() const {
return aabb;
}
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index d428191f96..3176b83bb8 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -310,9 +310,11 @@ int MeshDataTool::get_format() const {
int MeshDataTool::get_vertex_count() const {
return vertices.size();
}
+
int MeshDataTool::get_edge_count() const {
return edges.size();
}
+
int MeshDataTool::get_face_count() const {
return faces.size();
}
@@ -321,6 +323,7 @@ Vector3 MeshDataTool::get_vertex(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector3());
return vertices[p_idx].vertex;
}
+
void MeshDataTool::set_vertex(int p_idx, const Vector3 &p_vertex) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].vertex = p_vertex;
@@ -330,6 +333,7 @@ Vector3 MeshDataTool::get_vertex_normal(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector3());
return vertices[p_idx].normal;
}
+
void MeshDataTool::set_vertex_normal(int p_idx, const Vector3 &p_normal) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].normal = p_normal;
@@ -340,6 +344,7 @@ Plane MeshDataTool::get_vertex_tangent(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Plane());
return vertices[p_idx].tangent;
}
+
void MeshDataTool::set_vertex_tangent(int p_idx, const Plane &p_tangent) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].tangent = p_tangent;
@@ -350,6 +355,7 @@ Vector2 MeshDataTool::get_vertex_uv(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector2());
return vertices[p_idx].uv;
}
+
void MeshDataTool::set_vertex_uv(int p_idx, const Vector2 &p_uv) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].uv = p_uv;
@@ -360,6 +366,7 @@ Vector2 MeshDataTool::get_vertex_uv2(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector2());
return vertices[p_idx].uv2;
}
+
void MeshDataTool::set_vertex_uv2(int p_idx, const Vector2 &p_uv2) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].uv2 = p_uv2;
@@ -370,6 +377,7 @@ Color MeshDataTool::get_vertex_color(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Color());
return vertices[p_idx].color;
}
+
void MeshDataTool::set_vertex_color(int p_idx, const Color &p_color) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].color = p_color;
@@ -380,6 +388,7 @@ Vector<int> MeshDataTool::get_vertex_bones(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector<int>());
return vertices[p_idx].bones;
}
+
void MeshDataTool::set_vertex_bones(int p_idx, const Vector<int> &p_bones) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].bones = p_bones;
@@ -390,6 +399,7 @@ Vector<float> MeshDataTool::get_vertex_weights(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector<float>());
return vertices[p_idx].weights;
}
+
void MeshDataTool::set_vertex_weights(int p_idx, const Vector<float> &p_weights) {
ERR_FAIL_INDEX(p_idx, vertices.size());
vertices.write[p_idx].weights = p_weights;
@@ -410,6 +420,7 @@ Vector<int> MeshDataTool::get_vertex_edges(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector<int>());
return vertices[p_idx].edges;
}
+
Vector<int> MeshDataTool::get_vertex_faces(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, vertices.size(), Vector<int>());
return vertices[p_idx].faces;
@@ -420,14 +431,17 @@ int MeshDataTool::get_edge_vertex(int p_edge, int p_vertex) const {
ERR_FAIL_INDEX_V(p_vertex, 2, -1);
return edges[p_edge].vertex[p_vertex];
}
+
Vector<int> MeshDataTool::get_edge_faces(int p_edge) const {
ERR_FAIL_INDEX_V(p_edge, edges.size(), Vector<int>());
return edges[p_edge].faces;
}
+
Variant MeshDataTool::get_edge_meta(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edges.size(), Variant());
return edges[p_idx].meta;
}
+
void MeshDataTool::set_edge_meta(int p_idx, const Variant &p_meta) {
ERR_FAIL_INDEX(p_idx, edges.size());
edges.write[p_idx].meta = p_meta;
@@ -438,15 +452,18 @@ int MeshDataTool::get_face_vertex(int p_face, int p_vertex) const {
ERR_FAIL_INDEX_V(p_vertex, 3, -1);
return faces[p_face].v[p_vertex];
}
+
int MeshDataTool::get_face_edge(int p_face, int p_vertex) const {
ERR_FAIL_INDEX_V(p_face, faces.size(), -1);
ERR_FAIL_INDEX_V(p_vertex, 3, -1);
return faces[p_face].edges[p_vertex];
}
+
Variant MeshDataTool::get_face_meta(int p_face) const {
ERR_FAIL_INDEX_V(p_face, faces.size(), Variant());
return faces[p_face].meta;
}
+
void MeshDataTool::set_face_meta(int p_face, const Variant &p_meta) {
ERR_FAIL_INDEX(p_face, faces.size());
faces.write[p_face].meta = p_meta;
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index c0615d9b29..0f2fd939ec 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -190,6 +190,7 @@ Ref<Texture2D> MeshLibrary::get_item_preview(int p_item) const {
bool MeshLibrary::has_item(int p_item) const {
return item_map.has(p_item);
}
+
void MeshLibrary::remove_item(int p_item) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map.erase(p_item);
@@ -282,5 +283,6 @@ void MeshLibrary::_bind_methods() {
MeshLibrary::MeshLibrary() {
}
+
MeshLibrary::~MeshLibrary() {
}
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 795ec0df4b..10b9e24fbd 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -207,6 +207,7 @@ void MultiMesh::set_instance_count(int p_count) {
RenderingServer::get_singleton()->multimesh_allocate(multimesh, p_count, RS::MultimeshTransformFormat(transform_format), use_colors, use_custom_data);
instance_count = p_count;
}
+
int MultiMesh::get_instance_count() const {
return instance_count;
}
@@ -217,6 +218,7 @@ void MultiMesh::set_visible_instance_count(int p_count) {
RenderingServer::get_singleton()->multimesh_set_visible_instances(multimesh, p_count);
visible_instance_count = p_count;
}
+
int MultiMesh::get_visible_instance_count() const {
return visible_instance_count;
}
@@ -240,6 +242,7 @@ Transform2D MultiMesh::get_instance_transform_2d(int p_instance) const {
void MultiMesh::set_instance_color(int p_instance, const Color &p_color) {
RenderingServer::get_singleton()->multimesh_instance_set_color(multimesh, p_instance, p_color);
}
+
Color MultiMesh::get_instance_color(int p_instance) const {
return RenderingServer::get_singleton()->multimesh_instance_get_color(multimesh, p_instance);
}
@@ -247,6 +250,7 @@ Color MultiMesh::get_instance_color(int p_instance) const {
void MultiMesh::set_instance_custom_data(int p_instance, const Color &p_custom_data) {
RenderingServer::get_singleton()->multimesh_instance_set_custom_data(multimesh, p_instance, p_custom_data);
}
+
Color MultiMesh::get_instance_custom_data(int p_instance) const {
return RenderingServer::get_singleton()->multimesh_instance_get_custom_data(multimesh, p_instance);
}
@@ -281,6 +285,7 @@ void MultiMesh::set_transform_format(TransformFormat p_transform_format) {
ERR_FAIL_COND(instance_count > 0);
transform_format = p_transform_format;
}
+
MultiMesh::TransformFormat MultiMesh::get_transform_format() const {
return transform_format;
}
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index f5d3c7a3fb..13d818188d 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -279,13 +279,16 @@ void NavigationMesh::add_polygon(const Vector<int> &p_polygon) {
polygons.push_back(polygon);
_change_notify();
}
+
int NavigationMesh::get_polygon_count() const {
return polygons.size();
}
+
Vector<int> NavigationMesh::get_polygon(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, polygons.size(), Vector<int>());
return polygons[p_idx].indices;
}
+
void NavigationMesh::clear_polygons() {
polygons.clear();
}
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 199f0e3989..ba2cdf75e4 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1331,11 +1331,13 @@ int SceneState::get_node_property_count(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), -1);
return nodes[p_idx].properties.size();
}
+
StringName SceneState::get_node_property_name(int p_idx, int p_prop) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), StringName());
ERR_FAIL_INDEX_V(p_prop, nodes[p_idx].properties.size(), StringName());
return names[nodes[p_idx].properties[p_prop].name];
}
+
Variant SceneState::get_node_property_value(int p_idx, int p_prop) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), Variant());
ERR_FAIL_INDEX_V(p_prop, nodes[p_idx].properties.size(), Variant());
@@ -1357,6 +1359,7 @@ NodePath SceneState::get_node_owner_path(int p_idx) const {
int SceneState::get_connection_count() const {
return connections.size();
}
+
NodePath SceneState::get_connection_source(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, connections.size(), NodePath());
if (connections[p_idx].from & FLAG_ID_IS_PATH) {
@@ -1370,6 +1373,7 @@ StringName SceneState::get_connection_signal(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, connections.size(), StringName());
return names[connections[p_idx].signal];
}
+
NodePath SceneState::get_connection_target(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, connections.size(), NodePath());
if (connections[p_idx].to & FLAG_ID_IS_PATH) {
@@ -1378,6 +1382,7 @@ NodePath SceneState::get_connection_target(int p_idx) const {
return get_node_path(connections[p_idx].to & FLAG_MASK);
}
}
+
StringName SceneState::get_connection_method(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, connections.size(), StringName());
return names[connections[p_idx].method];
@@ -1438,6 +1443,7 @@ bool SceneState::has_connection(const NodePath &p_node_from, const StringName &p
Vector<NodePath> SceneState::get_editable_instances() const {
return editable_instances;
}
+
//add
int SceneState::add_name(const StringName &p_name) {
@@ -1463,6 +1469,7 @@ int SceneState::add_node_path(const NodePath &p_path) {
node_paths.push_back(p_path);
return (node_paths.size() - 1) | FLAG_ID_IS_PATH;
}
+
int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance, int p_index) {
NodeData nd;
nd.parent = p_parent;
@@ -1476,6 +1483,7 @@ int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int
return nodes.size() - 1;
}
+
void SceneState::add_node_property(int p_node, int p_name, int p_value) {
ERR_FAIL_INDEX(p_node, nodes.size());
ERR_FAIL_INDEX(p_name, names.size());
@@ -1486,15 +1494,18 @@ void SceneState::add_node_property(int p_node, int p_name, int p_value) {
prop.value = p_value;
nodes.write[p_node].properties.push_back(prop);
}
+
void SceneState::add_node_group(int p_node, int p_group) {
ERR_FAIL_INDEX(p_node, nodes.size());
ERR_FAIL_INDEX(p_group, names.size());
nodes.write[p_node].groups.push_back(p_group);
}
+
void SceneState::set_base_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, variants.size());
base_scene_idx = p_idx;
}
+
void SceneState::add_connection(int p_from, int p_to, int p_signal, int p_method, int p_flags, const Vector<int> &p_binds) {
ERR_FAIL_INDEX(p_signal, names.size());
ERR_FAIL_INDEX(p_method, names.size());
@@ -1511,6 +1522,7 @@ void SceneState::add_connection(int p_from, int p_to, int p_signal, int p_method
c.binds = p_binds;
connections.push_back(c);
}
+
void SceneState::add_editable_instance(const NodePath &p_path) {
editable_instances.push_back(p_path);
}
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index e24cddd013..2f65c92181 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -637,6 +637,7 @@ void ParticlesMaterial::set_flatness(float p_flatness) {
flatness = p_flatness;
RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->flatness, p_flatness);
}
+
float ParticlesMaterial::get_flatness() const {
return flatness;
}
@@ -687,6 +688,7 @@ void ParticlesMaterial::set_param(Parameter p_param, float p_value) {
break; // Can't happen, but silences warning
}
}
+
float ParticlesMaterial::get_param(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -739,6 +741,7 @@ void ParticlesMaterial::set_param_randomness(Parameter p_param, float p_value) {
break; // Can't happen, but silences warning
}
}
+
float ParticlesMaterial::get_param_randomness(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
@@ -811,6 +814,7 @@ void ParticlesMaterial::set_param_texture(Parameter p_param, const Ref<Texture2D
_queue_shader_change();
}
+
Ref<Texture2D> ParticlesMaterial::get_param_texture(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, Ref<Texture2D>());
@@ -896,12 +900,15 @@ ParticlesMaterial::EmissionShape ParticlesMaterial::get_emission_shape() const {
float ParticlesMaterial::get_emission_sphere_radius() const {
return emission_sphere_radius;
}
+
Vector3 ParticlesMaterial::get_emission_box_extents() const {
return emission_box_extents;
}
+
Ref<Texture2D> ParticlesMaterial::get_emission_point_texture() const {
return emission_point_texture;
}
+
Ref<Texture2D> ParticlesMaterial::get_emission_normal_texture() const {
return emission_normal_texture;
}
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 30d884a5ac..6e662b1085 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -138,6 +138,7 @@ Array PrimitiveMesh::surface_get_arrays(int p_surface) const {
Dictionary PrimitiveMesh::surface_get_lods(int p_surface) const {
return Dictionary(); //not really supported
}
+
Array PrimitiveMesh::surface_get_blend_shape_arrays(int p_surface) const {
return Array(); //not really supported
}
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 01af96b1e0..f758427bd6 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -687,6 +687,7 @@ Error ResourceLoaderText::load() {
int ResourceLoaderText::get_stage() const {
return resource_current;
}
+
int ResourceLoaderText::get_stage_count() const {
return resources_total; //+ext_resources;
}
@@ -1287,6 +1288,7 @@ void ResourceFormatLoaderText::get_recognized_extensions(List<String> *p_extensi
bool ResourceFormatLoaderText::handles_type(const String &p_type) const {
return true;
}
+
String ResourceFormatLoaderText::get_resource_type(const String &p_path) const {
String ext = p_path.get_extension().to_lower();
if (ext == "tscn")
@@ -1788,6 +1790,7 @@ Error ResourceFormatSaverText::save(const String &p_path, const RES &p_resource,
bool ResourceFormatSaverText::recognize(const RES &p_resource) const {
return true; // all recognized!
}
+
void ResourceFormatSaverText::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
if (p_resource->get_class() == "PackedScene")
p_extensions->push_back("tscn"); //text scene
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index 6fce80b0df..2f7fbfb311 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -51,6 +51,7 @@ void SegmentShape2D::set_a(const Vector2 &p_a) {
a = p_a;
_update_shape();
}
+
Vector2 SegmentShape2D::get_a() const {
return a;
}
@@ -59,6 +60,7 @@ void SegmentShape2D::set_b(const Vector2 &p_b) {
b = p_b;
_update_shape();
}
+
Vector2 SegmentShape2D::get_b() const {
return b;
}
@@ -148,6 +150,7 @@ void RayShape2D::set_length(real_t p_length) {
length = p_length;
_update_shape();
}
+
real_t RayShape2D::get_length() const {
return length;
}
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 188fc70ed3..341139e1c4 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -159,6 +159,7 @@ Shader::Shader() {
Shader::~Shader() {
RenderingServer::get_singleton()->free(shader);
}
+
////////////
RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
@@ -225,6 +226,7 @@ void ResourceFormatSaverShader::get_recognized_extensions(const RES &p_resource,
}
}
}
+
bool ResourceFormatSaverShader::recognize(const RES &p_resource) const {
return p_resource->get_class_name() == "Shader"; //only shader, not inherited
}
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index b48de1aeb3..60c796f9f9 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -72,6 +72,7 @@ Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_x
return results;
}
+
Array Shape2D::collide_and_get_contacts(const Transform2D &p_local_xform, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform) {
ERR_FAIL_COND_V(p_shape.is_null(), Array());
const int max_contacts = 16;
diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp
index 86b65925f5..e88841a531 100644
--- a/scene/resources/skin.cpp
+++ b/scene/resources/skin.cpp
@@ -124,6 +124,7 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const {
}
return false;
}
+
void Skin::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "bind_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"));
for (int i = 0; i < get_bind_count(); i++) {
diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp
index 860673bee6..92c5151d7a 100644
--- a/scene/resources/sky_material.cpp
+++ b/scene/resources/sky_material.cpp
@@ -43,6 +43,7 @@ void ProceduralSkyMaterial::set_sky_horizon_color(const Color &p_sky_horizon) {
sky_horizon_color = p_sky_horizon;
RS::get_singleton()->material_set_param(_get_material(), "sky_horizon_color", sky_horizon_color.to_linear());
}
+
Color ProceduralSkyMaterial::get_sky_horizon_color() const {
return sky_horizon_color;
}
@@ -51,6 +52,7 @@ void ProceduralSkyMaterial::set_sky_curve(float p_curve) {
sky_curve = p_curve;
RS::get_singleton()->material_set_param(_get_material(), "sky_curve", sky_curve);
}
+
float ProceduralSkyMaterial::get_sky_curve() const {
return sky_curve;
}
@@ -59,6 +61,7 @@ void ProceduralSkyMaterial::set_sky_energy(float p_energy) {
sky_energy = p_energy;
RS::get_singleton()->material_set_param(_get_material(), "sky_energy", sky_energy);
}
+
float ProceduralSkyMaterial::get_sky_energy() const {
return sky_energy;
}
@@ -67,6 +70,7 @@ void ProceduralSkyMaterial::set_ground_bottom_color(const Color &p_ground_bottom
ground_bottom_color = p_ground_bottom;
RS::get_singleton()->material_set_param(_get_material(), "ground_bottom_color", ground_bottom_color.to_linear());
}
+
Color ProceduralSkyMaterial::get_ground_bottom_color() const {
return ground_bottom_color;
}
@@ -75,6 +79,7 @@ void ProceduralSkyMaterial::set_ground_horizon_color(const Color &p_ground_horiz
ground_horizon_color = p_ground_horizon;
RS::get_singleton()->material_set_param(_get_material(), "ground_horizon_color", ground_horizon_color.to_linear());
}
+
Color ProceduralSkyMaterial::get_ground_horizon_color() const {
return ground_horizon_color;
}
@@ -83,6 +88,7 @@ void ProceduralSkyMaterial::set_ground_curve(float p_curve) {
ground_curve = p_curve;
RS::get_singleton()->material_set_param(_get_material(), "ground_curve", ground_curve);
}
+
float ProceduralSkyMaterial::get_ground_curve() const {
return ground_curve;
}
@@ -91,6 +97,7 @@ void ProceduralSkyMaterial::set_ground_energy(float p_energy) {
ground_energy = p_energy;
RS::get_singleton()->material_set_param(_get_material(), "ground_energy", ground_energy);
}
+
float ProceduralSkyMaterial::get_ground_energy() const {
return ground_energy;
}
@@ -99,6 +106,7 @@ void ProceduralSkyMaterial::set_sun_angle_max(float p_angle) {
sun_angle_max = p_angle;
RS::get_singleton()->material_set_param(_get_material(), "sun_angle_max", Math::deg2rad(sun_angle_max));
}
+
float ProceduralSkyMaterial::get_sun_angle_max() const {
return sun_angle_max;
}
@@ -107,6 +115,7 @@ void ProceduralSkyMaterial::set_sun_curve(float p_curve) {
sun_curve = p_curve;
RS::get_singleton()->material_set_param(_get_material(), "sun_curve", sun_curve);
}
+
float ProceduralSkyMaterial::get_sun_curve() const {
return sun_curve;
}
@@ -307,6 +316,7 @@ PanoramaSkyMaterial::~PanoramaSkyMaterial() {
RS::get_singleton()->free(shader);
RS::get_singleton()->material_set_shader(_get_material(), RID());
}
+
//////////////////////////////////
/* PhysicalSkyMaterial */
@@ -314,6 +324,7 @@ void PhysicalSkyMaterial::set_rayleigh_coefficient(float p_rayleigh) {
rayleigh = p_rayleigh;
RS::get_singleton()->material_set_param(_get_material(), "rayleigh", rayleigh);
}
+
float PhysicalSkyMaterial::get_rayleigh_coefficient() const {
return rayleigh;
}
@@ -322,6 +333,7 @@ void PhysicalSkyMaterial::set_rayleigh_color(Color p_rayleigh_color) {
rayleigh_color = p_rayleigh_color;
RS::get_singleton()->material_set_param(_get_material(), "rayleigh_color", rayleigh_color);
}
+
Color PhysicalSkyMaterial::get_rayleigh_color() const {
return rayleigh_color;
}
@@ -330,6 +342,7 @@ void PhysicalSkyMaterial::set_mie_coefficient(float p_mie) {
mie = p_mie;
RS::get_singleton()->material_set_param(_get_material(), "mie", mie);
}
+
float PhysicalSkyMaterial::get_mie_coefficient() const {
return mie;
}
@@ -338,6 +351,7 @@ void PhysicalSkyMaterial::set_mie_eccentricity(float p_eccentricity) {
mie_eccentricity = p_eccentricity;
RS::get_singleton()->material_set_param(_get_material(), "mie_eccentricity", mie_eccentricity);
}
+
float PhysicalSkyMaterial::get_mie_eccentricity() const {
return mie_eccentricity;
}
@@ -346,6 +360,7 @@ void PhysicalSkyMaterial::set_mie_color(Color p_mie_color) {
mie_color = p_mie_color;
RS::get_singleton()->material_set_param(_get_material(), "mie_color", mie_color);
}
+
Color PhysicalSkyMaterial::get_mie_color() const {
return mie_color;
}
@@ -354,6 +369,7 @@ void PhysicalSkyMaterial::set_turbidity(float p_turbidity) {
turbidity = p_turbidity;
RS::get_singleton()->material_set_param(_get_material(), "turbidity", turbidity);
}
+
float PhysicalSkyMaterial::get_turbidity() const {
return turbidity;
}
@@ -362,6 +378,7 @@ void PhysicalSkyMaterial::set_sun_disk_scale(float p_sun_disk_scale) {
sun_disk_scale = p_sun_disk_scale;
RS::get_singleton()->material_set_param(_get_material(), "sun_disk_scale", sun_disk_scale);
}
+
float PhysicalSkyMaterial::get_sun_disk_scale() const {
return sun_disk_scale;
}
@@ -370,6 +387,7 @@ void PhysicalSkyMaterial::set_ground_color(Color p_ground_color) {
ground_color = p_ground_color;
RS::get_singleton()->material_set_param(_get_material(), "ground_color", ground_color);
}
+
Color PhysicalSkyMaterial::get_ground_color() const {
return ground_color;
}
@@ -378,6 +396,7 @@ void PhysicalSkyMaterial::set_exposure(float p_exposure) {
exposure = p_exposure;
RS::get_singleton()->material_set_param(_get_material(), "exposure", exposure);
}
+
float PhysicalSkyMaterial::get_exposure() const {
return exposure;
}
@@ -386,6 +405,7 @@ void PhysicalSkyMaterial::set_dither_strength(float p_dither_strength) {
dither_strength = p_dither_strength;
RS::get_singleton()->material_set_param(_get_material(), "dither_strength", dither_strength);
}
+
float PhysicalSkyMaterial::get_dither_strength() const {
return dither_strength;
}
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 550abd29af..b7c26dd3c3 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -44,6 +44,7 @@ void StyleBox::set_default_margin(Margin p_margin, float p_value) {
margin[p_margin] = p_value;
emit_changed();
}
+
float StyleBox::get_default_margin(Margin p_margin) const {
ERR_FAIL_INDEX_V((int)p_margin, 4, 0.0);
@@ -151,6 +152,7 @@ void StyleBoxTexture::set_margin_size(Margin p_margin, float p_size) {
};
_change_notify(margin_prop[p_margin]);
}
+
float StyleBoxTexture::get_margin_size(Margin p_margin) const {
ERR_FAIL_INDEX_V((int)p_margin, 4, 0.0);
@@ -341,6 +343,7 @@ StyleBoxTexture::StyleBoxTexture() {
axis_h = AXIS_STRETCH_MODE_STRETCH;
axis_v = AXIS_STRETCH_MODE_STRETCH;
}
+
StyleBoxTexture::~StyleBoxTexture() {
}
@@ -359,6 +362,7 @@ void StyleBoxFlat::set_border_color(const Color &p_color) {
border_color = p_color;
emit_changed();
}
+
Color StyleBoxFlat::get_border_color() const {
return border_color;
}
@@ -370,6 +374,7 @@ void StyleBoxFlat::set_border_width_all(int p_size) {
border_width[3] = p_size;
emit_changed();
}
+
int StyleBoxFlat::get_border_width_min() const {
return MIN(MIN(border_width[0], border_width[1]), MIN(border_width[2], border_width[3]));
}
@@ -389,6 +394,7 @@ void StyleBoxFlat::set_border_blend(bool p_blend) {
blend_border = p_blend;
emit_changed();
}
+
bool StyleBoxFlat::get_border_blend() const {
return blend_border;
}
@@ -400,6 +406,7 @@ void StyleBoxFlat::set_corner_radius_all(int radius) {
emit_changed();
}
+
void StyleBoxFlat::set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_botton_right, const int radius_bottom_left) {
corner_radius[0] = radius_top_left;
corner_radius[1] = radius_top_right;
@@ -408,6 +415,7 @@ void StyleBoxFlat::set_corner_radius_individual(const int radius_top_left, const
emit_changed();
}
+
int StyleBoxFlat::get_corner_radius_min() const {
int smallest = corner_radius[0];
for (int i = 1; i < 4; i++) {
@@ -423,6 +431,7 @@ void StyleBoxFlat::set_corner_radius(const Corner p_corner, const int radius) {
corner_radius[p_corner] = radius;
emit_changed();
}
+
int StyleBoxFlat::get_corner_radius(const Corner p_corner) const {
ERR_FAIL_INDEX_V((int)p_corner, 4, 0);
return corner_radius[p_corner];
@@ -453,10 +462,12 @@ float StyleBoxFlat::get_expand_margin_size(Margin p_expand_margin) const {
ERR_FAIL_INDEX_V((int)p_expand_margin, 4, 0.0);
return expand_margin[p_expand_margin];
}
+
void StyleBoxFlat::set_draw_center(bool p_enabled) {
draw_center = p_enabled;
emit_changed();
}
+
bool StyleBoxFlat::is_draw_center_enabled() const {
return draw_center;
}
@@ -465,6 +476,7 @@ void StyleBoxFlat::set_shadow_color(const Color &p_color) {
shadow_color = p_color;
emit_changed();
}
+
Color StyleBoxFlat::get_shadow_color() const {
return shadow_color;
}
@@ -473,6 +485,7 @@ void StyleBoxFlat::set_shadow_size(const int &p_size) {
shadow_size = p_size;
emit_changed();
}
+
int StyleBoxFlat::get_shadow_size() const {
return shadow_size;
}
@@ -481,6 +494,7 @@ void StyleBoxFlat::set_shadow_offset(const Point2 &p_offset) {
shadow_offset = p_offset;
emit_changed();
}
+
Point2 StyleBoxFlat::get_shadow_offset() const {
return shadow_offset;
}
@@ -489,6 +503,7 @@ void StyleBoxFlat::set_anti_aliased(const bool &p_anti_aliased) {
anti_aliased = p_anti_aliased;
emit_changed();
}
+
bool StyleBoxFlat::is_anti_aliased() const {
return anti_aliased;
}
@@ -497,6 +512,7 @@ void StyleBoxFlat::set_aa_size(const int &p_aa_size) {
aa_size = CLAMP(p_aa_size, 1, 5);
emit_changed();
}
+
int StyleBoxFlat::get_aa_size() const {
return aa_size;
}
@@ -505,6 +521,7 @@ void StyleBoxFlat::set_corner_detail(const int &p_corner_detail) {
corner_detail = CLAMP(p_corner_detail, 1, 20);
emit_changed();
}
+
int StyleBoxFlat::get_corner_detail() const {
return corner_detail;
}
@@ -805,6 +822,7 @@ float StyleBoxFlat::get_style_margin(Margin p_margin) const {
ERR_FAIL_INDEX_V((int)p_margin, 4, 0.0);
return border_width[p_margin];
}
+
void StyleBoxFlat::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bg_color", "color"), &StyleBoxFlat::set_bg_color);
ClassDB::bind_method(D_METHOD("get_bg_color"), &StyleBoxFlat::get_bg_color);
@@ -921,6 +939,7 @@ StyleBoxFlat::StyleBoxFlat() {
corner_radius[2] = 0;
corner_radius[3] = 0;
}
+
StyleBoxFlat::~StyleBoxFlat() {
}
@@ -928,6 +947,7 @@ void StyleBoxLine::set_color(const Color &p_color) {
color = p_color;
emit_changed();
}
+
Color StyleBoxLine::get_color() const {
return color;
}
@@ -936,6 +956,7 @@ void StyleBoxLine::set_thickness(int p_thickness) {
thickness = p_thickness;
emit_changed();
}
+
int StyleBoxLine::get_thickness() const {
return thickness;
}
@@ -944,6 +965,7 @@ void StyleBoxLine::set_vertical(bool p_vertical) {
vertical = p_vertical;
emit_changed();
}
+
bool StyleBoxLine::is_vertical() const {
return vertical;
}
@@ -952,6 +974,7 @@ void StyleBoxLine::set_grow_end(float p_grow_end) {
grow_end = p_grow_end;
emit_changed();
}
+
float StyleBoxLine::get_grow_end() const {
return grow_end;
}
@@ -960,6 +983,7 @@ void StyleBoxLine::set_grow_begin(float p_grow_begin) {
grow_begin = p_grow_begin;
emit_changed();
}
+
float StyleBoxLine::get_grow_begin() const {
return grow_begin;
}
@@ -982,10 +1006,12 @@ void StyleBoxLine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "thickness", PROPERTY_HINT_RANGE, "0,10"), "set_thickness", "get_thickness");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vertical"), "set_vertical", "is_vertical");
}
+
float StyleBoxLine::get_style_margin(Margin p_margin) const {
ERR_FAIL_INDEX_V((int)p_margin, 4, thickness);
return thickness;
}
+
Size2 StyleBoxLine::get_center_size() const {
return Size2();
}
@@ -1014,4 +1040,5 @@ StyleBoxLine::StyleBoxLine() {
color = Color(0.0, 0.0, 0.0);
vertical = false;
}
+
StyleBoxLine::~StyleBoxLine() {}
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 95eaf461e1..feba8c6c70 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -155,6 +155,7 @@ void SurfaceTool::add_vertex(const Vector3 &p_vertex) {
format |= Mesh::ARRAY_FORMAT_VERTEX;
}
+
void SurfaceTool::add_color(Color p_color) {
ERR_FAIL_COND(!begun);
@@ -163,6 +164,7 @@ void SurfaceTool::add_color(Color p_color) {
format |= Mesh::ARRAY_FORMAT_COLOR;
last_color = p_color;
}
+
void SurfaceTool::add_normal(const Vector3 &p_normal) {
ERR_FAIL_COND(!begun);
@@ -745,9 +747,11 @@ int SurfaceTool::mikktGetNumFaces(const SMikkTSpaceContext *pContext) {
return triangle_data.vertices.size() / 3;
}
}
+
int SurfaceTool::mikktGetNumVerticesOfFace(const SMikkTSpaceContext *pContext, const int iFace) {
return 3; //always 3
}
+
void SurfaceTool::mikktGetPosition(const SMikkTSpaceContext *pContext, float fvPosOut[], const int iFace, const int iVert) {
TangentGenerationContextUserData &triangle_data = *reinterpret_cast<TangentGenerationContextUserData *>(pContext->m_pUserData);
Vector3 v;
@@ -781,6 +785,7 @@ void SurfaceTool::mikktGetNormal(const SMikkTSpaceContext *pContext, float fvNor
fvNormOut[1] = v.y;
fvNormOut[2] = v.z;
}
+
void SurfaceTool::mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvTexcOut[], const int iFace, const int iVert) {
TangentGenerationContextUserData &triangle_data = *reinterpret_cast<TangentGenerationContextUserData *>(pContext->m_pUserData);
Vector2 v;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 78b8e4d9ff..b549bea4f4 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -236,6 +236,7 @@ void ImageTexture::draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_m
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, Rect2(p_pos, Size2(w, h)), texture, false, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void ImageTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat) const {
if ((w | h) == 0)
return;
@@ -243,6 +244,7 @@ void ImageTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, p_rect, texture, p_tile, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void ImageTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const {
if ((w | h) == 0)
return;
@@ -620,6 +622,7 @@ Error StreamTexture2D::load(const String &p_path) {
emit_changed();
return OK;
}
+
String StreamTexture2D::get_load_path() const {
return path_to_file;
}
@@ -627,9 +630,11 @@ String StreamTexture2D::get_load_path() const {
int StreamTexture2D::get_width() const {
return w;
}
+
int StreamTexture2D::get_height() const {
return h;
}
+
RID StreamTexture2D::get_rid() const {
if (!texture.is_valid()) {
texture = RS::get_singleton()->texture_2d_placeholder_create();
@@ -644,6 +649,7 @@ void StreamTexture2D::draw(RID p_canvas_item, const Point2 &p_pos, const Color &
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, Rect2(p_pos, Size2(w, h)), texture, false, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void StreamTexture2D::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat) const {
if ((w | h) == 0)
return;
@@ -651,6 +657,7 @@ void StreamTexture2D::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_t
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, p_rect, texture, p_tile, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void StreamTexture2D::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const {
if ((w | h) == 0)
return;
@@ -755,9 +762,11 @@ RES ResourceFormatLoaderStreamTexture2D::load(const String &p_path, const String
void ResourceFormatLoaderStreamTexture2D::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("stex");
}
+
bool ResourceFormatLoaderStreamTexture2D::handles_type(const String &p_type) const {
return p_type == "StreamTexture2D";
}
+
String ResourceFormatLoaderStreamTexture2D::get_resource_type(const String &p_path) const {
if (p_path.get_extension().to_lower() == "stex")
return "StreamTexture2D";
@@ -775,6 +784,7 @@ int AtlasTexture::get_width() const {
return region.size.width + margin.size.width;
}
}
+
int AtlasTexture::get_height() const {
if (region.size.height == 0) {
if (atlas.is_valid())
@@ -784,6 +794,7 @@ int AtlasTexture::get_height() const {
return region.size.height + margin.size.height;
}
}
+
RID AtlasTexture::get_rid() const {
if (atlas.is_valid())
return atlas->get_rid();
@@ -806,6 +817,7 @@ void AtlasTexture::set_atlas(const Ref<Texture2D> &p_atlas) {
emit_changed();
_change_notify("atlas");
}
+
Ref<Texture2D> AtlasTexture::get_atlas() const {
return atlas;
}
@@ -903,6 +915,7 @@ void AtlasTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RS::get_singleton()->canvas_item_add_texture_rect_region(p_canvas_item, dr, atlas->get_rid(), rc, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, filter_clip, p_texture_filter, p_texture_repeat);
}
+
void AtlasTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const {
//this might not necessarily work well if using a rect, needs to be fixed properly
if (!atlas.is_valid())
@@ -977,9 +990,11 @@ AtlasTexture::AtlasTexture() {
int MeshTexture::get_width() const {
return size.width;
}
+
int MeshTexture::get_height() const {
return size.height;
}
+
RID MeshTexture::get_rid() const {
return RID();
}
@@ -991,6 +1006,7 @@ bool MeshTexture::has_alpha() const {
void MeshTexture::set_mesh(const Ref<Mesh> &p_mesh) {
mesh = p_mesh;
}
+
Ref<Mesh> MeshTexture::get_mesh() const {
return mesh;
}
@@ -1025,6 +1041,7 @@ void MeshTexture::draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_mo
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid(), normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void MeshTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat) const {
if (mesh.is_null() || base_texture.is_null()) {
return;
@@ -1048,6 +1065,7 @@ void MeshTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile,
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid(), normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
void MeshTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const {
if (mesh.is_null() || base_texture.is_null()) {
return;
@@ -1071,6 +1089,7 @@ void MeshTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const
RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID();
RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid(), normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
+
bool MeshTexture::get_rect_region(const Rect2 &p_rect, const Rect2 &p_src_rect, Rect2 &r_rect, Rect2 &r_src_rect) const {
r_rect = p_rect;
r_src_rect = p_src_rect;
@@ -1102,9 +1121,11 @@ MeshTexture::MeshTexture() {
int LargeTexture::get_width() const {
return size.width;
}
+
int LargeTexture::get_height() const {
return size.height;
}
+
RID LargeTexture::get_rid() const {
return RID();
}
@@ -1143,6 +1164,7 @@ void LargeTexture::set_piece_texture(int p_idx, const Ref<Texture2D> &p_texture)
void LargeTexture::set_size(const Size2 &p_size) {
size = p_size;
}
+
void LargeTexture::clear() {
pieces.clear();
size = Size2i();
@@ -1157,6 +1179,7 @@ Array LargeTexture::_get_data() const {
arr.push_back(Size2(size));
return arr;
}
+
void LargeTexture::_set_data(const Array &p_array) {
ERR_FAIL_COND(p_array.size() < 1);
ERR_FAIL_COND(!(p_array.size() & 1));
@@ -1170,14 +1193,17 @@ void LargeTexture::_set_data(const Array &p_array) {
int LargeTexture::get_piece_count() const {
return pieces.size();
}
+
Vector2 LargeTexture::get_piece_offset(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, pieces.size(), Vector2());
return pieces[p_idx].offset;
}
+
Ref<Texture2D> LargeTexture::get_piece_texture(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, pieces.size(), Ref<Texture2D>());
return pieces[p_idx].texture;
}
+
Ref<Image> LargeTexture::to_image() const {
Ref<Image> img = memnew(Image(this->get_width(), this->get_height(), false, Image::FORMAT_RGBA8));
for (int i = 0; i < pieces.size(); i++) {
@@ -1224,6 +1250,7 @@ void LargeTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile
pieces[i].texture->draw_rect(p_canvas_item, Rect2(pieces[i].offset * scale + p_rect.position, pieces[i].texture->get_size() * scale), false, p_modulate, p_transpose, p_normal_map, p_specular_map, p_specular_color_shininess, p_texture_filter, p_texture_repeat);
}
}
+
void LargeTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, RS::CanvasItemTextureFilter p_texture_filter, RS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const {
//tiling not supported for this
if (p_src_rect.size.x == 0 || p_src_rect.size.y == 0)
@@ -1361,11 +1388,13 @@ RID CurveTexture::get_rid() const {
CurveTexture::CurveTexture() {
_width = 2048;
}
+
CurveTexture::~CurveTexture() {
if (_texture.is_valid()) {
RS::get_singleton()->free(_texture);
}
}
+
//////////////////
//setter and getter names for property serialization
@@ -1464,6 +1493,7 @@ void GradientTexture::set_width(int p_width) {
width = p_width;
_queue_update();
}
+
int GradientTexture::get_width() const {
return width;
}
@@ -1510,11 +1540,13 @@ int ProxyTexture::get_width() const {
return base->get_width();
return 1;
}
+
int ProxyTexture::get_height() const {
if (base.is_valid())
return base->get_height();
return 1;
}
+
RID ProxyTexture::get_rid() const {
if (proxy.is_null()) {
proxy_ph = RS::get_singleton()->texture_2d_placeholder_create();
@@ -1541,6 +1573,7 @@ ProxyTexture::~ProxyTexture() {
RS::get_singleton()->free(proxy);
}
}
+
//////////////////////////////////////////////
void AnimatedTexture::_update_proxy() {
@@ -1599,6 +1632,7 @@ void AnimatedTexture::set_frames(int p_frames) {
frame_count = p_frames;
}
+
int AnimatedTexture::get_frames() const {
return frame_count;
}
@@ -1610,6 +1644,7 @@ void AnimatedTexture::set_current_frame(int p_frame) {
current_frame = p_frame;
}
+
int AnimatedTexture::get_current_frame() const {
return current_frame;
}
@@ -1618,6 +1653,7 @@ void AnimatedTexture::set_pause(bool p_pause) {
RWLockWrite r(rw_lock);
pause = p_pause;
}
+
bool AnimatedTexture::get_pause() const {
return pause;
}
@@ -1626,6 +1662,7 @@ void AnimatedTexture::set_oneshot(bool p_oneshot) {
RWLockWrite r(rw_lock);
oneshot = p_oneshot;
}
+
bool AnimatedTexture::get_oneshot() const {
return oneshot;
}
@@ -1638,6 +1675,7 @@ void AnimatedTexture::set_frame_texture(int p_frame, const Ref<Texture2D> &p_tex
frames[p_frame].texture = p_texture;
}
+
Ref<Texture2D> AnimatedTexture::get_frame_texture(int p_frame) const {
ERR_FAIL_INDEX_V(p_frame, MAX_FRAMES, Ref<Texture2D>());
@@ -1653,6 +1691,7 @@ void AnimatedTexture::set_frame_delay(int p_frame, float p_delay_sec) {
frames[p_frame].delay_sec = p_delay_sec;
}
+
float AnimatedTexture::get_frame_delay(int p_frame) const {
ERR_FAIL_INDEX_V(p_frame, MAX_FRAMES, 0);
@@ -1666,6 +1705,7 @@ void AnimatedTexture::set_fps(float p_fps) {
fps = p_fps;
}
+
float AnimatedTexture::get_fps() const {
return fps;
}
@@ -1679,6 +1719,7 @@ int AnimatedTexture::get_width() const {
return frames[current_frame].texture->get_width();
}
+
int AnimatedTexture::get_height() const {
RWLockRead r(rw_lock);
@@ -1688,6 +1729,7 @@ int AnimatedTexture::get_height() const {
return frames[current_frame].texture->get_height();
}
+
RID AnimatedTexture::get_rid() const {
return proxy;
}
@@ -1796,6 +1838,7 @@ AnimatedTexture::~AnimatedTexture() {
memdelete(rw_lock);
}
}
+
///////////////////////////////
void TextureLayered::_bind_methods() {
@@ -2045,6 +2088,7 @@ Error StreamTextureLayered::load(const String &p_path) {
emit_changed();
return OK;
}
+
String StreamTextureLayered::get_load_path() const {
return path_to_file;
}
@@ -2052,12 +2096,15 @@ String StreamTextureLayered::get_load_path() const {
int StreamTextureLayered::get_width() const {
return w;
}
+
int StreamTextureLayered::get_height() const {
return h;
}
+
int StreamTextureLayered::get_layers() const {
return layers;
}
+
bool StreamTextureLayered::has_mipmaps() const {
return mipmaps;
}
@@ -2155,9 +2202,11 @@ void ResourceFormatLoaderStreamTextureLayered::get_recognized_extensions(List<St
p_extensions->push_back("scube");
p_extensions->push_back("scubearray");
}
+
bool ResourceFormatLoaderStreamTextureLayered::handles_type(const String &p_type) const {
return p_type == "StreamTexture2DArray" || p_type == "StreamCubemap" || p_type == "StreamCubemapArray";
}
+
String ResourceFormatLoaderStreamTextureLayered::get_resource_type(const String &p_path) const {
if (p_path.get_extension().to_lower() == "stexarray")
return "StreamTexture2DArray";
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 7a28927583..7a2abffed0 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -310,9 +310,11 @@ void Theme::set_project_default(const Ref<Theme> &p_project_default) {
void Theme::set_default_icon(const Ref<Texture2D> &p_icon) {
default_icon = p_icon;
}
+
void Theme::set_default_style(const Ref<StyleBox> &p_style) {
default_style = p_style;
}
+
void Theme::set_default_font(const Ref<Font> &p_font) {
default_font = p_font;
}
@@ -337,6 +339,7 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_type, const R
emit_changed();
}
}
+
Ref<Texture2D> Theme::get_icon(const StringName &p_name, const StringName &p_type) const {
if (icon_map.has(p_type) && icon_map[p_type].has(p_name) && icon_map[p_type][p_name].is_valid()) {
return icon_map[p_type][p_name];
@@ -509,6 +512,7 @@ void Theme::set_font(const StringName &p_name, const StringName &p_type, const R
emit_changed();
}
}
+
Ref<Font> Theme::get_font(const StringName &p_name, const StringName &p_type) const {
if (font_map.has(p_type) && font_map[p_type].has(p_name) && font_map[p_type][p_name].is_valid())
return font_map[p_type][p_name];
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 31d0fc2c9d..5faa256abd 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -66,6 +66,7 @@ bool VisualShaderNode::is_port_separator(int p_index) const {
Vector<VisualShader::DefaultTextureParam> VisualShaderNode::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const {
return Vector<VisualShader::DefaultTextureParam>();
}
+
String VisualShaderNode::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
return String();
}
@@ -90,6 +91,7 @@ Array VisualShaderNode::get_default_input_values() const {
}
return ret;
}
+
void VisualShaderNode::set_default_input_values(const Array &p_values) {
if (p_values.size() % 2 == 0) {
for (int i = 0; i < p_values.size(); i += 2) {
@@ -389,6 +391,7 @@ Vector<int> VisualShader::get_node_list(Type p_type) const {
return ret;
}
+
int VisualShader::get_valid_node_id(Type p_type) const {
ERR_FAIL_INDEX_V(p_type, TYPE_MAX, NODE_ID_INVALID);
const Graph *g = &graph[p_type];
@@ -1724,9 +1727,11 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::preview_ports[] = {
int VisualShaderNodeInput::get_input_port_count() const {
return 0;
}
+
VisualShaderNodeInput::PortType VisualShaderNodeInput::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
+
String VisualShaderNodeInput::get_input_port_name(int p_port) const {
return "";
}
@@ -1734,9 +1739,11 @@ String VisualShaderNodeInput::get_input_port_name(int p_port) const {
int VisualShaderNodeInput::get_output_port_count() const {
return 1;
}
+
VisualShaderNodeInput::PortType VisualShaderNodeInput::get_output_port_type(int p_port) const {
return get_input_type_by_name(input_name);
}
+
String VisualShaderNodeInput::get_output_port_name(int p_port) const {
return "";
}
@@ -1932,6 +1939,7 @@ void VisualShaderNodeInput::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "input_name", PROPERTY_HINT_ENUM, ""), "set_input_name", "get_input_name");
ADD_SIGNAL(MethodInfo("input_type_changed"));
}
+
VisualShaderNodeInput::VisualShaderNodeInput() {
input_name = "[None]";
// changed when set
@@ -2064,9 +2072,11 @@ Variant VisualShaderNodeOutput::get_input_port_default_value(int p_port) const {
int VisualShaderNodeOutput::get_output_port_count() const {
return 0;
}
+
VisualShaderNodeOutput::PortType VisualShaderNodeOutput::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
+
String VisualShaderNodeOutput::get_output_port_name(int p_port) const {
return String();
}
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 99b9c7803e..368a9d351d 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -293,6 +293,7 @@ void World2D::_register_viewport(Viewport *p_viewport, const Rect2 &p_rect) {
void World2D::_update_viewport(Viewport *p_viewport, const Rect2 &p_rect) {
indexer->_update_viewport(p_viewport, p_rect);
}
+
void World2D::_remove_viewport(Viewport *p_viewport) {
indexer->_remove_viewport(p_viewport);
}
@@ -300,9 +301,11 @@ void World2D::_remove_viewport(Viewport *p_viewport) {
void World2D::_register_notifier(VisibilityNotifier2D *p_notifier, const Rect2 &p_rect) {
indexer->_notifier_add(p_notifier, p_rect);
}
+
void World2D::_update_notifier(VisibilityNotifier2D *p_notifier, const Rect2 &p_rect) {
indexer->_notifier_update(p_notifier, p_rect);
}
+
void World2D::_remove_notifier(VisibilityNotifier2D *p_notifier) {
indexer->_notifier_remove(p_notifier);
}
diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp
index d8ec7f507c..f53a24596a 100644
--- a/scene/resources/world_3d.cpp
+++ b/scene/resources/world_3d.cpp
@@ -204,6 +204,7 @@ void World3D::_update_camera(Camera3D *p_camera) {
indexer->_update_camera(p_camera);
#endif
}
+
void World3D::_remove_camera(Camera3D *p_camera) {
#ifndef _3D_DISABLED
indexer->_remove_camera(p_camera);
diff --git a/servers/audio/audio_filter_sw.cpp b/servers/audio/audio_filter_sw.cpp
index b4f3935f3a..b6759649cc 100644
--- a/servers/audio/audio_filter_sw.cpp
+++ b/servers/audio/audio_filter_sw.cpp
@@ -33,9 +33,11 @@
void AudioFilterSW::set_mode(Mode p_mode) {
mode = p_mode;
}
+
void AudioFilterSW::set_cutoff(float p_cutoff) {
cutoff = p_cutoff;
}
+
void AudioFilterSW::set_resonance(float p_resonance) {
resonance = p_resonance;
}
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index b7e3f8964b..11b96edb8d 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -312,6 +312,7 @@ void AudioStreamPlaybackRandomPitch::stop() {
;
}
}
+
bool AudioStreamPlaybackRandomPitch::is_playing() const {
if (playing.is_valid()) {
return playing->is_playing();
@@ -335,6 +336,7 @@ float AudioStreamPlaybackRandomPitch::get_playback_position() const {
return 0;
}
+
void AudioStreamPlaybackRandomPitch::seek(float p_time) {
if (playing.is_valid()) {
playing->seek(p_time);
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index 11d820f828..48f050c5ab 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -189,6 +189,7 @@ void AudioEffectChorus::set_voice_delay_ms(int p_voice, float p_delay_ms) {
voice[p_voice].delay = p_delay_ms;
}
+
float AudioEffectChorus::get_voice_delay_ms(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
return voice[p_voice].delay;
@@ -199,6 +200,7 @@ void AudioEffectChorus::set_voice_rate_hz(int p_voice, float p_rate_hz) {
voice[p_voice].rate = p_rate_hz;
}
+
float AudioEffectChorus::get_voice_rate_hz(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
@@ -210,6 +212,7 @@ void AudioEffectChorus::set_voice_depth_ms(int p_voice, float p_depth_ms) {
voice[p_voice].depth = p_depth_ms;
}
+
float AudioEffectChorus::get_voice_depth_ms(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
@@ -221,6 +224,7 @@ void AudioEffectChorus::set_voice_level_db(int p_voice, float p_level_db) {
voice[p_voice].level = p_level_db;
}
+
float AudioEffectChorus::get_voice_level_db(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
@@ -232,6 +236,7 @@ void AudioEffectChorus::set_voice_cutoff_hz(int p_voice, float p_cutoff_hz) {
voice[p_voice].cutoff = p_cutoff_hz;
}
+
float AudioEffectChorus::get_voice_cutoff_hz(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
@@ -243,6 +248,7 @@ void AudioEffectChorus::set_voice_pan(int p_voice, float p_pan) {
voice[p_voice].pan = p_pan;
}
+
float AudioEffectChorus::get_voice_pan(int p_voice) const {
ERR_FAIL_INDEX_V(p_voice, MAX_VOICES, 0);
@@ -252,6 +258,7 @@ float AudioEffectChorus::get_voice_pan(int p_voice) const {
void AudioEffectChorus::set_wet(float amount) {
wet = amount;
}
+
float AudioEffectChorus::get_wet() const {
return wet;
}
@@ -259,6 +266,7 @@ float AudioEffectChorus::get_wet() const {
void AudioEffectChorus::set_dry(float amount) {
dry = amount;
}
+
float AudioEffectChorus::get_dry() const {
return dry;
}
diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp
index b4728314b6..b0f829b679 100644
--- a/servers/audio/effects/audio_effect_compressor.cpp
+++ b/servers/audio/effects/audio_effect_compressor.cpp
@@ -134,6 +134,7 @@ float AudioEffectCompressor::get_threshold() const {
void AudioEffectCompressor::set_ratio(float p_ratio) {
ratio = p_ratio;
}
+
float AudioEffectCompressor::get_ratio() const {
return ratio;
}
@@ -141,6 +142,7 @@ float AudioEffectCompressor::get_ratio() const {
void AudioEffectCompressor::set_gain(float p_gain) {
gain = p_gain;
}
+
float AudioEffectCompressor::get_gain() const {
return gain;
}
@@ -148,6 +150,7 @@ float AudioEffectCompressor::get_gain() const {
void AudioEffectCompressor::set_attack_us(float p_attack_us) {
attack_us = p_attack_us;
}
+
float AudioEffectCompressor::get_attack_us() const {
return attack_us;
}
@@ -155,6 +158,7 @@ float AudioEffectCompressor::get_attack_us() const {
void AudioEffectCompressor::set_release_ms(float p_release_ms) {
release_ms = p_release_ms;
}
+
float AudioEffectCompressor::get_release_ms() const {
return release_ms;
}
@@ -162,6 +166,7 @@ float AudioEffectCompressor::get_release_ms() const {
void AudioEffectCompressor::set_mix(float p_mix) {
mix = p_mix;
}
+
float AudioEffectCompressor::get_mix() const {
return mix;
}
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index 2a613ad4f1..00cf7a0e70 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -153,6 +153,7 @@ float AudioEffectDelay::get_dry() {
void AudioEffectDelay::set_tap1_active(bool p_active) {
tap_1_active = p_active;
}
+
bool AudioEffectDelay::is_tap1_active() const {
return tap_1_active;
}
@@ -160,6 +161,7 @@ bool AudioEffectDelay::is_tap1_active() const {
void AudioEffectDelay::set_tap1_delay_ms(float p_delay_ms) {
tap_1_delay_ms = p_delay_ms;
}
+
float AudioEffectDelay::get_tap1_delay_ms() const {
return tap_1_delay_ms;
}
@@ -167,6 +169,7 @@ float AudioEffectDelay::get_tap1_delay_ms() const {
void AudioEffectDelay::set_tap1_level_db(float p_level_db) {
tap_1_level = p_level_db;
}
+
float AudioEffectDelay::get_tap1_level_db() const {
return tap_1_level;
}
@@ -174,6 +177,7 @@ float AudioEffectDelay::get_tap1_level_db() const {
void AudioEffectDelay::set_tap1_pan(float p_pan) {
tap_1_pan = p_pan;
}
+
float AudioEffectDelay::get_tap1_pan() const {
return tap_1_pan;
}
@@ -181,6 +185,7 @@ float AudioEffectDelay::get_tap1_pan() const {
void AudioEffectDelay::set_tap2_active(bool p_active) {
tap_2_active = p_active;
}
+
bool AudioEffectDelay::is_tap2_active() const {
return tap_2_active;
}
@@ -188,6 +193,7 @@ bool AudioEffectDelay::is_tap2_active() const {
void AudioEffectDelay::set_tap2_delay_ms(float p_delay_ms) {
tap_2_delay_ms = p_delay_ms;
}
+
float AudioEffectDelay::get_tap2_delay_ms() const {
return tap_2_delay_ms;
}
@@ -195,6 +201,7 @@ float AudioEffectDelay::get_tap2_delay_ms() const {
void AudioEffectDelay::set_tap2_level_db(float p_level_db) {
tap_2_level = p_level_db;
}
+
float AudioEffectDelay::get_tap2_level_db() const {
return tap_2_level;
}
@@ -202,6 +209,7 @@ float AudioEffectDelay::get_tap2_level_db() const {
void AudioEffectDelay::set_tap2_pan(float p_pan) {
tap_2_pan = p_pan;
}
+
float AudioEffectDelay::get_tap2_pan() const {
return tap_2_pan;
}
@@ -209,6 +217,7 @@ float AudioEffectDelay::get_tap2_pan() const {
void AudioEffectDelay::set_feedback_active(bool p_active) {
feedback_active = p_active;
}
+
bool AudioEffectDelay::is_feedback_active() const {
return feedback_active;
}
@@ -216,6 +225,7 @@ bool AudioEffectDelay::is_feedback_active() const {
void AudioEffectDelay::set_feedback_delay_ms(float p_delay_ms) {
feedback_delay_ms = p_delay_ms;
}
+
float AudioEffectDelay::get_feedback_delay_ms() const {
return feedback_delay_ms;
}
@@ -223,6 +233,7 @@ float AudioEffectDelay::get_feedback_delay_ms() const {
void AudioEffectDelay::set_feedback_level_db(float p_level_db) {
feedback_level = p_level_db;
}
+
float AudioEffectDelay::get_feedback_level_db() const {
return feedback_level;
}
@@ -230,6 +241,7 @@ float AudioEffectDelay::get_feedback_level_db() const {
void AudioEffectDelay::set_feedback_lowpass(float p_lowpass) {
feedback_lowpass = p_lowpass;
}
+
float AudioEffectDelay::get_feedback_lowpass() const {
return feedback_lowpass;
}
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 7726b3da3e..da4c34ce82 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -112,6 +112,7 @@ AudioEffectDistortion::Mode AudioEffectDistortion::get_mode() const {
void AudioEffectDistortion::set_pre_gain(float p_pre_gain) {
pre_gain = p_pre_gain;
}
+
float AudioEffectDistortion::get_pre_gain() const {
return pre_gain;
}
@@ -119,6 +120,7 @@ float AudioEffectDistortion::get_pre_gain() const {
void AudioEffectDistortion::set_keep_hf_hz(float p_keep_hf_hz) {
keep_hf_hz = p_keep_hf_hz;
}
+
float AudioEffectDistortion::get_keep_hf_hz() const {
return keep_hf_hz;
}
@@ -126,6 +128,7 @@ float AudioEffectDistortion::get_keep_hf_hz() const {
void AudioEffectDistortion::set_drive(float p_drive) {
drive = p_drive;
}
+
float AudioEffectDistortion::get_drive() const {
return drive;
}
@@ -133,6 +136,7 @@ float AudioEffectDistortion::get_drive() const {
void AudioEffectDistortion::set_post_gain(float p_post_gain) {
post_gain = p_post_gain;
}
+
float AudioEffectDistortion::get_post_gain() const {
return post_gain;
}
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index e8d38f87a3..ed4e7122b5 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -84,6 +84,7 @@ float AudioEffectEQ::get_band_gain_db(int p_band) const {
return gain[p_band];
}
+
int AudioEffectEQ::get_band_count() const {
return gain.size();
}
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index 664b1785d4..cf6d0fa896 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -113,6 +113,7 @@ float AudioEffectFilter::get_cutoff() const {
void AudioEffectFilter::set_resonance(float p_amount) {
resonance = p_amount;
}
+
float AudioEffectFilter::get_resonance() const {
return resonance;
}
@@ -120,6 +121,7 @@ float AudioEffectFilter::get_resonance() const {
void AudioEffectFilter::set_gain(float p_amount) {
gain = p_amount;
}
+
float AudioEffectFilter::get_gain() const {
return gain;
}
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index aab217cde9..27f1aaf71f 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -86,6 +86,7 @@ float AudioEffectLimiter::get_threshold_db() const {
void AudioEffectLimiter::set_ceiling_db(float p_ceiling) {
ceiling = p_ceiling;
}
+
float AudioEffectLimiter::get_ceiling_db() const {
return ceiling;
}
@@ -93,6 +94,7 @@ float AudioEffectLimiter::get_ceiling_db() const {
void AudioEffectLimiter::set_soft_clip_db(float p_soft_clip) {
soft_clip = p_soft_clip;
}
+
float AudioEffectLimiter::get_soft_clip_db() const {
return soft_clip;
}
@@ -100,6 +102,7 @@ float AudioEffectLimiter::get_soft_clip_db() const {
void AudioEffectLimiter::set_soft_clip_ratio(float p_soft_clip) {
soft_clip_ratio = p_soft_clip;
}
+
float AudioEffectLimiter::get_soft_clip_ratio() const {
return soft_clip_ratio;
}
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index 0d3d2f74a5..ffeaa7d25e 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -99,6 +99,7 @@ float AudioEffectPhaser::get_range_min_hz() const {
void AudioEffectPhaser::set_range_max_hz(float p_hz) {
range_max = p_hz;
}
+
float AudioEffectPhaser::get_range_max_hz() const {
return range_max;
}
@@ -106,6 +107,7 @@ float AudioEffectPhaser::get_range_max_hz() const {
void AudioEffectPhaser::set_rate_hz(float p_hz) {
rate = p_hz;
}
+
float AudioEffectPhaser::get_rate_hz() const {
return rate;
}
@@ -113,6 +115,7 @@ float AudioEffectPhaser::get_rate_hz() const {
void AudioEffectPhaser::set_feedback(float p_fbk) {
feedback = p_fbk;
}
+
float AudioEffectPhaser::get_feedback() const {
return feedback;
}
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 24d5d72f37..a8f25ac325 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -225,6 +225,7 @@ void SMBPitchShift::PitchShift(float pitchShift, long numSampsToProcess, long ff
}
+
void SMBPitchShift::smbFft(float *fftBuffer, long fftFrameSize, long sign)
/*
FFT routine, (C)1996 S.M.Bernsee. Sign = -1 is FFT, 1 is iFFT (inverse)
@@ -280,6 +281,7 @@ void SMBPitchShift::smbFft(float *fftBuffer, long fftFrameSize, long sign)
}
}
+
/* Godot code again */
/* clang-format on */
diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp
index 3169e48d15..f6465abfaf 100644
--- a/servers/audio/effects/audio_effect_reverb.cpp
+++ b/servers/audio/effects/audio_effect_reverb.cpp
@@ -93,12 +93,15 @@ void AudioEffectReverb::set_predelay_msec(float p_msec) {
void AudioEffectReverb::set_predelay_feedback(float p_feedback) {
predelay_fb = CLAMP(p_feedback, 0, 0.98);
}
+
void AudioEffectReverb::set_room_size(float p_size) {
room_size = p_size;
}
+
void AudioEffectReverb::set_damping(float p_damping) {
damping = p_damping;
}
+
void AudioEffectReverb::set_spread(float p_spread) {
spread = p_spread;
}
@@ -106,9 +109,11 @@ void AudioEffectReverb::set_spread(float p_spread) {
void AudioEffectReverb::set_dry(float p_dry) {
dry = p_dry;
}
+
void AudioEffectReverb::set_wet(float p_wet) {
wet = p_wet;
}
+
void AudioEffectReverb::set_hpf(float p_hpf) {
hpf = p_hpf;
}
@@ -116,24 +121,31 @@ void AudioEffectReverb::set_hpf(float p_hpf) {
float AudioEffectReverb::get_predelay_msec() const {
return predelay;
}
+
float AudioEffectReverb::get_predelay_feedback() const {
return predelay_fb;
}
+
float AudioEffectReverb::get_room_size() const {
return room_size;
}
+
float AudioEffectReverb::get_damping() const {
return damping;
}
+
float AudioEffectReverb::get_spread() const {
return spread;
}
+
float AudioEffectReverb::get_dry() const {
return dry;
}
+
float AudioEffectReverb::get_wet() const {
return wet;
}
+
float AudioEffectReverb::get_hpf() const {
return hpf;
}
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index 69337a49c8..a3fd11c6c0 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -96,6 +96,7 @@ static void smbFft(float *fftBuffer, long fftFrameSize, long sign)
}
}
}
+
void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
uint64_t time = OS::get_singleton()->get_ticks_usec();
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp
index 6593e712a8..4f9bee83e4 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.cpp
+++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp
@@ -113,6 +113,7 @@ float AudioEffectStereoEnhance::get_pan_pullout() const {
void AudioEffectStereoEnhance::set_time_pullout(float p_amount) {
time_pullout = p_amount;
}
+
float AudioEffectStereoEnhance::get_time_pullout() const {
return time_pullout;
}
@@ -120,6 +121,7 @@ float AudioEffectStereoEnhance::get_time_pullout() const {
void AudioEffectStereoEnhance::set_surround(float p_amount) {
surround = p_amount;
}
+
float AudioEffectStereoEnhance::get_surround() const {
return surround;
}
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index e2f21ec6d2..aba04550db 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -41,6 +41,7 @@ float AudioStreamGenerator::get_mix_rate() const {
void AudioStreamGenerator::set_buffer_length(float p_seconds) {
buffer_len = p_seconds;
}
+
float AudioStreamGenerator::get_buffer_length() const {
return buffer_len;
}
@@ -54,6 +55,7 @@ Ref<AudioStreamPlayback> AudioStreamGenerator::instance_playback() {
playback->buffer.clear();
return playback;
}
+
String AudioStreamGenerator::get_stream_name() const {
return "UserFeed";
}
@@ -94,6 +96,7 @@ bool AudioStreamGeneratorPlayback::push_frame(const Vector2 &p_frame) {
bool AudioStreamGeneratorPlayback::can_push_buffer(int p_frames) const {
return buffer.space_left() >= p_frames;
}
+
bool AudioStreamGeneratorPlayback::push_buffer(const PackedVector2Array &p_frames) {
int to_write = p_frames.size();
if (buffer.space_left() < to_write) {
@@ -154,6 +157,7 @@ void AudioStreamGeneratorPlayback::_mix_internal(AudioFrame *p_buffer, int p_fra
mixed += p_frames / generator->get_mix_rate();
}
+
float AudioStreamGeneratorPlayback::get_stream_sampling_rate() {
return generator->get_mix_rate();
}
@@ -170,6 +174,7 @@ void AudioStreamGeneratorPlayback::start(float p_from_pos) {
void AudioStreamGeneratorPlayback::stop() {
active = false;
}
+
bool AudioStreamGeneratorPlayback::is_playing() const {
return active; //always playing, can't be stopped
}
@@ -181,6 +186,7 @@ int AudioStreamGeneratorPlayback::get_loop_count() const {
float AudioStreamGeneratorPlayback::get_playback_position() const {
return mixed;
}
+
void AudioStreamGeneratorPlayback::seek(float p_time) {
//no seek possible
}
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp
index bbcf31d5a9..59b3ba2d0b 100644
--- a/servers/audio/effects/eq.cpp
+++ b/servers/audio/effects/eq.cpp
@@ -160,10 +160,12 @@ void EQ::set_preset_band_mode(Preset p_preset) {
int EQ::get_band_count() const {
return band.size();
}
+
float EQ::get_band_frequency(int p_band) {
ERR_FAIL_INDEX_V(p_band, band.size(), 0);
return band[p_band].freq;
}
+
void EQ::set_bands(const Vector<float> &p_bands) {
band.resize(p_bands.size());
for (int i = 0; i < p_bands.size(); i++) {
diff --git a/servers/audio/effects/reverb.cpp b/servers/audio/effects/reverb.cpp
index 6cfba28b05..99f60557e1 100644
--- a/servers/audio/effects/reverb.cpp
+++ b/servers/audio/effects/reverb.cpp
@@ -177,10 +177,12 @@ void Reverb::set_room_size(float p_size) {
params.room_size = p_size;
update_parameters();
}
+
void Reverb::set_damp(float p_damp) {
params.damp = p_damp;
update_parameters();
}
+
void Reverb::set_wet(float p_wet) {
params.wet = p_wet;
}
@@ -192,6 +194,7 @@ void Reverb::set_dry(float p_dry) {
void Reverb::set_predelay(float p_predelay) {
params.predelay = p_predelay;
}
+
void Reverb::set_predelay_feedback(float p_predelay_fb) {
params.predelay_fb = p_predelay_fb;
}
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index ff5439b596..edccd7507c 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -676,6 +676,7 @@ void AudioServer::set_bus_name(int p_bus, const String &p_name) {
emit_signal("bus_layout_changed");
}
+
String AudioServer::get_bus_name(int p_bus) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), String());
return buses[p_bus]->name;
@@ -697,6 +698,7 @@ void AudioServer::set_bus_volume_db(int p_bus, float p_volume_db) {
buses[p_bus]->volume_db = p_volume_db;
}
+
float AudioServer::get_bus_volume_db(int p_bus) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), 0);
return buses[p_bus]->volume_db;
@@ -741,6 +743,7 @@ void AudioServer::set_bus_mute(int p_bus, bool p_enable) {
buses[p_bus]->mute = p_enable;
}
+
bool AudioServer::is_bus_mute(int p_bus) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), false);
@@ -754,6 +757,7 @@ void AudioServer::set_bus_bypass_effects(int p_bus, bool p_enable) {
buses[p_bus]->bypass = p_enable;
}
+
bool AudioServer::is_bus_bypassing_effects(int p_bus) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), false);
@@ -855,6 +859,7 @@ void AudioServer::set_bus_effect_enabled(int p_bus, int p_effect, bool p_enabled
buses.write[p_bus]->effects.write[p_effect].enabled = p_enabled;
}
+
bool AudioServer::is_bus_effect_enabled(int p_bus, int p_effect) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), false);
ERR_FAIL_INDEX_V(p_effect, buses[p_bus]->effects.size(), false);
@@ -867,6 +872,7 @@ float AudioServer::get_bus_peak_volume_left_db(int p_bus, int p_channel) const {
return buses[p_bus]->channels[p_channel].peak_volume.l;
}
+
float AudioServer::get_bus_peak_volume_right_db(int p_bus, int p_channel) const {
ERR_FAIL_INDEX_V(p_bus, buses.size(), 0);
ERR_FAIL_INDEX_V(p_channel, buses[p_bus]->channels.size(), 0);
@@ -884,6 +890,7 @@ bool AudioServer::is_bus_channel_active(int p_bus, int p_channel) const {
void AudioServer::set_global_rate_scale(float p_scale) {
global_rate_scale = p_scale;
}
+
float AudioServer::get_global_rate_scale() const {
return global_rate_scale;
}
@@ -1020,6 +1027,7 @@ void AudioServer::finish() {
void AudioServer::lock() {
AudioDriver::get_singleton()->lock();
}
+
void AudioServer::unlock() {
AudioDriver::get_singleton()->unlock();
}
@@ -1027,6 +1035,7 @@ void AudioServer::unlock() {
AudioServer::SpeakerMode AudioServer::get_speaker_mode() const {
return (AudioServer::SpeakerMode)AudioDriver::get_singleton()->get_speaker_mode();
}
+
float AudioServer::get_mix_rate() const {
return AudioDriver::get_singleton()->get_mix_rate();
}
@@ -1385,6 +1394,7 @@ bool AudioBusLayout::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+
void AudioBusLayout::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < buses.size(); i++) {
p_list->push_back(PropertyInfo(Variant::STRING, "bus/" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 3561be2c35..ffb05588cc 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -127,6 +127,7 @@ void DisplayServer::global_menu_clear(const String &p_menu_root) {
void DisplayServer::mouse_set_mode(MouseMode p_mode) {
WARN_PRINT("Mouse is not supported by this display server.");
}
+
DisplayServer::MouseMode DisplayServer::mouse_get_mode() const {
return MOUSE_MODE_VISIBLE;
}
@@ -134,12 +135,15 @@ DisplayServer::MouseMode DisplayServer::mouse_get_mode() const {
void DisplayServer::mouse_warp_to_position(const Point2i &p_to) {
WARN_PRINT("Mouse warping is not supported by this display server.");
}
+
Point2i DisplayServer::mouse_get_absolute_position() const {
ERR_FAIL_V_MSG(Point2i(), "Mouse is not supported by this display server.");
}
+
Point2i DisplayServer::mouse_get_position() const {
ERR_FAIL_V_MSG(Point2i(), "Mouse is not supported by this display server.");
}
+
int DisplayServer::mouse_get_button_state() const {
ERR_FAIL_V_MSG(0, "Mouse is not supported by this display server.");
}
@@ -147,6 +151,7 @@ int DisplayServer::mouse_get_button_state() const {
void DisplayServer::clipboard_set(const String &p_text) {
WARN_PRINT("Clipboard is not supported by this display server.");
}
+
String DisplayServer::clipboard_get() const {
ERR_FAIL_V_MSG(String(), "Clipboard is not supported by this display server.");
}
@@ -154,6 +159,7 @@ String DisplayServer::clipboard_get() const {
void DisplayServer::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
WARN_PRINT("Orientation not supported by this display server.");
}
+
DisplayServer::ScreenOrientation DisplayServer::screen_get_orientation(int p_screen) const {
return SCREEN_LANDSCAPE;
}
@@ -170,6 +176,7 @@ bool DisplayServer::screen_is_touchscreen(int p_screen) const {
void DisplayServer::screen_set_keep_on(bool p_enable) {
WARN_PRINT("Keeping screen on not supported by this display server.");
}
+
bool DisplayServer::screen_is_kept_on() const {
return false;
}
@@ -177,6 +184,7 @@ bool DisplayServer::screen_is_kept_on() const {
DisplayServer::WindowID DisplayServer::create_sub_window(WindowMode p_mode, uint32_t p_flags, const Rect2i &) {
ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Sub-windows not supported by this display server.");
}
+
void DisplayServer::delete_sub_window(WindowID p_id) {
ERR_FAIL_MSG("Sub-windows not supported by this display server.");
}
@@ -184,6 +192,7 @@ void DisplayServer::delete_sub_window(WindowID p_id) {
void DisplayServer::window_set_ime_active(const bool p_active, WindowID p_window) {
WARN_PRINT("IME not supported by this display server.");
}
+
void DisplayServer::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
WARN_PRINT("IME not supported by this display server.");
}
@@ -191,6 +200,7 @@ void DisplayServer::window_set_ime_position(const Point2i &p_pos, WindowID p_win
Point2i DisplayServer::ime_get_selection() const {
ERR_FAIL_V_MSG(Point2i(), "IME or NOTIFICATION_WM_IME_UPDATE not supported by this display server.");
}
+
String DisplayServer::ime_get_text() const {
ERR_FAIL_V_MSG(String(), "IME or NOTIFICATION_WM_IME_UPDATEnot supported by this display server.");
}
@@ -198,6 +208,7 @@ String DisplayServer::ime_get_text() const {
void DisplayServer::console_set_visible(bool p_enabled) {
WARN_PRINT("Console window not supported by this display server.");
}
+
bool DisplayServer::is_console_visible() const {
return false;
}
@@ -205,6 +216,7 @@ bool DisplayServer::is_console_visible() const {
void DisplayServer::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, int p_max_legth) {
WARN_PRINT("Virtual keyboard not supported by this display server.");
}
+
void DisplayServer::virtual_keyboard_hide() {
WARN_PRINT("Virtual keyboard not supported by this display server.");
}
@@ -217,9 +229,11 @@ int DisplayServer::virtual_keyboard_get_height() const {
void DisplayServer::cursor_set_shape(CursorShape p_shape) {
WARN_PRINT("Cursor shape not supported by this display server.");
}
+
DisplayServer::CursorShape DisplayServer::cursor_get_shape() const {
return CURSOR_ARROW;
}
+
void DisplayServer::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
WARN_PRINT("Custom cursor shape not supported by this display server.");
}
@@ -235,15 +249,19 @@ void DisplayServer::enable_for_stealing_focus(OS::ProcessID pid) {
Error DisplayServer::native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track, int p_screen) {
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Native video not supported by this display server.");
}
+
bool DisplayServer::native_video_is_playing() const {
return false;
}
+
void DisplayServer::native_video_pause() {
WARN_PRINT("Native video not supported by this display server.");
}
+
void DisplayServer::native_video_unpause() {
WARN_PRINT("Native video not supported by this display server.");
}
+
void DisplayServer::native_video_stop() {
WARN_PRINT("Native video not supported by this display server.");
}
@@ -252,6 +270,7 @@ Error DisplayServer::dialog_show(String p_title, String p_description, Vector<St
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
}
+
Error DisplayServer::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
@@ -267,9 +286,11 @@ void DisplayServer::force_process_and_drop_events() {
void DisplayServer::release_rendering_thread() {
WARN_PRINT("Rendering thread not supported by this display server.");
}
+
void DisplayServer::make_rendering_thread() {
WARN_PRINT("Rendering thread not supported by this display server.");
}
+
void DisplayServer::swap_buffers() {
WARN_PRINT("Swap buffers not supported by this display server.");
}
@@ -277,6 +298,7 @@ void DisplayServer::swap_buffers() {
void DisplayServer::set_native_icon(const String &p_filename) {
WARN_PRINT("Native icon not supported by this display server.");
}
+
void DisplayServer::set_icon(const Ref<Image> &p_icon) {
WARN_PRINT("Icon not supported by this display server.");
}
@@ -284,6 +306,7 @@ void DisplayServer::set_icon(const Ref<Image> &p_icon) {
void DisplayServer::_set_use_vsync(bool p_enable) {
WARN_PRINT("VSync not supported by this display server.");
}
+
void DisplayServer::vsync_set_enabled(bool p_enable) {
vsync_enabled = p_enable;
if (switch_vsync_function) { //if a function was set, use function
@@ -292,6 +315,7 @@ void DisplayServer::vsync_set_enabled(bool p_enable) {
_set_use_vsync(p_enable);
}
}
+
bool DisplayServer::vsync_is_enabled() const {
return vsync_enabled;
}
@@ -299,6 +323,7 @@ bool DisplayServer::vsync_is_enabled() const {
void DisplayServer::vsync_set_use_via_compositor(bool p_enable) {
WARN_PRINT("VSync via compositor not supported by this display server.");
}
+
bool DisplayServer::vsync_is_using_via_compositor() const {
return false;
}
@@ -565,6 +590,7 @@ DisplayServer *DisplayServer::create(int p_index, const String &p_rendering_driv
void DisplayServer::_input_set_mouse_mode(Input::MouseMode p_mode) {
singleton->mouse_set_mode(MouseMode(p_mode));
}
+
Input::MouseMode DisplayServer::_input_get_mouse_mode() {
return Input::MouseMode(singleton->mouse_get_mode());
}
@@ -576,6 +602,7 @@ void DisplayServer::_input_warp(const Vector2 &p_to_pos) {
Input::CursorShape DisplayServer::_input_get_current_cursor_shape() {
return (Input::CursorShape)singleton->cursor_get_shape();
}
+
void DisplayServer::_input_set_custom_mouse_cursor_func(const RES &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) {
singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hostspot);
}
@@ -588,5 +615,6 @@ DisplayServer::DisplayServer() {
Input::get_current_cursor_shape_func = _input_get_current_cursor_shape;
Input::set_custom_mouse_cursor_func = _input_set_custom_mouse_cursor_func;
}
+
DisplayServer::~DisplayServer() {
}
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp
index 17f2232c72..b20f6865cd 100644
--- a/servers/navigation_server_2d.cpp
+++ b/servers/navigation_server_2d.cpp
@@ -83,21 +83,27 @@ NavigationServer2D *NavigationServer2D::singleton = nullptr;
static RID rid_to_rid(const RID d) {
return d;
}
+
static bool bool_to_bool(const bool d) {
return d;
}
+
static int int_to_int(const int d) {
return d;
}
+
static real_t real_to_real(const real_t d) {
return d;
}
+
static Vector3 v2_to_v3(const Vector2 d) {
return Vector3(d.x, 0.0, d.y);
}
+
static Vector2 v3_to_v2(const Vector3 &d) {
return Vector2(d.x, d.z);
}
+
static Vector<Vector2> vector_v3_to_v2(const Vector<Vector3> &d) {
Vector<Vector2> nd;
nd.resize(d.size());
@@ -106,21 +112,26 @@ static Vector<Vector2> vector_v3_to_v2(const Vector<Vector3> &d) {
}
return nd;
}
+
static Transform trf2_to_trf3(const Transform2D &d) {
Vector3 o(v2_to_v3(d.get_origin()));
Basis b;
b.rotate(Vector3(0, 1, 0), d.get_rotation());
return Transform(b, o);
}
+
static Object *obj_to_obj(Object *d) {
return d;
}
+
static StringName sn_to_sn(StringName &d) {
return d;
}
+
static Variant var_to_var(Variant &d) {
return d;
}
+
static Ref<NavigationMesh> poly_to_mesh(Ref<NavigationPolygon> d) {
if (d.is_valid()) {
return d->get_mesh();
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index b566e75851..db2ae36067 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -38,6 +38,7 @@ Area2DSW::BodyKey::BodyKey(Body2DSW *p_body, uint32_t p_body_shape, uint32_t p_a
body_shape = p_body_shape;
area_shape = p_area_shape;
}
+
Area2DSW::BodyKey::BodyKey(Area2DSW *p_body, uint32_t p_body_shape, uint32_t p_area_shape) {
rid = p_body->get_self();
instance_id = p_body->get_instance_id();
diff --git a/servers/physics_2d/area_2d_sw.h b/servers/physics_2d/area_2d_sw.h
index 4910167952..8deeb82174 100644
--- a/servers/physics_2d/area_2d_sw.h
+++ b/servers/physics_2d/area_2d_sw.h
@@ -169,6 +169,7 @@ void Area2DSW::add_body_to_query(Body2DSW *p_body, uint32_t p_body_shape, uint32
if (!monitor_query_list.in_list())
_queue_monitor_update();
}
+
void Area2DSW::remove_body_from_query(Body2DSW *p_body, uint32_t p_body_shape, uint32_t p_area_shape) {
BodyKey bk(p_body, p_body_shape, p_area_shape);
monitored_bodies[bk].dec();
@@ -182,6 +183,7 @@ void Area2DSW::add_area_to_query(Area2DSW *p_area, uint32_t p_area_shape, uint32
if (!monitor_query_list.in_list())
_queue_monitor_update();
}
+
void Area2DSW::remove_area_from_query(Area2DSW *p_area, uint32_t p_area_shape, uint32_t p_self_shape) {
BodyKey bk(p_area, p_area_shape, p_self_shape);
monitored_areas[bk].dec();
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 12c7a49288..498972f538 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -235,6 +235,7 @@ void Body2DSW::set_mode(PhysicsServer2D::BodyMode p_mode) {
_update_queries();
*/
}
+
PhysicsServer2D::BodyMode Body2DSW::get_mode() const {
return mode;
}
@@ -314,6 +315,7 @@ void Body2DSW::set_state(PhysicsServer2D::BodyState p_state, const Variant &p_va
} break;
}
}
+
Variant Body2DSW::get_state(PhysicsServer2D::BodyState p_state) const {
switch (p_state) {
case PhysicsServer2D::BODY_STATE_TRANSFORM: {
diff --git a/servers/physics_2d/broad_phase_2d_basic.cpp b/servers/physics_2d/broad_phase_2d_basic.cpp
index 9f4960c4f6..a6bcae11e9 100644
--- a/servers/physics_2d/broad_phase_2d_basic.cpp
+++ b/servers/physics_2d/broad_phase_2d_basic.cpp
@@ -47,11 +47,13 @@ void BroadPhase2DBasic::move(ID p_id, const Rect2 &p_aabb) {
ERR_FAIL_COND(!E);
E->get().aabb = p_aabb;
}
+
void BroadPhase2DBasic::set_static(ID p_id, bool p_static) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
E->get()._static = p_static;
}
+
void BroadPhase2DBasic::remove(ID p_id) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -63,11 +65,13 @@ CollisionObject2DSW *BroadPhase2DBasic::get_object(ID p_id) const {
ERR_FAIL_COND_V(!E, nullptr);
return E->get().owner;
}
+
bool BroadPhase2DBasic::is_static(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, false);
return E->get()._static;
}
+
int BroadPhase2DBasic::get_subindex(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, -1);
@@ -90,6 +94,7 @@ int BroadPhase2DBasic::cull_segment(const Vector2 &p_from, const Vector2 &p_to,
return rc;
}
+
int BroadPhase2DBasic::cull_aabb(const Rect2 &p_aabb, CollisionObject2DSW **p_results, int p_max_results, int *p_result_indices) {
int rc = 0;
@@ -111,6 +116,7 @@ void BroadPhase2DBasic::set_pair_callback(PairCallback p_pair_callback, void *p_
pair_userdata = p_userdata;
pair_callback = p_pair_callback;
}
+
void BroadPhase2DBasic::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_userdata = p_userdata;
unpair_callback = p_unpair_callback;
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
index b78dcf2866..e3a841366e 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
@@ -321,6 +321,7 @@ void BroadPhase2DHashGrid::move(ID p_id, const Rect2 &p_aabb) {
e.aabb = p_aabb;
}
+
void BroadPhase2DHashGrid::set_static(ID p_id, bool p_static) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -340,6 +341,7 @@ void BroadPhase2DHashGrid::set_static(ID p_id, bool p_static) {
_check_motion(&e);
}
}
+
void BroadPhase2DHashGrid::remove(ID p_id) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -357,11 +359,13 @@ CollisionObject2DSW *BroadPhase2DHashGrid::get_object(ID p_id) const {
ERR_FAIL_COND_V(!E, nullptr);
return E->get().owner;
}
+
bool BroadPhase2DHashGrid::is_static(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, false);
return E->get()._static;
}
+
int BroadPhase2DHashGrid::get_subindex(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, -1);
@@ -560,6 +564,7 @@ void BroadPhase2DHashGrid::set_pair_callback(PairCallback p_pair_callback, void
pair_callback = p_pair_callback;
pair_userdata = p_userdata;
}
+
void BroadPhase2DHashGrid::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_callback = p_unpair_callback;
unpair_userdata = p_userdata;
diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp
index 645ee5ff45..a35283d76d 100644
--- a/servers/physics_2d/physics_server_2d_sw.cpp
+++ b/servers/physics_2d/physics_server_2d_sw.cpp
@@ -86,15 +86,19 @@ RID PhysicsServer2DSW::line_shape_create() {
RID PhysicsServer2DSW::ray_shape_create() {
return _shape_create(SHAPE_RAY);
}
+
RID PhysicsServer2DSW::segment_shape_create() {
return _shape_create(SHAPE_SEGMENT);
}
+
RID PhysicsServer2DSW::circle_shape_create() {
return _shape_create(SHAPE_CIRCLE);
}
+
RID PhysicsServer2DSW::rectangle_shape_create() {
return _shape_create(SHAPE_RECTANGLE);
}
+
RID PhysicsServer2DSW::capsule_shape_create() {
return _shape_create(SHAPE_CAPSULE);
}
@@ -102,6 +106,7 @@ RID PhysicsServer2DSW::capsule_shape_create() {
RID PhysicsServer2DSW::convex_polygon_shape_create() {
return _shape_create(SHAPE_CONVEX_POLYGON);
}
+
RID PhysicsServer2DSW::concave_polygon_shape_create() {
return _shape_create(SHAPE_CONCAVE_POLYGON);
}
@@ -349,6 +354,7 @@ void PhysicsServer2DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape)
area->set_shape(p_shape_idx, shape);
}
+
void PhysicsServer2DSW::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform) {
Area2DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND(!area);
@@ -371,6 +377,7 @@ int PhysicsServer2DSW::area_get_shape_count(RID p_area) const {
return area->get_shape_count();
}
+
RID PhysicsServer2DSW::area_get_shape(RID p_area, int p_shape_idx) const {
Area2DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND_V(!area, RID());
@@ -380,6 +387,7 @@ RID PhysicsServer2DSW::area_get_shape(RID p_area, int p_shape_idx) const {
return shape->get_self();
}
+
Transform2D PhysicsServer2DSW::area_get_shape_transform(RID p_area, int p_shape_idx) const {
Area2DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND_V(!area, Transform2D());
@@ -411,6 +419,7 @@ void PhysicsServer2DSW::area_attach_object_instance_id(RID p_area, ObjectID p_id
ERR_FAIL_COND(!area);
area->set_instance_id(p_id);
}
+
ObjectID PhysicsServer2DSW::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
Space2DSW *space = space_owner.getornull(p_area);
@@ -430,6 +439,7 @@ void PhysicsServer2DSW::area_attach_canvas_instance_id(RID p_area, ObjectID p_id
ERR_FAIL_COND(!area);
area->set_canvas_instance_id(p_id);
}
+
ObjectID PhysicsServer2DSW::area_get_canvas_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
Space2DSW *space = space_owner.getornull(p_area);
@@ -586,6 +596,7 @@ void PhysicsServer2DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape)
body->set_shape(p_shape_idx, shape);
}
+
void PhysicsServer2DSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform) {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
@@ -611,6 +622,7 @@ int PhysicsServer2DSW::body_get_shape_count(RID p_body) const {
return body->get_shape_count();
}
+
RID PhysicsServer2DSW::body_get_shape(RID p_body, int p_shape_idx) const {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, RID());
@@ -620,6 +632,7 @@ RID PhysicsServer2DSW::body_get_shape(RID p_body, int p_shape_idx) const {
return shape->get_self();
}
+
Transform2D PhysicsServer2DSW::body_get_shape_transform(RID p_body, int p_shape_idx) const {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, Transform2D());
@@ -650,6 +663,7 @@ void PhysicsServer2DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, boo
body->set_shape_as_disabled(p_shape_idx, p_disabled);
}
+
void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, float p_margin) {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 4976e3ede4..1fb53cf065 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -882,6 +882,7 @@ void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
configure(aabb);
}
+
Variant ConcavePolygonShape2DSW::get_data() const {
Vector<Vector2> rsegments;
int len = segments.size();
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 5fcb31221f..97bbc0f8f2 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -1107,9 +1107,11 @@ void Space2DSW::_broadphase_unpair(CollisionObject2DSW *A, int p_subindex_A, Col
const SelfList<Body2DSW>::List &Space2DSW::get_active_body_list() const {
return active_list;
}
+
void Space2DSW::body_add_to_active_list(SelfList<Body2DSW> *p_body) {
active_list.add(p_body);
}
+
void Space2DSW::body_remove_from_active_list(SelfList<Body2DSW> *p_body) {
active_list.remove(p_body);
}
@@ -1143,6 +1145,7 @@ const Set<CollisionObject2DSW *> &Space2DSW::get_objects() const {
void Space2DSW::body_add_to_state_query_list(SelfList<Body2DSW> *p_body) {
state_query_list.add(p_body);
}
+
void Space2DSW::body_remove_from_state_query_list(SelfList<Body2DSW> *p_body) {
state_query_list.remove(p_body);
}
@@ -1150,6 +1153,7 @@ void Space2DSW::body_remove_from_state_query_list(SelfList<Body2DSW> *p_body) {
void Space2DSW::area_add_to_monitor_query_list(SelfList<Area2DSW> *p_area) {
monitor_query_list.add(p_area);
}
+
void Space2DSW::area_remove_from_monitor_query_list(SelfList<Area2DSW> *p_area) {
monitor_query_list.remove(p_area);
}
diff --git a/servers/physics_3d/area_3d_sw.cpp b/servers/physics_3d/area_3d_sw.cpp
index 59041cb5e0..de4399330d 100644
--- a/servers/physics_3d/area_3d_sw.cpp
+++ b/servers/physics_3d/area_3d_sw.cpp
@@ -38,6 +38,7 @@ Area3DSW::BodyKey::BodyKey(Body3DSW *p_body, uint32_t p_body_shape, uint32_t p_a
body_shape = p_body_shape;
area_shape = p_area_shape;
}
+
Area3DSW::BodyKey::BodyKey(Area3DSW *p_body, uint32_t p_body_shape, uint32_t p_area_shape) {
rid = p_body->get_self();
instance_id = p_body->get_instance_id();
diff --git a/servers/physics_3d/area_3d_sw.h b/servers/physics_3d/area_3d_sw.h
index f64c84b5ab..d85a7fc509 100644
--- a/servers/physics_3d/area_3d_sw.h
+++ b/servers/physics_3d/area_3d_sw.h
@@ -170,6 +170,7 @@ void Area3DSW::add_body_to_query(Body3DSW *p_body, uint32_t p_body_shape, uint32
if (!monitor_query_list.in_list())
_queue_monitor_update();
}
+
void Area3DSW::remove_body_from_query(Body3DSW *p_body, uint32_t p_body_shape, uint32_t p_area_shape) {
BodyKey bk(p_body, p_body_shape, p_area_shape);
monitored_bodies[bk].dec();
@@ -183,6 +184,7 @@ void Area3DSW::add_area_to_query(Area3DSW *p_area, uint32_t p_area_shape, uint32
if (!monitor_query_list.in_list())
_queue_monitor_update();
}
+
void Area3DSW::remove_area_from_query(Area3DSW *p_area, uint32_t p_area_shape, uint32_t p_self_shape) {
BodyKey bk(p_area, p_area_shape, p_self_shape);
monitored_areas[bk].dec();
diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp
index c8a6a2303e..c01e55c4dd 100644
--- a/servers/physics_3d/body_3d_sw.cpp
+++ b/servers/physics_3d/body_3d_sw.cpp
@@ -254,6 +254,7 @@ void Body3DSW::set_mode(PhysicsServer3D::BodyMode p_mode) {
_update_queries();
*/
}
+
PhysicsServer3D::BodyMode Body3DSW::get_mode() const {
return mode;
}
@@ -331,6 +332,7 @@ void Body3DSW::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_va
} break;
}
}
+
Variant Body3DSW::get_state(PhysicsServer3D::BodyState p_state) const {
switch (p_state) {
case PhysicsServer3D::BODY_STATE_TRANSFORM: {
@@ -635,6 +637,7 @@ void BodySW::simulate_motion(const Transform& p_xform,real_t p_step) {
}
+
*/
void Body3DSW::wakeup_neighbours() {
diff --git a/servers/physics_3d/broad_phase_3d_basic.cpp b/servers/physics_3d/broad_phase_3d_basic.cpp
index 6a679a1040..68bf0da53e 100644
--- a/servers/physics_3d/broad_phase_3d_basic.cpp
+++ b/servers/physics_3d/broad_phase_3d_basic.cpp
@@ -51,11 +51,13 @@ void BroadPhase3DBasic::move(ID p_id, const AABB &p_aabb) {
ERR_FAIL_COND(!E);
E->get().aabb = p_aabb;
}
+
void BroadPhase3DBasic::set_static(ID p_id, bool p_static) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
E->get()._static = p_static;
}
+
void BroadPhase3DBasic::remove(ID p_id) {
Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -83,11 +85,13 @@ CollisionObject3DSW *BroadPhase3DBasic::get_object(ID p_id) const {
ERR_FAIL_COND_V(!E, nullptr);
return E->get().owner;
}
+
bool BroadPhase3DBasic::is_static(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, false);
return E->get()._static;
}
+
int BroadPhase3DBasic::get_subindex(ID p_id) const {
const Map<ID, Element>::Element *E = element_map.find(p_id);
ERR_FAIL_COND_V(!E, -1);
@@ -127,6 +131,7 @@ int BroadPhase3DBasic::cull_segment(const Vector3 &p_from, const Vector3 &p_to,
return rc;
}
+
int BroadPhase3DBasic::cull_aabb(const AABB &p_aabb, CollisionObject3DSW **p_results, int p_max_results, int *p_result_indices) {
int rc = 0;
@@ -148,6 +153,7 @@ void BroadPhase3DBasic::set_pair_callback(PairCallback p_pair_callback, void *p_
pair_userdata = p_userdata;
pair_callback = p_pair_callback;
}
+
void BroadPhase3DBasic::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_userdata = p_userdata;
unpair_callback = p_unpair_callback;
diff --git a/servers/physics_3d/broad_phase_octree.cpp b/servers/physics_3d/broad_phase_octree.cpp
index b81ce31ef3..ffa1802bc8 100644
--- a/servers/physics_3d/broad_phase_octree.cpp
+++ b/servers/physics_3d/broad_phase_octree.cpp
@@ -44,6 +44,7 @@ void BroadPhaseOctree::set_static(ID p_id, bool p_static) {
CollisionObject3DSW *it = octree.get(p_id);
octree.set_pairable(p_id, !p_static, 1 << it->get_type(), p_static ? 0 : 0xFFFFF); //pair everything, don't care 1?
}
+
void BroadPhaseOctree::remove(ID p_id) {
octree.erase(p_id);
}
@@ -53,9 +54,11 @@ CollisionObject3DSW *BroadPhaseOctree::get_object(ID p_id) const {
ERR_FAIL_COND_V(!it, nullptr);
return it;
}
+
bool BroadPhaseOctree::is_static(ID p_id) const {
return !octree.is_pairable(p_id);
}
+
int BroadPhaseOctree::get_subindex(ID p_id) const {
return octree.get_subindex(p_id);
}
@@ -92,6 +95,7 @@ void BroadPhaseOctree::set_pair_callback(PairCallback p_pair_callback, void *p_u
pair_callback = p_pair_callback;
pair_userdata = p_userdata;
}
+
void BroadPhaseOctree::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_callback = p_unpair_callback;
unpair_userdata = p_userdata;
diff --git a/servers/physics_3d/collision_object_3d_sw.cpp b/servers/physics_3d/collision_object_3d_sw.cpp
index f7e3b507ca..22a8235744 100644
--- a/servers/physics_3d/collision_object_3d_sw.cpp
+++ b/servers/physics_3d/collision_object_3d_sw.cpp
@@ -61,6 +61,7 @@ void CollisionObject3DSW::set_shape(int p_index, Shape3DSW *p_shape) {
//_update_shapes();
//_shapes_changed();
}
+
void CollisionObject3DSW::set_shape_transform(int p_index, const Transform &p_transform) {
ERR_FAIL_INDEX(p_index, shapes.size());
diff --git a/servers/physics_3d/gjk_epa.cpp b/servers/physics_3d/gjk_epa.cpp
index a937ebc426..7f7fc0f55b 100644
--- a/servers/physics_3d/gjk_epa.cpp
+++ b/servers/physics_3d/gjk_epa.cpp
@@ -847,6 +847,7 @@ bool Distance( const Shape3DSW* shape0,
}
}
+
//
bool Penetration( const Shape3DSW* shape0,
const Transform& wtrs0,
@@ -891,6 +892,7 @@ bool Penetration( const Shape3DSW* shape0,
}
+
/* Symbols cleanup */
#undef GJK_MAX_ITERATIONS
diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
index 77e6eacb69..97310a5924 100644
--- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
@@ -623,6 +623,7 @@ void Generic6DOFJoint3DSW::set_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOF
break; // Can't happen, but silences warning
}
}
+
bool Generic6DOFJoint3DSW::get_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOFJointAxisFlag p_flag) const {
ERR_FAIL_INDEX_V(p_axis, 3, 0);
switch (p_flag) {
diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
index a77d78ccaa..a879b4ca7f 100644
--- a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
@@ -360,12 +360,14 @@ void HingeJoint3DSW::solve(real_t p_step) {
}
}
}
+
/*
void HingeJointSW::updateRHS(real_t timeStep)
{
(void)timeStep;
}
+
*/
static _FORCE_INLINE_ real_t atan2fast(real_t y, real_t x) {
@@ -459,6 +461,7 @@ void HingeJoint3DSW::set_flag(PhysicsServer3D::HingeJointFlag p_flag, bool p_val
break; // Can't happen, but silences warning
}
}
+
bool HingeJoint3DSW::get_flag(PhysicsServer3D::HingeJointFlag p_flag) const {
switch (p_flag) {
case PhysicsServer3D::HINGE_JOINT_FLAG_USE_LIMIT:
diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp
index d2856829ed..d05001e636 100644
--- a/servers/physics_3d/physics_server_3d_sw.cpp
+++ b/servers/physics_3d/physics_server_3d_sw.cpp
@@ -278,6 +278,7 @@ int PhysicsServer3DSW::area_get_shape_count(RID p_area) const {
return area->get_shape_count();
}
+
RID PhysicsServer3DSW::area_get_shape(RID p_area, int p_shape_idx) const {
Area3DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND_V(!area, RID());
@@ -287,6 +288,7 @@ RID PhysicsServer3DSW::area_get_shape(RID p_area, int p_shape_idx) const {
return shape->get_self();
}
+
Transform PhysicsServer3DSW::area_get_shape_transform(RID p_area, int p_shape_idx) const {
Area3DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND_V(!area, Transform());
@@ -326,6 +328,7 @@ void PhysicsServer3DSW::area_attach_object_instance_id(RID p_area, ObjectID p_id
ERR_FAIL_COND(!area);
area->set_instance_id(p_id);
}
+
ObjectID PhysicsServer3DSW::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
Space3DSW *space = space_owner.getornull(p_area);
@@ -494,6 +497,7 @@ void PhysicsServer3DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape)
body->set_shape(p_shape_idx, shape);
}
+
void PhysicsServer3DSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform) {
Body3DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
@@ -507,6 +511,7 @@ int PhysicsServer3DSW::body_get_shape_count(RID p_body) const {
return body->get_shape_count();
}
+
RID PhysicsServer3DSW::body_get_shape(RID p_body, int p_shape_idx) const {
Body3DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, RID());
@@ -909,6 +914,7 @@ void PhysicsServer3DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param,
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_param(p_param, p_value);
}
+
real_t PhysicsServer3DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
@@ -924,6 +930,7 @@ void PhysicsServer3DSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_pos_a(p_A);
}
+
Vector3 PhysicsServer3DSW::pin_joint_get_local_a(RID p_joint) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
@@ -939,6 +946,7 @@ void PhysicsServer3DSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_pos_b(p_B);
}
+
Vector3 PhysicsServer3DSW::pin_joint_get_local_b(RID p_joint) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
@@ -994,6 +1002,7 @@ void PhysicsServer3DSW::hinge_joint_set_param(RID p_joint, HingeJointParam p_par
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
hinge_joint->set_param(p_param, p_value);
}
+
real_t PhysicsServer3DSW::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
@@ -1009,6 +1018,7 @@ void PhysicsServer3DSW::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag,
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
hinge_joint->set_flag(p_flag, p_value);
}
+
bool PhysicsServer3DSW::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, false);
@@ -1089,6 +1099,7 @@ void PhysicsServer3DSW::slider_joint_set_param(RID p_joint, SliderJointParam p_p
SliderJoint3DSW *slider_joint = static_cast<SliderJoint3DSW *>(joint);
slider_joint->set_param(p_param, p_value);
}
+
real_t PhysicsServer3DSW::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
@@ -1124,6 +1135,7 @@ void PhysicsServer3DSW::cone_twist_joint_set_param(RID p_joint, ConeTwistJointPa
ConeTwistJoint3DSW *cone_twist_joint = static_cast<ConeTwistJoint3DSW *>(joint);
cone_twist_joint->set_param(p_param, p_value);
}
+
real_t PhysicsServer3DSW::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
@@ -1159,6 +1171,7 @@ void PhysicsServer3DSW::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
generic_6dof_joint->set_param(p_axis, p_param, p_value);
}
+
real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
@@ -1174,6 +1187,7 @@ void PhysicsServer3DSW::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
generic_6dof_joint->set_flag(p_axis, p_flag, p_enable);
}
+
bool PhysicsServer3DSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, false);
diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp
index 2c248a4d38..a44244f7d5 100644
--- a/servers/physics_3d/shape_3d_sw.cpp
+++ b/servers/physics_3d/shape_3d_sw.cpp
@@ -1380,12 +1380,15 @@ ConcavePolygonShape3DSW::ConcavePolygonShape3DSW() {
Vector<real_t> HeightMapShape3DSW::get_heights() const {
return heights;
}
+
int HeightMapShape3DSW::get_width() const {
return width;
}
+
int HeightMapShape3DSW::get_depth() const {
return depth;
}
+
real_t HeightMapShape3DSW::get_cell_size() const {
return cell_size;
}
diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp
index 9193e6cbdd..066945d808 100644
--- a/servers/physics_3d/space_3d_sw.cpp
+++ b/servers/physics_3d/space_3d_sw.cpp
@@ -386,6 +386,7 @@ static void _rest_cbk_result(const Vector3 &p_point_A, const Vector3 &p_point_B,
rd->best_object = rd->object;
rd->best_shape = rd->shape;
}
+
bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
Shape3DSW *shape = static_cast<PhysicsServer3DSW *>(PhysicsServer3D::get_singleton())->shape_owner.getornull(p_shape);
ERR_FAIL_COND_V(!shape, 0);
@@ -990,9 +991,11 @@ void Space3DSW::_broadphase_unpair(CollisionObject3DSW *A, int p_subindex_A, Col
const SelfList<Body3DSW>::List &Space3DSW::get_active_body_list() const {
return active_list;
}
+
void Space3DSW::body_add_to_active_list(SelfList<Body3DSW> *p_body) {
active_list.add(p_body);
}
+
void Space3DSW::body_remove_from_active_list(SelfList<Body3DSW> *p_body) {
active_list.remove(p_body);
}
@@ -1026,6 +1029,7 @@ const Set<CollisionObject3DSW *> &Space3DSW::get_objects() const {
void Space3DSW::body_add_to_state_query_list(SelfList<Body3DSW> *p_body) {
state_query_list.add(p_body);
}
+
void Space3DSW::body_remove_from_state_query_list(SelfList<Body3DSW> *p_body) {
state_query_list.remove(p_body);
}
@@ -1033,6 +1037,7 @@ void Space3DSW::body_remove_from_state_query_list(SelfList<Body3DSW> *p_body) {
void Space3DSW::area_add_to_monitor_query_list(SelfList<Area3DSW> *p_area) {
monitor_query_list.add(p_area);
}
+
void Space3DSW::area_remove_from_monitor_query_list(SelfList<Area3DSW> *p_area) {
monitor_query_list.remove(p_area);
}
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index df38788b29..e3051c8fba 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -146,6 +146,7 @@ RID PhysicsShapeQueryParameters2D::get_shape_rid() const {
void PhysicsShapeQueryParameters2D::set_transform(const Transform2D &p_transform) {
transform = p_transform;
}
+
Transform2D PhysicsShapeQueryParameters2D::get_transform() const {
return transform;
}
@@ -153,6 +154,7 @@ Transform2D PhysicsShapeQueryParameters2D::get_transform() const {
void PhysicsShapeQueryParameters2D::set_motion(const Vector2 &p_motion) {
motion = p_motion;
}
+
Vector2 PhysicsShapeQueryParameters2D::get_motion() const {
return motion;
}
@@ -160,6 +162,7 @@ Vector2 PhysicsShapeQueryParameters2D::get_motion() const {
void PhysicsShapeQueryParameters2D::set_margin(float p_margin) {
margin = p_margin;
}
+
float PhysicsShapeQueryParameters2D::get_margin() const {
return margin;
}
@@ -167,6 +170,7 @@ float PhysicsShapeQueryParameters2D::get_margin() const {
void PhysicsShapeQueryParameters2D::set_collision_mask(int p_collision_mask) {
collision_mask = p_collision_mask;
}
+
int PhysicsShapeQueryParameters2D::get_collision_mask() const {
return collision_mask;
}
@@ -359,6 +363,7 @@ Array PhysicsDirectSpaceState2D::_collide_shape(const Ref<PhysicsShapeQueryParam
r[i] = ret[i];
return r;
}
+
Dictionary PhysicsDirectSpaceState2D::_get_rest_info(const Ref<PhysicsShapeQueryParameters2D> &p_shape_query) {
ERR_FAIL_COND_V(!p_shape_query.is_valid(), Dictionary());
@@ -396,15 +401,19 @@ void PhysicsDirectSpaceState2D::_bind_methods() {
int PhysicsShapeQueryResult2D::get_result_count() const {
return result.size();
}
+
RID PhysicsShapeQueryResult2D::get_result_rid(int p_idx) const {
return result[p_idx].rid;
}
+
ObjectID PhysicsShapeQueryResult2D::get_result_object_id(int p_idx) const {
return result[p_idx].collider_id;
}
+
Object *PhysicsShapeQueryResult2D::get_result_object(int p_idx) const {
return result[p_idx].collider;
}
+
int PhysicsShapeQueryResult2D::get_result_object_shape(int p_idx) const {
return result[p_idx].shape;
}
@@ -425,6 +434,7 @@ void PhysicsShapeQueryResult2D::_bind_methods() {
Vector2 PhysicsTestMotionResult2D::get_motion() const {
return result.motion;
}
+
Vector2 PhysicsTestMotionResult2D::get_motion_remainder() const {
return result.remainder;
}
@@ -432,15 +442,19 @@ Vector2 PhysicsTestMotionResult2D::get_motion_remainder() const {
Vector2 PhysicsTestMotionResult2D::get_collision_point() const {
return result.collision_point;
}
+
Vector2 PhysicsTestMotionResult2D::get_collision_normal() const {
return result.collision_normal;
}
+
Vector2 PhysicsTestMotionResult2D::get_collider_velocity() const {
return result.collider_velocity;
}
+
ObjectID PhysicsTestMotionResult2D::get_collider_id() const {
return result.collider_id;
}
+
RID PhysicsTestMotionResult2D::get_collider_rid() const {
return result.collider;
}
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index 2625141142..c8f5ae985e 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -150,6 +150,7 @@ RID PhysicsShapeQueryParameters3D::get_shape_rid() const {
void PhysicsShapeQueryParameters3D::set_transform(const Transform &p_transform) {
transform = p_transform;
}
+
Transform PhysicsShapeQueryParameters3D::get_transform() const {
return transform;
}
@@ -165,6 +166,7 @@ float PhysicsShapeQueryParameters3D::get_margin() const {
void PhysicsShapeQueryParameters3D::set_collision_mask(int p_collision_mask) {
collision_mask = p_collision_mask;
}
+
int PhysicsShapeQueryParameters3D::get_collision_mask() const {
return collision_mask;
}
@@ -298,6 +300,7 @@ Array PhysicsDirectSpaceState3D::_cast_motion(const Ref<PhysicsShapeQueryParamet
ret[1] = closest_unsafe;
return ret;
}
+
Array PhysicsDirectSpaceState3D::_collide_shape(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, int p_max_results) {
ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array());
@@ -313,6 +316,7 @@ Array PhysicsDirectSpaceState3D::_collide_shape(const Ref<PhysicsShapeQueryParam
r[i] = ret[i];
return r;
}
+
Dictionary PhysicsDirectSpaceState3D::_get_rest_info(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query) {
ERR_FAIL_COND_V(!p_shape_query.is_valid(), Dictionary());
@@ -347,15 +351,19 @@ void PhysicsDirectSpaceState3D::_bind_methods() {
int PhysicsShapeQueryResult3D::get_result_count() const {
return result.size();
}
+
RID PhysicsShapeQueryResult3D::get_result_rid(int p_idx) const {
return result[p_idx].rid;
}
+
ObjectID PhysicsShapeQueryResult3D::get_result_object_id(int p_idx) const {
return result[p_idx].collider_id;
}
+
Object *PhysicsShapeQueryResult3D::get_result_object(int p_idx) const {
return result[p_idx].collider;
}
+
int PhysicsShapeQueryResult3D::get_result_object_shape(int p_idx) const {
return result[p_idx].shape;
}
diff --git a/servers/rendering/rasterizer.cpp b/servers/rendering/rasterizer.cpp
index e7b5d81bf1..566a14b655 100644
--- a/servers/rendering/rasterizer.cpp
+++ b/servers/rendering/rasterizer.cpp
@@ -40,6 +40,7 @@ void RasterizerScene::InstanceDependency::instance_notify_changed(bool p_aabb, b
E->key()->dependency_changed(p_aabb, p_dependencies);
}
}
+
void RasterizerScene::InstanceDependency::instance_notify_deleted(RID p_deleted) {
for (Map<InstanceBase *, uint32_t>::Element *E = instances.front(); E; E = E->next()) {
E->key()->dependency_deleted(p_deleted);
diff --git a/servers/rendering/rasterizer_rd/light_cluster_builder.cpp b/servers/rendering/rasterizer_rd/light_cluster_builder.cpp
index 260c0f3760..efb48e6df7 100644
--- a/servers/rendering/rasterizer_rd/light_cluster_builder.cpp
+++ b/servers/rendering/rasterizer_rd/light_cluster_builder.cpp
@@ -203,6 +203,7 @@ void LightClusterBuilder::setup(uint32_t p_width, uint32_t p_height, uint32_t p_
RID LightClusterBuilder::get_cluster_texture() const {
return cluster_texture;
}
+
RID LightClusterBuilder::get_cluster_indices_buffer() const {
return items_buffer;
}
@@ -226,6 +227,7 @@ LightClusterBuilder::LightClusterBuilder() {
items_buffer = RD::get_singleton()->storage_buffer_create(sizeof(uint32_t) * 1024);
item_max = 1024;
}
+
LightClusterBuilder::~LightClusterBuilder() {
if (cluster_data.size()) {
RD::get_singleton()->free(cluster_texture);
diff --git a/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp
index f328bab7d1..4c477ca5f4 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp
@@ -1545,6 +1545,7 @@ void RasterizerCanvasRD::light_set_texture(RID p_rid, RID p_texture) {
cl->texture = p_texture;
}
+
void RasterizerCanvasRD::light_set_use_shadow(RID p_rid, bool p_enable, int p_resolution) {
CanvasLight *cl = canvas_light_owner.getornull(p_rid);
ERR_FAIL_COND(!cl);
@@ -1758,6 +1759,7 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con
}
}
}
+
void RasterizerCanvasRD::occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) {
OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder);
ERR_FAIL_COND(!oc);
@@ -1955,6 +1957,7 @@ void RasterizerCanvasRD::ShaderData::set_default_texture_param(const StringName
default_texture_params[p_name] = p_texture;
}
}
+
void RasterizerCanvasRD::ShaderData::get_param_list(List<PropertyInfo> *p_param_list) const {
Map<int, StringName> order;
@@ -2002,9 +2005,11 @@ bool RasterizerCanvasRD::ShaderData::is_param_texture(const StringName &p_param)
bool RasterizerCanvasRD::ShaderData::is_animated() const {
return false;
}
+
bool RasterizerCanvasRD::ShaderData::casts_shadows() const {
return false;
}
+
Variant RasterizerCanvasRD::ShaderData::get_default_parameter(const StringName &p_parameter) const {
if (uniforms.has(p_parameter)) {
ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter];
@@ -2033,6 +2038,7 @@ RasterizerStorageRD::ShaderData *RasterizerCanvasRD::_create_shader_func() {
ShaderData *shader_data = memnew(ShaderData);
return shader_data;
}
+
void RasterizerCanvasRD::MaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) {
RasterizerCanvasRD *canvas_singleton = (RasterizerCanvasRD *)RasterizerCanvas::singleton;
@@ -2134,6 +2140,7 @@ void RasterizerCanvasRD::MaterialData::update_parameters(const Map<StringName, V
uniform_set = RD::get_singleton()->uniform_set_create(uniforms, canvas_singleton->shader.canvas_shader.version_get_shader(shader_data->version, 0), 1);
}
+
RasterizerCanvasRD::MaterialData::~MaterialData() {
if (uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(uniform_set)) {
RD::get_singleton()->free(uniform_set);
diff --git a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
index 26d7090fbc..2b747cd04a 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
@@ -414,6 +414,7 @@ bool RasterizerSceneHighEndRD::ShaderData::is_animated() const {
bool RasterizerSceneHighEndRD::ShaderData::casts_shadows() const {
return false;
}
+
Variant RasterizerSceneHighEndRD::ShaderData::get_default_parameter(const StringName &p_parameter) const {
if (uniforms.has(p_parameter)) {
ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter];
diff --git a/servers/rendering/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_scene_rd.cpp
index 3ea89d643f..ac986fab58 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_scene_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_scene_rd.cpp
@@ -1130,36 +1130,43 @@ void RasterizerSceneRD::environment_set_background(RID p_env, RS::EnvironmentBG
ERR_FAIL_COND(!env);
env->background = p_bg;
}
+
void RasterizerSceneRD::environment_set_sky(RID p_env, RID p_sky) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->sky = p_sky;
}
+
void RasterizerSceneRD::environment_set_sky_custom_fov(RID p_env, float p_scale) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->sky_custom_fov = p_scale;
}
+
void RasterizerSceneRD::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->sky_orientation = p_orientation;
}
+
void RasterizerSceneRD::environment_set_bg_color(RID p_env, const Color &p_color) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->bg_color = p_color;
}
+
void RasterizerSceneRD::environment_set_bg_energy(RID p_env, float p_energy) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->bg_energy = p_energy;
}
+
void RasterizerSceneRD::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->canvas_max_layer = p_max_layer;
}
+
void RasterizerSceneRD::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source, const Color &p_ao_color) {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
@@ -1176,56 +1183,67 @@ RS::EnvironmentBG RasterizerSceneRD::environment_get_background(RID p_env) const
ERR_FAIL_COND_V(!env, RS::ENV_BG_MAX);
return env->background;
}
+
RID RasterizerSceneRD::environment_get_sky(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, RID());
return env->sky;
}
+
float RasterizerSceneRD::environment_get_sky_custom_fov(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->sky_custom_fov;
}
+
Basis RasterizerSceneRD::environment_get_sky_orientation(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, Basis());
return env->sky_orientation;
}
+
Color RasterizerSceneRD::environment_get_bg_color(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->bg_color;
}
+
float RasterizerSceneRD::environment_get_bg_energy(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->bg_energy;
}
+
int RasterizerSceneRD::environment_get_canvas_max_layer(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->canvas_max_layer;
}
+
Color RasterizerSceneRD::environment_get_ambient_light_color(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->ambient_light;
}
+
RS::EnvironmentAmbientSource RasterizerSceneRD::environment_get_ambient_source(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, RS::ENV_AMBIENT_SOURCE_BG);
return env->ambient_source;
}
+
float RasterizerSceneRD::environment_get_ambient_light_energy(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->ambient_light_energy;
}
+
float RasterizerSceneRD::environment_get_ambient_sky_contribution(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->ambient_sky_contribution;
}
+
RS::EnvironmentReflectionSource RasterizerSceneRD::environment_get_reflection_source(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, RS::ENV_REFLECTION_SOURCE_DISABLED);
@@ -1321,6 +1339,7 @@ float RasterizerSceneRD::environment_get_ssao_ao_affect(RID p_env) const {
ERR_FAIL_COND_V(!env, false);
return env->ssao_ao_channel_affect;
}
+
float RasterizerSceneRD::environment_get_ssao_light_affect(RID p_env) const {
Environent *env = environment_owner.getornull(p_env);
ERR_FAIL_COND_V(!env, false);
diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
index 63abe6b215..c04bbc6c06 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
@@ -713,6 +713,7 @@ RID RasterizerStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_l
return texture_owner.make_rid(texture);
}
+
RID RasterizerStorageRD::texture_3d_create(const Vector<Ref<Image>> &p_slices) {
return RID();
}
@@ -765,9 +766,11 @@ void RasterizerStorageRD::_texture_2d_update(RID p_texture, const Ref<Image> &p_
void RasterizerStorageRD::texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer) {
_texture_2d_update(p_texture, p_image, p_layer, true);
}
+
void RasterizerStorageRD::texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer) {
_texture_2d_update(p_texture, p_image, p_layer, false);
}
+
void RasterizerStorageRD::texture_3d_update(RID p_texture, const Ref<Image> &p_image, int p_depth, int p_mipmap) {
}
@@ -826,6 +829,7 @@ RID RasterizerStorageRD::texture_2d_placeholder_create() {
return texture_2d_create(image);
}
+
RID RasterizerStorageRD::texture_2d_layered_placeholder_create(RS::TextureLayeredType p_layered_type) {
//this could be better optimized to reuse an existing image , done this way
//for now to get it working
@@ -851,6 +855,7 @@ RID RasterizerStorageRD::texture_2d_layered_placeholder_create(RS::TextureLayere
return texture_2d_layered_create(images, p_layered_type);
}
+
RID RasterizerStorageRD::texture_3d_placeholder_create() {
return RID();
}
@@ -882,9 +887,11 @@ Ref<Image> RasterizerStorageRD::texture_2d_get(RID p_texture) const {
return image;
}
+
Ref<Image> RasterizerStorageRD::texture_2d_layer_get(RID p_texture, int p_layer) const {
return Ref<Image>();
}
+
Ref<Image> RasterizerStorageRD::texture_3d_slice_get(RID p_texture, int p_depth, int p_mipmap) const {
return Ref<Image>();
}
@@ -928,6 +935,7 @@ void RasterizerStorageRD::texture_replace(RID p_texture, RID p_by_texture) {
decal_atlas.dirty = true; //mark it dirty since it was most likely modified
}
}
+
void RasterizerStorageRD::texture_set_size_override(RID p_texture, int p_width, int p_height) {
Texture *tex = texture_owner.getornull(p_texture);
ERR_FAIL_COND(!tex);
@@ -941,6 +949,7 @@ void RasterizerStorageRD::texture_set_path(RID p_texture, const String &p_path)
ERR_FAIL_COND(!tex);
tex->path = p_path;
}
+
String RasterizerStorageRD::texture_get_path(RID p_texture) const {
return String();
}
@@ -951,23 +960,27 @@ void RasterizerStorageRD::texture_set_detect_3d_callback(RID p_texture, RS::Text
tex->detect_3d_callback_ud = p_userdata;
tex->detect_3d_callback = p_callback;
}
+
void RasterizerStorageRD::texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) {
Texture *tex = texture_owner.getornull(p_texture);
ERR_FAIL_COND(!tex);
tex->detect_normal_callback_ud = p_userdata;
tex->detect_normal_callback = p_callback;
}
+
void RasterizerStorageRD::texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) {
Texture *tex = texture_owner.getornull(p_texture);
ERR_FAIL_COND(!tex);
tex->detect_roughness_callback_ud = p_userdata;
tex->detect_roughness_callback = p_callback;
}
+
void RasterizerStorageRD::texture_debug_usage(List<RS::TextureInfo> *r_info) {
}
void RasterizerStorageRD::texture_set_proxy(RID p_proxy, RID p_base) {
}
+
void RasterizerStorageRD::texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) {
}
@@ -1055,6 +1068,7 @@ String RasterizerStorageRD::shader_get_code(RID p_shader) const {
ERR_FAIL_COND_V(!shader, String());
return shader->code;
}
+
void RasterizerStorageRD::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
Shader *shader = shader_owner.getornull(p_shader);
ERR_FAIL_COND(!shader);
@@ -1088,6 +1102,7 @@ RID RasterizerStorageRD::shader_get_default_texture_param(RID p_shader, const St
return RID();
}
+
Variant RasterizerStorageRD::shader_get_param_default(RID p_shader, const StringName &p_param) const {
Shader *shader = shader_owner.getornull(p_shader);
ERR_FAIL_COND_V(!shader, Variant());
@@ -1096,6 +1111,7 @@ Variant RasterizerStorageRD::shader_get_param_default(RID p_shader, const String
}
return Variant();
}
+
void RasterizerStorageRD::shader_set_data_request_function(ShaderType p_shader_type, ShaderDataRequestFunction p_function) {
ERR_FAIL_INDEX(p_shader_type, SHADER_TYPE_MAX);
shader_data_request_func[p_shader_type] = p_function;
@@ -1217,6 +1233,7 @@ void RasterizerStorageRD::material_set_next_pass(RID p_material, RID p_next_mate
material->instance_dependency.instance_notify_changed(false, true);
}
+
void RasterizerStorageRD::material_set_render_priority(RID p_material, int priority) {
Material *material = material_owner.getornull(p_material);
ERR_FAIL_COND(!material);
@@ -1238,6 +1255,7 @@ bool RasterizerStorageRD::material_is_animated(RID p_material) {
}
return false; //by default nothing is animated
}
+
bool RasterizerStorageRD::material_casts_shadows(RID p_material) {
Material *material = material_owner.getornull(p_material);
ERR_FAIL_COND_V(!material, true);
@@ -1978,6 +1996,7 @@ void RasterizerStorageRD::_update_queued_materials() {
}
material_update_list = nullptr;
}
+
/* MESH API */
RID RasterizerStorageRD::mesh_create() {
@@ -2142,6 +2161,7 @@ void RasterizerStorageRD::mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMo
mesh->blend_shape_mode = p_mode;
}
+
RS::BlendShapeMode RasterizerStorageRD::mesh_get_blend_shape_mode(RID p_mesh) const {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND_V(!mesh, RS::BLEND_SHAPE_MODE_NORMALIZED);
@@ -2168,6 +2188,7 @@ void RasterizerStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, R
mesh->instance_dependency.instance_notify_changed(false, true);
mesh->material_cache.clear();
}
+
RID RasterizerStorageRD::mesh_surface_get_material(RID p_mesh, int p_surface) const {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND_V(!mesh, RID());
@@ -2222,6 +2243,7 @@ void RasterizerStorageRD::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
ERR_FAIL_COND(!mesh);
mesh->custom_aabb = p_aabb;
}
+
AABB RasterizerStorageRD::mesh_get_custom_aabb(RID p_mesh) const {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND_V(!mesh, AABB());
@@ -2772,6 +2794,7 @@ void RasterizerStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, i
_multimesh_mark_dirty(multimesh, p_index, true);
}
+
void RasterizerStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
@@ -2793,6 +2816,7 @@ void RasterizerStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_in
_multimesh_mark_dirty(multimesh, p_index, false);
}
+
void RasterizerStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, int p_index, const Color &p_color) {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
@@ -2852,6 +2876,7 @@ Transform RasterizerStorageRD::multimesh_instance_get_transform(RID p_multimesh,
return t;
}
+
Transform2D RasterizerStorageRD::multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Transform2D());
@@ -2876,6 +2901,7 @@ Transform2D RasterizerStorageRD::multimesh_instance_get_transform_2d(RID p_multi
return t;
}
+
Color RasterizerStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_index) const {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
@@ -2898,6 +2924,7 @@ Color RasterizerStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_i
return c;
}
+
Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
@@ -2992,6 +3019,7 @@ void RasterizerStorageRD::multimesh_set_visible_instances(RID p_multimesh, int p
multimesh->visible_instances = p_visible;
}
+
int RasterizerStorageRD::multimesh_get_visible_instances(RID p_multimesh) const {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, 0);
@@ -3102,6 +3130,7 @@ void RasterizerStorageRD::skeleton_allocate(RID p_skeleton, int p_bones, bool p_
_skeleton_make_dirty(skeleton);
}
}
+
int RasterizerStorageRD::skeleton_get_bone_count(RID p_skeleton) const {
Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
ERR_FAIL_COND_V(!skeleton, 0);
@@ -3160,6 +3189,7 @@ Transform RasterizerStorageRD::skeleton_bone_get_transform(RID p_skeleton, int p
return t;
}
+
void RasterizerStorageRD::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) {
Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
@@ -3180,6 +3210,7 @@ void RasterizerStorageRD::skeleton_bone_set_transform_2d(RID p_skeleton, int p_b
_skeleton_make_dirty(skeleton);
}
+
Transform2D RasterizerStorageRD::skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const {
Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
@@ -3258,6 +3289,7 @@ void RasterizerStorageRD::light_set_color(RID p_light, const Color &p_color) {
light->color = p_color;
}
+
void RasterizerStorageRD::light_set_param(RID p_light, RS::LightParam p_param, float p_value) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
@@ -3282,6 +3314,7 @@ void RasterizerStorageRD::light_set_param(RID p_light, RS::LightParam p_param, f
light->param[p_param] = p_value;
}
+
void RasterizerStorageRD::light_set_shadow(RID p_light, bool p_enabled) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
@@ -3322,6 +3355,7 @@ void RasterizerStorageRD::light_set_negative(RID p_light, bool p_enable) {
light->negative = p_enable;
}
+
void RasterizerStorageRD::light_set_cull_mask(RID p_light, uint32_t p_mask) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
@@ -3351,6 +3385,7 @@ void RasterizerStorageRD::light_set_use_gi(RID p_light, bool p_enabled) {
light->version++;
light->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
@@ -3500,6 +3535,7 @@ void RasterizerStorageRD::reflection_probe_set_max_distance(RID p_probe, float p
reflection_probe->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -3507,6 +3543,7 @@ void RasterizerStorageRD::reflection_probe_set_extents(RID p_probe, const Vector
reflection_probe->extents = p_extents;
reflection_probe->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -3522,6 +3559,7 @@ void RasterizerStorageRD::reflection_probe_set_as_interior(RID p_probe, bool p_e
reflection_probe->interior = p_enable;
reflection_probe->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -3536,6 +3574,7 @@ void RasterizerStorageRD::reflection_probe_set_enable_shadows(RID p_probe, bool
reflection_probe->enable_shadows = p_enable;
reflection_probe->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) {
ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!reflection_probe);
@@ -3562,6 +3601,7 @@ AABB RasterizerStorageRD::reflection_probe_get_aabb(RID p_probe) const {
return aabb;
}
+
RS::ReflectionProbeUpdateMode RasterizerStorageRD::reflection_probe_get_update_mode(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, RS::REFLECTION_PROBE_UPDATE_ALWAYS);
@@ -3582,6 +3622,7 @@ Vector3 RasterizerStorageRD::reflection_probe_get_extents(RID p_probe) const {
return reflection_probe->extents;
}
+
Vector3 RasterizerStorageRD::reflection_probe_get_origin_offset(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, Vector3());
@@ -3616,12 +3657,14 @@ float RasterizerStorageRD::reflection_probe_get_intensity(RID p_probe) const {
return reflection_probe->intensity;
}
+
bool RasterizerStorageRD::reflection_probe_is_interior(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, false);
return reflection_probe->interior;
}
+
bool RasterizerStorageRD::reflection_probe_is_box_projection(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, false);
@@ -3635,12 +3678,14 @@ Color RasterizerStorageRD::reflection_probe_get_interior_ambient(RID p_probe) co
return reflection_probe->interior_ambient;
}
+
float RasterizerStorageRD::reflection_probe_get_interior_ambient_energy(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->interior_ambient_energy;
}
+
float RasterizerStorageRD::reflection_probe_get_interior_ambient_probe_contribution(RID p_probe) const {
const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
@@ -3658,6 +3703,7 @@ void RasterizerStorageRD::decal_set_extents(RID p_decal, const Vector3 &p_extent
decal->extents = p_extents;
decal->instance_dependency.instance_notify_changed(true, false);
}
+
void RasterizerStorageRD::decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) {
Decal *decal = decal_owner.getornull(p_decal);
ERR_FAIL_COND(!decal);
@@ -3681,6 +3727,7 @@ void RasterizerStorageRD::decal_set_texture(RID p_decal, RS::DecalTexture p_type
decal->instance_dependency.instance_notify_changed(false, true);
}
+
void RasterizerStorageRD::decal_set_emission_energy(RID p_decal, float p_energy) {
Decal *decal = decal_owner.getornull(p_decal);
ERR_FAIL_COND(!decal);
@@ -3698,6 +3745,7 @@ void RasterizerStorageRD::decal_set_modulate(RID p_decal, const Color &p_modulat
ERR_FAIL_COND(!decal);
decal->modulate = p_modulate;
}
+
void RasterizerStorageRD::decal_set_cull_mask(RID p_decal, uint32_t p_layers) {
Decal *decal = decal_owner.getornull(p_decal);
ERR_FAIL_COND(!decal);
@@ -3875,6 +3923,7 @@ Vector3i RasterizerStorageRD::gi_probe_get_octree_size(RID p_gi_probe) const {
ERR_FAIL_COND_V(!gi_probe, Vector3i());
return gi_probe->octree_size;
}
+
Vector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
@@ -3884,6 +3933,7 @@ Vector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) c
}
return Vector<uint8_t>();
}
+
Vector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
@@ -3893,6 +3943,7 @@ Vector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) con
}
return Vector<uint8_t>();
}
+
Vector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
@@ -3902,12 +3953,14 @@ Vector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe)
}
return Vector<uint8_t>();
}
+
Vector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, Vector<int>());
return gi_probe->level_counts;
}
+
Transform RasterizerStorageRD::gi_probe_get_to_cell_xform(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, Transform());
@@ -3922,6 +3975,7 @@ void RasterizerStorageRD::gi_probe_set_dynamic_range(RID p_gi_probe, float p_ran
gi_probe->dynamic_range = p_range;
gi_probe->version++;
}
+
float RasterizerStorageRD::gi_probe_get_dynamic_range(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -3936,6 +3990,7 @@ void RasterizerStorageRD::gi_probe_set_propagation(RID p_gi_probe, float p_range
gi_probe->propagation = p_range;
gi_probe->version++;
}
+
float RasterizerStorageRD::gi_probe_get_propagation(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -3948,6 +4003,7 @@ void RasterizerStorageRD::gi_probe_set_energy(RID p_gi_probe, float p_energy) {
gi_probe->energy = p_energy;
}
+
float RasterizerStorageRD::gi_probe_get_energy(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -3960,6 +4016,7 @@ void RasterizerStorageRD::gi_probe_set_ao(RID p_gi_probe, float p_ao) {
gi_probe->ao = p_ao;
}
+
float RasterizerStorageRD::gi_probe_get_ao(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -3985,6 +4042,7 @@ void RasterizerStorageRD::gi_probe_set_bias(RID p_gi_probe, float p_bias) {
gi_probe->bias = p_bias;
}
+
float RasterizerStorageRD::gi_probe_get_bias(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -3997,6 +4055,7 @@ void RasterizerStorageRD::gi_probe_set_normal_bias(RID p_gi_probe, float p_norma
gi_probe->normal_bias = p_normal_bias;
}
+
float RasterizerStorageRD::gi_probe_get_normal_bias(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, 0);
@@ -4060,6 +4119,7 @@ RID RasterizerStorageRD::gi_probe_get_octree_buffer(RID p_gi_probe) const {
ERR_FAIL_COND_V(!gi_probe, RID());
return gi_probe->octree_buffer;
}
+
RID RasterizerStorageRD::gi_probe_get_data_buffer(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND_V(!gi_probe, RID());
@@ -4072,6 +4132,7 @@ RID RasterizerStorageRD::gi_probe_get_sdf_texture(RID p_gi_probe) {
return gi_probe->sdf_texture;
}
+
/* LIGHTMAP API */
RID RasterizerStorageRD::lightmap_create() {
@@ -4160,16 +4221,19 @@ PackedVector3Array RasterizerStorageRD::lightmap_get_probe_capture_points(RID p_
return lm->points;
}
+
PackedColorArray RasterizerStorageRD::lightmap_get_probe_capture_sh(RID p_lightmap) const {
Lightmap *lm = lightmap_owner.getornull(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedColorArray());
return lm->point_sh;
}
+
PackedInt32Array RasterizerStorageRD::lightmap_get_probe_capture_tetrahedra(RID p_lightmap) const {
Lightmap *lm = lightmap_owner.getornull(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedInt32Array());
return lm->tetrahedra;
}
+
PackedInt32Array RasterizerStorageRD::lightmap_get_probe_capture_bsp_tree(RID p_lightmap) const {
Lightmap *lm = lightmap_owner.getornull(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedInt32Array());
@@ -4235,6 +4299,7 @@ bool RasterizerStorageRD::lightmap_is_interior(RID p_lightmap) const {
ERR_FAIL_COND_V(!lm, false);
return lm->interior;
}
+
AABB RasterizerStorageRD::lightmap_get_aabb(RID p_lightmap) const {
const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
ERR_FAIL_COND_V(!lm, AABB());
@@ -4463,12 +4528,14 @@ RID RasterizerStorageRD::render_target_get_rd_framebuffer(RID p_render_target) {
return rt->framebuffer;
}
+
RID RasterizerStorageRD::render_target_get_rd_texture(RID p_render_target) {
RenderTarget *rt = render_target_owner.getornull(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->color;
}
+
void RasterizerStorageRD::render_target_request_clear(RID p_render_target, const Color &p_clear_color) {
RenderTarget *rt = render_target_owner.getornull(p_render_target);
ERR_FAIL_COND(!rt);
@@ -5227,6 +5294,7 @@ void RasterizerStorageRD::global_variable_remove(const StringName &p_name) {
global_variables.variables.erase(p_name);
}
+
Vector<StringName> RasterizerStorageRD::global_variable_get_list() const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(Vector<StringName>(), "This function should never be used outside the editor, it can severely damage performance.");
@@ -5260,6 +5328,7 @@ void RasterizerStorageRD::global_variable_set(const StringName &p_name, const Va
}
}
}
+
void RasterizerStorageRD::global_variable_set_override(const StringName &p_name, const Variant &p_value) {
if (!global_variables.variables.has(p_name)) {
return; //variable may not exist
@@ -5422,6 +5491,7 @@ void RasterizerStorageRD::global_variables_instance_free(RID p_instance) {
}
global_variables.instance_buffer_pos.erase(p_instance);
}
+
void RasterizerStorageRD::global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) {
if (!global_variables.instance_buffer_pos.has(p_instance)) {
return; //just not allocated, ignore
@@ -5546,6 +5616,7 @@ bool RasterizerStorageRD::has_os_feature(const String &p_feature) const {
return false;
}
+
bool RasterizerStorageRD::free(RID p_rid) {
if (texture_owner.owns(p_rid)) {
Texture *t = texture_owner.getornull(p_rid);
@@ -5683,6 +5754,7 @@ void RasterizerStorageRD::capture_timestamp(const String &p_name) {
uint32_t RasterizerStorageRD::get_captured_timestamps_count() const {
return RD::get_singleton()->get_captured_timestamps_count();
}
+
uint64_t RasterizerStorageRD::get_captured_timestamps_frame() const {
return RD::get_singleton()->get_captured_timestamps_frame();
}
@@ -5690,9 +5762,11 @@ uint64_t RasterizerStorageRD::get_captured_timestamps_frame() const {
uint64_t RasterizerStorageRD::get_captured_timestamp_gpu_time(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_gpu_time(p_index);
}
+
uint64_t RasterizerStorageRD::get_captured_timestamp_cpu_time(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_cpu_time(p_index);
}
+
String RasterizerStorageRD::get_captured_timestamp_name(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_name(p_index);
}
diff --git a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
index 310fa1bed4..b24874345e 100644
--- a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
+++ b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
@@ -202,6 +202,7 @@ static int _get_datatype_alignment(SL::DataType p_type) {
ERR_FAIL_V(0);
}
+
static String _interpstr(SL::DataInterpolation p_interp) {
switch (p_interp) {
case SL::INTERPOLATION_FLAT:
diff --git a/servers/rendering/rasterizer_rd/shaders/bokeh_dof.glsl b/servers/rendering/rasterizer_rd/shaders/bokeh_dof.glsl
index dbeccbfff4..18555d9672 100644
--- a/servers/rendering/rasterizer_rd/shaders/bokeh_dof.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/bokeh_dof.glsl
@@ -51,6 +51,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float jitter_seed;
uint pad[2];
}
+
params;
//used to work around downsampling filter
diff --git a/servers/rendering/rasterizer_rd/shaders/canvas_occlusion.glsl b/servers/rendering/rasterizer_rd/shaders/canvas_occlusion.glsl
index 8c2b0c925d..3e0d5c4ffc 100644
--- a/servers/rendering/rasterizer_rd/shaders/canvas_occlusion.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/canvas_occlusion.glsl
@@ -12,6 +12,7 @@ layout(push_constant, binding = 0, std430) uniform Constants {
vec2 direction;
vec2 pad;
}
+
constants;
layout(location = 0) out highp float depth;
diff --git a/servers/rendering/rasterizer_rd/shaders/canvas_uniforms_inc.glsl b/servers/rendering/rasterizer_rd/shaders/canvas_uniforms_inc.glsl
index a39866004b..ba05b8b2fb 100644
--- a/servers/rendering/rasterizer_rd/shaders/canvas_uniforms_inc.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/canvas_uniforms_inc.glsl
@@ -51,6 +51,7 @@ layout(push_constant, binding = 0, std430) uniform DrawData {
vec2 color_texture_pixel_size;
uint lights[4];
}
+
draw_data;
// The values passed per draw primitives are cached within it
@@ -82,6 +83,7 @@ layout(set = 2, binding = 0, std140) uniform CanvasData {
float time_pad;
//uint light_count;
}
+
canvas_data;
layout(set = 2, binding = 1) uniform textureBuffer skeleton_buffer;
@@ -90,6 +92,7 @@ layout(set = 2, binding = 2, std140) uniform SkeletonData {
mat4 skeleton_transform; //in world coordinates
mat4 skeleton_transform_inverse;
}
+
skeleton_data;
#ifdef USE_LIGHTING
@@ -123,6 +126,7 @@ struct Light {
layout(set = 2, binding = 3, std140) uniform LightData {
Light data[MAX_LIGHTS];
}
+
light_array;
layout(set = 2, binding = 4) uniform texture2D light_textures[MAX_LIGHT_TEXTURES];
@@ -135,6 +139,7 @@ layout(set = 2, binding = 6) uniform sampler shadow_sampler;
layout(set = 2, binding = 7, std430) restrict readonly buffer GlobalVariableData {
vec4 data[];
}
+
global_variables;
/* SET3: Render Target Data */
diff --git a/servers/rendering/rasterizer_rd/shaders/copy.glsl b/servers/rendering/rasterizer_rd/shaders/copy.glsl
index c8a8b027c8..249e7963d0 100644
--- a/servers/rendering/rasterizer_rd/shaders/copy.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/copy.glsl
@@ -37,6 +37,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float camera_z_near;
uint pad2[2];
}
+
params;
#ifdef MODE_CUBEMAP_ARRAY_TO_PANORAMA
diff --git a/servers/rendering/rasterizer_rd/shaders/copy_to_fb.glsl b/servers/rendering/rasterizer_rd/shaders/copy_to_fb.glsl
index 2308f58e00..5f53045afd 100644
--- a/servers/rendering/rasterizer_rd/shaders/copy_to_fb.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/copy_to_fb.glsl
@@ -17,6 +17,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
bool force_luminance;
uint pad[3];
}
+
params;
void main() {
diff --git a/servers/rendering/rasterizer_rd/shaders/cube_to_dp.glsl b/servers/rendering/rasterizer_rd/shaders/cube_to_dp.glsl
index 2fd2e05ae1..133d97ffcb 100644
--- a/servers/rendering/rasterizer_rd/shaders/cube_to_dp.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/cube_to_dp.glsl
@@ -18,6 +18,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float z_near;
bool z_flip;
}
+
params;
layout(r32f, set = 1, binding = 0) uniform restrict writeonly image2D depth_buffer;
diff --git a/servers/rendering/rasterizer_rd/shaders/cubemap_downsampler.glsl b/servers/rendering/rasterizer_rd/shaders/cubemap_downsampler.glsl
index 9f3ecf6053..8d88e46727 100644
--- a/servers/rendering/rasterizer_rd/shaders/cubemap_downsampler.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/cubemap_downsampler.glsl
@@ -37,6 +37,7 @@ layout(rgba16f, set = 1, binding = 0) uniform restrict writeonly imageCube dest_
layout(push_constant, binding = 1, std430) uniform Params {
uint face_size;
}
+
params;
#define M_PI 3.14159265359
@@ -46,26 +47,31 @@ void get_dir_0(out vec3 dir, in float u, in float v) {
dir[1] = v;
dir[2] = -u;
}
+
void get_dir_1(out vec3 dir, in float u, in float v) {
dir[0] = -1.0;
dir[1] = v;
dir[2] = u;
}
+
void get_dir_2(out vec3 dir, in float u, in float v) {
dir[0] = u;
dir[1] = 1.0;
dir[2] = -v;
}
+
void get_dir_3(out vec3 dir, in float u, in float v) {
dir[0] = u;
dir[1] = -1.0;
dir[2] = v;
}
+
void get_dir_4(out vec3 dir, in float u, in float v) {
dir[0] = u;
dir[1] = v;
dir[2] = 1.0;
}
+
void get_dir_5(out vec3 dir, in float u, in float v) {
dir[0] = -u;
dir[1] = v;
diff --git a/servers/rendering/rasterizer_rd/shaders/cubemap_filter.glsl b/servers/rendering/rasterizer_rd/shaders/cubemap_filter.glsl
index 193d0a8a3c..20bc0e2d0d 100644
--- a/servers/rendering/rasterizer_rd/shaders/cubemap_filter.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/cubemap_filter.glsl
@@ -51,11 +51,13 @@ layout(rgba16f, set = 2, binding = 6) uniform restrict writeonly imageCube dest_
layout(set = 1, binding = 0, std430) buffer restrict readonly Data {
vec4[7][5][3][24] coeffs;
}
+
data;
#else
layout(set = 1, binding = 0, std430) buffer restrict readonly Data {
vec4[7][5][6] coeffs;
}
+
data;
#endif
diff --git a/servers/rendering/rasterizer_rd/shaders/cubemap_roughness.glsl b/servers/rendering/rasterizer_rd/shaders/cubemap_roughness.glsl
index 36dba6df3d..0e6e51f0de 100644
--- a/servers/rendering/rasterizer_rd/shaders/cubemap_roughness.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/cubemap_roughness.glsl
@@ -21,6 +21,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
bool use_direct_write;
float face_size;
}
+
params;
#define M_PI 3.14159265359
diff --git a/servers/rendering/rasterizer_rd/shaders/giprobe.glsl b/servers/rendering/rasterizer_rd/shaders/giprobe.glsl
index e4449afbd0..60c4032d80 100644
--- a/servers/rendering/rasterizer_rd/shaders/giprobe.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/giprobe.glsl
@@ -24,6 +24,7 @@ struct CellChildren {
layout(set = 0, binding = 1, std430) buffer CellChildrenBuffer {
CellChildren data[];
}
+
cell_children;
struct CellData {
@@ -36,6 +37,7 @@ struct CellData {
layout(set = 0, binding = 2, std430) buffer CellDataBuffer {
CellData data[];
}
+
cell_data;
#endif // MODE DYNAMIC
@@ -65,6 +67,7 @@ struct Light {
layout(set = 0, binding = 3, std140) uniform Lights {
Light data[MAX_LIGHTS];
}
+
lights;
#endif // MODE COMPUTE LIGHT
@@ -96,11 +99,13 @@ layout(push_constant, binding = 0, std430) uniform Params {
float aniso_strength;
uint pad;
}
+
params;
layout(set = 0, binding = 4, std430) buffer Outputs {
vec4 data[];
}
+
outputs;
#endif // MODE DYNAMIC
@@ -143,6 +148,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
float propagation;
float pad[3];
}
+
params;
#ifdef MODE_DYNAMIC_LIGHTING
diff --git a/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl b/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl
index dd347c86a7..db3043fb28 100644
--- a/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl
@@ -16,6 +16,7 @@ struct CellData {
layout(set = 0, binding = 1, std140) buffer CellDataBuffer {
CellData data[];
}
+
cell_data;
layout(set = 0, binding = 2) uniform texture3D color_tex;
@@ -36,6 +37,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
ivec3 bounds;
uint pad;
}
+
params;
layout(location = 0) out vec4 color_interp;
diff --git a/servers/rendering/rasterizer_rd/shaders/giprobe_sdf.glsl b/servers/rendering/rasterizer_rd/shaders/giprobe_sdf.glsl
index 5e54c8b4de..37ea673fbe 100644
--- a/servers/rendering/rasterizer_rd/shaders/giprobe_sdf.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/giprobe_sdf.glsl
@@ -20,6 +20,7 @@ struct CellChildren {
layout(set = 0, binding = 1, std430) buffer CellChildrenBuffer {
CellChildren data[];
}
+
cell_children;
struct CellData {
@@ -32,6 +33,7 @@ struct CellData {
layout(set = 0, binding = 2, std430) buffer CellDataBuffer {
CellData data[];
}
+
cell_data;
layout(r8ui, set = 0, binding = 3) uniform restrict writeonly uimage3D sdf_tex;
@@ -42,6 +44,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
uint pad0;
uint pad1;
}
+
params;
void main() {
@@ -81,6 +84,7 @@ float distance_to_aabb(ivec3 pos, ivec3 aabb_pos, ivec3 aabb_size) {
return length(delta);
}
+
void main() {
ivec3 pos = ivec3(gl_GlobalInvocationID);
diff --git a/servers/rendering/rasterizer_rd/shaders/giprobe_write.glsl b/servers/rendering/rasterizer_rd/shaders/giprobe_write.glsl
index d0f2703214..7a79f6a3ac 100644
--- a/servers/rendering/rasterizer_rd/shaders/giprobe_write.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/giprobe_write.glsl
@@ -18,6 +18,7 @@ struct CellChildren {
layout(set = 0, binding = 1, std430) buffer CellChildrenBuffer {
CellChildren data[];
}
+
cell_children;
struct CellData {
@@ -30,6 +31,7 @@ struct CellData {
layout(set = 0, binding = 2, std430) buffer CellDataBuffer {
CellData data[];
}
+
cell_data;
#define LIGHT_TYPE_DIRECTIONAL 0
@@ -57,6 +59,7 @@ struct Light {
layout(set = 0, binding = 3, std140) uniform Lights {
Light data[MAX_LIGHTS];
}
+
lights;
#endif
@@ -74,11 +77,13 @@ layout(push_constant, binding = 0, std430) uniform Params {
uint cell_count;
uint pad[2];
}
+
params;
layout(set = 0, binding = 4, std140) uniform Outputs {
vec4 data[];
}
+
output;
#ifdef MODE_COMPUTE_LIGHT
diff --git a/servers/rendering/rasterizer_rd/shaders/luminance_reduce.glsl b/servers/rendering/rasterizer_rd/shaders/luminance_reduce.glsl
index 979fdb2dc1..060b1a3101 100644
--- a/servers/rendering/rasterizer_rd/shaders/luminance_reduce.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/luminance_reduce.glsl
@@ -37,6 +37,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float exposure_adjust;
float pad[3];
}
+
params;
void main() {
diff --git a/servers/rendering/rasterizer_rd/shaders/roughness_limiter.glsl b/servers/rendering/rasterizer_rd/shaders/roughness_limiter.glsl
index 6969a967b9..e59424e3d6 100644
--- a/servers/rendering/rasterizer_rd/shaders/roughness_limiter.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/roughness_limiter.glsl
@@ -16,6 +16,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float curve;
uint pad;
}
+
params;
#define HALF_PI 1.5707963267948966
diff --git a/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl b/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl
index 4c2fb296e6..93ddcc9dbc 100644
--- a/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl
@@ -6,6 +6,7 @@ layout(push_constant, binding = 0, std430) uniform DrawCall {
uint pad; //16 bits minimum size
vec2 bake_uv2_offset; //used for bake to uv2, ignored otherwise
}
+
draw_call;
/* Set 0 Scene data that never changes, ever */
@@ -117,6 +118,7 @@ layout(set = 0, binding = 3, std140) uniform SceneData {
float fog_height_curve;
#endif
}
+
scene_data;
#define INSTANCE_FLAGS_USE_LIGHTMAP_CAPTURE (1 << 8)
@@ -146,6 +148,7 @@ struct InstanceData {
layout(set = 0, binding = 4, std430) restrict readonly buffer Instances {
InstanceData data[];
}
+
instances;
struct LightData { //this structure needs to be as packed as possible
@@ -172,6 +175,7 @@ struct LightData { //this structure needs to be as packed as possible
layout(set = 0, binding = 5, std430) restrict readonly buffer Lights {
LightData data[];
}
+
lights;
struct ReflectionData {
@@ -188,6 +192,7 @@ struct ReflectionData {
layout(set = 0, binding = 6, std140) uniform ReflectionProbeData {
ReflectionData data[MAX_REFLECTION_DATA_STRUCTS];
}
+
reflections;
struct DirectionalLightData {
@@ -226,6 +231,7 @@ struct DirectionalLightData {
layout(set = 0, binding = 7, std140) uniform DirectionalLights {
DirectionalLightData data[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS];
}
+
directional_lights;
struct GIProbeData {
@@ -247,6 +253,7 @@ struct GIProbeData {
layout(set = 0, binding = 8, std140) uniform GIProbes {
GIProbeData data[MAX_GI_PROBES];
}
+
gi_probes;
layout(set = 0, binding = 9) uniform texture3D gi_probe_textures[MAX_GI_PROBE_TEXTURES];
@@ -261,6 +268,7 @@ struct Lightmap {
layout(set = 0, binding = 10, std140) restrict readonly buffer Lightmaps {
Lightmap data[];
}
+
lightmaps;
layout(set = 0, binding = 11) uniform texture2DArray lightmap_textures[MAX_LIGHTMAP_TEXTURES];
@@ -272,6 +280,7 @@ struct LightmapCapture {
layout(set = 0, binding = 12, std140) restrict readonly buffer LightmapCaptures {
LightmapCapture data[];
}
+
lightmap_captures;
#define CLUSTER_COUNTER_SHIFT 20
@@ -302,6 +311,7 @@ struct DecalData {
layout(set = 0, binding = 15, std430) restrict readonly buffer Decals {
DecalData data[];
}
+
decals;
layout(set = 0, binding = 16) uniform utexture3D cluster_texture;
@@ -309,6 +319,7 @@ layout(set = 0, binding = 16) uniform utexture3D cluster_texture;
layout(set = 0, binding = 17, std430) restrict readonly buffer ClusterData {
uint indices[];
}
+
cluster_data;
layout(set = 0, binding = 18) uniform texture2D directional_shadow_atlas;
@@ -316,6 +327,7 @@ layout(set = 0, binding = 18) uniform texture2D directional_shadow_atlas;
layout(set = 0, binding = 19, std430) restrict readonly buffer GlobalVariableData {
vec4 data[];
}
+
global_variables;
// decal atlas
@@ -351,6 +363,7 @@ layout(set = 3, binding = 4) uniform texture2D ao_buffer;
layout(set = 4, binding = 0, std430) restrict readonly buffer Transforms {
vec4 data[];
}
+
transforms;
/* Set 5 User Material */
diff --git a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection.glsl b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection.glsl
index fcde6b9d7a..39b10871ac 100644
--- a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection.glsl
@@ -42,6 +42,7 @@ layout(push_constant, binding = 2, std430) uniform Params {
mat4 projection;
}
+
params;
vec2 view_to_screen(vec3 view_pos, out float w) {
diff --git a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_filter.glsl b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_filter.glsl
index a4ff2ba815..c36143039c 100644
--- a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_filter.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_filter.glsl
@@ -33,6 +33,7 @@ layout(push_constant, binding = 2, std430) uniform Params {
bool vertical;
uint steps;
}
+
params;
#define GAUSS_TABLE_SIZE 15
diff --git a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_scale.glsl b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_scale.glsl
index 3c6b3748d8..072f57eb40 100644
--- a/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_scale.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/screen_space_reflection_scale.glsl
@@ -26,6 +26,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
bool filtered;
uint pad[2];
}
+
params;
void main() {
diff --git a/servers/rendering/rasterizer_rd/shaders/sky.glsl b/servers/rendering/rasterizer_rd/shaders/sky.glsl
index f8e2257480..b0be03fe44 100644
--- a/servers/rendering/rasterizer_rd/shaders/sky.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/sky.glsl
@@ -14,6 +14,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
vec4 position_multiplier;
float time;
}
+
params;
void main() {
@@ -40,6 +41,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
vec4 position_multiplier;
float time; //TODO consider adding vec2 screen res, and float radiance size
}
+
params;
#define SAMPLER_NEAREST_CLAMP 0
@@ -60,6 +62,7 @@ layout(set = 0, binding = 0) uniform sampler material_samplers[12];
layout(set = 0, binding = 1, std430) restrict readonly buffer GlobalVariableData {
vec4 data[];
}
+
global_variables;
#ifdef USE_MATERIAL_UNIFORMS
@@ -108,6 +111,7 @@ struct DirectionalLightData {
layout(set = 3, binding = 0, std140) uniform DirectionalLights {
DirectionalLightData data[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS];
}
+
directional_lights;
/* clang-format off */
diff --git a/servers/rendering/rasterizer_rd/shaders/ssao.glsl b/servers/rendering/rasterizer_rd/shaders/ssao.glsl
index 0175e26b85..764d7eeeac 100644
--- a/servers/rendering/rasterizer_rd/shaders/ssao.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/ssao.glsl
@@ -78,6 +78,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float proj_scale;
uint pad;
}
+
params;
vec3 reconstructCSPosition(vec2 S, float z) {
diff --git a/servers/rendering/rasterizer_rd/shaders/ssao_blur.glsl b/servers/rendering/rasterizer_rd/shaders/ssao_blur.glsl
index 642a051ba0..ca7cc7d71b 100644
--- a/servers/rendering/rasterizer_rd/shaders/ssao_blur.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/ssao_blur.glsl
@@ -31,6 +31,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
ivec2 axis; /** (1, 0) or (0, 1) */
ivec2 screen_size;
}
+
params;
/** Filter radius in pixels. This will be multiplied by SCALE. */
diff --git a/servers/rendering/rasterizer_rd/shaders/ssao_minify.glsl b/servers/rendering/rasterizer_rd/shaders/ssao_minify.glsl
index db50ce1893..c590e406f3 100644
--- a/servers/rendering/rasterizer_rd/shaders/ssao_minify.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/ssao_minify.glsl
@@ -16,6 +16,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
bool orthogonal;
uint pad;
}
+
params;
#ifdef MINIFY_START
diff --git a/servers/rendering/rasterizer_rd/shaders/subsurface_scattering.glsl b/servers/rendering/rasterizer_rd/shaders/subsurface_scattering.glsl
index c91ef49c78..9d660c5865 100644
--- a/servers/rendering/rasterizer_rd/shaders/subsurface_scattering.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/subsurface_scattering.glsl
@@ -105,6 +105,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float depth_scale;
uint pad[3];
}
+
params;
layout(set = 0, binding = 0) uniform sampler2D source_image;
diff --git a/servers/rendering/rasterizer_rd/shaders/tonemap.glsl b/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
index 780d961197..f4754bfea7 100644
--- a/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
@@ -52,6 +52,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
bool use_fxaa;
uint pad;
}
+
params;
layout(location = 0) out vec4 frag_color;
diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp
index fa9f095585..55b65d2747 100644
--- a/servers/rendering/rendering_device.cpp
+++ b/servers/rendering/rendering_device.cpp
@@ -44,6 +44,7 @@ RenderingDevice::ShaderCacheFunction RenderingDevice::cache_function = nullptr;
void RenderingDevice::shader_set_compile_function(ShaderCompileFunction p_function) {
compile_function = p_function;
}
+
void RenderingDevice::shader_set_cache_function(ShaderCacheFunction p_function) {
cache_function = p_function;
}
diff --git a/servers/rendering/rendering_server_canvas.cpp b/servers/rendering/rendering_server_canvas.cpp
index 809e9700c4..324765a217 100644
--- a/servers/rendering/rendering_server_canvas.cpp
+++ b/servers/rendering/rendering_server_canvas.cpp
@@ -297,6 +297,7 @@ void RenderingServerCanvas::canvas_set_item_mirroring(RID p_canvas, RID p_item,
ERR_FAIL_COND(idx == -1);
canvas->child_items.write[idx].mirror = p_mirroring;
}
+
void RenderingServerCanvas::canvas_set_modulate(RID p_canvas, const Color &p_color) {
Canvas *canvas = canvas_owner.getornull(p_canvas);
ERR_FAIL_COND(!canvas);
@@ -365,6 +366,7 @@ void RenderingServerCanvas::canvas_item_set_parent(RID p_item, RID p_parent) {
canvas_item->parent = p_parent;
}
+
void RenderingServerCanvas::canvas_item_set_visible(RID p_item, bool p_visible) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -373,6 +375,7 @@ void RenderingServerCanvas::canvas_item_set_visible(RID p_item, bool p_visible)
_mark_ysort_dirty(canvas_item, canvas_item_owner);
}
+
void RenderingServerCanvas::canvas_item_set_light_mask(RID p_item, int p_mask) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -386,18 +389,21 @@ void RenderingServerCanvas::canvas_item_set_transform(RID p_item, const Transfor
canvas_item->xform = p_transform;
}
+
void RenderingServerCanvas::canvas_item_set_clip(RID p_item, bool p_clip) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->clip = p_clip;
}
+
void RenderingServerCanvas::canvas_item_set_distance_field_mode(RID p_item, bool p_enable) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->distance_field = p_enable;
}
+
void RenderingServerCanvas::canvas_item_set_custom_rect(RID p_item, bool p_custom_rect, const Rect2 &p_rect) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -405,12 +411,14 @@ void RenderingServerCanvas::canvas_item_set_custom_rect(RID p_item, bool p_custo
canvas_item->custom_rect = p_custom_rect;
canvas_item->rect = p_rect;
}
+
void RenderingServerCanvas::canvas_item_set_modulate(RID p_item, const Color &p_color) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->modulate = p_color;
}
+
void RenderingServerCanvas::canvas_item_set_self_modulate(RID p_item, const Color &p_color) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -716,6 +724,7 @@ void RenderingServerCanvas::canvas_item_add_nine_patch(RID p_item, const Rect2 &
style->axis_x = p_x_axis_mode;
style->axis_y = p_y_axis_mode;
}
+
void RenderingServerCanvas::canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width, RID p_normal_map, RID p_specular_map, const Color &p_specular_color_shininess, RenderingServer::CanvasItemTextureFilter p_filter, RenderingServer::CanvasItemTextureRepeat p_repeat) {
uint32_t pc = p_points.size();
ERR_FAIL_COND(pc == 0 || pc > 4);
@@ -811,6 +820,7 @@ void RenderingServerCanvas::canvas_item_add_mesh(RID p_item, const RID &p_mesh,
m->transform = p_transform;
m->modulate = p_modulate;
}
+
void RenderingServerCanvas::canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture, RID p_normal_map, RID p_specular_map, const Color &p_specular_color_shininess, RenderingServer::CanvasItemTextureFilter p_filter, RenderingServer::CanvasItemTextureRepeat p_repeat) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -844,6 +854,7 @@ void RenderingServerCanvas::canvas_item_add_clip_ignore(RID p_item, bool p_ignor
ERR_FAIL_COND(!ci);
ci->ignore = p_ignore;
}
+
void RenderingServerCanvas::canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -852,6 +863,7 @@ void RenderingServerCanvas::canvas_item_set_sort_children_by_y(RID p_item, bool
_mark_ysort_dirty(canvas_item, canvas_item_owner);
}
+
void RenderingServerCanvas::canvas_item_set_z_index(RID p_item, int p_z) {
ERR_FAIL_COND(p_z < RS::CANVAS_ITEM_Z_MIN || p_z > RS::CANVAS_ITEM_Z_MAX);
@@ -860,6 +872,7 @@ void RenderingServerCanvas::canvas_item_set_z_index(RID p_item, int p_z) {
canvas_item->z_index = p_z;
}
+
void RenderingServerCanvas::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -898,6 +911,7 @@ void RenderingServerCanvas::canvas_item_clear(RID p_item) {
canvas_item->clear();
}
+
void RenderingServerCanvas::canvas_item_set_draw_index(RID p_item, int p_index) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
@@ -936,6 +950,7 @@ RID RenderingServerCanvas::canvas_light_create() {
clight->light_internal = RSG::canvas_render->light_create();
return canvas_light_owner.make_rid(clight);
}
+
void RenderingServerCanvas::canvas_light_attach_to_canvas(RID p_light, RID p_canvas) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -962,18 +977,21 @@ void RenderingServerCanvas::canvas_light_set_enabled(RID p_light, bool p_enabled
clight->enabled = p_enabled;
}
+
void RenderingServerCanvas::canvas_light_set_scale(RID p_light, float p_scale) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->scale = p_scale;
}
+
void RenderingServerCanvas::canvas_light_set_transform(RID p_light, const Transform2D &p_transform) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->xform = p_transform;
}
+
void RenderingServerCanvas::canvas_light_set_texture(RID p_light, RID p_texture) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -982,30 +1000,35 @@ void RenderingServerCanvas::canvas_light_set_texture(RID p_light, RID p_texture)
clight->version++;
RSG::canvas_render->light_set_texture(clight->light_internal, p_texture);
}
+
void RenderingServerCanvas::canvas_light_set_texture_offset(RID p_light, const Vector2 &p_offset) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->texture_offset = p_offset;
}
+
void RenderingServerCanvas::canvas_light_set_color(RID p_light, const Color &p_color) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->color = p_color;
}
+
void RenderingServerCanvas::canvas_light_set_height(RID p_light, float p_height) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->height = p_height;
}
+
void RenderingServerCanvas::canvas_light_set_energy(RID p_light, float p_energy) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->energy = p_energy;
}
+
void RenderingServerCanvas::canvas_light_set_z_range(RID p_light, int p_min_z, int p_max_z) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -1013,6 +1036,7 @@ void RenderingServerCanvas::canvas_light_set_z_range(RID p_light, int p_min_z, i
clight->z_min = p_min_z;
clight->z_max = p_max_z;
}
+
void RenderingServerCanvas::canvas_light_set_layer_range(RID p_light, int p_min_layer, int p_max_layer) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -1020,18 +1044,21 @@ void RenderingServerCanvas::canvas_light_set_layer_range(RID p_light, int p_min_
clight->layer_max = p_max_layer;
clight->layer_min = p_min_layer;
}
+
void RenderingServerCanvas::canvas_light_set_item_cull_mask(RID p_light, int p_mask) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->item_mask = p_mask;
}
+
void RenderingServerCanvas::canvas_light_set_item_shadow_cull_mask(RID p_light, int p_mask) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
clight->item_shadow_mask = p_mask;
}
+
void RenderingServerCanvas::canvas_light_set_mode(RID p_light, RS::CanvasLightMode p_mode) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -1073,6 +1100,7 @@ void RenderingServerCanvas::canvas_light_set_shadow_filter(RID p_light, RS::Canv
clight->shadow_filter = p_filter;
}
+
void RenderingServerCanvas::canvas_light_set_shadow_color(RID p_light, const Color &p_color) {
RasterizerCanvas::Light *clight = canvas_light_owner.getornull(p_light);
ERR_FAIL_COND(!clight);
@@ -1091,6 +1119,7 @@ RID RenderingServerCanvas::canvas_light_occluder_create() {
return canvas_light_occluder_owner.make_rid(occluder);
}
+
void RenderingServerCanvas::canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas) {
RasterizerCanvas::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!occluder);
@@ -1110,12 +1139,14 @@ void RenderingServerCanvas::canvas_light_occluder_attach_to_canvas(RID p_occlude
canvas->occluders.insert(occluder);
}
}
+
void RenderingServerCanvas::canvas_light_occluder_set_enabled(RID p_occluder, bool p_enabled) {
RasterizerCanvas::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->enabled = p_enabled;
}
+
void RenderingServerCanvas::canvas_light_occluder_set_polygon(RID p_occluder, RID p_polygon) {
RasterizerCanvas::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!occluder);
@@ -1143,12 +1174,14 @@ void RenderingServerCanvas::canvas_light_occluder_set_polygon(RID p_occluder, RI
}
}
}
+
void RenderingServerCanvas::canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform) {
RasterizerCanvas::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->xform = p_xform;
}
+
void RenderingServerCanvas::canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) {
RasterizerCanvas::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!occluder);
@@ -1161,6 +1194,7 @@ RID RenderingServerCanvas::canvas_occluder_polygon_create() {
occluder_poly->occluder = RSG::canvas_render->occluder_polygon_create();
return canvas_light_occluder_polygon_owner.make_rid(occluder_poly);
}
+
void RenderingServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) {
if (p_shape.size() < 3) {
canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, p_shape);
@@ -1189,6 +1223,7 @@ void RenderingServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_pol
canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, lines);
}
+
void RenderingServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) {
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon);
ERR_FAIL_COND(!occluder_poly);
diff --git a/servers/rendering/rendering_server_raster.cpp b/servers/rendering/rendering_server_raster.cpp
index 6aaf197062..a301d81691 100644
--- a/servers/rendering/rendering_server_raster.cpp
+++ b/servers/rendering/rendering_server_raster.cpp
@@ -156,14 +156,18 @@ void RenderingServerRaster::draw(bool p_swap_buffers, double frame_step) {
frame_profile_frame = RSG::storage->get_captured_timestamps_frame();
}
+
void RenderingServerRaster::sync() {
}
+
bool RenderingServerRaster::has_changed() const {
return changes > 0;
}
+
void RenderingServerRaster::init() {
RSG::rasterizer->initialize();
}
+
void RenderingServerRaster::finish() {
if (test_cube.is_valid()) {
free(test_cube);
@@ -204,6 +208,7 @@ void RenderingServerRaster::set_boot_image(const Ref<Image> &p_image, const Colo
redraw_request();
RSG::rasterizer->set_boot_image(p_image, p_color, p_scale, p_use_filter);
}
+
void RenderingServerRaster::set_default_clear_color(const Color &p_color) {
RSG::viewport->set_default_clear_color(p_color);
}
@@ -238,6 +243,7 @@ bool RenderingServerRaster::is_low_end() const {
//return RSG::rasterizer->is_low_end();
return false;
}
+
RenderingServerRaster::RenderingServerRaster() {
RSG::canvas = memnew(RenderingServerCanvas);
RSG::viewport = memnew(RenderingServerViewport);
diff --git a/servers/rendering/rendering_server_scene.cpp b/servers/rendering/rendering_server_scene.cpp
index 0f8c4b6935..06217b3f0e 100644
--- a/servers/rendering/rendering_server_scene.cpp
+++ b/servers/rendering/rendering_server_scene.cpp
@@ -197,6 +197,7 @@ void *RenderingServerScene::_instance_pair(void *p_self, OctreeElementID, Instan
return nullptr;
}
+
void RenderingServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance *p_A, int, OctreeElementID, Instance *p_B, int, void *udata) {
//RenderingServerScene *self = (RenderingServerScene*)p_self;
Instance *A = p_A;
@@ -499,6 +500,7 @@ void RenderingServerScene::instance_set_base(RID p_instance, RID p_base) {
_instance_queue_update(instance, true, true);
}
+
void RenderingServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
@@ -583,12 +585,14 @@ void RenderingServerScene::instance_set_scenario(RID p_instance, RID p_scenario)
_instance_queue_update(instance, true, true);
}
}
+
void RenderingServerScene::instance_set_layer_mask(RID p_instance, uint32_t p_mask) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
instance->layer_mask = p_mask;
}
+
void RenderingServerScene::instance_set_transform(RID p_instance, const Transform &p_transform) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
@@ -612,12 +616,14 @@ void RenderingServerScene::instance_set_transform(RID p_instance, const Transfor
instance->transform = p_transform;
_instance_queue_update(instance, true);
}
+
void RenderingServerScene::instance_attach_object_instance_id(RID p_instance, ObjectID p_id) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
instance->object_id = p_id;
}
+
void RenderingServerScene::instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
@@ -690,6 +696,7 @@ void RenderingServerScene::instance_set_visible(RID p_instance, bool p_visible)
}
}
}
+
inline bool is_geometry_instance(RenderingServer::InstanceType p_type) {
return p_type == RS::INSTANCE_MESH || p_type == RS::INSTANCE_MULTIMESH || p_type == RS::INSTANCE_PARTICLES || p_type == RS::INSTANCE_IMMEDIATE;
}
@@ -766,6 +773,7 @@ Vector<ObjectID> RenderingServerScene::instances_cull_aabb(const AABB &p_aabb, R
return instances;
}
+
Vector<ObjectID> RenderingServerScene::instances_cull_ray(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario) const {
Vector<ObjectID> instances;
Scenario *scenario = scenario_owner.getornull(p_scenario);
@@ -787,6 +795,7 @@ Vector<ObjectID> RenderingServerScene::instances_cull_ray(const Vector3 &p_from,
return instances;
}
+
Vector<ObjectID> RenderingServerScene::instances_cull_convex(const Vector<Plane> &p_convex, RID p_scenario) const {
Vector<ObjectID> instances;
Scenario *scenario = scenario_owner.getornull(p_scenario);
@@ -846,6 +855,7 @@ void RenderingServerScene::instance_geometry_set_flag(RID p_instance, RS::Instan
}
}
}
+
void RenderingServerScene::instance_geometry_set_cast_shadows_setting(RID p_instance, RS::ShadowCastingSetting p_shadow_casting_setting) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
@@ -853,6 +863,7 @@ void RenderingServerScene::instance_geometry_set_cast_shadows_setting(RID p_inst
instance->cast_shadows = p_shadow_casting_setting;
_instance_queue_update(instance, false, true);
}
+
void RenderingServerScene::instance_geometry_set_material_override(RID p_instance, RID p_material) {
Instance *instance = instance_owner.getornull(p_instance);
ERR_FAIL_COND(!instance);
@@ -863,6 +874,7 @@ void RenderingServerScene::instance_geometry_set_material_override(RID p_instanc
void RenderingServerScene::instance_geometry_set_draw_range(RID p_instance, float p_min, float p_max, float p_min_margin, float p_max_margin) {
}
+
void RenderingServerScene::instance_geometry_set_as_instance_lod(RID p_instance, RID p_as_lod_of_instance) {
}
diff --git a/servers/rendering/rendering_server_viewport.cpp b/servers/rendering/rendering_server_viewport.cpp
index 660c96e441..4491f699dc 100644
--- a/servers/rendering/rendering_server_viewport.cpp
+++ b/servers/rendering/rendering_server_viewport.cpp
@@ -589,12 +589,14 @@ void RenderingServerViewport::viewport_set_hide_scenario(RID p_viewport, bool p_
viewport->hide_scenario = p_hide;
}
+
void RenderingServerViewport::viewport_set_hide_canvas(RID p_viewport, bool p_hide) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->hide_canvas = p_hide;
}
+
void RenderingServerViewport::viewport_set_disable_environment(RID p_viewport, bool p_disable) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
@@ -608,12 +610,14 @@ void RenderingServerViewport::viewport_attach_camera(RID p_viewport, RID p_camer
viewport->camera = p_camera;
}
+
void RenderingServerViewport::viewport_set_scenario(RID p_viewport, RID p_scenario) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->scenario = p_scenario;
}
+
void RenderingServerViewport::viewport_attach_canvas(RID p_viewport, RID p_canvas) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
@@ -639,6 +643,7 @@ void RenderingServerViewport::viewport_remove_canvas(RID p_viewport, RID p_canva
viewport->canvas_map.erase(p_canvas);
canvas->viewports.erase(p_viewport);
}
+
void RenderingServerViewport::viewport_set_canvas_transform(RID p_viewport, RID p_canvas, const Transform2D &p_offset) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
@@ -646,6 +651,7 @@ void RenderingServerViewport::viewport_set_canvas_transform(RID p_viewport, RID
ERR_FAIL_COND(!viewport->canvas_map.has(p_canvas));
viewport->canvas_map[p_canvas].transform = p_offset;
}
+
void RenderingServerViewport::viewport_set_transparent_background(RID p_viewport, bool p_enabled) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
@@ -660,6 +666,7 @@ void RenderingServerViewport::viewport_set_global_canvas_transform(RID p_viewpor
viewport->global_transform = p_transform;
}
+
void RenderingServerViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index e71c084aab..5db9e44084 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -3093,6 +3093,7 @@ bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringNam
}
ERR_FAIL_V(false); //bug? function not found
}
+
bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin) {
for (int i = 0; shader->functions.size(); i++) {
if (shader->functions[i].name == p_name) {