summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct2
-rw-r--r--core/bind/core_bind.h6
-rw-r--r--core/io/resource_importer.h3
-rw-r--r--core/io/resource_loader.h2
-rw-r--r--core/io/resource_saver.h2
-rw-r--r--core/math/a_star.cpp135
-rw-r--r--core/math/a_star.h41
-rw-r--r--core/math/expression.h3
-rw-r--r--core/os/input_event.h30
-rw-r--r--core/register_core_types.cpp1
-rw-r--r--core/ustring.cpp3
-rw-r--r--core/ustring.h2
-rw-r--r--core/variant_call.cpp2
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AStar2D.xml258
-rw-r--r--doc/classes/AcceptDialog.xml5
-rw-r--r--doc/classes/CameraFeed.xml4
-rw-r--r--doc/classes/CameraServer.xml4
-rw-r--r--doc/classes/ColorPicker.xml5
-rw-r--r--doc/classes/String.xml4
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp8
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp8
-rw-r--r--editor/animation_bezier_editor.h2
-rw-r--r--editor/animation_track_editor.cpp46
-rw-r--r--editor/animation_track_editor.h19
-rw-r--r--editor/animation_track_editor_plugins.h19
-rw-r--r--editor/audio_stream_preview.h4
-rw-r--r--editor/code_editor.cpp24
-rw-r--r--editor/code_editor.h1
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/editor_audio_buses.h4
-rw-r--r--editor/editor_export.h11
-rw-r--r--editor/editor_inspector.h5
-rw-r--r--editor/editor_plugin.h3
-rw-r--r--editor/editor_profiler.h2
-rw-r--r--editor/editor_properties.cpp3
-rw-r--r--editor/editor_properties.h61
-rw-r--r--editor/editor_properties_array_dict.h4
-rw-r--r--editor/editor_spin_slider.h2
-rw-r--r--editor/export_template_manager.h2
-rw-r--r--editor/find_in_files.h9
-rw-r--r--editor/import/editor_import_plugin.h3
-rw-r--r--editor/import/resource_importer_bitmask.h2
-rw-r--r--editor/import/resource_importer_csv_translation.h3
-rw-r--r--editor/import/resource_importer_image.h3
-rw-r--r--editor/import/resource_importer_layered_texture.h2
-rw-r--r--editor/import/resource_importer_obj.h3
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_texture.h2
-rw-r--r--editor/import/resource_importer_texture_atlas.h2
-rw-r--r--editor/import/resource_importer_wav.h3
-rw-r--r--editor/import_dock.cpp3
-rw-r--r--editor/import_dock.h2
-rw-r--r--editor/pane_drag.h2
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h2
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h3
-rw-r--r--editor/plugins/curve_editor_plugin.h12
-rw-r--r--editor/plugins/editor_preview_plugins.h15
-rw-r--r--editor/plugins/gradient_editor_plugin.h5
-rw-r--r--editor/plugins/material_editor_plugin.h11
-rw-r--r--editor/plugins/mesh_editor_plugin.h3
-rw-r--r--editor/plugins/particles_editor_plugin.h2
-rw-r--r--editor/plugins/root_motion_editor_plugin.h4
-rw-r--r--editor/plugins/script_editor_plugin.h4
-rw-r--r--editor/plugins/spatial_editor_plugin.h15
-rw-r--r--editor/plugins/style_box_editor_plugin.h3
-rw-r--r--editor/plugins/text_editor.h2
-rw-r--r--editor/plugins/texture_editor_plugin.h3
-rw-r--r--editor/plugins/tile_set_editor_plugin.h2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp5
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h11
-rw-r--r--editor/property_editor.h2
-rw-r--r--editor/property_selector.h2
-rw-r--r--editor/quick_open.h2
-rw-r--r--editor/scene_tree_dock.cpp29
-rw-r--r--editor/scene_tree_dock.h1
-rw-r--r--editor/script_editor_debugger.cpp20
-rw-r--r--main/tests/test_string.cpp12
-rw-r--r--misc/ide/jetbrains/build.gradle2
-rw-r--r--modules/bullet/bullet_physics_server.h2
-rw-r--r--modules/bullet/rigid_body_bullet.h2
-rw-r--r--modules/bullet/space_bullet.h3
-rw-r--r--modules/csg/csg_gizmos.h3
-rw-r--r--modules/csg/csg_shape.h17
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp6
-rw-r--r--modules/enet/networked_multiplayer_enet.h3
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.h2
-rw-r--r--modules/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/nativescript/nativescript.h4
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.h2
-rw-r--r--modules/gdnative/net/packet_peer_gdnative.h2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp6
-rw-r--r--modules/mono/csharp_script.h2
-rw-r--r--modules/mono/editor/godotsharp_editor.h4
-rw-r--r--modules/mono/editor/mono_bottom_panel.h4
-rw-r--r--modules/mono/mono_gc_handle.h2
-rw-r--r--modules/mono/mono_gd/gd_mono.h2
-rw-r--r--modules/mono/signal_awaiter_utils.h2
-rw-r--r--modules/opensimplex/noise_texture.h2
-rw-r--r--modules/opensimplex/open_simplex_noise.h2
-rw-r--r--modules/opus/SCsub2
-rw-r--r--modules/opus/audio_stream_opus.h4
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.h3
-rw-r--r--modules/visual_script/visual_script.h4
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h3
-rw-r--r--modules/visual_script/visual_script_editor.cpp4
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_expression.h2
-rw-r--r--modules/visual_script/visual_script_flow_control.h14
-rw-r--r--modules/visual_script/visual_script_func_nodes.h11
-rw-r--r--modules/visual_script/visual_script_nodes.h54
-rw-r--r--modules/visual_script/visual_script_property_selector.h2
-rw-r--r--modules/visual_script/visual_script_yield_nodes.h6
-rw-r--r--modules/webm/libvpx/SCsub2
-rw-r--r--modules/webm/video_stream_webm.h2
-rw-r--r--platform/android/SCsub4
-rw-r--r--platform/android/detect.py16
-rw-r--r--platform/android/export/export.cpp5
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--platform/x11/detect_prime.cpp14
-rw-r--r--platform/x11/joypad_linux.cpp4
-rw-r--r--scene/2d/audio_stream_player_2d.h2
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/2d/collision_object_2d.h2
-rw-r--r--scene/2d/collision_shape_2d.h2
-rw-r--r--scene/2d/line_2d.h2
-rw-r--r--scene/2d/mesh_instance_2d.h2
-rw-r--r--scene/2d/particles_2d.h2
-rw-r--r--scene/2d/position_2d.h2
-rw-r--r--scene/2d/skeleton_2d.h2
-rw-r--r--scene/3d/area.cpp2
-rw-r--r--scene/3d/audio_stream_player_3d.h3
-rw-r--r--scene/3d/spatial_velocity_tracker.h2
-rw-r--r--scene/animation/animation_blend_space_1d.h2
-rw-r--r--scene/animation/animation_blend_space_2d.h3
-rw-r--r--scene/animation/animation_blend_tree.h5
-rw-r--r--scene/animation/animation_node_state_machine.cpp3
-rw-r--r--scene/animation/animation_node_state_machine.h3
-rw-r--r--scene/animation/animation_tree.h9
-rw-r--r--scene/animation/root_motion_view.h3
-rw-r--r--scene/audio/audio_stream_player.h2
-rw-r--r--scene/gui/base_button.h2
-rw-r--r--scene/gui/color_picker.cpp133
-rw-r--r--scene/gui/color_picker.h10
-rw-r--r--scene/gui/color_rect.h2
-rw-r--r--scene/gui/dialogs.cpp14
-rw-r--r--scene/gui/dialogs.h3
-rw-r--r--scene/gui/split_container.h2
-rw-r--r--scene/gui/text_edit.h2
-rw-r--r--scene/main/viewport.cpp6
-rw-r--r--scene/resources/animation.cpp8
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/curve.h3
-rw-r--r--scene/resources/dynamic_font.h2
-rw-r--r--scene/resources/material.h4
-rw-r--r--scene/resources/particles_material.h2
-rw-r--r--scene/resources/primitive_meshes.h2
-rw-r--r--scene/resources/text_file.h2
-rw-r--r--scene/resources/texture.h18
-rw-r--r--scene/resources/visual_shader.h17
-rw-r--r--scene/resources/visual_shader_nodes.h98
-rw-r--r--servers/audio/audio_effect.h5
-rw-r--r--servers/audio/audio_stream.h14
-rw-r--r--servers/audio/effects/audio_effect_amplify.h4
-rw-r--r--servers/audio/effects/audio_effect_chorus.h4
-rw-r--r--servers/audio/effects/audio_effect_compressor.h4
-rw-r--r--servers/audio/effects/audio_effect_delay.h4
-rw-r--r--servers/audio/effects/audio_effect_distortion.h5
-rw-r--r--servers/audio/effects/audio_effect_eq.h13
-rw-r--r--servers/audio/effects/audio_effect_filter.h23
-rw-r--r--servers/audio/effects/audio_effect_limiter.h4
-rw-r--r--servers/audio/effects/audio_effect_panner.h4
-rw-r--r--servers/audio/effects/audio_effect_phaser.h4
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp42
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.h26
-rw-r--r--servers/audio/effects/audio_effect_record.h4
-rw-r--r--servers/audio/effects/audio_effect_reverb.h4
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp5
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.h5
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.h4
-rw-r--r--servers/audio/effects/audio_stream_generator.h4
-rw-r--r--servers/audio_server.h5
-rw-r--r--servers/camera/camera_feed.cpp18
-rw-r--r--servers/camera/camera_feed.h4
-rw-r--r--servers/camera_server.cpp4
-rw-r--r--servers/camera_server.h4
-rw-r--r--servers/physics/area_sw.cpp2
188 files changed, 1290 insertions, 515 deletions
diff --git a/SConstruct b/SConstruct
index ce2566559c..7358494123 100644
--- a/SConstruct
+++ b/SConstruct
@@ -327,6 +327,8 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['/EHsc'])
if (env["werror"]):
env.Append(CCFLAGS=['/WX'])
+ # Force to use Unicode encoding
+ env.Append(MSVC_FLAGS=['/utf8'])
else: # Rest of the world
shadow_local_warning = []
all_plus_warnings = ['-Wwrite-strings']
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 2751ff242c..7d0c158f51 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -694,7 +694,7 @@ VARIANT_ENUM_CAST(_Thread::Priority);
class _ClassDB : public Object {
- GDCLASS(_ClassDB, Object)
+ GDCLASS(_ClassDB, Object);
protected:
static void _bind_methods();
@@ -779,7 +779,7 @@ public:
class _JSON;
class JSONParseResult : public Reference {
- GDCLASS(JSONParseResult, Reference)
+ GDCLASS(JSONParseResult, Reference);
friend class _JSON;
@@ -807,7 +807,7 @@ public:
};
class _JSON : public Object {
- GDCLASS(_JSON, Object)
+ GDCLASS(_JSON, Object);
protected:
static void _bind_methods();
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index 317f301b5c..9cf298a7f5 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -94,7 +94,8 @@ public:
class ResourceImporter : public Reference {
- GDCLASS(ResourceImporter, Reference)
+ GDCLASS(ResourceImporter, Reference);
+
public:
virtual String get_importer_name() const = 0;
virtual String get_visible_name() const = 0;
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index 9e7020be7c..70e7bdc224 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -62,7 +62,7 @@ public:
class ResourceFormatLoader : public Reference {
- GDCLASS(ResourceFormatLoader, Reference)
+ GDCLASS(ResourceFormatLoader, Reference);
protected:
static void _bind_methods();
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index 7df3bfb1f8..0fba47a5e8 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -38,7 +38,7 @@
*/
class ResourceFormatSaver : public Reference {
- GDCLASS(ResourceFormatSaver, Reference)
+ GDCLASS(ResourceFormatSaver, Reference);
protected:
static void _bind_methods();
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 359446dde6..7ce3824505 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -458,13 +458,12 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_point_weight_scale", "id", "weight_scale"), &AStar::set_point_weight_scale);
ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point);
ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point);
+ ClassDB::bind_method(D_METHOD("get_point_connections", "id"), &AStar::get_point_connections);
ClassDB::bind_method(D_METHOD("get_points"), &AStar::get_points);
ClassDB::bind_method(D_METHOD("set_point_disabled", "id", "disabled"), &AStar::set_point_disabled, DEFVAL(true));
ClassDB::bind_method(D_METHOD("is_point_disabled", "id"), &AStar::is_point_disabled);
- ClassDB::bind_method(D_METHOD("get_point_connections", "id"), &AStar::get_point_connections);
-
ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));
ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
ClassDB::bind_method(D_METHOD("are_points_connected", "id", "to_id"), &AStar::are_points_connected);
@@ -491,3 +490,135 @@ AStar::~AStar() {
pass = 1;
clear();
}
+
+/////////////////////////////////////////////////////////////
+
+int AStar2D::get_available_point_id() const {
+ return astar.get_available_point_id();
+}
+
+void AStar2D::add_point(int p_id, const Vector2 &p_pos, real_t p_weight_scale) {
+ astar.add_point(p_id, Vector3(p_pos.x, p_pos.y, 0), p_weight_scale);
+}
+
+Vector2 AStar2D::get_point_position(int p_id) const {
+ Vector3 p = astar.get_point_position(p_id);
+ return Vector2(p.x, p.y);
+}
+
+void AStar2D::set_point_position(int p_id, const Vector2 &p_pos) {
+ astar.set_point_position(p_id, Vector3(p_pos.x, p_pos.y, 0));
+}
+
+real_t AStar2D::get_point_weight_scale(int p_id) const {
+ return astar.get_point_weight_scale(p_id);
+}
+
+void AStar2D::set_point_weight_scale(int p_id, real_t p_weight_scale) {
+ astar.set_point_weight_scale(p_id, p_weight_scale);
+}
+
+void AStar2D::remove_point(int p_id) {
+ astar.remove_point(p_id);
+}
+
+bool AStar2D::has_point(int p_id) const {
+ return astar.has_point(p_id);
+}
+
+PoolVector<int> AStar2D::get_point_connections(int p_id) {
+ return astar.get_point_connections(p_id);
+}
+
+Array AStar2D::get_points() {
+ return astar.get_points();
+}
+
+void AStar2D::set_point_disabled(int p_id, bool p_disabled) {
+ astar.set_point_disabled(p_id, p_disabled);
+}
+
+bool AStar2D::is_point_disabled(int p_id) const {
+ return astar.is_point_disabled(p_id);
+}
+
+void AStar2D::connect_points(int p_id, int p_with_id, bool p_bidirectional) {
+ astar.connect_points(p_id, p_with_id, p_bidirectional);
+}
+
+void AStar2D::disconnect_points(int p_id, int p_with_id) {
+ astar.disconnect_points(p_id, p_with_id);
+}
+
+bool AStar2D::are_points_connected(int p_id, int p_with_id) const {
+ return astar.are_points_connected(p_id, p_with_id);
+}
+
+void AStar2D::clear() {
+ astar.clear();
+}
+
+int AStar2D::get_closest_point(const Vector2 &p_point) const {
+ return astar.get_closest_point(Vector3(p_point.x, p_point.y, 0));
+}
+
+Vector2 AStar2D::get_closest_position_in_segment(const Vector2 &p_point) const {
+ Vector3 p = astar.get_closest_position_in_segment(Vector3(p_point.x, p_point.y, 0));
+ return Vector2(p.x, p.y);
+}
+
+PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
+
+ PoolVector3Array pv = astar.get_point_path(p_from_id, p_to_id);
+ int size = pv.size();
+ PoolVector2Array path;
+ path.resize(size);
+ {
+ PoolVector<Vector3>::Read r = pv.read();
+ PoolVector<Vector2>::Write w = path.write();
+ for (int i = 0; i < size; i++) {
+ Vector3 p = r[i];
+ w[i] = Vector2(p.x, p.y);
+ }
+ }
+ return path;
+}
+
+PoolVector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) {
+ return astar.get_id_path(p_from_id, p_to_id);
+}
+
+void AStar2D::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("get_available_point_id"), &AStar2D::get_available_point_id);
+ ClassDB::bind_method(D_METHOD("add_point", "id", "position", "weight_scale"), &AStar2D::add_point, DEFVAL(1.0));
+ ClassDB::bind_method(D_METHOD("get_point_position", "id"), &AStar2D::get_point_position);
+ ClassDB::bind_method(D_METHOD("set_point_position", "id", "position"), &AStar2D::set_point_position);
+ ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar2D::get_point_weight_scale);
+ ClassDB::bind_method(D_METHOD("set_point_weight_scale", "id", "weight_scale"), &AStar2D::set_point_weight_scale);
+ ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar2D::remove_point);
+ ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar2D::has_point);
+ ClassDB::bind_method(D_METHOD("get_point_connections", "id"), &AStar2D::get_point_connections);
+ ClassDB::bind_method(D_METHOD("get_points"), &AStar2D::get_points);
+
+ ClassDB::bind_method(D_METHOD("set_point_disabled", "id", "disabled"), &AStar2D::set_point_disabled, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("is_point_disabled", "id"), &AStar2D::is_point_disabled);
+
+ ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar2D::connect_points, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar2D::disconnect_points);
+ ClassDB::bind_method(D_METHOD("are_points_connected", "id", "to_id"), &AStar2D::are_points_connected);
+
+ ClassDB::bind_method(D_METHOD("clear"), &AStar2D::clear);
+
+ ClassDB::bind_method(D_METHOD("get_closest_point", "to_position"), &AStar2D::get_closest_point);
+ ClassDB::bind_method(D_METHOD("get_closest_position_in_segment", "to_position"), &AStar2D::get_closest_position_in_segment);
+
+ ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar2D::get_point_path);
+ ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar2D::get_id_path);
+}
+
+AStar2D::AStar2D() {
+}
+
+AStar2D::~AStar2D() {
+}
diff --git a/core/math/a_star.h b/core/math/a_star.h
index ba35d929b3..ec333efc1d 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -42,7 +42,7 @@
class AStar : public Reference {
- GDCLASS(AStar, Reference)
+ GDCLASS(AStar, Reference);
uint64_t pass;
@@ -143,4 +143,43 @@ public:
~AStar();
};
+class AStar2D : public Reference {
+ GDCLASS(AStar2D, Reference);
+ AStar astar;
+
+protected:
+ static void _bind_methods();
+
+public:
+ int get_available_point_id() const;
+
+ void add_point(int p_id, const Vector2 &p_pos, real_t p_weight_scale = 1);
+ Vector2 get_point_position(int p_id) const;
+ void set_point_position(int p_id, const Vector2 &p_pos);
+ real_t get_point_weight_scale(int p_id) const;
+ void set_point_weight_scale(int p_id, real_t p_weight_scale);
+ void remove_point(int p_id);
+ bool has_point(int p_id) const;
+ PoolVector<int> get_point_connections(int p_id);
+ Array get_points();
+
+ void set_point_disabled(int p_id, bool p_disabled = true);
+ bool is_point_disabled(int p_id) const;
+
+ void connect_points(int p_id, int p_with_id, bool p_bidirectional = true);
+ void disconnect_points(int p_id, int p_with_id);
+ bool are_points_connected(int p_id, int p_with_id) const;
+
+ void clear();
+
+ int get_closest_point(const Vector2 &p_point) const;
+ Vector2 get_closest_position_in_segment(const Vector2 &p_point) const;
+
+ PoolVector<Vector2> get_point_path(int p_from_id, int p_to_id);
+ PoolVector<int> get_id_path(int p_from_id, int p_to_id);
+
+ AStar2D();
+ ~AStar2D();
+};
+
#endif // ASTAR_H
diff --git a/core/math/expression.h b/core/math/expression.h
index 79f6f3989d..1113bb6587 100644
--- a/core/math/expression.h
+++ b/core/math/expression.h
@@ -34,7 +34,8 @@
#include "core/reference.h"
class Expression : public Reference {
- GDCLASS(Expression, Reference)
+ GDCLASS(Expression, Reference);
+
public:
enum BuiltinFunc {
MATH_SIN,
diff --git a/core/os/input_event.h b/core/os/input_event.h
index 2eb321f134..4f5762e756 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -173,7 +173,7 @@ enum MidiMessageList {
*/
class InputEvent : public Resource {
- GDCLASS(InputEvent, Resource)
+ GDCLASS(InputEvent, Resource);
int device;
@@ -210,7 +210,7 @@ public:
};
class InputEventWithModifiers : public InputEvent {
- GDCLASS(InputEventWithModifiers, InputEvent)
+ GDCLASS(InputEventWithModifiers, InputEvent);
bool shift;
bool alt;
@@ -256,7 +256,7 @@ public:
class InputEventKey : public InputEventWithModifiers {
- GDCLASS(InputEventKey, InputEventWithModifiers)
+ GDCLASS(InputEventKey, InputEventWithModifiers);
bool pressed; /// otherwise release
@@ -295,7 +295,7 @@ public:
class InputEventMouse : public InputEventWithModifiers {
- GDCLASS(InputEventMouse, InputEventWithModifiers)
+ GDCLASS(InputEventMouse, InputEventWithModifiers);
int button_mask;
@@ -320,7 +320,7 @@ public:
class InputEventMouseButton : public InputEventMouse {
- GDCLASS(InputEventMouseButton, InputEventMouse)
+ GDCLASS(InputEventMouseButton, InputEventMouse);
float factor;
int button_index;
@@ -354,7 +354,7 @@ public:
class InputEventMouseMotion : public InputEventMouse {
- GDCLASS(InputEventMouseMotion, InputEventMouse)
+ GDCLASS(InputEventMouseMotion, InputEventMouse);
Vector2 relative;
Vector2 speed;
@@ -378,7 +378,7 @@ public:
class InputEventJoypadMotion : public InputEvent {
- GDCLASS(InputEventJoypadMotion, InputEvent)
+ GDCLASS(InputEventJoypadMotion, InputEvent);
int axis; ///< Joypad axis
float axis_value; ///< -1 to 1
@@ -403,7 +403,7 @@ public:
};
class InputEventJoypadButton : public InputEvent {
- GDCLASS(InputEventJoypadButton, InputEvent)
+ GDCLASS(InputEventJoypadButton, InputEvent);
int button_index;
bool pressed;
@@ -431,7 +431,7 @@ public:
};
class InputEventScreenTouch : public InputEvent {
- GDCLASS(InputEventScreenTouch, InputEvent)
+ GDCLASS(InputEventScreenTouch, InputEvent);
int index;
Vector2 pos;
bool pressed;
@@ -457,7 +457,7 @@ public:
class InputEventScreenDrag : public InputEvent {
- GDCLASS(InputEventScreenDrag, InputEvent)
+ GDCLASS(InputEventScreenDrag, InputEvent);
int index;
Vector2 pos;
Vector2 relative;
@@ -487,7 +487,7 @@ public:
class InputEventAction : public InputEvent {
- GDCLASS(InputEventAction, InputEvent)
+ GDCLASS(InputEventAction, InputEvent);
StringName action;
bool pressed;
@@ -519,7 +519,7 @@ public:
class InputEventGesture : public InputEventWithModifiers {
- GDCLASS(InputEventGesture, InputEventWithModifiers)
+ GDCLASS(InputEventGesture, InputEventWithModifiers);
Vector2 pos;
@@ -533,7 +533,7 @@ public:
class InputEventMagnifyGesture : public InputEventGesture {
- GDCLASS(InputEventMagnifyGesture, InputEventGesture)
+ GDCLASS(InputEventMagnifyGesture, InputEventGesture);
real_t factor;
protected:
@@ -551,7 +551,7 @@ public:
class InputEventPanGesture : public InputEventGesture {
- GDCLASS(InputEventPanGesture, InputEventGesture)
+ GDCLASS(InputEventPanGesture, InputEventGesture);
Vector2 delta;
protected:
@@ -568,7 +568,7 @@ public:
};
class InputEventMIDI : public InputEvent {
- GDCLASS(InputEventMIDI, InputEvent)
+ GDCLASS(InputEventMIDI, InputEvent);
int channel;
int message;
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 97c96b4018..135df4e5bd 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -184,6 +184,7 @@ void register_core_types() {
ClassDB::register_class<PackedDataContainer>();
ClassDB::register_virtual_class<PackedDataContainerRef>();
ClassDB::register_class<AStar>();
+ ClassDB::register_class<AStar2D>();
ClassDB::register_class<EncodedObjectAsID>();
ClassDB::register_class<RandomNumberGenerator>();
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 35b817b1d2..686aa6f8e3 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -2331,6 +2331,9 @@ String String::insert(int p_at_pos, const String &p_string) const {
}
String String::substr(int p_from, int p_chars) const {
+ if (p_chars == -1)
+ p_chars = length() - p_from;
+
if (empty() || p_from < 0 || p_from >= length() || p_chars <= 0)
return "";
diff --git a/core/ustring.h b/core/ustring.h
index 5b9be9f27c..ecf934a26b 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -201,7 +201,7 @@ public:
}
/* complex helpers */
- String substr(int p_from, int p_chars) const;
+ String substr(int p_from, int p_chars = -1) const;
int find(const String &p_str, int p_from = 0) const; ///< return <0 if failed
int find(const char *p_str, int p_from = 0) const; ///< return <0 if failed
int find_char(const CharType &p_char, int p_from = 0) const; ///< return <0 if failed
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 5d5f18926f..dc28f1ca02 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1499,7 +1499,7 @@ void register_variant_methods() {
ADDFUNC1R(STRING, INT, String, casecmp_to, STRING, "to", varray());
ADDFUNC1R(STRING, INT, String, nocasecmp_to, STRING, "to", varray());
ADDFUNC0R(STRING, INT, String, length, varray());
- ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray());
+ ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray(-1));
ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0));
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 16ceb293ad..81722535c2 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" category="Core" version="3.2">
<brief_description>
- AStar class representation that uses vectors as edges.
+ AStar class representation that uses 3d-vectors as edges.
</brief_description>
<description>
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points.
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
new file mode 100644
index 0000000000..b86e53d4d4
--- /dev/null
+++ b/doc/classes/AStar2D.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AStar2D" inherits="Reference" category="Core" version="3.2">
+ <brief_description>
+ AStar class representation that uses 2d-vectors as edges.
+ </brief_description>
+ <description>
+ This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <argument index="2" name="weight_scale" type="float" default="1.0">
+ </argument>
+ <description>
+ Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
+ [/codeblock]
+ If there already exists a point for the given id, its position and weight scale are updated to the given values.
+ </description>
+ </method>
+ <method name="are_points_connected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns whether there is a connection/segment between the given points.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clears all the points and segments.
+ </description>
+ </method>
+ <method name="connect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <argument index="2" name="bidirectional" type="bool" default="true">
+ </argument>
+ <description>
+ Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(1, 1))
+ as.add_point(2, Vector2(0, 5))
+ as.connect_points(1, 2, false)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="disconnect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Deletes the segment between the given points.
+ </description>
+ </method>
+ <method name="get_available_point_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the next available point id with no point associated to it.
+ </description>
+ </method>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="to_position" type="Vector2">
+ </argument>
+ <description>
+ Returns the id of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool.
+ </description>
+ </method>
+ <method name="get_closest_position_in_segment" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="to_position" type="Vector2">
+ </argument>
+ <description>
+ Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 5))
+ as.connect_points(1, 2)
+ var res = as.get_closest_position_in_segment(Vector2(3, 3)) # returns (0, 3)
+ [/codeblock]
+ The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
+ </description>
+ </method>
+ <method name="get_id_path">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 1), 1) # default weight is 1
+ as.add_point(3, Vector2(1, 1))
+ as.add_point(4, Vector2(2, 0))
+
+ as.connect_points(1, 2, false)
+ as.connect_points(2, 3, false)
+ as.connect_points(4, 3, false)
+ as.connect_points(1, 4, false)
+ as.connect_points(5, 4, false)
+
+ var res = as.get_id_path(1, 3) # returns [1, 2, 3]
+ [/codeblock]
+ If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
+ </description>
+ </method>
+ <method name="get_point_connections">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the connect with the given point.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 1))
+ as.add_point(3, Vector2(1, 1))
+ as.add_point(4, Vector2(2, 0))
+
+ as.connect_points(1, 2, true)
+ as.connect_points(1, 3, true)
+
+ var neighbors = as.get_point_connections(1) # returns [2, 3]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_point_path">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ </description>
+ </method>
+ <method name="get_point_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the position of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_point_weight_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the weight scale of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_points">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of all points.
+ </description>
+ </method>
+ <method name="has_point" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns whether a point associated with the given id exists.
+ </description>
+ </method>
+ <method name="is_point_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Removes the point associated with the given id from the points pool.
+ </description>
+ </method>
+ <method name="set_point_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool" default="true">
+ </argument>
+ <description>
+ Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
+ </description>
+ </method>
+ <method name="set_point_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <description>
+ Sets the position for the point with the given id.
+ </description>
+ </method>
+ <method name="set_point_weight_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="weight_scale" type="float">
+ </argument>
+ <description>
+ Sets the [code]weight_scale[/code] for the point with the given id.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index db35b2f352..3ea280cba3 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -57,12 +57,15 @@
</method>
</methods>
<members>
+ <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap">
+ Sets autowrapping for the text in the dialog.
+ </member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code].
Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK.
</member>
<member name="dialog_text" type="String" setter="set_text" getter="get_text">
- The text displayed by this dialog.
+ The text displayed by the dialog.
</member>
</members>
<signals>
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index 7f353f7a05..4611b9c507 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -45,10 +45,10 @@
<constant name="FEED_RGB" value="1" enum="FeedDataType">
Feed supplies RGB images.
</constant>
- <constant name="FEED_YCbCr" value="2" enum="FeedDataType">
+ <constant name="FEED_YCBCR" value="2" enum="FeedDataType">
Feed supplies YCbCr images that need to be converted to RGB.
</constant>
- <constant name="FEED_YCbCr_Sep" value="3" enum="FeedDataType">
+ <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
</constant>
<constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index f492bda74f..ee41f08ec6 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -70,13 +70,13 @@
<constant name="FEED_RGBA_IMAGE" value="0" enum="FeedImage">
The RGBA camera image.
</constant>
- <constant name="FEED_YCbCr_IMAGE" value="0" enum="FeedImage">
+ <constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
The YCbCr camera image.
</constant>
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
The Y component camera image.
</constant>
- <constant name="FEED_CbCr_IMAGE" value="1" enum="FeedImage">
+ <constant name="FEED_CBCR_IMAGE" value="1" enum="FeedImage">
The CbCr component camera image.
</constant>
</constants>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 32e6014c75..1fefc719b7 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -49,8 +49,13 @@
</member>
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible">
</member>
+ <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode">
+ If [code]true[/code], allows to edit color with Hue/Saturation/Value sliders.
+ [b]Note:[/b] Cannot be enabled if raw mode is on.
+ </member>
<member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode">
If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
+ [b]Note:[/b] Cannot be enabled if hsv mode is on.
</member>
</members>
<signals>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index af7e5a395a..ff0572f384 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -757,10 +757,10 @@
</return>
<argument index="0" name="from" type="int">
</argument>
- <argument index="1" name="len" type="int">
+ <argument index="1" name="len" type="int" default="-1">
</argument>
<description>
- Returns part of the string from the position [code]from[/code] with length [code]len[/code].
+ Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using -1 will return remaining characters from given position.
</description>
</method>
<method name="to_ascii">
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index a07c6832dc..ea29af7d9e 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -2920,16 +2920,16 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
VS::get_singleton()->texture_bind(camera_RGBA, 0);
- } else if (feed->get_datatype() == CameraFeed::FEED_YCbCr) {
- RID camera_YCbCr = feed->get_texture(CameraServer::FEED_YCbCr_IMAGE);
+ } else if (feed->get_datatype() == CameraFeed::FEED_YCBCR) {
+ RID camera_YCbCr = feed->get_texture(CameraServer::FEED_YCBCR_IMAGE);
VS::get_singleton()->texture_bind(camera_YCbCr, 0);
storage->shaders.copy.set_conditional(CopyShaderGLES2::YCBCR_TO_RGB, true);
- } else if (feed->get_datatype() == CameraFeed::FEED_YCbCr_Sep) {
+ } else if (feed->get_datatype() == CameraFeed::FEED_YCBCR_SEP) {
RID camera_Y = feed->get_texture(CameraServer::FEED_Y_IMAGE);
- RID camera_CbCr = feed->get_texture(CameraServer::FEED_CbCr_IMAGE);
+ RID camera_CbCr = feed->get_texture(CameraServer::FEED_CBCR_IMAGE);
VS::get_singleton()->texture_bind(camera_Y, 0);
VS::get_singleton()->texture_bind(camera_CbCr, 1);
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 7acb8a22bc..c7ef5cded4 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -4454,16 +4454,16 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
RID camera_RGBA = feed->get_texture(CameraServer::FEED_RGBA_IMAGE);
VS::get_singleton()->texture_bind(camera_RGBA, 0);
- } else if (feed->get_datatype() == CameraFeed::FEED_YCbCr) {
- RID camera_YCbCr = feed->get_texture(CameraServer::FEED_YCbCr_IMAGE);
+ } else if (feed->get_datatype() == CameraFeed::FEED_YCBCR) {
+ RID camera_YCbCr = feed->get_texture(CameraServer::FEED_YCBCR_IMAGE);
VS::get_singleton()->texture_bind(camera_YCbCr, 0);
storage->shaders.copy.set_conditional(CopyShaderGLES3::YCBCR_TO_SRGB, true);
- } else if (feed->get_datatype() == CameraFeed::FEED_YCbCr_Sep) {
+ } else if (feed->get_datatype() == CameraFeed::FEED_YCBCR_SEP) {
RID camera_Y = feed->get_texture(CameraServer::FEED_Y_IMAGE);
- RID camera_CbCr = feed->get_texture(CameraServer::FEED_CbCr_IMAGE);
+ RID camera_CbCr = feed->get_texture(CameraServer::FEED_CBCR_IMAGE);
VS::get_singleton()->texture_bind(camera_Y, 0);
VS::get_singleton()->texture_bind(camera_CbCr, 1);
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index 66c818f09d..49aab48719 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -35,7 +35,7 @@
class AnimationBezierTrackEdit : public Control {
- GDCLASS(AnimationBezierTrackEdit, Control)
+ GDCLASS(AnimationBezierTrackEdit, Control);
enum HandleMode {
HANDLE_MODE_FREE,
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 3295753bda..6e47fadb20 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -2083,8 +2083,6 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
moving_selection_from_ofs = (mb->get_position().x - timeline->get_name_limit()) / timeline->get_zoom_scale();
}
accept_event();
- } else {
- emit_signal("clear_selection");
}
}
@@ -2326,7 +2324,7 @@ void AnimationTrackEdit::set_in_group(bool p_enable) {
update();
}
-void AnimationTrackEdit::append_to_selection(const Rect2 &p_box) {
+void AnimationTrackEdit::append_to_selection(const Rect2 &p_box, bool p_deselection) {
Rect2 select_rect(timeline->get_name_limit(), 0, get_size().width - timeline->get_name_limit() - timeline->get_buttons_width(), get_size().height);
select_rect = select_rect.clip(p_box);
@@ -2339,7 +2337,10 @@ void AnimationTrackEdit::append_to_selection(const Rect2 &p_box) {
rect.position.x += offset;
if (select_rect.intersects(rect)) {
- emit_signal("select_key", i, false);
+ if (p_deselection)
+ emit_signal("deselect_key", i);
+ else
+ emit_signal("select_key", i, false);
}
}
}
@@ -4342,7 +4343,7 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
Rect2 local_rect = box_select_rect;
local_rect.position -= track_edits[i]->get_global_position();
- track_edits[i]->append_to_selection(local_rect);
+ track_edits[i]->append_to_selection(local_rect, mb->get_command());
}
if (_get_track_selected() == -1 && track_edits.size() > 0) { //minimal hack to make shortcuts work
@@ -4374,8 +4375,8 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
}
if (!box_selection->is_visible_in_tree()) {
- if (!mm->get_shift()) {
- _clear_selection(); //only append if shift is pressed
+ if (!mm->get_command() && !mm->get_shift()) {
+ _clear_selection();
}
box_selection->show();
}
@@ -4568,7 +4569,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
it->set_metadata(0, md);
}
- track_copy_dialog->popup_centered_minsize(Size2(300, 500) * EDSCALE);
+ track_copy_dialog->popup_centered_minsize(Size2(350, 500) * EDSCALE);
} break;
case EDIT_COPY_TRACKS_CONFIRM: {
@@ -4962,6 +4963,19 @@ void AnimationTrackEditor::_show_imported_anim_warning() const {
TTR("Warning: Editing imported animation"));
}
+void AnimationTrackEditor::_select_all_tracks_for_copy() {
+ TreeItem *track = track_copy_select->get_root()->get_children();
+ while (track) {
+ track->set_checked(0, selected_all_tracks);
+ track = track->get_next();
+ }
+ selected_all_tracks = !selected_all_tracks;
+ if (selected_all_tracks)
+ select_all_button->set_text(TTR("Select All"));
+ else
+ select_all_button->set_text(TTR("Select None"));
+}
+
void AnimationTrackEditor::_bind_methods() {
ClassDB::bind_method("_animation_changed", &AnimationTrackEditor::_animation_changed);
@@ -5002,6 +5016,7 @@ void AnimationTrackEditor::_bind_methods() {
ClassDB::bind_method("_selection_changed", &AnimationTrackEditor::_selection_changed);
ClassDB::bind_method("_snap_mode_changed", &AnimationTrackEditor::_snap_mode_changed);
ClassDB::bind_method("_show_imported_anim_warning", &AnimationTrackEditor::_show_imported_anim_warning);
+ ClassDB::bind_method("_select_all_tracks_for_copy", &AnimationTrackEditor::_select_all_tracks_for_copy);
ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("keying_changed"));
@@ -5284,9 +5299,22 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_dialog->set_title(TTR("Select tracks to copy:"));
track_copy_dialog->get_ok()->set_text(TTR("Copy"));
+ VBoxContainer *track_vbox = memnew(VBoxContainer);
+ track_copy_dialog->add_child(track_vbox);
+
+ selected_all_tracks = true;
+
track_copy_select = memnew(Tree);
+ track_copy_select->set_h_size_flags(SIZE_EXPAND_FILL);
+ track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true);
- track_copy_dialog->add_child(track_copy_select);
+ track_vbox->add_child(track_copy_select);
+ track_copy_options = memnew(HBoxContainer);
+ track_vbox->add_child(track_copy_options);
+ select_all_button = memnew(Button);
+ select_all_button->set_text(TTR("Select All"));
+ select_all_button->connect("pressed", this, "_select_all_tracks_for_copy");
+ track_copy_options->add_child(select_all_button);
track_copy_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM));
animation_changing_awaiting_update = false;
}
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index c64f663b3b..1452d5519c 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -50,7 +50,7 @@
#include "scene_tree_editor.h"
class AnimationTimelineEdit : public Range {
- GDCLASS(AnimationTimelineEdit, Range)
+ GDCLASS(AnimationTimelineEdit, Range);
Ref<Animation> animation;
int name_limit;
@@ -123,7 +123,7 @@ class AnimationTrackEditor;
class AnimationTrackEdit : public Control {
- GDCLASS(AnimationTrackEdit, Control)
+ GDCLASS(AnimationTrackEdit, Control);
enum {
MENU_CALL_MODE_CONTINUOUS,
@@ -231,13 +231,14 @@ public:
void cancel_drop();
void set_in_group(bool p_enable);
- void append_to_selection(const Rect2 &p_box);
+ void append_to_selection(const Rect2 &p_box, bool p_deselection);
AnimationTrackEdit();
};
class AnimationTrackEditPlugin : public Reference {
- GDCLASS(AnimationTrackEditPlugin, Reference)
+ GDCLASS(AnimationTrackEditPlugin, Reference);
+
public:
virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage);
virtual AnimationTrackEdit *create_audio_track_edit();
@@ -248,7 +249,7 @@ class AnimationTrackKeyEdit;
class AnimationBezierTrackEdit;
class AnimationTrackEditGroup : public Control {
- GDCLASS(AnimationTrackEditGroup, Control)
+ GDCLASS(AnimationTrackEditGroup, Control);
Ref<Texture> icon;
String node_name;
NodePath node;
@@ -271,7 +272,7 @@ public:
};
class AnimationTrackEditor : public VBoxContainer {
- GDCLASS(AnimationTrackEditor, VBoxContainer)
+ GDCLASS(AnimationTrackEditor, VBoxContainer);
enum {
EDIT_COPY_TRACKS,
@@ -445,6 +446,8 @@ class AnimationTrackEditor : public VBoxContainer {
ConfirmationDialog *scale_dialog;
SpinBox *scale;
+ void _select_all_tracks_for_copy();
+
void _edit_menu_pressed(int p_option);
int last_menu_track_opt;
@@ -458,8 +461,12 @@ class AnimationTrackEditor : public VBoxContainer {
void _selection_changed();
+ bool selected_all_tracks;
ConfirmationDialog *track_copy_dialog;
Tree *track_copy_select;
+ HBoxContainer *track_copy_options;
+ Button *select_all_button;
+
struct TrackClipboard {
NodePath full_path;
NodePath base_path;
diff --git a/editor/animation_track_editor_plugins.h b/editor/animation_track_editor_plugins.h
index a1ea7435b1..5f0ea6196c 100644
--- a/editor/animation_track_editor_plugins.h
+++ b/editor/animation_track_editor_plugins.h
@@ -34,7 +34,7 @@
#include "editor/animation_track_editor.h"
class AnimationTrackEditBool : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditBool, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditBool, AnimationTrackEdit);
Ref<Texture> icon_checked;
Ref<Texture> icon_unchecked;
@@ -46,7 +46,7 @@ public:
};
class AnimationTrackEditColor : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditColor, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditColor, AnimationTrackEdit);
public:
virtual int get_key_height() const;
@@ -57,7 +57,7 @@ public:
};
class AnimationTrackEditAudio : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditAudio, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditAudio, AnimationTrackEdit);
ObjectID id;
@@ -78,7 +78,7 @@ public:
};
class AnimationTrackEditSpriteFrame : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditSpriteFrame, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditSpriteFrame, AnimationTrackEdit);
ObjectID id;
@@ -92,7 +92,7 @@ public:
};
class AnimationTrackEditSubAnim : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditSubAnim, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditSubAnim, AnimationTrackEdit);
ObjectID id;
@@ -106,7 +106,7 @@ public:
};
class AnimationTrackEditTypeAudio : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditTypeAudio, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditTypeAudio, AnimationTrackEdit);
void _preview_changed(ObjectID p_which);
@@ -134,7 +134,7 @@ public:
};
class AnimationTrackEditTypeAnimation : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditTypeAnimation, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditTypeAnimation, AnimationTrackEdit);
ObjectID id;
@@ -149,7 +149,7 @@ public:
};
class AnimationTrackEditVolumeDB : public AnimationTrackEdit {
- GDCLASS(AnimationTrackEditVolumeDB, AnimationTrackEdit)
+ GDCLASS(AnimationTrackEditVolumeDB, AnimationTrackEdit);
public:
virtual void draw_bg(int p_clip_left, int p_clip_right);
@@ -159,7 +159,8 @@ public:
};
class AnimationTrackEditDefaultPlugin : public AnimationTrackEditPlugin {
- GDCLASS(AnimationTrackEditDefaultPlugin, AnimationTrackEditPlugin)
+ GDCLASS(AnimationTrackEditDefaultPlugin, AnimationTrackEditPlugin);
+
public:
virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage);
virtual AnimationTrackEdit *create_audio_track_edit();
diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h
index 3b8975e3aa..fca0aabac1 100644
--- a/editor/audio_stream_preview.h
+++ b/editor/audio_stream_preview.h
@@ -36,7 +36,7 @@
#include "servers/audio/audio_stream.h"
class AudioStreamPreview : public Reference {
- GDCLASS(AudioStreamPreview, Reference)
+ GDCLASS(AudioStreamPreview, Reference);
friend class AudioStream;
Vector<uint8_t> preview;
float length;
@@ -52,7 +52,7 @@ public:
};
class AudioStreamPreviewGenerator : public Node {
- GDCLASS(AudioStreamPreviewGenerator, Node)
+ GDCLASS(AudioStreamPreviewGenerator, Node);
static AudioStreamPreviewGenerator *singleton;
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index e471993fc7..8b3c537fe3 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -587,6 +587,26 @@ FindReplaceBar::FindReplaceBar() {
/*** CODE EDITOR ****/
+// This function should be used to handle shortcuts that could otherwise
+// be handled too late if they weren't handled here.
+void CodeTextEditor::_input(const Ref<InputEvent> &event) {
+
+ const Ref<InputEventKey> key_event = event;
+ if (!key_event.is_valid() || !key_event->is_pressed())
+ return;
+
+ if (ED_IS_SHORTCUT("script_text_editor/move_up", key_event)) {
+ move_lines_up();
+ accept_event();
+ return;
+ }
+ if (ED_IS_SHORTCUT("script_text_editor/move_down", key_event)) {
+ move_lines_down();
+ accept_event();
+ return;
+ }
+}
+
void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
@@ -1375,6 +1395,9 @@ void CodeTextEditor::_notification(int p_what) {
warning_button->set_icon(get_icon("NodeWarning", "EditorIcons"));
add_constant_override("separation", 4 * EDSCALE);
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ set_process_input(is_visible_in_tree());
+ } break;
default:
break;
}
@@ -1454,6 +1477,7 @@ void CodeTextEditor::remove_all_bookmarks() {
void CodeTextEditor::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_input"), &CodeTextEditor::_input);
ClassDB::bind_method("_text_editor_gui_input", &CodeTextEditor::_text_editor_gui_input);
ClassDB::bind_method("_line_col_changed", &CodeTextEditor::_line_col_changed);
ClassDB::bind_method("_text_changed", &CodeTextEditor::_text_changed);
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 0ef8ec7061..ce219f340c 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -165,6 +165,7 @@ class CodeTextEditor : public VBoxContainer {
void _font_resize_timeout();
bool _add_font_size(int p_delta);
+ void _input(const Ref<InputEvent> &event);
void _text_editor_gui_input(const Ref<InputEvent> &p_event);
void _zoom_in();
void _zoom_out();
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 03c4b25f5c..0eddbc3ceb 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -44,7 +44,7 @@
class CreateDialog : public ConfirmationDialog {
- GDCLASS(CreateDialog, ConfirmationDialog)
+ GDCLASS(CreateDialog, ConfirmationDialog);
Vector<String> favorite_list;
Tree *favorites;
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index 20890fd3b5..8781e6ff6c 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -52,7 +52,7 @@ class EditorAudioBuses;
class EditorAudioBus : public PanelContainer {
- GDCLASS(EditorAudioBus, PanelContainer)
+ GDCLASS(EditorAudioBus, PanelContainer);
Ref<Texture> disabled_vu;
LineEdit *track_name;
@@ -155,7 +155,7 @@ public:
class EditorAudioBuses : public VBoxContainer {
- GDCLASS(EditorAudioBuses, VBoxContainer)
+ GDCLASS(EditorAudioBuses, VBoxContainer);
HBoxContainer *top_hb;
diff --git a/editor/editor_export.h b/editor/editor_export.h
index bd864c528c..7c01abe0e9 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -44,7 +44,8 @@ struct EditorProgress;
class EditorExportPreset : public Reference {
- GDCLASS(EditorExportPreset, Reference)
+ GDCLASS(EditorExportPreset, Reference);
+
public:
enum ExportFilter {
EXPORT_ALL_RESOURCES,
@@ -152,7 +153,7 @@ struct SharedObject {
class EditorExportPlatform : public Reference {
- GDCLASS(EditorExportPlatform, Reference)
+ GDCLASS(EditorExportPlatform, Reference);
public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total);
@@ -272,7 +273,7 @@ public:
};
class EditorExportPlugin : public Reference {
- GDCLASS(EditorExportPlugin, Reference)
+ GDCLASS(EditorExportPlugin, Reference);
friend class EditorExportPlatform;
@@ -388,7 +389,7 @@ public:
class EditorExportPlatformPC : public EditorExportPlatform {
- GDCLASS(EditorExportPlatformPC, EditorExportPlatform)
+ GDCLASS(EditorExportPlatformPC, EditorExportPlatform);
Ref<ImageTexture> logo;
String name;
@@ -440,7 +441,7 @@ public:
class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin {
- GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin)
+ GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin);
public:
virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features);
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 494e8b5833..0550509ba2 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -48,7 +48,8 @@ public:
class EditorProperty : public Container {
- GDCLASS(EditorProperty, Container)
+ GDCLASS(EditorProperty, Container);
+
private:
String label;
int text_size;
@@ -167,7 +168,7 @@ public:
};
class EditorInspectorPlugin : public Reference {
- GDCLASS(EditorInspectorPlugin, Reference)
+ GDCLASS(EditorInspectorPlugin, Reference);
friend class EditorInspector;
struct AddedEditor {
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index c28e607c89..0d700cd9b6 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -60,7 +60,8 @@ class EditorToolAddons;
class ScriptEditor;
class EditorInterface : public Node {
- GDCLASS(EditorInterface, Node)
+ GDCLASS(EditorInterface, Node);
+
protected:
static void _bind_methods();
static EditorInterface *singleton;
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index e62213887d..46c13d257a 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -42,7 +42,7 @@
class EditorProfiler : public VBoxContainer {
- GDCLASS(EditorProfiler, VBoxContainer)
+ GDCLASS(EditorProfiler, VBoxContainer);
public:
struct Metric {
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 45acd1b6d4..d5f4d54e5c 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -599,7 +599,8 @@ EditorPropertyFlags::EditorPropertyFlags() {
///////////////////// LAYERS /////////////////////////
class EditorPropertyLayersGrid : public Control {
- GDCLASS(EditorPropertyLayersGrid, Control)
+ GDCLASS(EditorPropertyLayersGrid, Control);
+
public:
uint32_t value;
Vector<Rect2> flag_rects;
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 574767890c..02d9349f2d 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -40,7 +40,7 @@
#include "scene/gui/color_picker.h"
class EditorPropertyNil : public EditorProperty {
- GDCLASS(EditorPropertyNil, EditorProperty)
+ GDCLASS(EditorPropertyNil, EditorProperty);
LineEdit *text;
public:
@@ -49,7 +49,7 @@ public:
};
class EditorPropertyText : public EditorProperty {
- GDCLASS(EditorPropertyText, EditorProperty)
+ GDCLASS(EditorPropertyText, EditorProperty);
LineEdit *text;
bool updating;
@@ -66,7 +66,7 @@ public:
};
class EditorPropertyMultilineText : public EditorProperty {
- GDCLASS(EditorPropertyMultilineText, EditorProperty)
+ GDCLASS(EditorPropertyMultilineText, EditorProperty);
TextEdit *text;
AcceptDialog *big_text_dialog;
@@ -87,7 +87,7 @@ public:
};
class EditorPropertyTextEnum : public EditorProperty {
- GDCLASS(EditorPropertyTextEnum, EditorProperty)
+ GDCLASS(EditorPropertyTextEnum, EditorProperty);
OptionButton *options;
void _option_selected(int p_which);
@@ -102,7 +102,7 @@ public:
};
class EditorPropertyPath : public EditorProperty {
- GDCLASS(EditorPropertyPath, EditorProperty)
+ GDCLASS(EditorPropertyPath, EditorProperty);
Vector<String> extensions;
bool folder;
bool global;
@@ -127,7 +127,8 @@ public:
};
class EditorPropertyClassName : public EditorProperty {
- GDCLASS(EditorPropertyClassName, EditorProperty)
+ GDCLASS(EditorPropertyClassName, EditorProperty);
+
private:
CreateDialog *dialog;
Button *property;
@@ -146,7 +147,8 @@ public:
};
class EditorPropertyMember : public EditorProperty {
- GDCLASS(EditorPropertyMember, EditorProperty)
+ GDCLASS(EditorPropertyMember, EditorProperty);
+
public:
enum Type {
MEMBER_METHOD_OF_VARIANT_TYPE, ///< a method of a type
@@ -179,7 +181,7 @@ public:
};
class EditorPropertyCheck : public EditorProperty {
- GDCLASS(EditorPropertyCheck, EditorProperty)
+ GDCLASS(EditorPropertyCheck, EditorProperty);
CheckBox *checkbox;
void _checkbox_pressed();
@@ -193,7 +195,7 @@ public:
};
class EditorPropertyEnum : public EditorProperty {
- GDCLASS(EditorPropertyEnum, EditorProperty)
+ GDCLASS(EditorPropertyEnum, EditorProperty);
OptionButton *options;
void _option_selected(int p_which);
@@ -209,7 +211,7 @@ public:
};
class EditorPropertyFlags : public EditorProperty {
- GDCLASS(EditorPropertyFlags, EditorProperty)
+ GDCLASS(EditorPropertyFlags, EditorProperty);
VBoxContainer *vbox;
Vector<CheckBox *> flags;
Vector<int> flag_indices;
@@ -228,7 +230,8 @@ public:
class EditorPropertyLayersGrid;
class EditorPropertyLayers : public EditorProperty {
- GDCLASS(EditorPropertyLayers, EditorProperty)
+ GDCLASS(EditorPropertyLayers, EditorProperty);
+
public:
enum LayerType {
LAYER_PHYSICS_2D,
@@ -257,7 +260,7 @@ public:
};
class EditorPropertyInteger : public EditorProperty {
- GDCLASS(EditorPropertyInteger, EditorProperty)
+ GDCLASS(EditorPropertyInteger, EditorProperty);
EditorSpinSlider *spin;
bool setting;
void _value_changed(double p_val);
@@ -272,7 +275,7 @@ public:
};
class EditorPropertyObjectID : public EditorProperty {
- GDCLASS(EditorPropertyObjectID, EditorProperty)
+ GDCLASS(EditorPropertyObjectID, EditorProperty);
Button *edit;
String base_type;
void _edit_pressed();
@@ -287,7 +290,7 @@ public:
};
class EditorPropertyFloat : public EditorProperty {
- GDCLASS(EditorPropertyFloat, EditorProperty)
+ GDCLASS(EditorPropertyFloat, EditorProperty);
EditorSpinSlider *spin;
bool setting;
void _value_changed(double p_val);
@@ -302,7 +305,7 @@ public:
};
class EditorPropertyEasing : public EditorProperty {
- GDCLASS(EditorPropertyEasing, EditorProperty)
+ GDCLASS(EditorPropertyEasing, EditorProperty);
Control *easing_draw;
PopupMenu *preset;
bool full;
@@ -335,7 +338,7 @@ public:
};
class EditorPropertyVector2 : public EditorProperty {
- GDCLASS(EditorPropertyVector2, EditorProperty)
+ GDCLASS(EditorPropertyVector2, EditorProperty);
EditorSpinSlider *spin[2];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -351,7 +354,7 @@ public:
};
class EditorPropertyRect2 : public EditorProperty {
- GDCLASS(EditorPropertyRect2, EditorProperty)
+ GDCLASS(EditorPropertyRect2, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -367,7 +370,7 @@ public:
};
class EditorPropertyVector3 : public EditorProperty {
- GDCLASS(EditorPropertyVector3, EditorProperty)
+ GDCLASS(EditorPropertyVector3, EditorProperty);
EditorSpinSlider *spin[3];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -383,7 +386,7 @@ public:
};
class EditorPropertyPlane : public EditorProperty {
- GDCLASS(EditorPropertyPlane, EditorProperty)
+ GDCLASS(EditorPropertyPlane, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -399,7 +402,7 @@ public:
};
class EditorPropertyQuat : public EditorProperty {
- GDCLASS(EditorPropertyQuat, EditorProperty)
+ GDCLASS(EditorPropertyQuat, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -415,7 +418,7 @@ public:
};
class EditorPropertyAABB : public EditorProperty {
- GDCLASS(EditorPropertyAABB, EditorProperty)
+ GDCLASS(EditorPropertyAABB, EditorProperty);
EditorSpinSlider *spin[6];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -431,7 +434,7 @@ public:
};
class EditorPropertyTransform2D : public EditorProperty {
- GDCLASS(EditorPropertyTransform2D, EditorProperty)
+ GDCLASS(EditorPropertyTransform2D, EditorProperty);
EditorSpinSlider *spin[6];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -447,7 +450,7 @@ public:
};
class EditorPropertyBasis : public EditorProperty {
- GDCLASS(EditorPropertyBasis, EditorProperty)
+ GDCLASS(EditorPropertyBasis, EditorProperty);
EditorSpinSlider *spin[9];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -463,7 +466,7 @@ public:
};
class EditorPropertyTransform : public EditorProperty {
- GDCLASS(EditorPropertyTransform, EditorProperty)
+ GDCLASS(EditorPropertyTransform, EditorProperty);
EditorSpinSlider *spin[12];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -479,7 +482,7 @@ public:
};
class EditorPropertyColor : public EditorProperty {
- GDCLASS(EditorPropertyColor, EditorProperty)
+ GDCLASS(EditorPropertyColor, EditorProperty);
ColorPickerButton *picker;
void _color_changed(const Color &p_color);
void _popup_closed();
@@ -494,7 +497,7 @@ public:
};
class EditorPropertyNodePath : public EditorProperty {
- GDCLASS(EditorPropertyNodePath, EditorProperty)
+ GDCLASS(EditorPropertyNodePath, EditorProperty);
Button *assign;
Button *clear;
SceneTreeDialog *scene_tree;
@@ -517,7 +520,7 @@ public:
};
class EditorPropertyRID : public EditorProperty {
- GDCLASS(EditorPropertyRID, EditorProperty)
+ GDCLASS(EditorPropertyRID, EditorProperty);
Label *label;
public:
@@ -526,7 +529,7 @@ public:
};
class EditorPropertyResource : public EditorProperty {
- GDCLASS(EditorPropertyResource, EditorProperty)
+ GDCLASS(EditorPropertyResource, EditorProperty);
enum MenuOption {
@@ -605,7 +608,7 @@ public:
/// \brief The EditorInspectorDefaultPlugin class
///
class EditorInspectorDefaultPlugin : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorDefaultPlugin, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorDefaultPlugin, EditorInspectorPlugin);
public:
virtual bool can_handle(Object *p_object);
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index ff759105c3..18519c754a 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -78,7 +78,7 @@ public:
};
class EditorPropertyArray : public EditorProperty {
- GDCLASS(EditorPropertyArray, EditorProperty)
+ GDCLASS(EditorPropertyArray, EditorProperty);
PopupMenu *change_type;
bool updating;
@@ -117,7 +117,7 @@ public:
};
class EditorPropertyDictionary : public EditorProperty {
- GDCLASS(EditorPropertyDictionary, EditorProperty)
+ GDCLASS(EditorPropertyDictionary, EditorProperty);
PopupMenu *change_type;
bool updating;
diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h
index ceff878e7f..1523c20f48 100644
--- a/editor/editor_spin_slider.h
+++ b/editor/editor_spin_slider.h
@@ -36,7 +36,7 @@
#include "scene/gui/texture_rect.h"
class EditorSpinSlider : public Range {
- GDCLASS(EditorSpinSlider, Range)
+ GDCLASS(EditorSpinSlider, Range);
String label;
int updown_offset;
diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h
index 608830c990..ad3ab507b3 100644
--- a/editor/export_template_manager.h
+++ b/editor/export_template_manager.h
@@ -41,7 +41,7 @@
class ExportTemplateVersion;
class ExportTemplateManager : public ConfirmationDialog {
- GDCLASS(ExportTemplateManager, ConfirmationDialog)
+ GDCLASS(ExportTemplateManager, ConfirmationDialog);
AcceptDialog *template_downloader;
VBoxContainer *template_list;
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index 5f728a104b..178b9a2080 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -36,7 +36,8 @@
// Performs the actual search
class FindInFiles : public Node {
- GDCLASS(FindInFiles, Node)
+ GDCLASS(FindInFiles, Node);
+
public:
static const char *SIGNAL_RESULT_FOUND;
static const char *SIGNAL_FINISHED;
@@ -93,7 +94,8 @@ class HBoxContainer;
// Prompts search parameters
class FindInFilesDialog : public AcceptDialog {
- GDCLASS(FindInFilesDialog, AcceptDialog)
+ GDCLASS(FindInFilesDialog, AcceptDialog);
+
public:
static const char *SIGNAL_FIND_REQUESTED;
static const char *SIGNAL_REPLACE_REQUESTED;
@@ -138,7 +140,8 @@ class ProgressBar;
// Display search results
class FindInFilesPanel : public Control {
- GDCLASS(FindInFilesPanel, Control)
+ GDCLASS(FindInFilesPanel, Control);
+
public:
static const char *SIGNAL_RESULT_SELECTED;
static const char *SIGNAL_FILES_MODIFIED;
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index d396dd6d5b..b3eb7ae83b 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -34,7 +34,8 @@
#include "core/io/resource_importer.h"
class EditorImportPlugin : public ResourceImporter {
- GDCLASS(EditorImportPlugin, Reference)
+ GDCLASS(EditorImportPlugin, Reference);
+
protected:
static void _bind_methods();
diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h
index 166fa998e4..6ae7608ff2 100644
--- a/editor/import/resource_importer_bitmask.h
+++ b/editor/import/resource_importer_bitmask.h
@@ -37,7 +37,7 @@
class StreamBitMap;
class ResourceImporterBitMap : public ResourceImporter {
- GDCLASS(ResourceImporterBitMap, ResourceImporter)
+ GDCLASS(ResourceImporterBitMap, ResourceImporter);
public:
virtual String get_importer_name() const;
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 6785b68d87..c2753b326f 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -34,7 +34,8 @@
#include "core/io/resource_importer.h"
class ResourceImporterCSVTranslation : public ResourceImporter {
- GDCLASS(ResourceImporterCSVTranslation, ResourceImporter)
+ GDCLASS(ResourceImporterCSVTranslation, ResourceImporter);
+
public:
virtual String get_importer_name() const;
virtual String get_visible_name() const;
diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h
index 3d5b99db2c..beadf5a8ea 100644
--- a/editor/import/resource_importer_image.h
+++ b/editor/import/resource_importer_image.h
@@ -35,7 +35,8 @@
#include "core/io/resource_importer.h"
class ResourceImporterImage : public ResourceImporter {
- GDCLASS(ResourceImporterImage, ResourceImporter)
+ GDCLASS(ResourceImporterImage, ResourceImporter);
+
public:
virtual String get_importer_name() const;
virtual String get_visible_name() const;
diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h
index 6b393886b7..d6acbbabca 100644
--- a/editor/import/resource_importer_layered_texture.h
+++ b/editor/import/resource_importer_layered_texture.h
@@ -37,7 +37,7 @@
class StreamTexture;
class ResourceImporterLayeredTexture : public ResourceImporter {
- GDCLASS(ResourceImporterLayeredTexture, ResourceImporter)
+ GDCLASS(ResourceImporterLayeredTexture, ResourceImporter);
bool is_3d;
static const char *compression_formats[];
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index b2a53f582c..b96bc1b656 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -47,7 +47,8 @@ public:
};
class ResourceImporterOBJ : public ResourceImporter {
- GDCLASS(ResourceImporterOBJ, ResourceImporter)
+ GDCLASS(ResourceImporterOBJ, ResourceImporter);
+
public:
virtual String get_importer_name() const;
virtual String get_visible_name() const;
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index b10c4da2e5..e89f862c1b 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -90,7 +90,7 @@ public:
};
class ResourceImporterScene : public ResourceImporter {
- GDCLASS(ResourceImporterScene, ResourceImporter)
+ GDCLASS(ResourceImporterScene, ResourceImporter);
Set<Ref<EditorSceneImporter> > importers;
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index ef74e4e41e..da712bf84d 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -37,7 +37,7 @@
class StreamTexture;
class ResourceImporterTexture : public ResourceImporter {
- GDCLASS(ResourceImporterTexture, ResourceImporter)
+ GDCLASS(ResourceImporterTexture, ResourceImporter);
protected:
enum {
diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h
index 042deacfe3..3c6fc343c4 100644
--- a/editor/import/resource_importer_texture_atlas.h
+++ b/editor/import/resource_importer_texture_atlas.h
@@ -34,7 +34,7 @@
#include "core/image.h"
#include "core/io/resource_importer.h"
class ResourceImporterTextureAtlas : public ResourceImporter {
- GDCLASS(ResourceImporterTextureAtlas, ResourceImporter)
+ GDCLASS(ResourceImporterTextureAtlas, ResourceImporter);
struct PackData {
Rect2 region;
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index f993f9e7bc..24481ea46b 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -34,7 +34,8 @@
#include "core/io/resource_importer.h"
class ResourceImporterWAV : public ResourceImporter {
- GDCLASS(ResourceImporterWAV, ResourceImporter)
+ GDCLASS(ResourceImporterWAV, ResourceImporter);
+
public:
virtual String get_importer_name() const;
virtual String get_visible_name() const;
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index b307ec649a..6918fe7977 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -32,7 +32,8 @@
#include "editor_node.h"
class ImportDockParameters : public Object {
- GDCLASS(ImportDockParameters, Object)
+ GDCLASS(ImportDockParameters, Object);
+
public:
Map<StringName, Variant> values;
List<PropertyInfo> properties;
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 77a34e80eb..c839e19d67 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -43,7 +43,7 @@
class ImportDockParameters;
class ImportDock : public VBoxContainer {
- GDCLASS(ImportDock, VBoxContainer)
+ GDCLASS(ImportDock, VBoxContainer);
Label *imported;
OptionButton *import_as;
diff --git a/editor/pane_drag.h b/editor/pane_drag.h
index c9631bb870..36c5953d84 100644
--- a/editor/pane_drag.h
+++ b/editor/pane_drag.h
@@ -35,7 +35,7 @@
class PaneDrag : public Control {
- GDCLASS(PaneDrag, Control)
+ GDCLASS(PaneDrag, Control);
bool mouse_over;
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index ae4db184e4..4a924b46c1 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -43,7 +43,7 @@
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
- GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin)
+ GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin);
Ref<AnimationNodeBlendSpace1D> blend_space;
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index 4a7f933bbf..4ecbf2e05e 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -41,7 +41,8 @@
#include "scene/gui/tree.h"
class AnimationTreeNodeEditorPlugin : public VBoxContainer {
- GDCLASS(AnimationTreeNodeEditorPlugin, VBoxContainer)
+ GDCLASS(AnimationTreeNodeEditorPlugin, VBoxContainer);
+
public:
virtual bool can_edit(const Ref<AnimationNode> &p_node) = 0;
virtual void edit(const Ref<AnimationNode> &p_node) = 0;
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index b034368b6a..be774a9696 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -37,7 +37,8 @@
// Edits a y(x) curve
class CurveEditor : public Control {
- GDCLASS(CurveEditor, Control)
+ GDCLASS(CurveEditor, Control);
+
public:
CurveEditor();
@@ -120,14 +121,16 @@ private:
};
class EditorInspectorPluginCurve : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginCurve, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginCurve, EditorInspectorPlugin);
+
public:
virtual bool can_handle(Object *p_object);
virtual void parse_begin(Object *p_object);
};
class CurveEditorPlugin : public EditorPlugin {
- GDCLASS(CurveEditorPlugin, EditorPlugin)
+ GDCLASS(CurveEditorPlugin, EditorPlugin);
+
public:
CurveEditorPlugin(EditorNode *p_node);
@@ -135,7 +138,8 @@ public:
};
class CurvePreviewGenerator : public EditorResourcePreviewGenerator {
- GDCLASS(CurvePreviewGenerator, EditorResourcePreviewGenerator)
+ GDCLASS(CurvePreviewGenerator, EditorResourcePreviewGenerator);
+
public:
virtual bool handles(const String &p_type) const;
virtual Ref<Texture> generate(const Ref<Resource> &p_from, const Size2 p_size) const;
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index 16b1f3082b..12d693b10a 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -36,7 +36,8 @@
void post_process_preview(Ref<Image> p_image);
class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorTexturePreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorTexturePreviewPlugin, EditorResourcePreviewGenerator);
+
public:
virtual bool handles(const String &p_type) const;
virtual bool generate_small_preview_automatically() const;
@@ -46,7 +47,8 @@ public:
};
class EditorImagePreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorImagePreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorImagePreviewPlugin, EditorResourcePreviewGenerator);
+
public:
virtual bool handles(const String &p_type) const;
virtual bool generate_small_preview_automatically() const;
@@ -56,7 +58,8 @@ public:
};
class EditorBitmapPreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorBitmapPreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorBitmapPreviewPlugin, EditorResourcePreviewGenerator);
+
public:
virtual bool handles(const String &p_type) const;
virtual bool generate_small_preview_automatically() const;
@@ -77,7 +80,7 @@ public:
class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorMaterialPreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorMaterialPreviewPlugin, EditorResourcePreviewGenerator);
RID scenario;
RID sphere;
@@ -123,7 +126,7 @@ public:
class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorMeshPreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorMeshPreviewPlugin, EditorResourcePreviewGenerator);
RID scenario;
RID mesh_instance;
@@ -151,7 +154,7 @@ public:
class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator {
- GDCLASS(EditorFontPreviewPlugin, EditorResourcePreviewGenerator)
+ GDCLASS(EditorFontPreviewPlugin, EditorResourcePreviewGenerator);
RID viewport;
RID viewport_texture;
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index 91790abee8..a87a5fe0ba 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -36,7 +36,7 @@
#include "scene/gui/gradient_edit.h"
class GradientEditor : public GradientEdit {
- GDCLASS(GradientEditor, GradientEdit)
+ GDCLASS(GradientEditor, GradientEdit);
bool editing;
Ref<Gradient> gradient;
@@ -54,7 +54,8 @@ public:
};
class EditorInspectorPluginGradient : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin);
+
public:
virtual bool can_handle(Object *p_object);
virtual void parse_begin(Object *p_object);
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index c3f14c27e5..1405127ab3 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -78,7 +78,7 @@ public:
};
class EditorInspectorPluginMaterial : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginMaterial, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginMaterial, EditorInspectorPlugin);
Ref<Environment> env;
public:
@@ -99,7 +99,8 @@ public:
};
class SpatialMaterialConversionPlugin : public EditorResourceConversionPlugin {
- GDCLASS(SpatialMaterialConversionPlugin, EditorResourceConversionPlugin)
+ GDCLASS(SpatialMaterialConversionPlugin, EditorResourceConversionPlugin);
+
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
@@ -107,7 +108,8 @@ public:
};
class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin {
- GDCLASS(ParticlesMaterialConversionPlugin, EditorResourceConversionPlugin)
+ GDCLASS(ParticlesMaterialConversionPlugin, EditorResourceConversionPlugin);
+
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
@@ -115,7 +117,8 @@ public:
};
class CanvasItemMaterialConversionPlugin : public EditorResourceConversionPlugin {
- GDCLASS(CanvasItemMaterialConversionPlugin, EditorResourceConversionPlugin)
+ GDCLASS(CanvasItemMaterialConversionPlugin, EditorResourceConversionPlugin);
+
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 8ada2dac90..4c2a81ed70 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -73,7 +73,8 @@ public:
};
class EditorInspectorPluginMesh : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginMesh, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginMesh, EditorInspectorPlugin);
+
public:
virtual bool can_handle(Object *p_object);
virtual void parse_begin(Object *p_object);
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index b1b3e3c1c0..b1c53dcf94 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -42,7 +42,7 @@
class ParticlesEditorBase : public Control {
- GDCLASS(ParticlesEditorBase, Control)
+ GDCLASS(ParticlesEditorBase, Control);
protected:
Spatial *base_node;
diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h
index e7fd597235..af5d8fc122 100644
--- a/editor/plugins/root_motion_editor_plugin.h
+++ b/editor/plugins/root_motion_editor_plugin.h
@@ -37,7 +37,7 @@
#include "scene/animation/animation_tree.h"
class EditorPropertyRootMotion : public EditorProperty {
- GDCLASS(EditorPropertyRootMotion, EditorProperty)
+ GDCLASS(EditorPropertyRootMotion, EditorProperty);
Button *assign;
Button *clear;
NodePath base_hint;
@@ -60,7 +60,7 @@ public:
};
class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorRootMotionPlugin, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorRootMotionPlugin, EditorInspectorPlugin);
public:
virtual bool can_handle(Object *p_object);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 0d9168261a..4ad2156779 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -50,7 +50,7 @@
class ScriptEditorQuickOpen : public ConfirmationDialog {
- GDCLASS(ScriptEditorQuickOpen, ConfirmationDialog)
+ GDCLASS(ScriptEditorQuickOpen, ConfirmationDialog);
LineEdit *search_box;
Tree *search_options;
@@ -77,7 +77,7 @@ class ScriptEditorDebugger;
class ScriptEditorBase : public VBoxContainer {
- GDCLASS(ScriptEditorBase, VBoxContainer)
+ GDCLASS(ScriptEditorBase, VBoxContainer);
protected:
static void _bind_methods();
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index f3a1e657cc..701b9e8144 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -178,6 +178,12 @@ public:
GIZMO_GRID_LAYER = 25
};
+ enum NavigationScheme {
+ NAVIGATION_GODOT,
+ NAVIGATION_MAYA,
+ NAVIGATION_MODO,
+ };
+
private:
int index;
String name;
@@ -260,12 +266,6 @@ private:
PopupMenu *selection_menu;
- enum NavigationScheme {
- NAVIGATION_GODOT,
- NAVIGATION_MAYA,
- NAVIGATION_MODO,
- };
-
enum NavigationZoomStyle {
NAVIGATION_ZOOM_VERTICAL,
NAVIGATION_ZOOM_HORIZONTAL
@@ -431,7 +431,8 @@ public:
class SpatialEditorViewportContainer : public Container {
- GDCLASS(SpatialEditorViewportContainer, Container)
+ GDCLASS(SpatialEditorViewportContainer, Container);
+
public:
enum View {
VIEW_USE_1_VIEWPORT,
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index 95d21b2c44..d31a28b3e4 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -56,7 +56,8 @@ public:
};
class EditorInspectorPluginStyleBox : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginStyleBox, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginStyleBox, EditorInspectorPlugin);
+
public:
virtual bool can_handle(Object *p_object);
virtual void parse_begin(Object *p_object);
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index e91909e0ea..277e93fd39 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -35,7 +35,7 @@
class TextEditor : public ScriptEditorBase {
- GDCLASS(TextEditor, ScriptEditorBase)
+ GDCLASS(TextEditor, ScriptEditorBase);
private:
CodeTextEditor *code_editor;
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index bcbda1fbd7..ed25783303 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -54,7 +54,8 @@ public:
};
class EditorInspectorPluginTexture : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorPluginTexture, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorPluginTexture, EditorInspectorPlugin);
+
public:
virtual bool can_handle(Object *p_object);
virtual void parse_begin(Object *p_object);
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 1176e1bb92..b417414ae0 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -46,7 +46,7 @@ class TileSetEditor : public HSplitContainer {
friend class TileSetEditorPlugin;
friend class TilesetEditorContext;
- GDCLASS(TileSetEditor, HSplitContainer)
+ GDCLASS(TileSetEditor, HSplitContainer);
enum TextureToolButtons {
TOOL_TILESET_ADD_TEXTURE,
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index a1b903576e..7d0c67b5ed 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -2350,7 +2350,7 @@ VisualShaderEditorPlugin::~VisualShaderEditorPlugin() {
////////////////
class VisualShaderNodePluginInputEditor : public OptionButton {
- GDCLASS(VisualShaderNodePluginInputEditor, OptionButton)
+ GDCLASS(VisualShaderNodePluginInputEditor, OptionButton);
Ref<VisualShaderNodeInput> input;
@@ -2395,7 +2395,8 @@ public:
};
class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
- GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer)
+ GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer);
+
public:
void _property_changed(const String &prop, const Variant &p_value, const String &p_field, bool p_changing = false) {
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 1b009b61d5..567706b808 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -42,7 +42,8 @@
class VisualShaderNodePlugin : public Reference {
- GDCLASS(VisualShaderNodePlugin, Reference)
+ GDCLASS(VisualShaderNodePlugin, Reference);
+
protected:
static void _bind_methods();
@@ -245,14 +246,14 @@ public:
class VisualShaderNodePluginDefault : public VisualShaderNodePlugin {
- GDCLASS(VisualShaderNodePluginDefault, VisualShaderNodePlugin)
+ GDCLASS(VisualShaderNodePluginDefault, VisualShaderNodePlugin);
public:
virtual Control *create_editor(const Ref<VisualShaderNode> &p_node);
};
class EditorPropertyShaderMode : public EditorProperty {
- GDCLASS(EditorPropertyShaderMode, EditorProperty)
+ GDCLASS(EditorPropertyShaderMode, EditorProperty);
OptionButton *options;
void _option_selected(int p_which);
@@ -268,7 +269,7 @@ public:
};
class EditorInspectorShaderModePlugin : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorShaderModePlugin, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorShaderModePlugin, EditorInspectorPlugin);
public:
virtual bool can_handle(Object *p_object);
@@ -278,7 +279,7 @@ public:
};
class VisualShaderNodePortPreview : public Control {
- GDCLASS(VisualShaderNodePortPreview, Control)
+ GDCLASS(VisualShaderNodePortPreview, Control);
Ref<VisualShader> shader;
VisualShader::Type type;
int node;
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 6a709d348b..a8ef1d6fc1 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -56,7 +56,7 @@ class PropertySelector;
class EditorResourceConversionPlugin : public Reference {
- GDCLASS(EditorResourceConversionPlugin, Reference)
+ GDCLASS(EditorResourceConversionPlugin, Reference);
protected:
static void _bind_methods();
diff --git a/editor/property_selector.h b/editor/property_selector.h
index cc5b1d4884..a6c1ec6498 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -36,7 +36,7 @@
#include "scene/gui/rich_text_label.h"
class PropertySelector : public ConfirmationDialog {
- GDCLASS(PropertySelector, ConfirmationDialog)
+ GDCLASS(PropertySelector, ConfirmationDialog);
LineEdit *search_box;
Tree *search_options;
diff --git a/editor/quick_open.h b/editor/quick_open.h
index 14d857fa1c..b6a2e50e88 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -37,7 +37,7 @@
#include "scene/gui/tree.h"
class EditorQuickOpen : public ConfirmationDialog {
- GDCLASS(EditorQuickOpen, ConfirmationDialog)
+ GDCLASS(EditorQuickOpen, ConfirmationDialog);
LineEdit *search_box;
Tree *search_options;
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index e8f5139cd5..a15ae2efda 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -269,7 +269,7 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
bool SceneTreeDock::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {
int childCount = p_desired_node->get_child_count();
- if (p_desired_node->get_filename() == p_target_scene_path) {
+ if (_track_inherit(p_target_scene_path, p_desired_node)) {
return true;
}
@@ -284,6 +284,33 @@ bool SceneTreeDock::_cyclical_dependency_exists(const String &p_target_scene_pat
return false;
}
+bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_desired_node) {
+ Node *p = p_desired_node;
+ bool result = false;
+ Vector<Node *> instances;
+ while (true) {
+ if (p->get_filename() == p_target_scene_path) {
+ result = true;
+ break;
+ }
+ Ref<SceneState> ss = p->get_scene_inherited_state();
+ if (ss.is_valid()) {
+ String path = ss->get_path();
+ Ref<PackedScene> data = ResourceLoader::load(path);
+ if (data.is_valid()) {
+ p = data->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
+ instances.push_back(p);
+ } else
+ break;
+ } else
+ break;
+ }
+ for (int i = 0; i < instances.size(); i++) {
+ memdelete(instances[i]);
+ }
+ return result;
+}
+
void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
current_option = p_tool;
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 9f9e93f2df..b645c22295 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -165,6 +165,7 @@ class SceneTreeDock : public VBoxContainer {
void _script_open_request(const Ref<Script> &p_script);
bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node);
+ bool _track_inherit(const String &p_target_scene_path, Node *p_desired_node);
void _node_selected();
void _node_renamed();
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 3b086c6316..3167abb745 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1121,10 +1121,13 @@ void ScriptEditorDebugger::_notification(int p_what) {
last_warning_count = warning_count;
}
- if (connection.is_null()) {
-
- if (server->is_connection_available()) {
-
+ if (server->is_connection_available()) {
+ if (connection.is_valid()) {
+ // We already have a valid connection. Disconnecting any new connecting client to prevent it from hanging.
+ // (If we don't keep a reference to the connection it will be destroyed and disconnect_from_host will be called internally)
+ server->take_connection();
+ } else {
+ // We just got the first connection.
connection = server->take_connection();
if (connection.is_null())
break;
@@ -1158,12 +1161,11 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (profiler->is_profiling()) {
_profiler_activate(true);
}
-
- } else {
-
- break;
}
- };
+ }
+
+ if (connection.is_null())
+ break;
if (!connection->is_connected_to_host()) {
stop();
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index 531887a452..a107fd738f 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -1017,8 +1017,8 @@ bool test_32() {
STRIP_TEST(String("abca").lstrip("a") == "bca");
STRIP_TEST(String("abc").rstrip("a") == "abc");
STRIP_TEST(String("abca").rstrip("a") == "abc");
- // in utf-8 "¿" has the same first byte as "µ"
- // and the same second as "ÿ"
+ // in utf-8 "¿" (\u00bf) has the same first byte as "µ" (\u00b5)
+ // and the same second as "ÿ" (\u00ff)
STRIP_TEST(String::utf8("¿").lstrip(String::utf8("µÿ")) == String::utf8("¿"));
STRIP_TEST(String::utf8("¿").rstrip(String::utf8("µÿ")) == String::utf8("¿"));
STRIP_TEST(String::utf8("µ¿ÿ").lstrip(String::utf8("µÿ")) == String::utf8("¿ÿ"));
@@ -1046,8 +1046,8 @@ bool test_32() {
STRIP_TEST(String("abca").lstrip("qwajkl") == "bca");
STRIP_TEST(String("abc").rstrip("qwajkl") == "abc");
STRIP_TEST(String("abca").rstrip("qwajkl") == "abc");
- // in utf-8 "¿" has the same first byte as "µ"
- // and the same second as "ÿ"
+ // in utf-8 "¿" (\u00bf) has the same first byte as "µ" (\u00b5)
+ // and the same second as "ÿ" (\u00ff)
STRIP_TEST(String::utf8("¿").lstrip(String::utf8("qwaµÿjkl")) == String::utf8("¿"));
STRIP_TEST(String::utf8("¿").rstrip(String::utf8("qwaµÿjkl")) == String::utf8("¿"));
STRIP_TEST(String::utf8("µ¿ÿ").lstrip(String::utf8("qwaµÿjkl")) == String::utf8("¿ÿ"));
@@ -1068,8 +1068,8 @@ bool test_33() {
bool test_34() {
OS::get_singleton()->print("\n\nTest 34: Cyrillic to_lower()\n");
- String upper = L"АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ";
- String lower = L"абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
+ String upper = String::utf8("АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ");
+ String lower = String::utf8("абвгдеёжзийклмнопрстуфхцчшщъыьэюя");
String test = upper.to_lower();
diff --git a/misc/ide/jetbrains/build.gradle b/misc/ide/jetbrains/build.gradle
index ffcd12cd15..eb2fbc0e69 100644
--- a/misc/ide/jetbrains/build.gradle
+++ b/misc/ide/jetbrains/build.gradle
@@ -23,7 +23,7 @@ dependencies {
def pathToRootDir = "../../../"
// Note: Only keep the abis you support to speed up the gradle 'assemble' task.
-def supportedAbis = ["armv6", "armv7", "arm64v8", "x86", "x86_64"]
+def supportedAbis = ["armv7", "arm64v8", "x86", "x86_64"]
android {
diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h
index 0b8ad53658..4c598c84f2 100644
--- a/modules/bullet/bullet_physics_server.h
+++ b/modules/bullet/bullet_physics_server.h
@@ -45,7 +45,7 @@
*/
class BulletPhysicsServer : public PhysicsServer {
- GDCLASS(BulletPhysicsServer, PhysicsServer)
+ GDCLASS(BulletPhysicsServer, PhysicsServer);
friend class BulletPhysicsDirectSpaceState;
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index 1e1bea846a..2c9bdb8b0b 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -54,7 +54,7 @@ class BulletPhysicsDirectBodyState;
/// created by BulletPhysicsServer and is held by the "singleton" variable of this class
/// Each time something require it, the body must be set again.
class BulletPhysicsDirectBodyState : public PhysicsDirectBodyState {
- GDCLASS(BulletPhysicsDirectBodyState, PhysicsDirectBodyState)
+ GDCLASS(BulletPhysicsDirectBodyState, PhysicsDirectBodyState);
static BulletPhysicsDirectBodyState *singleton;
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 6b3d65edf6..eb4a065e54 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -68,7 +68,8 @@ class btGjkEpaPenetrationDepthSolver;
extern ContactAddedCallback gContactAddedCallback;
class BulletPhysicsDirectSpaceState : public PhysicsDirectSpaceState {
- GDCLASS(BulletPhysicsDirectSpaceState, PhysicsDirectSpaceState)
+ GDCLASS(BulletPhysicsDirectSpaceState, PhysicsDirectSpaceState);
+
private:
SpaceBullet *space;
diff --git a/modules/csg/csg_gizmos.h b/modules/csg/csg_gizmos.h
index 0915d05111..d38dafc936 100644
--- a/modules/csg/csg_gizmos.h
+++ b/modules/csg/csg_gizmos.h
@@ -55,7 +55,8 @@ public:
};
class EditorPluginCSG : public EditorPlugin {
- GDCLASS(EditorPluginCSG, EditorPlugin)
+ GDCLASS(EditorPluginCSG, EditorPlugin);
+
public:
EditorPluginCSG(EditorNode *p_editor);
};
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 2171f27f96..553a7553c6 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -156,7 +156,8 @@ public:
VARIANT_ENUM_CAST(CSGShape::Operation)
class CSGCombiner : public CSGShape {
- GDCLASS(CSGCombiner, CSGShape)
+ GDCLASS(CSGCombiner, CSGShape);
+
private:
virtual CSGBrush *_build_brush();
@@ -165,7 +166,7 @@ public:
};
class CSGPrimitive : public CSGShape {
- GDCLASS(CSGPrimitive, CSGShape)
+ GDCLASS(CSGPrimitive, CSGShape);
private:
bool invert_faces;
@@ -182,7 +183,7 @@ public:
};
class CSGMesh : public CSGPrimitive {
- GDCLASS(CSGMesh, CSGPrimitive)
+ GDCLASS(CSGMesh, CSGPrimitive);
virtual CSGBrush *_build_brush();
@@ -204,7 +205,7 @@ public:
class CSGSphere : public CSGPrimitive {
- GDCLASS(CSGSphere, CSGPrimitive)
+ GDCLASS(CSGSphere, CSGPrimitive);
virtual CSGBrush *_build_brush();
Ref<Material> material;
@@ -237,7 +238,7 @@ public:
class CSGBox : public CSGPrimitive {
- GDCLASS(CSGBox, CSGPrimitive)
+ GDCLASS(CSGBox, CSGPrimitive);
virtual CSGBrush *_build_brush();
Ref<Material> material;
@@ -266,7 +267,7 @@ public:
class CSGCylinder : public CSGPrimitive {
- GDCLASS(CSGCylinder, CSGPrimitive)
+ GDCLASS(CSGCylinder, CSGPrimitive);
virtual CSGBrush *_build_brush();
Ref<Material> material;
@@ -303,7 +304,7 @@ public:
class CSGTorus : public CSGPrimitive {
- GDCLASS(CSGTorus, CSGPrimitive)
+ GDCLASS(CSGTorus, CSGPrimitive);
virtual CSGBrush *_build_brush();
Ref<Material> material;
@@ -340,7 +341,7 @@ public:
class CSGPolygon : public CSGPrimitive {
- GDCLASS(CSGPolygon, CSGPrimitive)
+ GDCLASS(CSGPolygon, CSGPrimitive);
public:
enum Mode {
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp
index 0a70ff535f..024e9ffc3b 100644
--- a/modules/cvtt/image_compress_cvtt.cpp
+++ b/modules/cvtt/image_compress_cvtt.cpp
@@ -145,7 +145,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS
int h = p_image->get_height();
bool is_ldr = (p_image->get_format() <= Image::FORMAT_RGBA8);
- bool is_hdr = (p_image->get_format() == Image::FORMAT_RGBH);
+ bool is_hdr = (p_image->get_format() >= Image::FORMAT_RH) && (p_image->get_format() <= Image::FORMAT_RGBE9995);
if (!is_ldr && !is_hdr) {
return; // Not a usable source format
@@ -175,6 +175,10 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS
bool is_signed = false;
if (is_hdr) {
+ if (p_image->get_format() != Image::FORMAT_RGBH) {
+ p_image->convert(Image::FORMAT_RGBH);
+ }
+
PoolVector<uint8_t>::Read rb = p_image->get_data().read();
const uint16_t *source_data = reinterpret_cast<const uint16_t *>(&rb[0]);
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index 957d0830cb..8dcb202314 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -38,7 +38,8 @@
class NetworkedMultiplayerENet : public NetworkedMultiplayerPeer {
- GDCLASS(NetworkedMultiplayerENet, NetworkedMultiplayerPeer)
+ GDCLASS(NetworkedMultiplayerENet, NetworkedMultiplayerPeer);
+
public:
enum CompressionMode {
COMPRESS_NONE,
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h
index e0e5b67849..651e5c8715 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.h
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.h
@@ -41,7 +41,7 @@
*/
class ARVRInterfaceGDNative : public ARVRInterface {
- GDCLASS(ARVRInterfaceGDNative, ARVRInterface)
+ GDCLASS(ARVRInterfaceGDNative, ARVRInterface);
void cleanup();
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 1590994ab4..005d1d2bff 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -45,7 +45,7 @@ class GDNativeLibraryResourceLoader;
class GDNative;
class GDNativeLibrary : public Resource {
- GDCLASS(GDNativeLibrary, Resource)
+ GDCLASS(GDNativeLibrary, Resource);
static Map<String, Vector<Ref<GDNative> > > *loaded_libraries;
@@ -137,7 +137,7 @@ struct GDNativeCallRegistry {
};
class GDNative : public Reference {
- GDCLASS(GDNative, Reference)
+ GDCLASS(GDNative, Reference);
Ref<GDNativeLibrary> library;
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index d60e3ae1ae..79a41df107 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -99,7 +99,7 @@ struct NativeScriptDesc {
};
class NativeScript : public Script {
- GDCLASS(NativeScript, Script)
+ GDCLASS(NativeScript, Script);
#ifdef TOOLS_ENABLED
Set<PlaceHolderScriptInstance *> placeholders;
@@ -370,7 +370,7 @@ inline NativeScriptDesc *NativeScript::get_script_desc() const {
}
class NativeReloadNode : public Node {
- GDCLASS(NativeReloadNode, Node)
+ GDCLASS(NativeReloadNode, Node);
bool unloaded;
public:
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.h b/modules/gdnative/net/multiplayer_peer_gdnative.h
index 7d48dc60d1..6fbc62aaa1 100644
--- a/modules/gdnative/net/multiplayer_peer_gdnative.h
+++ b/modules/gdnative/net/multiplayer_peer_gdnative.h
@@ -36,7 +36,7 @@
#include "modules/gdnative/include/net/godot_net.h"
class MultiplayerPeerGDNative : public NetworkedMultiplayerPeer {
- GDCLASS(MultiplayerPeerGDNative, NetworkedMultiplayerPeer)
+ GDCLASS(MultiplayerPeerGDNative, NetworkedMultiplayerPeer);
protected:
static void _bind_methods();
diff --git a/modules/gdnative/net/packet_peer_gdnative.h b/modules/gdnative/net/packet_peer_gdnative.h
index 742fa4e7d5..8483217210 100644
--- a/modules/gdnative/net/packet_peer_gdnative.h
+++ b/modules/gdnative/net/packet_peer_gdnative.h
@@ -36,7 +36,7 @@
#include "modules/gdnative/include/net/godot_net.h"
class PacketPeerGDNative : public PacketPeer {
- GDCLASS(PacketPeerGDNative, PacketPeer)
+ GDCLASS(PacketPeerGDNative, PacketPeer);
protected:
static void _bind_methods();
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 890bd730f7..6b9a97efb4 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -664,8 +664,10 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
}
if (mb->is_pressed()) {
-
- if (mb->get_button_index() == BUTTON_LEFT) {
+ SpatialEditorViewport::NavigationScheme nav_scheme = (SpatialEditorViewport::NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ if ((nav_scheme == SpatialEditorViewport::NAVIGATION_MAYA || nav_scheme == SpatialEditorViewport::NAVIGATION_MODO) && mb->get_alt()) {
+ input_action = INPUT_NONE;
+ } else if (mb->get_button_index() == BUTTON_LEFT) {
if (input_action == INPUT_PASTE) {
_do_paste();
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 7b16b5609e..64e3b40063 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -63,7 +63,7 @@ TScriptInstance *cast_script_instance(ScriptInstance *p_inst) {
class CSharpScript : public Script {
- GDCLASS(CSharpScript, Script)
+ GDCLASS(CSharpScript, Script);
friend class CSharpInstance;
friend class CSharpLanguage;
diff --git a/modules/mono/editor/godotsharp_editor.h b/modules/mono/editor/godotsharp_editor.h
index d9523c384c..4a28492bad 100644
--- a/modules/mono/editor/godotsharp_editor.h
+++ b/modules/mono/editor/godotsharp_editor.h
@@ -35,7 +35,7 @@
#include "monodevelop_instance.h"
class GodotSharpEditor : public Node {
- GDCLASS(GodotSharpEditor, Object)
+ GDCLASS(GodotSharpEditor, Object);
EditorNode *editor;
@@ -109,7 +109,7 @@ public:
};
class MonoReloadNode : public Node {
- GDCLASS(MonoReloadNode, Node)
+ GDCLASS(MonoReloadNode, Node);
Timer *reload_timer;
diff --git a/modules/mono/editor/mono_bottom_panel.h b/modules/mono/editor/mono_bottom_panel.h
index 406e46f7ce..9b362e51df 100644
--- a/modules/mono/editor/mono_bottom_panel.h
+++ b/modules/mono/editor/mono_bottom_panel.h
@@ -40,7 +40,7 @@ class MonoBuildTab;
class MonoBottomPanel : public VBoxContainer {
- GDCLASS(MonoBottomPanel, VBoxContainer)
+ GDCLASS(MonoBottomPanel, VBoxContainer);
EditorNode *editor;
@@ -87,7 +87,7 @@ public:
class MonoBuildTab : public VBoxContainer {
- GDCLASS(MonoBuildTab, VBoxContainer)
+ GDCLASS(MonoBuildTab, VBoxContainer);
public:
enum BuildResult {
diff --git a/modules/mono/mono_gc_handle.h b/modules/mono/mono_gc_handle.h
index 63b61aff18..60a1eed212 100644
--- a/modules/mono/mono_gc_handle.h
+++ b/modules/mono/mono_gc_handle.h
@@ -37,7 +37,7 @@
class MonoGCHandle : public Reference {
- GDCLASS(MonoGCHandle, Reference)
+ GDCLASS(MonoGCHandle, Reference);
bool released;
bool weak;
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 216c96a612..95340edcca 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -267,7 +267,7 @@ public:
(void)__gdmono__scope__exit__domain__unload__;
class _GodotSharp : public Object {
- GDCLASS(_GodotSharp, Object)
+ GDCLASS(_GodotSharp, Object);
friend class GDMono;
diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h
index 098008ded7..4fb3cdb56d 100644
--- a/modules/mono/signal_awaiter_utils.h
+++ b/modules/mono/signal_awaiter_utils.h
@@ -41,7 +41,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p
class SignalAwaiterHandle : public MonoGCHandle {
- GDCLASS(SignalAwaiterHandle, MonoGCHandle)
+ GDCLASS(SignalAwaiterHandle, MonoGCHandle);
bool completed;
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index 0d00ee154d..445bf974b8 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -40,7 +40,7 @@
#include "editor/property_editor.h"
class NoiseTexture : public Texture {
- GDCLASS(NoiseTexture, Texture)
+ GDCLASS(NoiseTexture, Texture);
private:
Ref<Image> data;
diff --git a/modules/opensimplex/open_simplex_noise.h b/modules/opensimplex/open_simplex_noise.h
index 96885f5893..c31cbf68c3 100644
--- a/modules/opensimplex/open_simplex_noise.h
+++ b/modules/opensimplex/open_simplex_noise.h
@@ -38,7 +38,7 @@
#include "thirdparty/misc/open-simplex-noise.h"
class OpenSimplexNoise : public Resource {
- GDCLASS(OpenSimplexNoise, Resource)
+ GDCLASS(OpenSimplexNoise, Resource);
OBJ_SAVE_TYPE(OpenSimplexNoise);
osn_context contexts[6];
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index f3c981dd45..a4a431bab7 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -221,7 +221,7 @@ if env['builtin_opus']:
env_opus.Prepend(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
if env["platform"] == "android":
- if ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
+ if ("android_arch" in env and env["android_arch"] == "armv7"):
env_opus.Append(CPPFLAGS=["-DOPUS_ARM_OPT"])
elif ("android_arch" in env and env["android_arch"] == "arm64v8"):
env_opus.Append(CPPFLAGS=["-DOPUS_ARM64_OPT"])
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index fd07e19e2e..04c2e9d9f0 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -43,7 +43,7 @@
class AudioStreamPlaybackOpus : public AudioStreamPlayback {
- GDCLASS(AudioStreamPlaybackOpus, AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackOpus, AudioStreamPlayback);
enum {
MIN_MIX = 1024
@@ -117,7 +117,7 @@ public:
class AudioStreamOpus : public AudioStream {
- GDCLASS(AudioStreamOpus, AudioStream)
+ GDCLASS(AudioStreamOpus, AudioStream);
String file;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index cbff9d47bb..c8c179554a 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -40,7 +40,7 @@ class AudioStreamOGGVorbis;
class AudioStreamPlaybackOGGVorbis : public AudioStreamPlaybackResampled {
- GDCLASS(AudioStreamPlaybackOGGVorbis, AudioStreamPlaybackResampled)
+ GDCLASS(AudioStreamPlaybackOGGVorbis, AudioStreamPlaybackResampled);
stb_vorbis *ogg_stream;
stb_vorbis_alloc ogg_alloc;
@@ -72,7 +72,7 @@ public:
class AudioStreamOGGVorbis : public AudioStream {
- GDCLASS(AudioStreamOGGVorbis, AudioStream)
+ GDCLASS(AudioStreamOGGVorbis, AudioStream);
OBJ_SAVE_TYPE(AudioStream) //children are all saved as AudioStream, so they can be exchanged
RES_BASE_EXTENSION("oggstr");
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.h b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
index d3d0574d56..8e4fbde916 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
@@ -35,7 +35,8 @@
#include "core/io/resource_importer.h"
class ResourceImporterOGGVorbis : public ResourceImporter {
- GDCLASS(ResourceImporterOGGVorbis, ResourceImporter)
+ GDCLASS(ResourceImporterOGGVorbis, ResourceImporter);
+
public:
virtual String get_importer_name() const;
virtual String get_visible_name() const;
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 89f32f54f7..098c28370d 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -39,7 +39,7 @@ class VisualScriptNodeInstance;
class VisualScript;
class VisualScriptNode : public Resource {
- GDCLASS(VisualScriptNode, Resource)
+ GDCLASS(VisualScriptNode, Resource);
friend class VisualScript;
@@ -165,7 +165,7 @@ public:
class VisualScript : public Script {
- GDCLASS(VisualScript, Script)
+ GDCLASS(VisualScript, Script);
RES_BASE_EXTENSION("vs");
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index 3e452cd94f..f009f49b5b 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -35,7 +35,8 @@
class VisualScriptBuiltinFunc : public VisualScriptNode {
- GDCLASS(VisualScriptBuiltinFunc, VisualScriptNode)
+ GDCLASS(VisualScriptBuiltinFunc, VisualScriptNode);
+
public:
enum BuiltinFunc {
MATH_SIN,
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 7c3bad6785..3ac170a935 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -46,7 +46,7 @@
#ifdef TOOLS_ENABLED
class VisualScriptEditorSignalEdit : public Object {
- GDCLASS(VisualScriptEditorSignalEdit, Object)
+ GDCLASS(VisualScriptEditorSignalEdit, Object);
StringName sig;
@@ -186,7 +186,7 @@ public:
class VisualScriptEditorVariableEdit : public Object {
- GDCLASS(VisualScriptEditorVariableEdit, Object)
+ GDCLASS(VisualScriptEditorVariableEdit, Object);
StringName var;
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index b66d10021a..4f302d1d72 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -44,7 +44,7 @@ class VisualScriptEditorVariableEdit;
#ifdef TOOLS_ENABLED
class VisualScriptEditor : public ScriptEditorBase {
- GDCLASS(VisualScriptEditor, ScriptEditorBase)
+ GDCLASS(VisualScriptEditor, ScriptEditorBase);
enum {
TYPE_SEQUENCE = 1000,
diff --git a/modules/visual_script/visual_script_expression.h b/modules/visual_script/visual_script_expression.h
index 3b2e3b9f78..3a045d2cf7 100644
--- a/modules/visual_script/visual_script_expression.h
+++ b/modules/visual_script/visual_script_expression.h
@@ -36,7 +36,7 @@
class VisualScriptExpression : public VisualScriptNode {
- GDCLASS(VisualScriptExpression, VisualScriptNode)
+ GDCLASS(VisualScriptExpression, VisualScriptNode);
friend class VisualScriptNodeInstanceExpression;
struct Input {
diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h
index a42605a50e..d3c7aa68e3 100644
--- a/modules/visual_script/visual_script_flow_control.h
+++ b/modules/visual_script/visual_script_flow_control.h
@@ -35,7 +35,7 @@
class VisualScriptReturn : public VisualScriptNode {
- GDCLASS(VisualScriptReturn, VisualScriptNode)
+ GDCLASS(VisualScriptReturn, VisualScriptNode);
Variant::Type type;
bool with_value;
@@ -72,7 +72,7 @@ public:
class VisualScriptCondition : public VisualScriptNode {
- GDCLASS(VisualScriptCondition, VisualScriptNode)
+ GDCLASS(VisualScriptCondition, VisualScriptNode);
protected:
static void _bind_methods();
@@ -100,7 +100,7 @@ public:
class VisualScriptWhile : public VisualScriptNode {
- GDCLASS(VisualScriptWhile, VisualScriptNode)
+ GDCLASS(VisualScriptWhile, VisualScriptNode);
protected:
static void _bind_methods();
@@ -128,7 +128,7 @@ public:
class VisualScriptIterator : public VisualScriptNode {
- GDCLASS(VisualScriptIterator, VisualScriptNode)
+ GDCLASS(VisualScriptIterator, VisualScriptNode);
protected:
static void _bind_methods();
@@ -156,7 +156,7 @@ public:
class VisualScriptSequence : public VisualScriptNode {
- GDCLASS(VisualScriptSequence, VisualScriptNode)
+ GDCLASS(VisualScriptSequence, VisualScriptNode);
int steps;
@@ -189,7 +189,7 @@ public:
class VisualScriptSwitch : public VisualScriptNode {
- GDCLASS(VisualScriptSwitch, VisualScriptNode)
+ GDCLASS(VisualScriptSwitch, VisualScriptNode);
struct Case {
Variant::Type type;
@@ -231,7 +231,7 @@ public:
class VisualScriptTypeCast : public VisualScriptNode {
- GDCLASS(VisualScriptTypeCast, VisualScriptNode)
+ GDCLASS(VisualScriptTypeCast, VisualScriptNode);
StringName base_type;
String script;
diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h
index 7b1e7871b6..11eb96293b 100644
--- a/modules/visual_script/visual_script_func_nodes.h
+++ b/modules/visual_script/visual_script_func_nodes.h
@@ -35,7 +35,8 @@
class VisualScriptFunctionCall : public VisualScriptNode {
- GDCLASS(VisualScriptFunctionCall, VisualScriptNode)
+ GDCLASS(VisualScriptFunctionCall, VisualScriptNode);
+
public:
enum CallMode {
CALL_MODE_SELF,
@@ -137,7 +138,8 @@ VARIANT_ENUM_CAST(VisualScriptFunctionCall::RPCCallMode);
class VisualScriptPropertySet : public VisualScriptNode {
- GDCLASS(VisualScriptPropertySet, VisualScriptNode)
+ GDCLASS(VisualScriptPropertySet, VisualScriptNode);
+
public:
enum CallMode {
CALL_MODE_SELF,
@@ -242,7 +244,8 @@ VARIANT_ENUM_CAST(VisualScriptPropertySet::AssignOp);
class VisualScriptPropertyGet : public VisualScriptNode {
- GDCLASS(VisualScriptPropertyGet, VisualScriptNode)
+ GDCLASS(VisualScriptPropertyGet, VisualScriptNode);
+
public:
enum CallMode {
CALL_MODE_SELF,
@@ -323,7 +326,7 @@ VARIANT_ENUM_CAST(VisualScriptPropertyGet::CallMode);
class VisualScriptEmitSignal : public VisualScriptNode {
- GDCLASS(VisualScriptEmitSignal, VisualScriptNode)
+ GDCLASS(VisualScriptEmitSignal, VisualScriptNode);
private:
StringName name;
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index b3d199fb38..762a1bdfb6 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -35,7 +35,7 @@
class VisualScriptFunction : public VisualScriptNode {
- GDCLASS(VisualScriptFunction, VisualScriptNode)
+ GDCLASS(VisualScriptFunction, VisualScriptNode);
struct Argument {
String name;
@@ -105,7 +105,7 @@ public:
class VisualScriptOperator : public VisualScriptNode {
- GDCLASS(VisualScriptOperator, VisualScriptNode)
+ GDCLASS(VisualScriptOperator, VisualScriptNode);
Variant::Type typed;
Variant::Operator op;
@@ -141,7 +141,7 @@ public:
class VisualScriptSelect : public VisualScriptNode {
- GDCLASS(VisualScriptSelect, VisualScriptNode)
+ GDCLASS(VisualScriptSelect, VisualScriptNode);
Variant::Type typed;
@@ -174,7 +174,7 @@ public:
class VisualScriptVariableGet : public VisualScriptNode {
- GDCLASS(VisualScriptVariableGet, VisualScriptNode)
+ GDCLASS(VisualScriptVariableGet, VisualScriptNode);
StringName variable;
@@ -207,7 +207,7 @@ public:
class VisualScriptVariableSet : public VisualScriptNode {
- GDCLASS(VisualScriptVariableSet, VisualScriptNode)
+ GDCLASS(VisualScriptVariableSet, VisualScriptNode);
StringName variable;
@@ -240,7 +240,7 @@ public:
class VisualScriptConstant : public VisualScriptNode {
- GDCLASS(VisualScriptConstant, VisualScriptNode)
+ GDCLASS(VisualScriptConstant, VisualScriptNode);
Variant::Type type;
Variant value;
@@ -277,7 +277,7 @@ public:
class VisualScriptPreload : public VisualScriptNode {
- GDCLASS(VisualScriptPreload, VisualScriptNode)
+ GDCLASS(VisualScriptPreload, VisualScriptNode);
Ref<Resource> preload;
@@ -309,7 +309,7 @@ public:
class VisualScriptIndexGet : public VisualScriptNode {
- GDCLASS(VisualScriptIndexGet, VisualScriptNode)
+ GDCLASS(VisualScriptIndexGet, VisualScriptNode);
public:
virtual int get_output_sequence_port_count() const;
@@ -333,7 +333,7 @@ public:
class VisualScriptIndexSet : public VisualScriptNode {
- GDCLASS(VisualScriptIndexSet, VisualScriptNode)
+ GDCLASS(VisualScriptIndexSet, VisualScriptNode);
public:
virtual int get_output_sequence_port_count() const;
@@ -357,7 +357,7 @@ public:
class VisualScriptGlobalConstant : public VisualScriptNode {
- GDCLASS(VisualScriptGlobalConstant, VisualScriptNode)
+ GDCLASS(VisualScriptGlobalConstant, VisualScriptNode);
int index;
@@ -388,7 +388,7 @@ public:
class VisualScriptClassConstant : public VisualScriptNode {
- GDCLASS(VisualScriptClassConstant, VisualScriptNode)
+ GDCLASS(VisualScriptClassConstant, VisualScriptNode);
StringName base_type;
StringName name;
@@ -425,7 +425,7 @@ public:
class VisualScriptBasicTypeConstant : public VisualScriptNode {
- GDCLASS(VisualScriptBasicTypeConstant, VisualScriptNode)
+ GDCLASS(VisualScriptBasicTypeConstant, VisualScriptNode);
Variant::Type type;
StringName name;
@@ -463,7 +463,8 @@ public:
class VisualScriptMathConstant : public VisualScriptNode {
- GDCLASS(VisualScriptMathConstant, VisualScriptNode)
+ GDCLASS(VisualScriptMathConstant, VisualScriptNode);
+
public:
enum MathConstant {
MATH_CONSTANT_ONE,
@@ -512,7 +513,7 @@ VARIANT_ENUM_CAST(VisualScriptMathConstant::MathConstant)
class VisualScriptEngineSingleton : public VisualScriptNode {
- GDCLASS(VisualScriptEngineSingleton, VisualScriptNode)
+ GDCLASS(VisualScriptEngineSingleton, VisualScriptNode);
String singleton;
@@ -545,7 +546,7 @@ public:
class VisualScriptSceneNode : public VisualScriptNode {
- GDCLASS(VisualScriptSceneNode, VisualScriptNode)
+ GDCLASS(VisualScriptSceneNode, VisualScriptNode);
NodePath path;
@@ -580,7 +581,7 @@ public:
class VisualScriptSceneTree : public VisualScriptNode {
- GDCLASS(VisualScriptSceneTree, VisualScriptNode)
+ GDCLASS(VisualScriptSceneTree, VisualScriptNode);
protected:
virtual void _validate_property(PropertyInfo &property) const;
@@ -610,7 +611,7 @@ public:
class VisualScriptResourcePath : public VisualScriptNode {
- GDCLASS(VisualScriptResourcePath, VisualScriptNode)
+ GDCLASS(VisualScriptResourcePath, VisualScriptNode);
String path;
@@ -642,7 +643,7 @@ public:
class VisualScriptSelf : public VisualScriptNode {
- GDCLASS(VisualScriptSelf, VisualScriptNode)
+ GDCLASS(VisualScriptSelf, VisualScriptNode);
protected:
static void _bind_methods();
@@ -671,7 +672,7 @@ public:
class VisualScriptCustomNode : public VisualScriptNode {
- GDCLASS(VisualScriptCustomNode, VisualScriptNode)
+ GDCLASS(VisualScriptCustomNode, VisualScriptNode);
protected:
static void _bind_methods();
@@ -719,7 +720,7 @@ VARIANT_ENUM_CAST(VisualScriptCustomNode::StartMode);
class VisualScriptSubCall : public VisualScriptNode {
- GDCLASS(VisualScriptSubCall, VisualScriptNode)
+ GDCLASS(VisualScriptSubCall, VisualScriptNode);
protected:
static void _bind_methods();
@@ -747,7 +748,7 @@ public:
class VisualScriptComment : public VisualScriptNode {
- GDCLASS(VisualScriptComment, VisualScriptNode)
+ GDCLASS(VisualScriptComment, VisualScriptNode);
String title;
String description;
@@ -788,7 +789,7 @@ public:
class VisualScriptConstructor : public VisualScriptNode {
- GDCLASS(VisualScriptConstructor, VisualScriptNode)
+ GDCLASS(VisualScriptConstructor, VisualScriptNode);
Variant::Type type;
MethodInfo constructor;
@@ -824,7 +825,7 @@ public:
class VisualScriptLocalVar : public VisualScriptNode {
- GDCLASS(VisualScriptLocalVar, VisualScriptNode)
+ GDCLASS(VisualScriptLocalVar, VisualScriptNode);
StringName name;
Variant::Type type;
@@ -860,7 +861,7 @@ public:
class VisualScriptLocalVarSet : public VisualScriptNode {
- GDCLASS(VisualScriptLocalVarSet, VisualScriptNode)
+ GDCLASS(VisualScriptLocalVarSet, VisualScriptNode);
StringName name;
Variant::Type type;
@@ -897,7 +898,8 @@ public:
class VisualScriptInputAction : public VisualScriptNode {
- GDCLASS(VisualScriptInputAction, VisualScriptNode)
+ GDCLASS(VisualScriptInputAction, VisualScriptNode);
+
public:
enum Mode {
MODE_PRESSED,
@@ -944,7 +946,7 @@ VARIANT_ENUM_CAST(VisualScriptInputAction::Mode)
class VisualScriptDeconstruct : public VisualScriptNode {
- GDCLASS(VisualScriptDeconstruct, VisualScriptNode)
+ GDCLASS(VisualScriptDeconstruct, VisualScriptNode);
struct Element {
StringName name;
diff --git a/modules/visual_script/visual_script_property_selector.h b/modules/visual_script/visual_script_property_selector.h
index 1588243bc1..6235e4ba1d 100644
--- a/modules/visual_script/visual_script_property_selector.h
+++ b/modules/visual_script/visual_script_property_selector.h
@@ -36,7 +36,7 @@
#include "scene/gui/rich_text_label.h"
class VisualScriptPropertySelector : public ConfirmationDialog {
- GDCLASS(VisualScriptPropertySelector, ConfirmationDialog)
+ GDCLASS(VisualScriptPropertySelector, ConfirmationDialog);
LineEdit *search_box;
Tree *search_options;
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h
index 851bf6aa74..647f2b1e2e 100644
--- a/modules/visual_script/visual_script_yield_nodes.h
+++ b/modules/visual_script/visual_script_yield_nodes.h
@@ -35,7 +35,8 @@
class VisualScriptYield : public VisualScriptNode {
- GDCLASS(VisualScriptYield, VisualScriptNode)
+ GDCLASS(VisualScriptYield, VisualScriptNode);
+
public:
enum YieldMode {
YIELD_RETURN,
@@ -84,7 +85,8 @@ VARIANT_ENUM_CAST(VisualScriptYield::YieldMode)
class VisualScriptYieldSignal : public VisualScriptNode {
- GDCLASS(VisualScriptYieldSignal, VisualScriptNode)
+ GDCLASS(VisualScriptYieldSignal, VisualScriptNode);
+
public:
enum CallMode {
CALL_MODE_SELF,
diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub
index a6be1380a6..c76585013c 100644
--- a/modules/webm/libvpx/SCsub
+++ b/modules/webm/libvpx/SCsub
@@ -384,8 +384,6 @@ elif webm_cpu_arm:
env_libvpx.add_source_files(env.modules_sources, [libvpx_dir + "third_party/android/cpu-features.c"])
env_libvpx_neon = env_libvpx.Clone()
- if env["platform"] == 'android' and env["android_arch"] == 'armv6':
- env_libvpx_neon.Append(CCFLAGS=['-mfpu=neon'])
env_libvpx_neon.add_source_files(env.modules_sources, libvpx_sources_arm_neon)
if env["platform"] == 'uwp':
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index 4e07c86775..ddcbb1eb08 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -41,7 +41,7 @@ class OpusVorbisDecoder;
class VideoStreamPlaybackWebm : public VideoStreamPlayback {
- GDCLASS(VideoStreamPlaybackWebm, VideoStreamPlayback)
+ GDCLASS(VideoStreamPlaybackWebm, VideoStreamPlayback);
String file_name;
int audio_track;
diff --git a/platform/android/SCsub b/platform/android/SCsub
index 22ed476c6f..1562714d76 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -37,9 +37,7 @@ android_objects.append(env_thirdparty.SharedObject('#thirdparty/misc/ifaddrs-and
lib = env_android.add_shared_library("#bin/libgodot", [android_objects], SHLIBSUFFIX=env["SHLIBSUFFIX"])
lib_arch_dir = ''
-if env['android_arch'] == 'armv6':
- lib_arch_dir = 'armeabi'
-elif env['android_arch'] == 'armv7':
+if env['android_arch'] == 'armv7':
lib_arch_dir = 'armeabi-v7a'
elif env['android_arch'] == 'arm64v8':
lib_arch_dir = 'arm64-v8a'
diff --git a/platform/android/detect.py b/platform/android/detect.py
index b7641172e4..eed51c4d30 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -26,7 +26,7 @@ def get_opts():
return [
('ANDROID_NDK_ROOT', 'Path to the Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)),
('ndk_platform', 'Target platform (android-<api>, e.g. "android-18")', "android-18"),
- EnumVariable('android_arch', 'Target architecture', "armv7", ('armv7', 'armv6', 'arm64v8', 'x86', 'x86_64')),
+ EnumVariable('android_arch', 'Target architecture', "armv7", ('armv7', 'arm64v8', 'x86', 'x86_64')),
BoolVariable('android_neon', 'Enable NEON support (armv7 only)', True),
BoolVariable('android_stl', 'Enable Android STL support (for modules)', True)
]
@@ -93,7 +93,7 @@ def configure(env):
## Architecture
- if env['android_arch'] not in ['armv7', 'armv6', 'arm64v8', 'x86', 'x86_64']:
+ if env['android_arch'] not in ['armv7', 'arm64v8', 'x86', 'x86_64']:
env['android_arch'] = 'armv7'
neon_text = ""
@@ -119,13 +119,6 @@ def configure(env):
abi_subpath = "x86_64-linux-android"
arch_subpath = "x86_64"
env["x86_libtheora_opt_gcc"] = True
- elif env['android_arch'] == 'armv6':
- env['ARCH'] = 'arch-arm'
- env.extra_suffix = ".armv6" + env.extra_suffix
- target_subpath = "arm-linux-androideabi-4.9"
- abi_subpath = "arm-linux-androideabi"
- arch_subpath = "armeabi"
- can_vectorize = False
elif env["android_arch"] == "armv7":
env['ARCH'] = 'arch-arm'
target_subpath = "arm-linux-androideabi-4.9"
@@ -249,11 +242,6 @@ def configure(env):
elif env['android_arch'] == 'x86_64':
target_opts = ['-target', 'x86_64-none-linux-android']
- elif env["android_arch"] == "armv6":
- target_opts = ['-target', 'armv6-none-linux-androideabi']
- env.Append(CCFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=softfp'.split())
- env.Append(CPPFLAGS=['-D__ARM_ARCH_6__'])
-
elif env["android_arch"] == "armv7":
target_opts = ['-target', 'armv7-none-linux-androideabi']
env.Append(CCFLAGS='-march=armv7-a -mfloat-abi=softfp'.split())
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 30267aa968..0bd82b769f 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -208,7 +208,7 @@ static const LauncherIcon launcher_icons[] = {
class EditorExportPlatformAndroid : public EditorExportPlatform {
- GDCLASS(EditorExportPlatformAndroid, EditorExportPlatform)
+ GDCLASS(EditorExportPlatformAndroid, EditorExportPlatform);
Ref<ImageTexture> logo;
Ref<ImageTexture> run_icon;
@@ -553,9 +553,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
static Vector<String> get_abis() {
Vector<String> abis;
- // We can still build armv6 in theory, but it doesn't make much
- // sense for games, so disabling for now.
- //abis.push_back("armeabi");
abis.push_back("armeabi-v7a");
abis.push_back("arm64-v8a");
abis.push_back("x86");
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 487da77b10..c68b420c61 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -40,7 +40,7 @@
class EditorExportPlatformJavaScript : public EditorExportPlatform {
- GDCLASS(EditorExportPlatformJavaScript, EditorExportPlatform)
+ GDCLASS(EditorExportPlatformJavaScript, EditorExportPlatform);
Ref<ImageTexture> logo;
Ref<ImageTexture> run_icon;
diff --git a/platform/x11/detect_prime.cpp b/platform/x11/detect_prime.cpp
index 0fde2a0c04..26008feade 100644
--- a/platform/x11/detect_prime.cpp
+++ b/platform/x11/detect_prime.cpp
@@ -159,10 +159,11 @@ int detect_prime() {
if (!stat_loc) {
// No need to do anything complicated here. Anything less than
// PIPE_BUF will be delivered in one read() call.
- read(fdset[0], string, sizeof(string) - 1);
-
- vendors[i] = string;
- renderers[i] = string + strlen(string) + 1;
+ // Leave it 'Unknown' otherwise.
+ if (read(fdset[0], string, sizeof(string) - 1) > 0) {
+ vendors[i] = string;
+ renderers[i] = string + strlen(string) + 1;
+ }
}
close(fdset[0]);
@@ -190,8 +191,9 @@ int detect_prime() {
memcpy(&string, vendor, vendor_len);
memcpy(&string[vendor_len], renderer, renderer_len);
- write(fdset[1], string, vendor_len + renderer_len);
-
+ if (write(fdset[1], string, vendor_len + renderer_len) == -1) {
+ print_verbose("Couldn't write vendor/renderer string.");
+ }
close(fdset[1]);
exit(0);
}
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index 3e9e8033e8..21c3b0ac91 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -414,7 +414,9 @@ void JoypadLinux::joypad_vibration_start(int p_id, float p_weak_magnitude, float
play.type = EV_FF;
play.code = effect.id;
play.value = 1;
- write(joy.fd, (const void *)&play, sizeof(play));
+ if (write(joy.fd, (const void *)&play, sizeof(play)) == -1) {
+ print_verbose("Couldn't write to Joypad device.");
+ }
joy.ff_effect_id = effect.id;
joy.ff_effect_timestamp = p_timestamp;
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index e9cdfa2303..ffa3d4edb4 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -37,7 +37,7 @@
class AudioStreamPlayer2D : public Node2D {
- GDCLASS(AudioStreamPlayer2D, Node2D)
+ GDCLASS(AudioStreamPlayer2D, Node2D);
private:
enum {
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index a020ab5029..1f585d84ce 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -46,7 +46,7 @@ class StyleBox;
class CanvasItemMaterial : public Material {
- GDCLASS(CanvasItemMaterial, Material)
+ GDCLASS(CanvasItemMaterial, Material);
public:
enum BlendMode {
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 8aa3330f37..4e7d01c8e6 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -36,7 +36,7 @@
class CollisionObject2D : public Node2D {
- GDCLASS(CollisionObject2D, Node2D)
+ GDCLASS(CollisionObject2D, Node2D);
bool area;
RID rid;
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index e913b4a866..26c61f47bd 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -38,7 +38,7 @@ class CollisionObject2D;
class CollisionShape2D : public Node2D {
- GDCLASS(CollisionShape2D, Node2D)
+ GDCLASS(CollisionShape2D, Node2D);
Ref<Shape2D> shape;
Rect2 rect;
uint32_t owner_id;
diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h
index 8a6f7b2dc5..11be5055d4 100644
--- a/scene/2d/line_2d.h
+++ b/scene/2d/line_2d.h
@@ -35,7 +35,7 @@
class Line2D : public Node2D {
- GDCLASS(Line2D, Node2D)
+ GDCLASS(Line2D, Node2D);
public:
enum LineJointMode {
diff --git a/scene/2d/mesh_instance_2d.h b/scene/2d/mesh_instance_2d.h
index 4d81c8088a..af552415ca 100644
--- a/scene/2d/mesh_instance_2d.h
+++ b/scene/2d/mesh_instance_2d.h
@@ -34,7 +34,7 @@
#include "scene/2d/node_2d.h"
class MeshInstance2D : public Node2D {
- GDCLASS(MeshInstance2D, Node2D)
+ GDCLASS(MeshInstance2D, Node2D);
Ref<Mesh> mesh;
diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h
index a0104b4b16..0276978f83 100644
--- a/scene/2d/particles_2d.h
+++ b/scene/2d/particles_2d.h
@@ -37,7 +37,7 @@
class Particles2D : public Node2D {
private:
- GDCLASS(Particles2D, Node2D)
+ GDCLASS(Particles2D, Node2D);
public:
enum DrawOrder {
diff --git a/scene/2d/position_2d.h b/scene/2d/position_2d.h
index ec73c02d2b..f5ec3ef01a 100644
--- a/scene/2d/position_2d.h
+++ b/scene/2d/position_2d.h
@@ -35,7 +35,7 @@
class Position2D : public Node2D {
- GDCLASS(Position2D, Node2D)
+ GDCLASS(Position2D, Node2D);
void _draw_cross();
diff --git a/scene/2d/skeleton_2d.h b/scene/2d/skeleton_2d.h
index d24c0a1561..0f48b44387 100644
--- a/scene/2d/skeleton_2d.h
+++ b/scene/2d/skeleton_2d.h
@@ -36,7 +36,7 @@
class Skeleton2D;
class Bone2D : public Node2D {
- GDCLASS(Bone2D, Node2D)
+ GDCLASS(Bone2D, Node2D);
friend class Skeleton2D;
#ifdef TOOLS_ENABLED
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 3557f0425c..4247266e3d 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -752,7 +752,7 @@ Area::Area() :
gravity_is_point = false;
gravity_distance_scale = 0;
linear_damp = 0.1;
- angular_damp = 1;
+ angular_damp = 0.1;
priority = 0;
monitoring = false;
monitorable = false;
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index 98bc74b2e4..7a652ed65f 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -40,7 +40,8 @@
class Camera;
class AudioStreamPlayer3D : public Spatial {
- GDCLASS(AudioStreamPlayer3D, Spatial)
+ GDCLASS(AudioStreamPlayer3D, Spatial);
+
public:
enum AttenuationModel {
ATTENUATION_INVERSE_DISTANCE,
diff --git a/scene/3d/spatial_velocity_tracker.h b/scene/3d/spatial_velocity_tracker.h
index 795f56091f..8260cf3f06 100644
--- a/scene/3d/spatial_velocity_tracker.h
+++ b/scene/3d/spatial_velocity_tracker.h
@@ -34,7 +34,7 @@
#include "scene/3d/spatial.h"
class SpatialVelocityTracker : public Reference {
- GDCLASS(SpatialVelocityTracker, Reference)
+ GDCLASS(SpatialVelocityTracker, Reference);
struct PositionHistory {
uint64_t frame;
diff --git a/scene/animation/animation_blend_space_1d.h b/scene/animation/animation_blend_space_1d.h
index dfac88b712..2e2d848450 100644
--- a/scene/animation/animation_blend_space_1d.h
+++ b/scene/animation/animation_blend_space_1d.h
@@ -34,7 +34,7 @@
#include "scene/animation/animation_tree.h"
class AnimationNodeBlendSpace1D : public AnimationRootNode {
- GDCLASS(AnimationNodeBlendSpace1D, AnimationRootNode)
+ GDCLASS(AnimationNodeBlendSpace1D, AnimationRootNode);
enum {
MAX_BLEND_POINTS = 64
diff --git a/scene/animation/animation_blend_space_2d.h b/scene/animation/animation_blend_space_2d.h
index c21360beb9..66ba9b0db7 100644
--- a/scene/animation/animation_blend_space_2d.h
+++ b/scene/animation/animation_blend_space_2d.h
@@ -34,7 +34,8 @@
#include "scene/animation/animation_tree.h"
class AnimationNodeBlendSpace2D : public AnimationRootNode {
- GDCLASS(AnimationNodeBlendSpace2D, AnimationRootNode)
+ GDCLASS(AnimationNodeBlendSpace2D, AnimationRootNode);
+
public:
enum BlendMode {
BLEND_MODE_INTERPOLATED,
diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h
index c16dcb1b8c..a6ef78d82e 100644
--- a/scene/animation/animation_blend_tree.h
+++ b/scene/animation/animation_blend_tree.h
@@ -322,7 +322,8 @@ public:
};
class AnimationNodeOutput : public AnimationNode {
- GDCLASS(AnimationNodeOutput, AnimationNode)
+ GDCLASS(AnimationNodeOutput, AnimationNode);
+
public:
virtual String get_caption() const;
virtual float process(float p_time, bool p_seek);
@@ -332,7 +333,7 @@ public:
/////
class AnimationNodeBlendTree : public AnimationRootNode {
- GDCLASS(AnimationNodeBlendTree, AnimationRootNode)
+ GDCLASS(AnimationNodeBlendTree, AnimationRootNode);
struct Node {
Ref<AnimationNode> node;
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index 60f8806b25..a2411743d4 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -599,6 +599,9 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) {
{
Ref<AnimationNode> node = states[p_name].node;
+
+ ERR_FAIL_COND(node.is_null());
+
node->disconnect("tree_changed", this, "_tree_changed");
}
diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h
index e47b940c35..26909a326e 100644
--- a/scene/animation/animation_node_state_machine.h
+++ b/scene/animation/animation_node_state_machine.h
@@ -34,7 +34,8 @@
#include "scene/animation/animation_tree.h"
class AnimationNodeStateMachineTransition : public Resource {
- GDCLASS(AnimationNodeStateMachineTransition, Resource)
+ GDCLASS(AnimationNodeStateMachineTransition, Resource);
+
public:
enum SwitchMode {
SWITCH_MODE_IMMEDIATE,
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index 4c65b2a92c..e22d6e4c2d 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -41,7 +41,8 @@ class AnimationPlayer;
class AnimationTree;
class AnimationNode : public Resource {
- GDCLASS(AnimationNode, Resource)
+ GDCLASS(AnimationNode, Resource);
+
public:
enum FilterAction {
FILTER_IGNORE,
@@ -155,13 +156,15 @@ VARIANT_ENUM_CAST(AnimationNode::FilterAction)
//root node does not allow inputs
class AnimationRootNode : public AnimationNode {
- GDCLASS(AnimationRootNode, AnimationNode)
+ GDCLASS(AnimationRootNode, AnimationNode);
+
public:
AnimationRootNode() {}
};
class AnimationTree : public Node {
- GDCLASS(AnimationTree, Node)
+ GDCLASS(AnimationTree, Node);
+
public:
enum AnimationProcessMode {
ANIMATION_PROCESS_PHYSICS,
diff --git a/scene/animation/root_motion_view.h b/scene/animation/root_motion_view.h
index bca265b1f0..07f51165a7 100644
--- a/scene/animation/root_motion_view.h
+++ b/scene/animation/root_motion_view.h
@@ -34,7 +34,8 @@
#include "scene/3d/visual_instance.h"
class RootMotionView : public VisualInstance {
- GDCLASS(RootMotionView, VisualInstance)
+ GDCLASS(RootMotionView, VisualInstance);
+
public:
RID immediate;
NodePath path;
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h
index 7987bd7e7d..ab9161c798 100644
--- a/scene/audio/audio_stream_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -36,7 +36,7 @@
class AudioStreamPlayer : public Node {
- GDCLASS(AudioStreamPlayer, Node)
+ GDCLASS(AudioStreamPlayer, Node);
public:
enum MixTarget {
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index abb3f58d6b..ef278d7406 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -138,7 +138,7 @@ VARIANT_ENUM_CAST(BaseButton::ActionMode)
class ButtonGroup : public Resource {
- GDCLASS(ButtonGroup, Resource)
+ GDCLASS(ButtonGroup, Resource);
friend class BaseButton;
Set<BaseButton *> buttons;
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index bca3471091..58a0762469 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -93,6 +93,28 @@ void ColorPicker::set_focus_on_line_edit() {
void ColorPicker::_update_controls() {
+ const char *rgb[3] = { "R", "G", "B" };
+ const char *hsv[3] = { "H", "S", "V" };
+
+ if (hsv_mode_enabled) {
+ for (int i = 0; i < 3; i++)
+ labels[i]->set_text(hsv[i]);
+ } else {
+ for (int i = 0; i < 3; i++)
+ labels[i]->set_text(rgb[i]);
+ }
+
+ if (hsv_mode_enabled) {
+ set_raw_mode(false);
+ btn_raw->set_disabled(true);
+ } else if (raw_mode_enabled) {
+ set_hsv_mode(false);
+ btn_hsv->set_disabled(true);
+ } else {
+ btn_raw->set_disabled(false);
+ btn_hsv->set_disabled(false);
+ }
+
if (edit_alpha) {
values[3]->show();
scroll[3]->show();
@@ -104,7 +126,7 @@ void ColorPicker::_update_controls() {
}
}
-void ColorPicker::set_pick_color(const Color &p_color) {
+void ColorPicker::_set_pick_color(const Color &p_color, bool p_update_sliders) {
color = p_color;
if (color != last_hsv) {
@@ -117,7 +139,12 @@ void ColorPicker::set_pick_color(const Color &p_color) {
if (!is_inside_tree())
return;
- _update_color();
+ _update_color(p_update_sliders);
+}
+
+void ColorPicker::set_pick_color(const Color &p_color) {
+
+ _set_pick_color(p_color, true); //because setters can't have more arguments
}
void ColorPicker::set_edit_alpha(bool p_show) {
@@ -142,11 +169,18 @@ void ColorPicker::_value_changed(double) {
if (updating)
return;
- for (int i = 0; i < 4; i++) {
- color.components[i] = scroll[i]->get_value() / (raw_mode_enabled ? 1.0 : 255.0);
+ if (hsv_mode_enabled) {
+ color.set_hsv(scroll[0]->get_value() / 360.0,
+ scroll[1]->get_value() / 100.0,
+ scroll[2]->get_value() / 100.0,
+ scroll[3]->get_value() / 100.0);
+ } else {
+ for (int i = 0; i < 4; i++) {
+ color.components[i] = scroll[i]->get_value() / (raw_mode_enabled ? 1.0 : 255.0);
+ }
}
- set_pick_color(color);
+ _set_pick_color(color, false);
emit_signal("color_changed", color);
}
@@ -167,22 +201,40 @@ void ColorPicker::_html_entered(const String &p_html) {
emit_signal("color_changed", color);
}
-void ColorPicker::_update_color() {
+void ColorPicker::_update_color(bool p_update_sliders) {
updating = true;
- for (int i = 0; i < 4; i++) {
- if (raw_mode_enabled) {
- scroll[i]->set_step(0.01);
- scroll[i]->set_max(100);
- if (i == 3)
- scroll[i]->set_max(1);
- scroll[i]->set_value(color.components[i]);
+ if (p_update_sliders) {
+
+ if (hsv_mode_enabled) {
+ for (int i = 0; i < 4; i++) {
+ scroll[i]->set_step(0.1);
+ }
+
+ scroll[0]->set_max(360);
+ scroll[0]->set_value(h * 360.0);
+ scroll[1]->set_max(100);
+ scroll[1]->set_value(s * 100.0);
+ scroll[2]->set_max(100);
+ scroll[2]->set_value(v * 100.0);
+ scroll[3]->set_max(100);
+ scroll[3]->set_value(color.components[3] * 100.0);
} else {
- scroll[i]->set_step(1);
- const float byte_value = color.components[i] * 255.0;
- scroll[i]->set_max(next_power_of_2(MAX(255, byte_value)) - 1);
- scroll[i]->set_value(byte_value);
+ for (int i = 0; i < 4; i++) {
+ if (raw_mode_enabled) {
+ scroll[i]->set_step(0.01);
+ scroll[i]->set_max(100);
+ if (i == 3)
+ scroll[i]->set_max(1);
+ scroll[i]->set_value(color.components[i]);
+ } else {
+ scroll[i]->set_step(1);
+ const float byte_value = color.components[i] * 255.0;
+ scroll[i]->set_max(next_power_of_2(MAX(255, byte_value)) - 1);
+ scroll[i]->set_value(byte_value);
+ }
+ }
}
}
@@ -272,13 +324,33 @@ PoolColorArray ColorPicker::get_presets() const {
return arr;
}
+void ColorPicker::set_hsv_mode(bool p_enabled) {
+
+ if (hsv_mode_enabled == p_enabled || raw_mode_enabled)
+ return;
+ hsv_mode_enabled = p_enabled;
+ if (btn_hsv->is_pressed() != p_enabled)
+ btn_hsv->set_pressed(p_enabled);
+
+ if (!is_inside_tree())
+ return;
+
+ _update_controls();
+ _update_color();
+}
+
+bool ColorPicker::is_hsv_mode() const {
+
+ return hsv_mode_enabled;
+}
+
void ColorPicker::set_raw_mode(bool p_enabled) {
- if (raw_mode_enabled == p_enabled)
+ if (raw_mode_enabled == p_enabled || hsv_mode_enabled)
return;
raw_mode_enabled = p_enabled;
- if (btn_mode->is_pressed() != p_enabled)
- btn_mode->set_pressed(p_enabled);
+ if (btn_raw->is_pressed() != p_enabled)
+ btn_raw->set_pressed(p_enabled);
if (!is_inside_tree())
return;
@@ -592,6 +664,8 @@ void ColorPicker::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pick_color", "color"), &ColorPicker::set_pick_color);
ClassDB::bind_method(D_METHOD("get_pick_color"), &ColorPicker::get_pick_color);
+ ClassDB::bind_method(D_METHOD("set_hsv_mode", "mode"), &ColorPicker::set_hsv_mode);
+ ClassDB::bind_method(D_METHOD("is_hsv_mode"), &ColorPicker::is_hsv_mode);
ClassDB::bind_method(D_METHOD("set_raw_mode", "mode"), &ColorPicker::set_raw_mode);
ClassDB::bind_method(D_METHOD("is_raw_mode"), &ColorPicker::is_raw_mode);
ClassDB::bind_method(D_METHOD("set_deferred_mode", "mode"), &ColorPicker::set_deferred_mode);
@@ -623,6 +697,7 @@ void ColorPicker::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_pick_color", "get_pick_color");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "edit_alpha"), "set_edit_alpha", "is_editing_alpha");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hsv_mode"), "set_hsv_mode", "is_hsv_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "raw_mode"), "set_raw_mode", "is_raw_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "deferred_mode"), "set_deferred_mode", "is_deferred_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "presets_enabled"), "set_presets_enabled", "are_presets_enabled");
@@ -639,6 +714,7 @@ ColorPicker::ColorPicker() :
updating = true;
edit_alpha = true;
text_is_constructor = false;
+ hsv_mode_enabled = false;
raw_mode_enabled = false;
deferred_mode_enabled = false;
changing_color = false;
@@ -689,13 +765,12 @@ ColorPicker::ColorPicker() :
VBoxContainer *vbr = memnew(VBoxContainer);
add_child(vbr);
vbr->set_h_size_flags(SIZE_EXPAND_FILL);
- const char *lt[4] = { "R", "G", "B", "A" };
for (int i = 0; i < 4; i++) {
HBoxContainer *hbc = memnew(HBoxContainer);
- labels[i] = memnew(Label(lt[i]));
+ labels[i] = memnew(Label());
labels[i]->set_custom_minimum_size(Size2(get_constant("label_width"), 0));
labels[i]->set_v_size_flags(SIZE_SHRINK_CENTER);
hbc->add_child(labels[i]);
@@ -719,14 +794,20 @@ ColorPicker::ColorPicker() :
vbr->add_child(hbc);
}
+ labels[3]->set_text("A");
HBoxContainer *hhb = memnew(HBoxContainer);
vbr->add_child(hhb);
- btn_mode = memnew(CheckButton);
- hhb->add_child(btn_mode);
- btn_mode->set_text(TTR("Raw Mode"));
- btn_mode->connect("toggled", this, "set_raw_mode");
+ btn_hsv = memnew(CheckButton);
+ hhb->add_child(btn_hsv);
+ btn_hsv->set_text(TTR("HSV"));
+ btn_hsv->connect("toggled", this, "set_hsv_mode");
+
+ btn_raw = memnew(CheckButton);
+ hhb->add_child(btn_raw);
+ btn_raw->set_text(TTR("Raw"));
+ btn_raw->connect("toggled", this, "set_raw_mode");
text_type = memnew(Button);
hhb->add_child(text_type);
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index b5ddf2d0c2..3af27a9856 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -58,7 +58,8 @@ private:
Button *bt_add_preset;
List<Color> presets;
ToolButton *btn_pick;
- CheckButton *btn_mode;
+ CheckButton *btn_hsv;
+ CheckButton *btn_raw;
HSlider *scroll[4];
SpinBox *values[4];
Label *labels[4];
@@ -70,6 +71,7 @@ private:
Color color;
bool raw_mode_enabled;
+ bool hsv_mode_enabled;
bool deferred_mode_enabled;
bool updating;
bool changing_color;
@@ -81,7 +83,7 @@ private:
void _html_entered(const String &p_html);
void _value_changed(double);
void _update_controls();
- void _update_color();
+ void _update_color(bool p_update_sliders = true);
void _update_presets();
void _update_text_value();
void _text_type_toggled();
@@ -106,6 +108,7 @@ public:
void set_edit_alpha(bool p_show);
bool is_editing_alpha() const;
+ void _set_pick_color(const Color &p_color, bool p_update_sliders);
void set_pick_color(const Color &p_color);
Color get_pick_color() const;
@@ -113,6 +116,9 @@ public:
void erase_preset(const Color &p_color);
PoolColorArray get_presets() const;
+ void set_hsv_mode(bool p_enabled);
+ bool is_hsv_mode() const;
+
void set_raw_mode(bool p_enabled);
bool is_raw_mode() const;
diff --git a/scene/gui/color_rect.h b/scene/gui/color_rect.h
index d7f9ef275d..7a7bbe1029 100644
--- a/scene/gui/color_rect.h
+++ b/scene/gui/color_rect.h
@@ -34,7 +34,7 @@
#include "scene/gui/control.h"
class ColorRect : public Control {
- GDCLASS(ColorRect, Control)
+ GDCLASS(ColorRect, Control);
Color color;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 89f3d509d0..4da11b671e 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -406,12 +406,20 @@ 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;
}
+void AcceptDialog::set_autowrap(bool p_autowrap) {
+
+ label->set_autowrap(p_autowrap);
+}
+bool AcceptDialog::has_autowrap() {
+
+ return label->has_autowrap();
+}
+
void AcceptDialog::register_text_enter(Node *p_line_edit) {
ERR_FAIL_NULL(p_line_edit);
@@ -530,6 +538,8 @@ void AcceptDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_custom_action"), &AcceptDialog::_custom_action);
ClassDB::bind_method(D_METHOD("set_text", "text"), &AcceptDialog::set_text);
ClassDB::bind_method(D_METHOD("get_text"), &AcceptDialog::get_text);
+ ClassDB::bind_method(D_METHOD("set_autowrap", "autowrap"), &AcceptDialog::set_autowrap);
+ ClassDB::bind_method(D_METHOD("has_autowrap"), &AcceptDialog::has_autowrap);
ADD_SIGNAL(MethodInfo("confirmed"));
ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING, "action")));
@@ -537,6 +547,7 @@ void AcceptDialog::_bind_methods() {
ADD_GROUP("Dialog", "dialog");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "dialog_text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dialog_hide_on_ok"), "set_hide_on_ok", "get_hide_on_ok");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dialog_autowrap"), "set_autowrap", "has_autowrap");
}
bool AcceptDialog::swap_ok_cancel = false;
@@ -555,7 +566,6 @@ AcceptDialog::AcceptDialog() {
label->set_anchor(MARGIN_BOTTOM, ANCHOR_END);
label->set_begin(Point2(margin, margin));
label->set_end(Point2(-margin, -button_margin - 10));
- //label->set_autowrap(true);
add_child(label);
hbc = memnew(HBoxContainer);
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index 4b89ac54c5..c1a7f26a85 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -145,6 +145,9 @@ public:
void set_text(String p_text);
String get_text() const;
+ void set_autowrap(bool p_autowrap);
+ bool has_autowrap();
+
AcceptDialog();
~AcceptDialog();
};
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 3c1ca09a9f..97838e19a3 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -35,7 +35,7 @@
class SplitContainer : public Container {
- GDCLASS(SplitContainer, Container)
+ GDCLASS(SplitContainer, Container);
public:
enum DraggerVisibility {
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 0c26602d2b..3e852deda6 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -40,7 +40,7 @@ class SyntaxHighlighter;
class TextEdit : public Control {
- GDCLASS(TextEdit, Control)
+ GDCLASS(TextEdit, Control);
public:
struct HighlighterInfo {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index c02873cdeb..f8a0db18b1 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -172,14 +172,16 @@ ViewportTexture::~ViewportTexture() {
class TooltipPanel : public PanelContainer {
- GDCLASS(TooltipPanel, PanelContainer)
+ GDCLASS(TooltipPanel, PanelContainer);
+
public:
TooltipPanel(){};
};
class TooltipLabel : public Label {
- GDCLASS(TooltipLabel, Label)
+ GDCLASS(TooltipLabel, Label);
+
public:
TooltipLabel(){};
};
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index e4da659b0d..1ca643cd7a 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1425,7 +1425,9 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
TransformTrack *tt = static_cast<TransformTrack *>(t);
ERR_FAIL_INDEX(p_key_idx, tt->transforms.size());
+
Dictionary d = p_value;
+
if (d.has("location"))
tt->transforms.write[p_key_idx].value.loc = d["location"];
if (d.has("rotation"))
@@ -1438,6 +1440,7 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
ValueTrack *vt = static_cast<ValueTrack *>(t);
ERR_FAIL_INDEX(p_key_idx, vt->values.size());
+
vt->values.write[p_key_idx].value = p_value;
} break;
@@ -1445,11 +1448,14 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
MethodTrack *mt = static_cast<MethodTrack *>(t);
ERR_FAIL_INDEX(p_key_idx, mt->methods.size());
+
Dictionary d = p_value;
+
if (d.has("method"))
mt->methods.write[p_key_idx].method = d["method"];
if (d.has("args"))
mt->methods.write[p_key_idx].params = d["args"];
+
} break;
case TYPE_BEZIER: {
@@ -1469,6 +1475,7 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
case TYPE_AUDIO: {
AudioTrack *at = static_cast<AudioTrack *>(t);
+ ERR_FAIL_INDEX(p_key_idx, at->values.size());
Dictionary k = p_value;
ERR_FAIL_COND(!k.has("start_offset"));
@@ -1483,6 +1490,7 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
case TYPE_ANIMATION: {
AnimationTrack *at = static_cast<AnimationTrack *>(t);
+ ERR_FAIL_INDEX(p_key_idx, at->values.size());
at->values.write[p_key_idx].value = p_value;
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index d4c5511f34..bb25b60835 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -37,7 +37,7 @@ class AudioStreamSample;
class AudioStreamPlaybackSample : public AudioStreamPlayback {
- GDCLASS(AudioStreamPlaybackSample, AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackSample, AudioStreamPlayback);
enum {
MIX_FRAC_BITS = 13,
MIX_FRAC_LEN = (1 << MIX_FRAC_BITS),
@@ -81,7 +81,7 @@ public:
};
class AudioStreamSample : public AudioStream {
- GDCLASS(AudioStreamSample, AudioStream)
+ GDCLASS(AudioStreamSample, AudioStream);
RES_BASE_EXTENSION("sample")
public:
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index 911a440567..bb12baca48 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -35,7 +35,8 @@
// y(x) curve
class Curve : public Resource {
- GDCLASS(Curve, Resource)
+ GDCLASS(Curve, Resource);
+
public:
static const int MIN_X = 0.f;
static const int MAX_X = 1.f;
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index 8d60ea1798..d0a709a2d3 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -110,7 +110,7 @@ VARIANT_ENUM_CAST(DynamicFontData::Hinting);
class DynamicFontAtSize : public Reference {
- GDCLASS(DynamicFontAtSize, Reference)
+ GDCLASS(DynamicFontAtSize, Reference);
_THREAD_SAFE_CLASS_
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 29b45f769b..17e52527b3 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -43,7 +43,7 @@
class Material : public Resource {
- GDCLASS(Material, Resource)
+ GDCLASS(Material, Resource);
RES_BASE_EXTENSION("material")
OBJ_SAVE_TYPE(Material)
@@ -111,7 +111,7 @@ public:
class SpatialMaterial : public Material {
- GDCLASS(SpatialMaterial, Material)
+ GDCLASS(SpatialMaterial, Material);
public:
enum TextureParam {
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index 8b3248a9cb..42bf60ff48 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -36,7 +36,7 @@
class ParticlesMaterial : public Material {
- GDCLASS(ParticlesMaterial, Material)
+ GDCLASS(ParticlesMaterial, Material);
public:
enum Parameter {
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index 0045a48736..312899c028 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -269,7 +269,7 @@ public:
class QuadMesh : public PrimitiveMesh {
- GDCLASS(QuadMesh, PrimitiveMesh)
+ GDCLASS(QuadMesh, PrimitiveMesh);
private:
Size2 size;
diff --git a/scene/resources/text_file.h b/scene/resources/text_file.h
index 91bb98a3b1..7127eaeb93 100644
--- a/scene/resources/text_file.h
+++ b/scene/resources/text_file.h
@@ -36,7 +36,7 @@
class TextFile : public Resource {
- GDCLASS(TextFile, Resource)
+ GDCLASS(TextFile, Resource);
private:
String text;
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 59d243484d..eb7a9ff25c 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -469,7 +469,7 @@ VARIANT_ENUM_CAST(CubeMap::Storage)
class TextureLayered : public Resource {
- GDCLASS(TextureLayered, Resource)
+ GDCLASS(TextureLayered, Resource);
public:
enum Flags {
@@ -521,7 +521,8 @@ VARIANT_ENUM_CAST(TextureLayered::Flags)
class Texture3D : public TextureLayered {
- GDCLASS(Texture3D, TextureLayered)
+ GDCLASS(Texture3D, TextureLayered);
+
public:
Texture3D() :
TextureLayered(true) {}
@@ -529,7 +530,8 @@ public:
class TextureArray : public TextureLayered {
- GDCLASS(TextureArray, TextureLayered)
+ GDCLASS(TextureArray, TextureLayered);
+
public:
TextureArray() :
TextureLayered(false) {}
@@ -551,7 +553,7 @@ public:
class CurveTexture : public Texture {
- GDCLASS(CurveTexture, Texture)
+ GDCLASS(CurveTexture, Texture);
RES_BASE_EXTENSION("curvetex")
private:
@@ -599,7 +601,7 @@ public:
//VARIANT_ENUM_CAST( Texture::CubeMapSide );
class GradientTexture : public Texture {
- GDCLASS(GradientTexture, Texture)
+ GDCLASS(GradientTexture, Texture);
public:
struct Point {
@@ -644,7 +646,7 @@ public:
};
class ProxyTexture : public Texture {
- GDCLASS(ProxyTexture, Texture)
+ GDCLASS(ProxyTexture, Texture);
private:
RID proxy;
@@ -671,7 +673,7 @@ public:
};
class AnimatedTexture : public Texture {
- GDCLASS(AnimatedTexture, Texture)
+ GDCLASS(AnimatedTexture, Texture);
//use readers writers lock for this, since its far more times read than written to
RWLock *rw_lock;
@@ -740,7 +742,7 @@ public:
};
class CameraTexture : public Texture {
- GDCLASS(CameraTexture, Texture)
+ GDCLASS(CameraTexture, Texture);
private:
int camera_feed_id;
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 838c2c618d..1ab3c0c9cc 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -39,7 +39,8 @@ class VisualShaderNodeUniform;
class VisualShaderNode;
class VisualShader : public Shader {
- GDCLASS(VisualShader, Shader)
+ GDCLASS(VisualShader, Shader);
+
public:
enum Type {
TYPE_VERTEX,
@@ -163,7 +164,7 @@ VARIANT_ENUM_CAST(VisualShader::Type)
///
class VisualShaderNode : public Resource {
- GDCLASS(VisualShaderNode, Resource)
+ GDCLASS(VisualShaderNode, Resource);
int port_preview;
@@ -215,7 +216,7 @@ public:
/////
class VisualShaderNodeInput : public VisualShaderNode {
- GDCLASS(VisualShaderNodeInput, VisualShaderNode)
+ GDCLASS(VisualShaderNodeInput, VisualShaderNode);
friend class VisualShader;
VisualShader::Type shader_type;
@@ -268,7 +269,8 @@ public:
///
class VisualShaderNodeOutput : public VisualShaderNode {
- GDCLASS(VisualShaderNodeOutput, VisualShaderNode)
+ GDCLASS(VisualShaderNodeOutput, VisualShaderNode);
+
public:
friend class VisualShader;
VisualShader::Type shader_type;
@@ -304,7 +306,7 @@ public:
};
class VisualShaderNodeUniform : public VisualShaderNode {
- GDCLASS(VisualShaderNodeUniform, VisualShaderNode)
+ GDCLASS(VisualShaderNodeUniform, VisualShaderNode);
String uniform_name;
@@ -319,7 +321,8 @@ public:
};
class VisualShaderNodeGroupBase : public VisualShaderNode {
- GDCLASS(VisualShaderNodeGroupBase, VisualShaderNode)
+ GDCLASS(VisualShaderNodeGroupBase, VisualShaderNode);
+
private:
void _apply_port_changes();
@@ -386,7 +389,7 @@ public:
};
class VisualShaderNodeExpression : public VisualShaderNodeGroupBase {
- GDCLASS(VisualShaderNodeExpression, VisualShaderNodeGroupBase)
+ GDCLASS(VisualShaderNodeExpression, VisualShaderNodeGroupBase);
private:
String expression;
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index 852248b9b4..df753276e4 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -38,7 +38,7 @@
///////////////////////////////////////
class VisualShaderNodeScalarConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarConstant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarConstant, VisualShaderNode);
float constant;
protected:
@@ -68,7 +68,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeBooleanConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeBooleanConstant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeBooleanConstant, VisualShaderNode);
bool constant;
protected:
@@ -98,7 +98,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeColorConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeColorConstant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeColorConstant, VisualShaderNode);
Color constant;
protected:
@@ -128,7 +128,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVec3Constant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVec3Constant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVec3Constant, VisualShaderNode);
Vector3 constant;
protected:
@@ -158,7 +158,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeTransformConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformConstant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformConstant, VisualShaderNode);
Transform constant;
protected:
@@ -190,7 +190,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeTexture : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTexture, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTexture, VisualShaderNode);
Ref<Texture> texture;
public:
@@ -251,7 +251,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeTexture::Source)
///////////////////////////////////////
class VisualShaderNodeCubeMap : public VisualShaderNode {
- GDCLASS(VisualShaderNodeCubeMap, VisualShaderNode)
+ GDCLASS(VisualShaderNodeCubeMap, VisualShaderNode);
Ref<CubeMap> cube_map;
public:
@@ -300,7 +300,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeCubeMap::TextureType)
///////////////////////////////////////
class VisualShaderNodeScalarOp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarOp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarOp, VisualShaderNode);
public:
enum Operator {
@@ -345,7 +345,7 @@ public:
VARIANT_ENUM_CAST(VisualShaderNodeScalarOp::Operator)
class VisualShaderNodeVectorOp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorOp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorOp, VisualShaderNode);
public:
enum Operator {
@@ -394,7 +394,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeVectorOp::Operator)
///////////////////////////////////////
class VisualShaderNodeColorOp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeColorOp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeColorOp, VisualShaderNode);
public:
enum Operator {
@@ -442,7 +442,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeColorOp::Operator)
///////////////////////////////////////
class VisualShaderNodeTransformMult : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformMult, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformMult, VisualShaderNode);
public:
enum Operator {
@@ -485,7 +485,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeTransformMult::Operator)
///////////////////////////////////////
class VisualShaderNodeTransformVecMult : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformVecMult, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformVecMult, VisualShaderNode);
public:
enum Operator {
@@ -528,7 +528,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeTransformVecMult::Operator)
///////////////////////////////////////
class VisualShaderNodeScalarFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarFunc, VisualShaderNode);
public:
enum Function {
@@ -599,7 +599,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeScalarFunc::Function)
///////////////////////////////////////
class VisualShaderNodeVectorFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorFunc, VisualShaderNode);
public:
enum Function {
@@ -673,7 +673,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeVectorFunc::Function)
///////////////////////////////////////
class VisualShaderNodeColorFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeColorFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeColorFunc, VisualShaderNode);
public:
enum Function {
@@ -714,7 +714,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeColorFunc::Function)
///////////////////////////////////////
class VisualShaderNodeTransformFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformFunc, VisualShaderNode);
public:
enum Function {
@@ -755,7 +755,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeTransformFunc::Function)
///////////////////////////////////////
class VisualShaderNodeDotProduct : public VisualShaderNode {
- GDCLASS(VisualShaderNodeDotProduct, VisualShaderNode)
+ GDCLASS(VisualShaderNodeDotProduct, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -778,7 +778,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorLen : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorLen, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorLen, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -801,7 +801,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeDeterminant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeDeterminant, VisualShaderNode)
+ GDCLASS(VisualShaderNodeDeterminant, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -824,7 +824,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeScalarClamp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarClamp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarClamp, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -845,7 +845,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorClamp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorClamp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorClamp, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -868,7 +868,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeScalarDerivativeFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarDerivativeFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarDerivativeFunc, VisualShaderNode);
public:
enum Function {
@@ -908,7 +908,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeScalarDerivativeFunc::Function)
///////////////////////////////////////
class VisualShaderNodeVectorDerivativeFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorDerivativeFunc, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorDerivativeFunc, VisualShaderNode);
public:
enum Function {
@@ -950,7 +950,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeVectorDerivativeFunc::Function)
///////////////////////////////////////
class VisualShaderNodeFaceForward : public VisualShaderNode {
- GDCLASS(VisualShaderNodeFaceForward, VisualShaderNode)
+ GDCLASS(VisualShaderNodeFaceForward, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -973,7 +973,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeOuterProduct : public VisualShaderNode {
- GDCLASS(VisualShaderNodeOuterProduct, VisualShaderNode)
+ GDCLASS(VisualShaderNodeOuterProduct, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -996,7 +996,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorScalarStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorScalarStep, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorScalarStep, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1019,7 +1019,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeScalarSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarSmoothStep, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarSmoothStep, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1040,7 +1040,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorSmoothStep, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorSmoothStep, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1061,7 +1061,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorScalarSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorScalarSmoothStep, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorScalarSmoothStep, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1084,7 +1084,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorDistance : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorDistance, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorDistance, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1107,7 +1107,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorRefract : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorRefract, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorRefract, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1130,7 +1130,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeScalarInterp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarInterp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeScalarInterp, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1151,7 +1151,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorInterp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorInterp, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorInterp, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1174,7 +1174,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorCompose : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorCompose, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorCompose, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1195,7 +1195,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeTransformCompose : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformCompose, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformCompose, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1218,7 +1218,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVectorDecompose : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorDecompose, VisualShaderNode)
+ GDCLASS(VisualShaderNodeVectorDecompose, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1239,7 +1239,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeTransformDecompose : public VisualShaderNode {
- GDCLASS(VisualShaderNodeTransformDecompose, VisualShaderNode)
+ GDCLASS(VisualShaderNodeTransformDecompose, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1262,7 +1262,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeScalarUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeScalarUniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeScalarUniform, VisualShaderNodeUniform);
public:
virtual String get_caption() const;
@@ -1284,7 +1284,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeBooleanUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeBooleanUniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeBooleanUniform, VisualShaderNodeUniform);
public:
virtual String get_caption() const;
@@ -1306,7 +1306,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeColorUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeColorUniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeColorUniform, VisualShaderNodeUniform);
public:
virtual String get_caption() const;
@@ -1328,7 +1328,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeVec3Uniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeVec3Uniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeVec3Uniform, VisualShaderNodeUniform);
public:
virtual String get_caption() const;
@@ -1350,7 +1350,7 @@ public:
///////////////////////////////////////
class VisualShaderNodeTransformUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeTransformUniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeTransformUniform, VisualShaderNodeUniform);
public:
virtual String get_caption() const;
@@ -1372,7 +1372,8 @@ public:
///////////////////////////////////////
class VisualShaderNodeTextureUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeTextureUniform, VisualShaderNodeUniform)
+ GDCLASS(VisualShaderNodeTextureUniform, VisualShaderNodeUniform);
+
public:
enum TextureType {
TYPE_DATA,
@@ -1424,7 +1425,7 @@ VARIANT_ENUM_CAST(VisualShaderNodeTextureUniform::ColorDefault)
///////////////////////////////////////
class VisualShaderNodeCubeMapUniform : public VisualShaderNode {
- GDCLASS(VisualShaderNodeCubeMapUniform, VisualShaderNode)
+ GDCLASS(VisualShaderNodeCubeMapUniform, VisualShaderNode);
public:
virtual String get_caption() const;
@@ -1447,7 +1448,8 @@ public:
///////////////////////////////////////
class VisualShaderNodeIf : public VisualShaderNode {
- GDCLASS(VisualShaderNodeIf, VisualShaderNode)
+ GDCLASS(VisualShaderNodeIf, VisualShaderNode);
+
public:
virtual String get_caption() const;
@@ -1469,7 +1471,8 @@ public:
///////////////////////////////////////
class VisualShaderNodeSwitch : public VisualShaderNode {
- GDCLASS(VisualShaderNodeSwitch, VisualShaderNode)
+ GDCLASS(VisualShaderNodeSwitch, VisualShaderNode);
+
public:
virtual String get_caption() const;
@@ -1491,7 +1494,8 @@ public:
///////////////////////////////////////
class VisualShaderNodeFresnel : public VisualShaderNode {
- GDCLASS(VisualShaderNodeFresnel, VisualShaderNode)
+ GDCLASS(VisualShaderNodeFresnel, VisualShaderNode);
+
public:
virtual String get_caption() const;
diff --git a/servers/audio/audio_effect.h b/servers/audio/audio_effect.h
index 1274e06740..8ae716db20 100644
--- a/servers/audio/audio_effect.h
+++ b/servers/audio/audio_effect.h
@@ -35,7 +35,7 @@
#include "core/resource.h"
class AudioEffectInstance : public Reference {
- GDCLASS(AudioEffectInstance, Reference)
+ GDCLASS(AudioEffectInstance, Reference);
public:
virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) = 0;
@@ -43,7 +43,8 @@ public:
};
class AudioEffect : public Resource {
- GDCLASS(AudioEffect, Resource)
+ GDCLASS(AudioEffect, Resource);
+
public:
virtual Ref<AudioEffectInstance> instance() = 0;
AudioEffect();
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index ab4ef5f91b..8f023c0401 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -38,7 +38,7 @@
class AudioStreamPlayback : public Reference {
- GDCLASS(AudioStreamPlayback, Reference)
+ GDCLASS(AudioStreamPlayback, Reference);
public:
virtual void start(float p_from_pos = 0.0) = 0;
@@ -55,7 +55,7 @@ public:
class AudioStreamPlaybackResampled : public AudioStreamPlayback {
- GDCLASS(AudioStreamPlaybackResampled, AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackResampled, AudioStreamPlayback);
enum {
FP_BITS = 16, //fixed point used for resampling
@@ -81,7 +81,7 @@ public:
class AudioStream : public Resource {
- GDCLASS(AudioStream, Resource)
+ GDCLASS(AudioStream, Resource);
OBJ_SAVE_TYPE(AudioStream) //children are all saved as AudioStream, so they can be exchanged
protected:
@@ -100,7 +100,7 @@ class AudioStreamPlaybackMicrophone;
class AudioStreamMicrophone : public AudioStream {
- GDCLASS(AudioStreamMicrophone, AudioStream)
+ GDCLASS(AudioStreamMicrophone, AudioStream);
friend class AudioStreamPlaybackMicrophone;
Set<AudioStreamPlaybackMicrophone *> playbacks;
@@ -119,7 +119,7 @@ public:
class AudioStreamPlaybackMicrophone : public AudioStreamPlaybackResampled {
- GDCLASS(AudioStreamPlaybackMicrophone, AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackMicrophone, AudioStreamPlayback);
friend class AudioStreamMicrophone;
bool active;
@@ -153,7 +153,7 @@ class AudioStreamPlaybackRandomPitch;
class AudioStreamRandomPitch : public AudioStream {
- GDCLASS(AudioStreamRandomPitch, AudioStream)
+ GDCLASS(AudioStreamRandomPitch, AudioStream);
friend class AudioStreamPlaybackRandomPitch;
Set<AudioStreamPlaybackRandomPitch *> playbacks;
@@ -180,7 +180,7 @@ public:
class AudioStreamPlaybackRandomPitch : public AudioStreamPlayback {
- GDCLASS(AudioStreamPlaybackRandomPitch, AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackRandomPitch, AudioStreamPlayback);
friend class AudioStreamRandomPitch;
Ref<AudioStreamRandomPitch> random_pitch;
diff --git a/servers/audio/effects/audio_effect_amplify.h b/servers/audio/effects/audio_effect_amplify.h
index b6e2a1d4d8..4a98196d94 100644
--- a/servers/audio/effects/audio_effect_amplify.h
+++ b/servers/audio/effects/audio_effect_amplify.h
@@ -36,7 +36,7 @@
class AudioEffectAmplify;
class AudioEffectAmplifyInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectAmplifyInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectAmplifyInstance, AudioEffectInstance);
friend class AudioEffectAmplify;
Ref<AudioEffectAmplify> base;
@@ -47,7 +47,7 @@ public:
};
class AudioEffectAmplify : public AudioEffect {
- GDCLASS(AudioEffectAmplify, AudioEffect)
+ GDCLASS(AudioEffectAmplify, AudioEffect);
friend class AudioEffectAmplifyInstance;
float volume_db;
diff --git a/servers/audio/effects/audio_effect_chorus.h b/servers/audio/effects/audio_effect_chorus.h
index 9cad2906ff..417cc0c035 100644
--- a/servers/audio/effects/audio_effect_chorus.h
+++ b/servers/audio/effects/audio_effect_chorus.h
@@ -36,7 +36,7 @@
class AudioEffectChorus;
class AudioEffectChorusInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectChorusInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectChorusInstance, AudioEffectInstance);
friend class AudioEffectChorus;
Ref<AudioEffectChorus> base;
@@ -54,7 +54,7 @@ public:
};
class AudioEffectChorus : public AudioEffect {
- GDCLASS(AudioEffectChorus, AudioEffect)
+ GDCLASS(AudioEffectChorus, AudioEffect);
friend class AudioEffectChorusInstance;
diff --git a/servers/audio/effects/audio_effect_compressor.h b/servers/audio/effects/audio_effect_compressor.h
index 3ea3a58cb2..0fe956f60b 100644
--- a/servers/audio/effects/audio_effect_compressor.h
+++ b/servers/audio/effects/audio_effect_compressor.h
@@ -36,7 +36,7 @@
class AudioEffectCompressor;
class AudioEffectCompressorInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectCompressorInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectCompressorInstance, AudioEffectInstance);
friend class AudioEffectCompressor;
Ref<AudioEffectCompressor> base;
@@ -49,7 +49,7 @@ public:
};
class AudioEffectCompressor : public AudioEffect {
- GDCLASS(AudioEffectCompressor, AudioEffect)
+ GDCLASS(AudioEffectCompressor, AudioEffect);
friend class AudioEffectCompressorInstance;
float threshold;
diff --git a/servers/audio/effects/audio_effect_delay.h b/servers/audio/effects/audio_effect_delay.h
index 131b8714a0..ee778c70dc 100644
--- a/servers/audio/effects/audio_effect_delay.h
+++ b/servers/audio/effects/audio_effect_delay.h
@@ -36,7 +36,7 @@
class AudioEffectDelay;
class AudioEffectDelayInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectDelayInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectDelayInstance, AudioEffectInstance);
friend class AudioEffectDelay;
Ref<AudioEffectDelay> base;
@@ -58,7 +58,7 @@ public:
};
class AudioEffectDelay : public AudioEffect {
- GDCLASS(AudioEffectDelay, AudioEffect)
+ GDCLASS(AudioEffectDelay, AudioEffect);
friend class AudioEffectDelayInstance;
enum {
diff --git a/servers/audio/effects/audio_effect_distortion.h b/servers/audio/effects/audio_effect_distortion.h
index 2cbffc81a1..0b5ad0ec9e 100644
--- a/servers/audio/effects/audio_effect_distortion.h
+++ b/servers/audio/effects/audio_effect_distortion.h
@@ -36,7 +36,7 @@
class AudioEffectDistortion;
class AudioEffectDistortionInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectDistortionInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectDistortionInstance, AudioEffectInstance);
friend class AudioEffectDistortion;
Ref<AudioEffectDistortion> base;
float h[2];
@@ -46,7 +46,8 @@ public:
};
class AudioEffectDistortion : public AudioEffect {
- GDCLASS(AudioEffectDistortion, AudioEffect)
+ GDCLASS(AudioEffectDistortion, AudioEffect);
+
public:
enum Mode {
MODE_CLIP,
diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h
index c9735b9073..dc75e566e7 100644
--- a/servers/audio/effects/audio_effect_eq.h
+++ b/servers/audio/effects/audio_effect_eq.h
@@ -37,7 +37,7 @@
class AudioEffectEQ;
class AudioEffectEQInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectEQInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectEQInstance, AudioEffectInstance);
friend class AudioEffectEQ;
Ref<AudioEffectEQ> base;
@@ -49,7 +49,7 @@ public:
};
class AudioEffectEQ : public AudioEffect {
- GDCLASS(AudioEffectEQ, AudioEffect)
+ GDCLASS(AudioEffectEQ, AudioEffect);
friend class AudioEffectEQInstance;
@@ -75,21 +75,24 @@ public:
};
class AudioEffectEQ6 : public AudioEffectEQ {
- GDCLASS(AudioEffectEQ6, AudioEffectEQ)
+ GDCLASS(AudioEffectEQ6, AudioEffectEQ);
+
public:
AudioEffectEQ6() :
AudioEffectEQ(EQ::PRESET_6_BANDS) {}
};
class AudioEffectEQ10 : public AudioEffectEQ {
- GDCLASS(AudioEffectEQ10, AudioEffectEQ)
+ GDCLASS(AudioEffectEQ10, AudioEffectEQ);
+
public:
AudioEffectEQ10() :
AudioEffectEQ(EQ::PRESET_10_BANDS) {}
};
class AudioEffectEQ21 : public AudioEffectEQ {
- GDCLASS(AudioEffectEQ21, AudioEffectEQ)
+ GDCLASS(AudioEffectEQ21, AudioEffectEQ);
+
public:
AudioEffectEQ21() :
AudioEffectEQ(EQ::PRESET_21_BANDS) {}
diff --git a/servers/audio/effects/audio_effect_filter.h b/servers/audio/effects/audio_effect_filter.h
index fd9a4bcf07..bb0d451522 100644
--- a/servers/audio/effects/audio_effect_filter.h
+++ b/servers/audio/effects/audio_effect_filter.h
@@ -37,7 +37,7 @@
class AudioEffectFilter;
class AudioEffectFilterInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectFilterInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectFilterInstance, AudioEffectInstance);
friend class AudioEffectFilter;
Ref<AudioEffectFilter> base;
@@ -55,7 +55,8 @@ public:
};
class AudioEffectFilter : public AudioEffect {
- GDCLASS(AudioEffectFilter, AudioEffect)
+ GDCLASS(AudioEffectFilter, AudioEffect);
+
public:
enum FilterDB {
FILTER_6DB,
@@ -95,7 +96,7 @@ public:
VARIANT_ENUM_CAST(AudioEffectFilter::FilterDB)
class AudioEffectLowPassFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectLowPassFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectLowPassFilter, AudioEffectFilter);
void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
@@ -107,7 +108,7 @@ public:
};
class AudioEffectHighPassFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter);
void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
}
@@ -118,7 +119,7 @@ public:
};
class AudioEffectBandPassFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter);
void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
}
@@ -129,28 +130,32 @@ public:
};
class AudioEffectNotchFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectNotchFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectNotchFilter, AudioEffectFilter);
+
public:
AudioEffectNotchFilter() :
AudioEffectFilter(AudioFilterSW::NOTCH) {}
};
class AudioEffectBandLimitFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectBandLimitFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectBandLimitFilter, AudioEffectFilter);
+
public:
AudioEffectBandLimitFilter() :
AudioEffectFilter(AudioFilterSW::BANDLIMIT) {}
};
class AudioEffectLowShelfFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectLowShelfFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectLowShelfFilter, AudioEffectFilter);
+
public:
AudioEffectLowShelfFilter() :
AudioEffectFilter(AudioFilterSW::LOWSHELF) {}
};
class AudioEffectHighShelfFilter : public AudioEffectFilter {
- GDCLASS(AudioEffectHighShelfFilter, AudioEffectFilter)
+ GDCLASS(AudioEffectHighShelfFilter, AudioEffectFilter);
+
public:
AudioEffectHighShelfFilter() :
AudioEffectFilter(AudioFilterSW::HIGHSHELF) {}
diff --git a/servers/audio/effects/audio_effect_limiter.h b/servers/audio/effects/audio_effect_limiter.h
index d629166f42..bf7167e3f4 100644
--- a/servers/audio/effects/audio_effect_limiter.h
+++ b/servers/audio/effects/audio_effect_limiter.h
@@ -36,7 +36,7 @@
class AudioEffectLimiter;
class AudioEffectLimiterInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectLimiterInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectLimiterInstance, AudioEffectInstance);
friend class AudioEffectLimiter;
Ref<AudioEffectLimiter> base;
@@ -47,7 +47,7 @@ public:
};
class AudioEffectLimiter : public AudioEffect {
- GDCLASS(AudioEffectLimiter, AudioEffect)
+ GDCLASS(AudioEffectLimiter, AudioEffect);
friend class AudioEffectLimiterInstance;
float threshold;
diff --git a/servers/audio/effects/audio_effect_panner.h b/servers/audio/effects/audio_effect_panner.h
index 4256d05a2f..7bd5a09fc6 100644
--- a/servers/audio/effects/audio_effect_panner.h
+++ b/servers/audio/effects/audio_effect_panner.h
@@ -36,7 +36,7 @@
class AudioEffectPanner;
class AudioEffectPannerInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectPannerInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectPannerInstance, AudioEffectInstance);
friend class AudioEffectPanner;
Ref<AudioEffectPanner> base;
@@ -45,7 +45,7 @@ public:
};
class AudioEffectPanner : public AudioEffect {
- GDCLASS(AudioEffectPanner, AudioEffect)
+ GDCLASS(AudioEffectPanner, AudioEffect);
friend class AudioEffectPannerInstance;
float pan;
diff --git a/servers/audio/effects/audio_effect_phaser.h b/servers/audio/effects/audio_effect_phaser.h
index 264e792be5..b76d6bb29c 100644
--- a/servers/audio/effects/audio_effect_phaser.h
+++ b/servers/audio/effects/audio_effect_phaser.h
@@ -36,7 +36,7 @@
class AudioEffectPhaser;
class AudioEffectPhaserInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectPhaserInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectPhaserInstance, AudioEffectInstance);
friend class AudioEffectPhaser;
Ref<AudioEffectPhaser> base;
@@ -70,7 +70,7 @@ public:
};
class AudioEffectPhaser : public AudioEffect {
- GDCLASS(AudioEffectPhaser, AudioEffect)
+ GDCLASS(AudioEffectPhaser, AudioEffect);
friend class AudioEffectPhaserInstance;
float range_min;
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index ca2a88f858..c250f2e2bd 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -293,14 +293,16 @@ void AudioEffectPitchShiftInstance::process(const AudioFrame *p_src_frames, Audi
float *out_l = (float *)p_dst_frames;
float *out_r = out_l + 1;
- shift_l.PitchShift(base->pitch_scale, p_frame_count, 2048, 4, sample_rate, in_l, out_l, 2);
- shift_r.PitchShift(base->pitch_scale, p_frame_count, 2048, 4, sample_rate, in_r, out_r, 2);
+ shift_l.PitchShift(base->pitch_scale, p_frame_count, fft_size, base->oversampling, sample_rate, in_l, out_l, 2);
+ shift_r.PitchShift(base->pitch_scale, p_frame_count, fft_size, base->oversampling, sample_rate, in_r, out_r, 2);
}
Ref<AudioEffectInstance> AudioEffectPitchShift::instance() {
Ref<AudioEffectPitchShiftInstance> ins;
ins.instance();
ins->base = Ref<AudioEffectPitchShift>(this);
+ static const int fft_sizes[FFT_SIZE_MAX] = { 256, 512, 1024, 2048, 4096 };
+ ins->fft_size = fft_sizes[fft_size];
return ins;
}
@@ -315,14 +317,50 @@ float AudioEffectPitchShift::get_pitch_scale() const {
return pitch_scale;
}
+void AudioEffectPitchShift::set_oversampling(int p_oversampling) {
+ ERR_FAIL_COND(p_oversampling < 4);
+ oversampling = p_oversampling;
+}
+
+int AudioEffectPitchShift::get_oversampling() const {
+
+ return oversampling;
+}
+
+void AudioEffectPitchShift::set_fft_size(FFT_Size p_fft_size) {
+ ERR_FAIL_INDEX(p_fft_size, FFT_SIZE_MAX);
+ fft_size = p_fft_size;
+}
+
+AudioEffectPitchShift::FFT_Size AudioEffectPitchShift::get_fft_size() const {
+ return fft_size;
+}
+
void AudioEffectPitchShift::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pitch_scale", "rate"), &AudioEffectPitchShift::set_pitch_scale);
ClassDB::bind_method(D_METHOD("get_pitch_scale"), &AudioEffectPitchShift::get_pitch_scale);
+ ClassDB::bind_method(D_METHOD("set_oversampling", "amount"), &AudioEffectPitchShift::set_oversampling);
+ ClassDB::bind_method(D_METHOD("get_oversampling"), &AudioEffectPitchShift::get_oversampling);
+
+ ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectPitchShift::set_fft_size);
+ ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectPitchShift::get_fft_size);
+
ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size");
+
+ BIND_ENUM_CONSTANT(FFT_SIZE_256);
+ BIND_ENUM_CONSTANT(FFT_SIZE_512);
+ BIND_ENUM_CONSTANT(FFT_SIZE_1024);
+ BIND_ENUM_CONSTANT(FFT_SIZE_2048);
+ BIND_ENUM_CONSTANT(FFT_SIZE_4096);
+ BIND_ENUM_CONSTANT(FFT_SIZE_MAX);
}
AudioEffectPitchShift::AudioEffectPitchShift() {
pitch_scale = 1.0;
+ oversampling = 4;
+ fft_size = FFT_SIZE_2048;
}
diff --git a/servers/audio/effects/audio_effect_pitch_shift.h b/servers/audio/effects/audio_effect_pitch_shift.h
index febc20e9d5..2028496ebf 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.h
+++ b/servers/audio/effects/audio_effect_pitch_shift.h
@@ -72,10 +72,11 @@ public:
class AudioEffectPitchShift;
class AudioEffectPitchShiftInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectPitchShiftInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectPitchShiftInstance, AudioEffectInstance);
friend class AudioEffectPitchShift;
Ref<AudioEffectPitchShift> base;
+ int fft_size;
SMBPitchShift shift_l;
SMBPitchShift shift_r;
@@ -84,12 +85,23 @@ public:
};
class AudioEffectPitchShift : public AudioEffect {
- GDCLASS(AudioEffectPitchShift, AudioEffect)
+ GDCLASS(AudioEffectPitchShift, AudioEffect);
+public:
friend class AudioEffectPitchShiftInstance;
+ enum FFT_Size {
+ FFT_SIZE_256,
+ FFT_SIZE_512,
+ FFT_SIZE_1024,
+ FFT_SIZE_2048,
+ FFT_SIZE_4096,
+ FFT_SIZE_MAX
+ };
+
float pitch_scale;
- int window_size;
+ int oversampling;
+ FFT_Size fft_size;
float wet;
float dry;
bool filter;
@@ -103,7 +115,15 @@ public:
void set_pitch_scale(float p_pitch_scale);
float get_pitch_scale() const;
+ void set_oversampling(int p_oversampling);
+ int get_oversampling() const;
+
+ void set_fft_size(FFT_Size);
+ FFT_Size get_fft_size() const;
+
AudioEffectPitchShift();
};
+VARIANT_ENUM_CAST(AudioEffectPitchShift::FFT_Size);
+
#endif // AUDIO_EFFECT_PITCH_SHIFT_H
diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h
index 528c7dbd7c..d9bf39eb5f 100644
--- a/servers/audio/effects/audio_effect_record.h
+++ b/servers/audio/effects/audio_effect_record.h
@@ -43,7 +43,7 @@
class AudioEffectRecord;
class AudioEffectRecordInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectRecordInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectRecordInstance, AudioEffectInstance);
friend class AudioEffectRecord;
Ref<AudioEffectRecord> base;
@@ -77,7 +77,7 @@ public:
};
class AudioEffectRecord : public AudioEffect {
- GDCLASS(AudioEffectRecord, AudioEffect)
+ GDCLASS(AudioEffectRecord, AudioEffect);
friend class AudioEffectRecordInstance;
diff --git a/servers/audio/effects/audio_effect_reverb.h b/servers/audio/effects/audio_effect_reverb.h
index ed76050f24..31a796bf98 100644
--- a/servers/audio/effects/audio_effect_reverb.h
+++ b/servers/audio/effects/audio_effect_reverb.h
@@ -37,7 +37,7 @@
class AudioEffectReverb;
class AudioEffectReverbInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectReverbInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectReverbInstance, AudioEffectInstance);
Ref<AudioEffectReverb> base;
@@ -54,7 +54,7 @@ public:
};
class AudioEffectReverb : public AudioEffect {
- GDCLASS(AudioEffectReverb, AudioEffect)
+ GDCLASS(AudioEffectReverb, AudioEffect);
friend class AudioEffectReverbInstance;
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index f5ac0afefa..305f9046c3 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -111,9 +111,10 @@ void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames
float *fftw = temporal_fft.ptrw();
for (int i = 0; i < to_fill; i++) { //left and right buffers
- fftw[(i + temporal_fft_pos) * 2] = p_src_frames[i].l;
+ float window = -0.5 * Math::cos(2.0 * Math_PI * (double)i / (double)to_fill) + 0.5;
+ fftw[(i + temporal_fft_pos) * 2] = window * p_src_frames[i].l;
fftw[(i + temporal_fft_pos) * 2 + 1] = 0;
- fftw[(i + temporal_fft_pos + fft_size * 2) * 2] = p_src_frames[i].r;
+ fftw[(i + temporal_fft_pos + fft_size * 2) * 2] = window * p_src_frames[i].r;
fftw[(i + temporal_fft_pos + fft_size * 2) * 2 + 1] = 0;
}
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.h b/servers/audio/effects/audio_effect_spectrum_analyzer.h
index 4f4c3c8a58..27eb88d29f 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.h
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.h
@@ -36,7 +36,7 @@
class AudioEffectSpectrumAnalyzer;
class AudioEffectSpectrumAnalyzerInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectSpectrumAnalyzerInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectSpectrumAnalyzerInstance, AudioEffectInstance);
public:
enum MagnitudeMode {
@@ -68,7 +68,8 @@ public:
VARIANT_ENUM_CAST(AudioEffectSpectrumAnalyzerInstance::MagnitudeMode)
class AudioEffectSpectrumAnalyzer : public AudioEffect {
- GDCLASS(AudioEffectSpectrumAnalyzer, AudioEffect)
+ GDCLASS(AudioEffectSpectrumAnalyzer, AudioEffect);
+
public:
enum FFT_Size {
FFT_SIZE_256,
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.h b/servers/audio/effects/audio_effect_stereo_enhance.h
index 787c351a03..44b7d3eb5c 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.h
+++ b/servers/audio/effects/audio_effect_stereo_enhance.h
@@ -36,7 +36,7 @@
class AudioEffectStereoEnhance;
class AudioEffectStereoEnhanceInstance : public AudioEffectInstance {
- GDCLASS(AudioEffectStereoEnhanceInstance, AudioEffectInstance)
+ GDCLASS(AudioEffectStereoEnhanceInstance, AudioEffectInstance);
friend class AudioEffectStereoEnhance;
Ref<AudioEffectStereoEnhance> base;
@@ -56,7 +56,7 @@ public:
};
class AudioEffectStereoEnhance : public AudioEffect {
- GDCLASS(AudioEffectStereoEnhance, AudioEffect)
+ GDCLASS(AudioEffectStereoEnhance, AudioEffect);
friend class AudioEffectStereoEnhanceInstance;
float volume_db;
diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h
index c3490ddaa5..33839d3db8 100644
--- a/servers/audio/effects/audio_stream_generator.h
+++ b/servers/audio/effects/audio_stream_generator.h
@@ -35,7 +35,7 @@
#include "servers/audio/audio_stream.h"
class AudioStreamGenerator : public AudioStream {
- GDCLASS(AudioStreamGenerator, AudioStream)
+ GDCLASS(AudioStreamGenerator, AudioStream);
float mix_rate;
float buffer_len;
@@ -59,7 +59,7 @@ public:
class AudioStreamGeneratorPlayback : public AudioStreamPlaybackResampled {
- GDCLASS(AudioStreamGeneratorPlayback, AudioStreamPlaybackResampled)
+ GDCLASS(AudioStreamGeneratorPlayback, AudioStreamPlaybackResampled);
friend class AudioStreamGenerator;
RingBuffer<AudioFrame> buffer;
int skips;
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 8c0ffd5a6b..942fe7bc87 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -147,7 +147,8 @@ class AudioBusLayout;
class AudioServer : public Object {
- GDCLASS(AudioServer, Object)
+ GDCLASS(AudioServer, Object);
+
public:
//re-expose this here, as AudioDriver is not exposed to script
enum SpeakerMode {
@@ -390,7 +391,7 @@ VARIANT_ENUM_CAST(AudioServer::SpeakerMode)
class AudioBusLayout : public Resource {
- GDCLASS(AudioBusLayout, Resource)
+ GDCLASS(AudioBusLayout, Resource);
friend class AudioServer;
diff --git a/servers/camera/camera_feed.cpp b/servers/camera/camera_feed.cpp
index 31b8b2874f..094c83cd7c 100644
--- a/servers/camera/camera_feed.cpp
+++ b/servers/camera/camera_feed.cpp
@@ -60,8 +60,8 @@ void CameraFeed::_bind_methods() {
BIND_ENUM_CONSTANT(FEED_NOIMAGE);
BIND_ENUM_CONSTANT(FEED_RGB);
- BIND_ENUM_CONSTANT(FEED_YCbCr);
- BIND_ENUM_CONSTANT(FEED_YCbCr_Sep);
+ BIND_ENUM_CONSTANT(FEED_YCBCR);
+ BIND_ENUM_CONSTANT(FEED_YCBCR_SEP);
BIND_ENUM_CONSTANT(FEED_UNSPECIFIED);
BIND_ENUM_CONSTANT(FEED_FRONT);
@@ -145,7 +145,7 @@ CameraFeed::CameraFeed() {
// create a texture object
VisualServer *vs = VisualServer::get_singleton();
texture[CameraServer::FEED_Y_IMAGE] = vs->texture_create(); // also used for RGBA
- texture[CameraServer::FEED_CbCr_IMAGE] = vs->texture_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = vs->texture_create();
}
CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
@@ -162,14 +162,14 @@ CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
// create a texture object
VisualServer *vs = VisualServer::get_singleton();
texture[CameraServer::FEED_Y_IMAGE] = vs->texture_create(); // also used for RGBA
- texture[CameraServer::FEED_CbCr_IMAGE] = vs->texture_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = vs->texture_create();
}
CameraFeed::~CameraFeed() {
// Free our textures
VisualServer *vs = VisualServer::get_singleton();
vs->free(texture[CameraServer::FEED_Y_IMAGE]);
- vs->free(texture[CameraServer::FEED_CbCr_IMAGE]);
+ vs->free(texture[CameraServer::FEED_CBCR_IMAGE]);
}
void CameraFeed::set_RGB_img(Ref<Image> p_rgb_img) {
@@ -208,7 +208,7 @@ void CameraFeed::set_YCbCr_img(Ref<Image> p_ycbcr_img) {
}
vs->texture_set_data(texture[CameraServer::FEED_RGBA_IMAGE], p_ycbcr_img);
- datatype = CameraFeed::FEED_YCbCr;
+ datatype = CameraFeed::FEED_YCBCR;
}
}
@@ -233,12 +233,12 @@ void CameraFeed::set_YCbCr_imgs(Ref<Image> p_y_img, Ref<Image> p_cbcr_img) {
vs->texture_allocate(texture[CameraServer::FEED_Y_IMAGE], new_y_width, new_y_height, 0, Image::FORMAT_R8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
///@TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion
- vs->texture_allocate(texture[CameraServer::FEED_CbCr_IMAGE], new_cbcr_width, new_cbcr_height, 0, Image::FORMAT_RG8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
+ vs->texture_allocate(texture[CameraServer::FEED_CBCR_IMAGE], new_cbcr_width, new_cbcr_height, 0, Image::FORMAT_RG8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
}
vs->texture_set_data(texture[CameraServer::FEED_Y_IMAGE], p_y_img);
- vs->texture_set_data(texture[CameraServer::FEED_CbCr_IMAGE], p_cbcr_img);
- datatype = CameraFeed::FEED_YCbCr_Sep;
+ vs->texture_set_data(texture[CameraServer::FEED_CBCR_IMAGE], p_cbcr_img);
+ datatype = CameraFeed::FEED_YCBCR_SEP;
}
}
diff --git a/servers/camera/camera_feed.h b/servers/camera/camera_feed.h
index 90c076071c..0c53ff9309 100644
--- a/servers/camera/camera_feed.h
+++ b/servers/camera/camera_feed.h
@@ -50,8 +50,8 @@ public:
enum FeedDataType {
FEED_NOIMAGE, // we don't have an image yet
FEED_RGB, // our texture will contain a normal RGB texture that can be used directly
- FEED_YCbCr, // our texture will contain a YCbCr texture that needs to be converted to RGB before output
- FEED_YCbCr_Sep // our camera is split into two textures, first plane contains Y data, second plane contains CbCr data
+ FEED_YCBCR, // our texture will contain a YCbCr texture that needs to be converted to RGB before output
+ FEED_YCBCR_SEP // our camera is split into two textures, first plane contains Y data, second plane contains CbCr data
};
enum FeedPosition {
diff --git a/servers/camera_server.cpp b/servers/camera_server.cpp
index 8d2ae37001..0f93221072 100644
--- a/servers/camera_server.cpp
+++ b/servers/camera_server.cpp
@@ -47,9 +47,9 @@ void CameraServer::_bind_methods() {
ADD_SIGNAL(MethodInfo("camera_feed_removed", PropertyInfo(Variant::INT, "id")));
BIND_ENUM_CONSTANT(FEED_RGBA_IMAGE);
- BIND_ENUM_CONSTANT(FEED_YCbCr_IMAGE);
+ BIND_ENUM_CONSTANT(FEED_YCBCR_IMAGE);
BIND_ENUM_CONSTANT(FEED_Y_IMAGE);
- BIND_ENUM_CONSTANT(FEED_CbCr_IMAGE);
+ BIND_ENUM_CONSTANT(FEED_CBCR_IMAGE);
};
CameraServer *CameraServer::singleton = NULL;
diff --git a/servers/camera_server.h b/servers/camera_server.h
index d204142c7d..5a62af3d60 100644
--- a/servers/camera_server.h
+++ b/servers/camera_server.h
@@ -53,9 +53,9 @@ class CameraServer : public Object {
public:
enum FeedImage {
FEED_RGBA_IMAGE = 0,
- FEED_YCbCr_IMAGE = 0,
+ FEED_YCBCR_IMAGE = 0,
FEED_Y_IMAGE = 0,
- FEED_CbCr_IMAGE = 1,
+ FEED_CBCR_IMAGE = 1,
FEED_IMAGES = 2
};
diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp
index 9d68869bc2..ad3e40916d 100644
--- a/servers/physics/area_sw.cpp
+++ b/servers/physics/area_sw.cpp
@@ -250,7 +250,7 @@ AreaSW::AreaSW() :
gravity_is_point = false;
gravity_distance_scale = 0;
point_attenuation = 1;
- angular_damp = 1.0;
+ angular_damp = 0.1;
linear_damp = 0.1;
priority = 0;
set_ray_pickable(false);