summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/gi_probe.cpp2
-rw-r--r--scene/3d/particles.cpp4
-rw-r--r--scene/animation/animation_player.cpp4
-rw-r--r--scene/main/viewport.cpp7
-rw-r--r--scene/resources/surface_tool.cpp2
5 files changed, 7 insertions, 12 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index ff5cb41135..1f2b43165e 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -1286,7 +1286,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
Ref<GIProbeData> probe_data = get_probe_data();
- if(probe_data.is_null())
+ if (probe_data.is_null())
probe_data.instance();
probe_data->set_bounds(AABB(-extents, extents * 2.0));
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index c137b7e8ff..821f1a5a78 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -1189,7 +1189,7 @@ void ParticlesMaterial::set_flag(Flags p_flag, bool p_enable) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags[p_flag] = p_enable;
_queue_shader_change();
- if (p_flag==FLAG_DISABLE_Z) {
+ if (p_flag == FLAG_DISABLE_Z) {
_change_notify();
}
}
@@ -1379,7 +1379,7 @@ void ParticlesMaterial::_validate_property(PropertyInfo &property) const {
}
if (property.name.begins_with("orbit_") && !flags[FLAG_DISABLE_Z]) {
- property.usage=0;
+ property.usage = 0;
}
}
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 91aa069060..e866e665d8 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1327,7 +1327,7 @@ void AnimationPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_root"), &AnimationPlayer::get_root);
ClassDB::bind_method(D_METHOD("seek", "seconds", "update"), &AnimationPlayer::seek, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("get_position"), &AnimationPlayer::get_current_animation_position);
+ ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance);
ClassDB::bind_method(D_METHOD("find_animation", "animation"), &AnimationPlayer::find_animation);
@@ -1339,8 +1339,6 @@ void AnimationPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_animation_position"), &AnimationPlayer::get_current_animation_position);
ClassDB::bind_method(D_METHOD("get_current_animation_length"), &AnimationPlayer::get_current_animation_length);
- ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance);
-
ADD_GROUP("Playback Options", "playback_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_animation_process_mode", "get_animation_process_mode");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time");
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a785abbc65..ea8adc58cd 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1269,12 +1269,9 @@ Transform2D Viewport::_get_input_pre_xform() const {
Vector2 Viewport::_get_window_offset() const {
- /*
- if (parent_control) {
- return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin();
+ if (get_parent() && get_parent()->has_method("get_global_position")) {
+ return get_parent()->call("get_global_position");
}
- */
-
return Vector2();
}
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 352418e65c..d8600e041d 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -990,7 +990,7 @@ void SurfaceTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_from", "existing", "surface"), &SurfaceTool::create_from);
ClassDB::bind_method(D_METHOD("append_from", "existing", "surface", "transform"), &SurfaceTool::append_from);
- ClassDB::bind_method(D_METHOD("commit", "existing"), &SurfaceTool::commit, DEFVAL(Variant()), DEFVAL(Mesh::ARRAY_COMPRESS_DEFAULT));
+ ClassDB::bind_method(D_METHOD("commit", "existing", "flags"), &SurfaceTool::commit, DEFVAL(Variant()), DEFVAL(Mesh::ARRAY_COMPRESS_DEFAULT));
}
SurfaceTool::SurfaceTool() {