summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 14:29:06 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit07bc4e2f96f8f47991339654ff4ab16acc19d44f (patch)
tree43cdc7cfe8239c23065616a931de3769d2db1e86 /scene
parent0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (diff)
Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
Diffstat (limited to 'scene')
-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
119 files changed, 891 insertions, 0 deletions
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);