summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bmp/image_loader_bmp.cpp10
-rw-r--r--modules/bullet/bullet_physics_server.h2
-rw-r--r--modules/bullet/collision_object_bullet.cpp2
-rw-r--r--modules/bullet/rigid_body_bullet.h2
-rw-r--r--modules/bullet/space_bullet.h3
-rw-r--r--modules/csg/csg.cpp8
-rw-r--r--modules/csg/csg_gizmos.h3
-rw-r--r--modules/csg/csg_shape.cpp8
-rw-r--r--modules/csg/csg_shape.h17
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp6
-rw-r--r--modules/dds/texture_loader_dds.h1
-rw-r--r--modules/enet/networked_multiplayer_enet.h3
-rw-r--r--modules/etc/texture_loader_pkm.h1
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.h2
-rw-r--r--modules/gdnative/config.py2
-rw-r--r--modules/gdnative/doc_classes/@NativeScript.xml (renamed from modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml)2
-rw-r--r--modules/gdnative/gdnative.h6
-rw-r--r--modules/gdnative/nativescript/nativescript.h6
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.h2
-rw-r--r--modules/gdnative/net/packet_peer_gdnative.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_loader.h4
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.h1
-rw-r--r--modules/gdscript/config.py1
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml1301
-rw-r--r--modules/gdscript/gdscript.h2
-rw-r--r--modules/gdscript/gdscript_function.cpp62
-rw-r--r--modules/gridmap/grid_map.cpp1
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp6
-rwxr-xr-xmodules/mbedtls/stream_peer_mbed_tls.cpp2
-rw-r--r--modules/mono/csharp_script.h4
-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/doc_classes/OpenSimplexNoise.xml2
-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.h5
-rw-r--r--modules/pvr/texture_loader_pvr.h1
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/stb_vorbis/config.py1
-rw-r--r--modules/stb_vorbis/register_types.cpp13
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp5
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.h3
-rw-r--r--modules/theora/config.py1
-rw-r--r--modules/theora/video_stream_theora.h1
-rw-r--r--modules/visual_script/config.py1
-rw-r--r--modules/visual_script/doc_classes/@VisualScript.xml (renamed from modules/gdnative/doc_classes/ResourceFormatLoaderVideoStreamGDNative.xml)4
-rw-r--r--modules/visual_script/visual_script.cpp2
-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.cpp3
-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/vorbis/audio_stream_ogg_vorbis.h1
-rw-r--r--modules/webm/config.py1
-rw-r--r--modules/webm/libvpx/SCsub2
-rw-r--r--modules/webm/video_stream_webm.h3
66 files changed, 1480 insertions, 167 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index bcc992db24..b4530c2df1 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -261,12 +261,10 @@ Error ImageLoaderBMP::load_image(Ref<Image> p_image, FileAccess *f,
ERR_FAIL_COND_V(color_table_size == 0, ERR_BUG);
PoolVector<uint8_t> bmp_color_table;
- if (color_table_size > 0) {
- // Color table is usually 4 bytes per color -> [B][G][R][0]
- err = bmp_color_table.resize(color_table_size * 4);
- PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write();
- f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4);
- }
+ // Color table is usually 4 bytes per color -> [B][G][R][0]
+ err = bmp_color_table.resize(color_table_size * 4);
+ PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write();
+ f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4);
f->seek(bmp_header.bmp_file_header.bmp_file_offset);
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/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 166d7e6158..e1800fd3eb 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -305,7 +305,7 @@ void RigidCollisionObjectBullet::set_shape_transform(int p_index, const Transfor
ERR_FAIL_INDEX(p_index, get_shape_count());
shapes.write[p_index].set_transform(p_transform);
- reload_shapes();
+ shape_changed(p_index);
}
const btTransform &RigidCollisionObjectBullet::get_bt_shape_transform(int p_index) const {
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.cpp b/modules/csg/csg.cpp
index aa4d7d7d32..fd0d36eddf 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -1018,15 +1018,15 @@ int CSGBrushOperation::MeshMerge::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from
max_depth = p_depth;
}
- if (p_size <= BVH_LIMIT) {
+ if (p_size == 0) {
+
+ return -1;
+ } else if (p_size <= BVH_LIMIT) {
for (int i = 0; i < p_size - 1; i++) {
p_bb[p_from + i]->next = p_bb[p_from + i + 1] - p_bvh;
}
return p_bb[p_from] - p_bvh;
- } else if (p_size == 0) {
-
- return -1;
}
AABB aabb;
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.cpp b/modules/csg/csg_shape.cpp
index 1d27b9b6f4..a496a214fd 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -1816,11 +1816,9 @@ CSGBrush *CSGPolygon::_build_brush() {
path_cache = path;
- if (path_cache) {
- path_cache->connect("tree_exited", this, "_path_exited");
- path_cache->connect("curve_changed", this, "_path_changed");
- path_cache = NULL;
- }
+ path_cache->connect("tree_exited", this, "_path_exited");
+ path_cache->connect("curve_changed", this, "_path_changed");
+ path_cache = NULL;
}
curve = path->get_curve();
if (curve.is_null())
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/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h
index 585f2891bf..6ddef4e770 100644
--- a/modules/dds/texture_loader_dds.h
+++ b/modules/dds/texture_loader_dds.h
@@ -35,7 +35,6 @@
#include "scene/resources/texture.h"
class ResourceFormatDDS : public ResourceFormatLoader {
- GDCLASS(ResourceFormatDDS, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
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/etc/texture_loader_pkm.h b/modules/etc/texture_loader_pkm.h
index 860fe8b5df..79c17953fc 100644
--- a/modules/etc/texture_loader_pkm.h
+++ b/modules/etc/texture_loader_pkm.h
@@ -35,7 +35,6 @@
#include "scene/resources/texture.h"
class ResourceFormatPKM : public ResourceFormatLoader {
- GDCLASS(ResourceFormatPKM, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
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/config.py b/modules/gdnative/config.py
index 7898de5523..b9e5afcdf3 100644
--- a/modules/gdnative/config.py
+++ b/modules/gdnative/config.py
@@ -6,6 +6,7 @@ def configure(env):
def get_doc_classes():
return [
+ "@NativeScript",
"ARVRInterfaceGDNative",
"GDNative",
"GDNativeLibrary",
@@ -13,7 +14,6 @@ def get_doc_classes():
"NativeScript",
"PacketPeerGDNative",
"PluginScript",
- "ResourceFormatLoaderVideoStreamGDNative",
"StreamPeerGDNative",
"VideoStreamGDNative",
"WebRTCPeerConnectionGDNative",
diff --git a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml b/modules/gdnative/doc_classes/@NativeScript.xml
index 4dd77fed34..cb5de198ac 100644
--- a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
+++ b/modules/gdnative/doc_classes/@NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.2">
+<class name="@NativeScript" category="Core" version="3.2">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index ef57387059..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;
@@ -165,7 +165,6 @@ public:
};
class GDNativeLibraryResourceLoader : public ResourceFormatLoader {
- GDCLASS(GDNativeLibraryResourceLoader, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path, Error *r_error);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@@ -174,7 +173,6 @@ public:
};
class GDNativeLibraryResourceSaver : public ResourceFormatSaver {
- GDCLASS(GDNativeLibraryResourceSaver, ResourceFormatSaver)
public:
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags);
virtual bool recognize(const RES &p_resource) const;
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index be1c499714..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:
@@ -382,7 +382,6 @@ public:
};
class ResourceFormatLoaderNativeScript : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderNativeScript, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@@ -391,7 +390,6 @@ public:
};
class ResourceFormatSaverNativeScript : public ResourceFormatSaver {
- GDCLASS(ResourceFormatSaverNativeScript, ResourceFormatSaver)
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual bool recognize(const RES &p_resource) const;
virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const;
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/gdnative/pluginscript/pluginscript_loader.h b/modules/gdnative/pluginscript/pluginscript_loader.h
index 69a2ac6bfe..6218037a15 100644
--- a/modules/gdnative/pluginscript/pluginscript_loader.h
+++ b/modules/gdnative/pluginscript/pluginscript_loader.h
@@ -40,8 +40,6 @@ class PluginScriptLanguage;
class ResourceFormatLoaderPluginScript : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderPluginScript, ResourceFormatLoader)
-
PluginScriptLanguage *_language;
public:
@@ -54,8 +52,6 @@ public:
class ResourceFormatSaverPluginScript : public ResourceFormatSaver {
- GDCLASS(ResourceFormatSaverPluginScript, ResourceFormatSaver)
-
PluginScriptLanguage *_language;
public:
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h
index aafd02f33d..b9f1c8e4da 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.h
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.h
@@ -197,7 +197,6 @@ public:
};
class ResourceFormatLoaderVideoStreamGDNative : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderVideoStreamGDNative, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
diff --git a/modules/gdscript/config.py b/modules/gdscript/config.py
index 95b40d90af..a525eedaaa 100644
--- a/modules/gdscript/config.py
+++ b/modules/gdscript/config.py
@@ -6,6 +6,7 @@ def configure(env):
def get_doc_classes():
return [
+ "@GDScript",
"GDScript",
"GDScriptFunctionState",
"GDScriptNativeClass",
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
new file mode 100644
index 0000000000..b6de5dbf62
--- /dev/null
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -0,0 +1,1301 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="@GDScript" category="Core" version="3.2">
+ <brief_description>
+ Built-in GDScript functions.
+ </brief_description>
+ <description>
+ List of core built-in GDScript functions. Math functions and other utilities. Everything else is provided by objects. (Keywords: builtin, built in, global functions.)
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="Color8">
+ <return type="Color">
+ </return>
+ <argument index="0" name="r8" type="int">
+ </argument>
+ <argument index="1" name="g8" type="int">
+ </argument>
+ <argument index="2" name="b8" type="int">
+ </argument>
+ <argument index="3" name="a8" type="int" default="255">
+ </argument>
+ <description>
+ Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255.
+ [code]r8[/code] red channel
+ [code]g8[/code] green channel
+ [code]b8[/code] blue channel
+ [code]a8[/code] alpha channel
+ [codeblock]
+ red = Color8(255, 0, 0)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="ColorN">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="alpha" type="float" default="1.0">
+ </argument>
+ <description>
+ Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
+ [codeblock]
+ red = ColorN("red", 1)
+ [/codeblock]
+ Supported color names:
+ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflower", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "webgray", "green", "webgreen", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrod", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "webmaroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navyblue", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "webpurple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen".
+ </description>
+ </method>
+ <method name="abs">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the absolute value of parameter [code]s[/code] (i.e. unsigned value, works for integer and float).
+ [codeblock]
+ # a is 1
+ a = abs(-1)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="acos">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code].
+ [codeblock]
+ # c is 0.523599 or 30 degrees if converted with rad2deg(s)
+ c = acos(0.866025)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="asin">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code].
+ [codeblock]
+ # s is 0.523599 or 30 degrees if converted with rad2deg(s)
+ s = asin(0.5)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="assert">
+ <return type="void">
+ </return>
+ <argument index="0" name="condition" type="bool">
+ </argument>
+ <description>
+ Asserts that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code], an error is generated and the program is halted until you resume it. Only executes in debug builds, or when running the game from the editor. Use it for debugging purposes, to make sure a statement is [code]true[/code] during development.
+ [codeblock]
+ # Imagine we always want speed to be between 0 and 20
+ speed = -10
+ assert(speed &lt; 20) # True, the program will continue
+ assert(speed &gt;= 0) # False, the program will stop
+ assert(speed &gt;= 0 &amp;&amp; speed &lt; 20) # You can also combine the two conditional statements in one check
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of [code]s[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
+ The method cannot know in which quadrant the angle should fall. See [method atan2] if you always want an exact angle.
+ [codeblock]
+ a = atan(0.5) # a is 0.463648
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan2">
+ <return type="float">
+ </return>
+ <argument index="0" name="y" type="float">
+ </argument>
+ <argument index="1" name="x" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
+ [codeblock]
+ a = atan2(0, -1) # a is 3.141593
+ [/codeblock]
+ </description>
+ </method>
+ <method name="bytes2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="bytes" type="PoolByteArray">
+ </argument>
+ <argument index="1" name="allow_objects" type="bool" default="false">
+ </argument>
+ <description>
+ Decodes a byte array back to a value. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed.
+ [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
+ </description>
+ </method>
+ <method name="cartesian2polar">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
+ </description>
+ </method>
+ <method name="ceil">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Rounds [code]s[/code] upward, returning the smallest integral value that is not less than [code]s[/code].
+ [codeblock]
+ i = ceil(1.45) # i is 2
+ i = ceil(1.001) # i is 2
+ [/codeblock]
+ </description>
+ </method>
+ <method name="char">
+ <return type="String">
+ </return>
+ <argument index="0" name="ascii" type="int">
+ </argument>
+ <description>
+ Returns a character as a String of the given ASCII code.
+ [codeblock]
+ # a is 'A'
+ a = char(65)
+ # a is 'a'
+ a = char(65 + 32)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="clamp">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <description>
+ Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ [codeblock]
+ speed = 1000
+ # a is 20
+ a = clamp(speed, 1, 20)
+
+ speed = -10
+ # a is 1
+ a = clamp(speed, 1, 20)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="convert">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="what" type="Variant">
+ </argument>
+ <argument index="1" name="type" type="int">
+ </argument>
+ <description>
+ Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@GlobalScope].
+ [codeblock]
+ a = Vector2(1, 0)
+ # prints 1
+ print(a.length())
+ a = convert(a, TYPE_STRING)
+ # prints 6
+ # (1, 0) is 6 characters
+ print(a.length())
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cos">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the cosine of angle [code]s[/code] in radians.
+ [codeblock]
+ # prints 1 and -1
+ print(cos(PI * 2))
+ print(cos(PI))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cosh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic cosine of [code]s[/code] in radians.
+ [codeblock]
+ # prints 1.543081
+ print(cosh(1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="db2linear">
+ <return type="float">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ Converts from decibels to linear energy (audio).
+ </description>
+ </method>
+ <method name="decimals">
+ <return type="int">
+ </return>
+ <argument index="0" name="step" type="float">
+ </argument>
+ <description>
+ Deprecated alias for "[method step_decimals]".
+ </description>
+ </method>
+ <method name="dectime">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="amount" type="float">
+ </argument>
+ <argument index="2" name="step" type="float">
+ </argument>
+ <description>
+ Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code].
+ [codeblock]
+ # a = 59
+ a = dectime(60, 10, 0.1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="deg2rad">
+ <return type="float">
+ </return>
+ <argument index="0" name="deg" type="float">
+ </argument>
+ <description>
+ Returns degrees converted to radians.
+ [codeblock]
+ # r is 3.141593
+ r = deg2rad(180)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="dict2inst">
+ <return type="Object">
+ </return>
+ <argument index="0" name="dict" type="Dictionary">
+ </argument>
+ <description>
+ Converts a previously converted instance to a dictionary, back into an instance. Useful for deserializing.
+ </description>
+ </method>
+ <method name="ease">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <argument index="1" name="curve" type="float">
+ </argument>
+ <description>
+ Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
+ </description>
+ </method>
+ <method name="exp">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it.
+ [b]e[/b] has an approximate value of 2.71828.
+ [codeblock]
+ a = exp(2) # approximately 7.39
+ [/codeblock]
+ </description>
+ </method>
+ <method name="floor">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Rounds [code]s[/code] to the closest smaller integer and returns it.
+ [codeblock]
+ # a is 2
+ a = floor(2.99)
+ # a is -3
+ a = floor(-2.99)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="fmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point remainder of [code]x/y[/code].
+ [codeblock]
+ # remainder is 1.5
+ var remainder = fmod(7, 5.5)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="fposmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point remainder of [code]x/y[/code] that wraps equally in positive and negative.
+ [codeblock]
+ var i = -10
+ while i &lt; 0:
+ prints(i, fposmod(i, 10))
+ i += 1
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -10 10
+ -9 1
+ -8 2
+ -7 3
+ -6 4
+ -5 5
+ -4 6
+ -3 7
+ -2 8
+ -1 9
+ [/codeblock]
+ </description>
+ </method>
+ <method name="funcref">
+ <return type="FuncRef">
+ </return>
+ <argument index="0" name="instance" type="Object">
+ </argument>
+ <argument index="1" name="funcname" type="String">
+ </argument>
+ <description>
+ Returns a reference to the specified function [code]funcname[/code] in the [code]instance[/code] node. As functions aren't first-class objects in GDscript, use [code]funcref[/code] to store a [FuncRef] in a variable and call it later.
+ [codeblock]
+ func foo():
+ return("bar")
+
+ a = funcref(self, "foo")
+ print(a.call_func()) # prints bar
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_stack">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of dictionaries representing the current call stack.
+ [codeblock]
+ func _ready():
+ foo()
+
+ func foo():
+ bar()
+
+ func bar():
+ print(get_stack())
+ [/codeblock]
+ would print
+ [codeblock]
+ [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Returns the integer hash of the variable passed.
+ [codeblock]
+ print(hash("a")) # prints 177670
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inst2dict">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="inst" type="Object">
+ </argument>
+ <description>
+ Returns the passed instance converted to a dictionary (useful for serializing).
+ [codeblock]
+ var foo = "bar"
+ func _ready():
+ var d = inst2dict(self)
+ print(d.keys())
+ print(d.values())
+ [/codeblock]
+ Prints out:
+ [codeblock]
+ [@subpath, @path, foo]
+ [, res://test.gd, bar]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="instance_from_id">
+ <return type="Object">
+ </return>
+ <argument index="0" name="instance_id" type="int">
+ </argument>
+ <description>
+ Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
+ [codeblock]
+ var foo = "bar"
+ func _ready():
+ var id = get_instance_id()
+ var inst = instance_from_id(id)
+ print(inst.foo) # prints bar
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inverse_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Returns a normalized value considering the given range.
+ [codeblock]
+ inverse_lerp(3, 5, 4) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns True/False whether [code]a[/code] and [code]b[/code] are approximately equal to each other.
+ </description>
+ </method>
+ <method name="is_inf">
+ <return type="bool">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
+ </description>
+ </method>
+ <method name="is_instance_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="instance" type="Object">
+ </argument>
+ <description>
+ Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
+ </description>
+ </method>
+ <method name="is_nan">
+ <return type="bool">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns whether [code]s[/code] is a NaN (Not-A-Number) value.
+ </description>
+ </method>
+ <method name="is_zero_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns True/False whether [code]s[/code] is zero or almost zero.
+ </description>
+ </method>
+ <method name="len">
+ <return type="int">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Returns length of Variant [code]var[/code]. Length is the character count of String, element count of Array, size of Dictionary, etc.
+ [b]Note:[/b] Generates a fatal error if Variant can not provide a length.
+ [codeblock]
+ a = [1, 2, 3, 4]
+ len(a) # returns 4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="lerp">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Variant">
+ </argument>
+ <argument index="1" name="to" type="Variant">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Linearly interpolates between two values by a normalized value.
+ If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float].
+ If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method).
+ [codeblock]
+ lerp(0, 4, 0.75) # returns 3.0
+ lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="linear2db">
+ <return type="float">
+ </return>
+ <argument index="0" name="nrg" type="float">
+ </argument>
+ <description>
+ Converts from linear energy to decibels (audio).
+ </description>
+ </method>
+ <method name="load">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Loads a resource from the filesystem located at [code]path[/code].
+ [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
+ [codeblock]
+ # load a scene called main located in the root of the project directory
+ var main = load("res://main.tscn")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="log">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
+ [b]Note:[/b] This is not the same as the log function on your calculator which is a base 10 logarithm.
+ [codeblock]
+ log(10) # returns 2.302585
+ [/codeblock]
+ </description>
+ </method>
+ <method name="max">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the maximum of two values.
+ [codeblock]
+ max(1, 2) # returns 2
+ max(-3.99, -4) # returns -3.99
+ [/codeblock]
+ </description>
+ </method>
+ <method name="min">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the minimum of two values.
+ [codeblock]
+ min(1, 2) # returns 1
+ min(-3.99, -4) # returns -4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="move_toward">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="delta" type="float">
+ </argument>
+ <description>
+ Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
+ Use a negative [code]delta[/code] value to move away.
+ [codeblock]
+ move_toward(10, 5, 4) # returns 6
+ [/codeblock]
+ </description>
+ </method>
+ <method name="nearest_po2">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Returns the nearest larger power of 2 for integer [code]value[/code].
+ [codeblock]
+ nearest_po2(3) # returns 4
+ nearest_po2(4) # returns 4
+ nearest_po2(5) # returns 8
+ [/codeblock]
+ </description>
+ </method>
+ <method name="parse_json">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
+ Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
+ Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="polar2cartesian">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="r" type="float">
+ </argument>
+ <argument index="1" name="th" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis).
+ </description>
+ </method>
+ <method name="pow">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the result of [code]x[/code] raised to the power of [code]y[/code].
+ [codeblock]
+ pow(2, 5) # returns 32
+ [/codeblock]
+ </description>
+ </method>
+ <method name="preload">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Returns a resource from the filesystem that is loaded during script parsing.
+ [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
+ [codeblock]
+ # load a scene called main located in the root of the project directory
+ var main = preload("res://main.tscn")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="print" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Converts one or more arguments to strings in the best way possible and prints them to the console.
+ [codeblock]
+ a = [1, 2, 3]
+ print("a", "b", a) # prints ab[1, 2, 3]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="print_debug" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Like [method print], but prints only when used in debug mode.
+ </description>
+ </method>
+ <method name="print_stack">
+ <return type="void">
+ </return>
+ <description>
+ Prints a stack track at code location, only works when running with debugger turned on.
+ Output in the console would look something like this:
+ [codeblock]
+ Frame 0 - res://test.gd:16 in function '_process'
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printerr" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Prints one or more arguments to strings in the best way possible to standard error line.
+ [codeblock]
+ printerr("prints to stderr")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printraw" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ [codeblock]
+ printraw("A")
+ printraw("B")
+ # prints AB
+ [/codeblock]
+ </description>
+ </method>
+ <method name="prints" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Prints one or more arguments to the console with a space between each argument.
+ [codeblock]
+ prints("A", "B", "C") # prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printt" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Prints one or more arguments to the console with a tab between each argument.
+ [codeblock]
+ printt("A", "B", "C") # prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="push_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="message" type="String">
+ </argument>
+ <description>
+ Pushes an error message to Godot's built-in debugger and to the OS terminal.
+ [codeblock]
+ push_error("test error") # prints "test error" to debugger and terminal as error call
+ [/codeblock]
+ </description>
+ </method>
+ <method name="push_warning">
+ <return type="void">
+ </return>
+ <argument index="0" name="message" type="String">
+ </argument>
+ <description>
+ Pushes a warning message to Godot's built-in debugger and to the OS terminal.
+ [codeblock]
+ push_warning("test warning") # prints "test warning" to debugger and terminal as warning call
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rad2deg">
+ <return type="float">
+ </return>
+ <argument index="0" name="rad" type="float">
+ </argument>
+ <description>
+ Converts from radians to degrees.
+ [codeblock]
+ rad2deg(0.523599) # returns 30
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rand_range">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <description>
+ Random range, any floating point value between [code]from[/code] and [code]to[/code].
+ [codeblock]
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rand_seed">
+ <return type="Array">
+ </return>
+ <argument index="0" name="seed" type="int">
+ </argument>
+ <description>
+ Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ </description>
+ </method>
+ <method name="randf">
+ <return type="float">
+ </return>
+ <description>
+ Returns a random floating point value on the interval [code][0, 1][/code].
+ [codeblock]
+ randf() # returns e.g. 0.375671
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randi">
+ <return type="int">
+ </return>
+ <description>
+ Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1).
+ [codeblock]
+ randi() # returns random integer between 0 and 2^32 - 1
+ randi() % 20 # returns random integer between 0 and 19
+ randi() % 100 # returns random integer between 0 and 99
+ randi() % 100 + 1 # returns random integer between 1 and 100
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randomize">
+ <return type="void">
+ </return>
+ <description>
+ Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
+ [codeblock]
+ func _ready():
+ randomize()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range" qualifiers="vararg">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
+ [codeblock]
+ for i in range(4):
+ print(i)
+ for i in range(2, 5):
+ print(i)
+ for i in range(0, 6, 2):
+ print(i)
+ [/codeblock]
+ Output:
+ [codeblock]
+ 0
+ 1
+ 2
+ 3
+
+ 2
+ 3
+ 4
+
+ 0
+ 2
+ 4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="istart" type="float">
+ </argument>
+ <argument index="2" name="istop" type="float">
+ </argument>
+ <argument index="3" name="ostart" type="float">
+ </argument>
+ <argument index="4" name="ostop" type="float">
+ </argument>
+ <description>
+ Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code].
+ [codeblock]
+ range_lerp(75, 0, 100, -1, 1) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="round">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the integral value that is nearest to [code]s[/code], with halfway cases rounded away from zero.
+ [codeblock]
+ round(2.6) # returns 3
+ [/codeblock]
+ </description>
+ </method>
+ <method name="seed">
+ <return type="void">
+ </return>
+ <argument index="0" name="seed" type="int">
+ </argument>
+ <description>
+ Sets seed for the random number generator.
+ [codeblock]
+ my_seed = "Godot Rocks"
+ seed(my_seed.hash())
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sign">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0.
+ [codeblock]
+ sign(-6) # returns -1
+ sign(0) # returns 0
+ sign(6) # returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sin">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the sine of angle [code]s[/code] in radians.
+ [codeblock]
+ sin(0.523599) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sinh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic sine of [code]s[/code].
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ sinh(a) # returns 0.75
+ [/codeblock]
+ </description>
+ </method>
+ <method name="smoothstep">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Returns a number smoothly interpolated between the [code]from[/code] and [code]to[/code], based on the [code]weight[/code]. Similar to [method lerp], but interpolates faster at the beginning and slower at the end.
+ [codeblock]
+ smoothstep(0, 2, 0.5) # returns 0.15
+ smoothstep(0, 2, 1.0) # returns 0.5
+ smoothstep(0, 2, 2.0) # returns 1.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sqrt">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the square root of [code]s[/code].
+ [codeblock]
+ sqrt(9) # returns 3
+ [/codeblock]
+ </description>
+ </method>
+ <method name="step_decimals">
+ <return type="int">
+ </return>
+ <argument index="0" name="step" type="float">
+ </argument>
+ <description>
+ Returns the position of the first non-zero digit, after the decimal point.
+ [codeblock]
+ # n is 0
+ n = step_decimals(5)
+ # n is 4
+ n = step_decimals(1.0005)
+ # n is 9
+ n = step_decimals(0.000000005)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="stepify">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <argument index="1" name="step" type="float">
+ </argument>
+ <description>
+ Snaps float value [code]s[/code] to a given [code]step[/code].
+ </description>
+ </method>
+ <method name="str" qualifiers="vararg">
+ <return type="String">
+ </return>
+ <description>
+ Converts one or more arguments to string in the best way possible.
+ [codeblock]
+ var a = [10, 20, 30]
+ var b = str(a);
+ len(a) # returns 3
+ len(b) # returns 12
+ [/codeblock]
+ </description>
+ </method>
+ <method name="str2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Converts a formatted string that was returned by [method var2str] to the original value.
+ [codeblock]
+ a = '{ "a": 1, "b": 2 }'
+ b = str2var(a)
+ print(b['a']) # prints 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tan">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the tangent of angle [code]s[/code] in radians.
+ [codeblock]
+ tan(deg2rad(45)) # returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tanh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic tangent of [code]s[/code].
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ tanh(a) # returns 0.6
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_json">
+ <return type="String">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Converts a Variant [code]var[/code] to JSON text and return the result. Useful for serializing data to store or send over the network.
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ b = to_json(a)
+ print(b) # {"a":1, "b":2}
+ [/codeblock]
+ </description>
+ </method>
+ <method name="type_exists">
+ <return type="bool">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Returns whether the given class exists in [ClassDB].
+ [codeblock]
+ type_exists("Sprite") # returns true
+ type_exists("Variant") # returns false
+ [/codeblock]
+ </description>
+ </method>
+ <method name="typeof">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="Variant">
+ </argument>
+ <description>
+ Returns the internal type of the given Variant object, using the TYPE_* enum in [@GlobalScope].
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="validate_json">
+ <return type="String">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ Checks that [code]json[/code] is valid JSON data. Returns empty string if valid. Returns error message if not valid.
+ [codeblock]
+ j = to_json([1, 2, 3])
+ v = validate_json(j)
+ if not v:
+ print("valid")
+ else:
+ prints("invalid", v)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="var2bytes">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <argument index="1" name="full_objects" type="bool" default="false">
+ </argument>
+ <description>
+ Encodes a variable value to a byte array. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code).
+ </description>
+ </method>
+ <method name="var2str">
+ <return type="String">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Converts a Variant [code]var[/code] to a formatted string that can later be parsed using [method str2var].
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ print(var2str(a))
+ [/codeblock]
+ prints
+ [codeblock]
+ {
+ "a": 1,
+ "b": 2
+ }
+ [/codeblock]
+ </description>
+ </method>
+ <method name="weakref">
+ <return type="WeakRef">
+ </return>
+ <argument index="0" name="obj" type="Object">
+ </argument>
+ <description>
+ Returns a weak reference to an object.
+ A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
+ </description>
+ </method>
+ <method name="wrapf">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <description>
+ Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Usable for creating loop-alike behavior or infinite surfaces.
+ [codeblock]
+ # a is 0.5
+ a = wrapf(10.5, 0.0, 10.0)
+ [/codeblock]
+ [codeblock]
+ # a is 9.5
+ a = wrapf(-0.5, 0.0, 10.0)
+ [/codeblock]
+ [codeblock]
+ # infinite loop between 0.0 and 0.99
+ f = wrapf(f + 0.1, 0.0, 1.0)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="wrapi">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <argument index="1" name="min" type="int">
+ </argument>
+ <argument index="2" name="max" type="int">
+ </argument>
+ <description>
+ Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Usable for creating loop-alike behavior or infinite surfaces.
+ [codeblock]
+ # a is 0
+ a = wrapi(10, 0, 10)
+ [/codeblock]
+ [codeblock]
+ # a is 9
+ a = wrapi(-1, 0, 10)
+ [/codeblock]
+ [codeblock]
+ # infinite loop between 0 and 9
+ frame = wrapi(frame + 1, 0, 10)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="yield">
+ <return type="GDScriptFunctionState">
+ </return>
+ <argument index="0" name="object" type="Object" default="null">
+ </argument>
+ <argument index="1" name="signal" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Stops the function execution and returns the current suspended state to the calling function.
+ From the caller, call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. Within the resumed function, [code]yield()[/code] returns whatever was passed to the [code]resume()[/code] function call.
+ If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, [code]yield()[/code] returns the argument passed to [code]emit_signal()[/code] if the signal takes only one argument, or an array containing all the arguments passed to [code]emit_signal()[/code] if the signal takes multiple arguments.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="PI" value="3.141593">
+ Constant that represents how many times the diameter of a circle fits around its perimeter.
+ </constant>
+ <constant name="TAU" value="6.283185">
+ The circle constant, the circumference of the unit circle.
+ </constant>
+ <constant name="INF" value="inf">
+ A positive infinity. (For negative infinity, use -INF).
+ </constant>
+ <constant name="NAN" value="nan">
+ Macro constant that expands to an expression of type float that represents a NaN.
+ The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
+ </constant>
+ </constants>
+</class>
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 40b773d99f..1756f6eabc 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -509,7 +509,6 @@ public:
};
class ResourceFormatLoaderGDScript : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderGDScript, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@@ -519,7 +518,6 @@ public:
};
class ResourceFormatSaverGDScript : public ResourceFormatSaver {
- GDCLASS(ResourceFormatSaverGDScript, ResourceFormatSaver)
public:
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const;
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index cff9ba55b8..bae5eca218 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -133,35 +133,13 @@ Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_insta
return NULL;
}
-String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const {
-
- String err_text;
-
- if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
- int errorarg = p_err.argument;
- err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(p_err.expected) + ".";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
- err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
- err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
- err_text = "Invalid call. Nonexistent " + p_where + ".";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
- err_text = "Attempt to call " + p_where + " on a null instance.";
- } else {
- err_text = "Bug, call error: #" + itos(p_err.error);
- }
-
- return err_text;
-}
-
#ifdef DEBUG_ENABLED
-static String _get_var_type(const Variant *p_type) {
+static String _get_var_type(const Variant *p_var) {
String basestr;
- if (p_type->get_type() == Variant::OBJECT) {
- Object *bobj = *p_type;
+ if (p_var->get_type() == Variant::OBJECT) {
+ Object *bobj = *p_var;
if (!bobj) {
basestr = "null instance";
} else {
@@ -176,12 +154,42 @@ static String _get_var_type(const Variant *p_type) {
}
} else {
- basestr = Variant::get_type_name(p_type->get_type());
+ basestr = Variant::get_type_name(p_var->get_type());
}
return basestr;
}
-#endif
+#endif // DEBUG_ENABLED
+
+String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const {
+
+ String err_text;
+
+ if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ int errorarg = p_err.argument;
+ // Handle the Object to Object case separately as we don't have further class details.
+#ifdef DEBUG_ENABLED
+ if (p_err.expected == Variant::OBJECT && argptrs[errorarg]->get_type() == p_err.expected) {
+ err_text = "Invalid type in " + p_where + ". The Object-derived class of argument " + itos(errorarg + 1) + " (" + _get_var_type(argptrs[errorarg]) + ") is not a subclass of the expected argument class.";
+ } else
+#endif // DEBUG_ENABLED
+ {
+ err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(p_err.expected) + ".";
+ }
+ } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
+ err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
+ } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
+ err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
+ } else if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ err_text = "Invalid call. Nonexistent " + p_where + ".";
+ } else if (p_err.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
+ err_text = "Attempt to call " + p_where + " on a null instance.";
+ } else {
+ err_text = "Bug, call error: #" + itos(p_err.error);
+ }
+
+ return err_text;
+}
#if defined(__GNUC__)
#define OPCODES_TABLE \
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 3caa7b1d12..994a84fbc4 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -241,6 +241,7 @@ Vector3 GridMap::get_cell_size() const {
void GridMap::set_octant_size(int p_size) {
+ ERR_FAIL_COND(p_size == 0);
octant_size = p_size;
_recreate_octant_data();
}
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/mbedtls/stream_peer_mbed_tls.cpp b/modules/mbedtls/stream_peer_mbed_tls.cpp
index 45d3b86919..3541eff25a 100755
--- a/modules/mbedtls/stream_peer_mbed_tls.cpp
+++ b/modules/mbedtls/stream_peer_mbed_tls.cpp
@@ -122,6 +122,8 @@ Error StreamPeerMbedTLS::_do_handshake() {
Error StreamPeerMbedTLS::connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs, const String &p_for_hostname) {
+ ERR_FAIL_COND_V(p_base.is_null(), ERR_INVALID_PARAMETER);
+
base = p_base;
int ret = 0;
int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE;
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 4a1fb8e5ed..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;
@@ -440,7 +440,6 @@ public:
};
class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderCSharpScript, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@@ -449,7 +448,6 @@ public:
};
class ResourceFormatSaverCSharpScript : public ResourceFormatSaver {
- GDCLASS(ResourceFormatSaverCSharpScript, ResourceFormatSaver)
public:
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const;
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/doc_classes/OpenSimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
index dc7fc7fe31..894a1b3ced 100644
--- a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
+++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
@@ -41,6 +41,8 @@
<argument index="0" name="x" type="float">
</argument>
<description>
+ Returns the 1D noise value [code][-1,1][/code] at the given x-coordinate.
+ Note: This method actually returns the 2D noise value [code][-1,1][/code] with fixed y-coordinate value 0.0.
</description>
</method>
<method name="get_noise_2d">
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 f53bff0288..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;
@@ -132,7 +132,6 @@ public:
};
class ResourceFormatLoaderAudioStreamOpus : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderAudioStreamOpus, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
diff --git a/modules/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h
index 2808b4ff03..606268e447 100644
--- a/modules/pvr/texture_loader_pvr.h
+++ b/modules/pvr/texture_loader_pvr.h
@@ -35,7 +35,6 @@
#include "scene/resources/texture.h"
class ResourceFormatPVR : public ResourceFormatLoader {
- GDCLASS(ResourceFormatPVR, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path, Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
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/config.py b/modules/stb_vorbis/config.py
index d75e41797a..200b8dfd50 100644
--- a/modules/stb_vorbis/config.py
+++ b/modules/stb_vorbis/config.py
@@ -7,7 +7,6 @@ def configure(env):
def get_doc_classes():
return [
"AudioStreamOGGVorbis",
- "ResourceImporterOGGVorbis",
]
def get_doc_path():
diff --git a/modules/stb_vorbis/register_types.cpp b/modules/stb_vorbis/register_types.cpp
index 88a1766e47..ce64626e4b 100644
--- a/modules/stb_vorbis/register_types.cpp
+++ b/modules/stb_vorbis/register_types.cpp
@@ -29,15 +29,22 @@
/*************************************************************************/
#include "register_types.h"
+
#include "audio_stream_ogg_vorbis.h"
+
+#ifdef TOOLS_ENABLED
+#include "core/engine.h"
#include "resource_importer_ogg_vorbis.h"
+#endif
void register_stb_vorbis_types() {
#ifdef TOOLS_ENABLED
- Ref<ResourceImporterOGGVorbis> ogg_import;
- ogg_import.instance();
- ResourceFormatImporter::get_singleton()->add_importer(ogg_import);
+ if (Engine::get_singleton()->is_editor_hint()) {
+ Ref<ResourceImporterOGGVorbis> ogg_import;
+ ogg_import.instance();
+ ResourceFormatImporter::get_singleton()->add_importer(ogg_import);
+ }
#endif
ClassDB::register_class<AudioStreamOGGVorbis>();
}
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 7254f57672..e10f29e310 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -82,9 +82,8 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
float loop_offset = p_options["loop_offset"];
FileAccess *f = FileAccess::open(p_source_file, FileAccess::READ);
- if (!f) {
- ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
- }
+
+ ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
size_t len = f->get_len();
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/theora/config.py b/modules/theora/config.py
index 7504166237..c7713d7607 100644
--- a/modules/theora/config.py
+++ b/modules/theora/config.py
@@ -6,7 +6,6 @@ def configure(env):
def get_doc_classes():
return [
- "ResourceImporterTheora",
"VideoStreamTheora",
]
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index 85d73d3c0d..0c37d33358 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -186,7 +186,6 @@ public:
};
class ResourceFormatLoaderTheora : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderTheora, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
diff --git a/modules/visual_script/config.py b/modules/visual_script/config.py
index 07a0450734..04e1a40b81 100644
--- a/modules/visual_script/config.py
+++ b/modules/visual_script/config.py
@@ -6,6 +6,7 @@ def configure(env):
def get_doc_classes():
return [
+ "@VisualScript",
"VisualScriptBasicTypeConstant",
"VisualScriptBuiltinFunc",
"VisualScriptClassConstant",
diff --git a/modules/gdnative/doc_classes/ResourceFormatLoaderVideoStreamGDNative.xml b/modules/visual_script/doc_classes/@VisualScript.xml
index cd8b336778..8d9408e6d4 100644
--- a/modules/gdnative/doc_classes/ResourceFormatLoaderVideoStreamGDNative.xml
+++ b/modules/visual_script/doc_classes/@VisualScript.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderVideoStreamGDNative" inherits="ResourceFormatLoader" category="Core" version="3.2">
+<class name="@VisualScript" category="Core" version="3.2">
<brief_description>
+ Built-in visual script functions.
</brief_description>
<description>
+ A list of built-in visual script functions, see [VisualScriptBuiltinFunc] and [VisualScript].
</description>
<tutorials>
</tutorials>
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 85fc867901..df5bb9ca2e 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -1692,7 +1692,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if ((ret == output || ret & VisualScriptNodeInstance::STEP_FLAG_PUSH_STACK_BIT) && node->sequence_output_count) {
//if no exit bit was set, and has sequence outputs, guess next node
- if (output < 0 || output >= node->sequence_output_count) {
+ if (output >= node->sequence_output_count) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Node returned an invalid sequence output: ") + itos(output);
error = true;
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.cpp b/modules/visual_script/visual_script_property_selector.cpp
index ceec79c0d5..1e7ed3019c 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -188,7 +188,6 @@ void VisualScriptPropertySelector::_update_search() {
}
}
}
- bool script_methods = false;
{
if (type != Variant::NIL) {
Variant v;
@@ -211,7 +210,7 @@ void VisualScriptPropertySelector::_update_search() {
for (List<MethodInfo>::Element *M = methods.front(); M; M = M->next()) {
String name = M->get().name.get_slice(":", 0);
- if (!script_methods && name.begins_with("_") && !(M->get().flags & METHOD_FLAG_VIRTUAL))
+ if (name.begins_with("_") && !(M->get().flags & METHOD_FLAG_VIRTUAL))
continue;
if (virtuals_only && !(M->get().flags & METHOD_FLAG_VIRTUAL))
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/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index fa9d5fe664..a37867d9f9 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -127,7 +127,6 @@ public:
};
class ResourceFormatLoaderAudioStreamOGGVorbis : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderAudioStreamOGGVorbis, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
diff --git a/modules/webm/config.py b/modules/webm/config.py
index 72a4073423..ba4dcce2f5 100644
--- a/modules/webm/config.py
+++ b/modules/webm/config.py
@@ -6,7 +6,6 @@ def configure(env):
def get_doc_classes():
return [
- "ResourceImporterWebm",
"VideoStreamWebm",
]
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 992095ba4c..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;
@@ -127,7 +127,6 @@ public:
};
class ResourceFormatLoaderWebm : public ResourceFormatLoader {
- GDCLASS(ResourceFormatLoaderWebm, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;