summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--compat.py29
-rw-r--r--core/bind/core_bind.cpp18
-rw-r--r--core/bind/core_bind.h5
-rw-r--r--core/error_macros.cpp3
-rw-r--r--core/io/file_access_buffered_fa.h5
-rw-r--r--core/io/file_access_compressed.cpp7
-rw-r--r--core/io/file_access_compressed.h1
-rw-r--r--core/io/file_access_encrypted.cpp6
-rw-r--r--core/io/file_access_encrypted.h1
-rw-r--r--core/io/file_access_memory.cpp4
-rw-r--r--core/io/file_access_memory.h1
-rw-r--r--core/io/file_access_network.cpp4
-rw-r--r--core/io/file_access_network.h1
-rw-r--r--core/io/file_access_pack.cpp5
-rw-r--r--core/io/file_access_pack.h1
-rw-r--r--core/io/file_access_zip.cpp5
-rw-r--r--core/io/file_access_zip.h1
-rw-r--r--core/io/http_client.cpp2
-rw-r--r--core/io/logger.cpp255
-rw-r--r--core/io/logger.h107
-rw-r--r--core/io/resource_import.cpp2
-rw-r--r--core/io/resource_loader.cpp2
-rw-r--r--core/os/file_access.cpp2
-rw-r--r--core/os/file_access.h1
-rw-r--r--core/os/os.cpp49
-rw-r--r--core/os/os.h28
-rw-r--r--core/project_settings.cpp18
-rw-r--r--core/project_settings.h5
-rw-r--r--core/translation.cpp2
-rw-r--r--doc/classes/@VisualScript.xml2
-rw-r--r--doc/classes/ARVRAnchor.xml7
-rw-r--r--doc/classes/ARVRInterface.xml88
-rw-r--r--doc/classes/ARVRScriptInterface.xml43
-rw-r--r--doc/classes/ARVRServer.xml32
-rw-r--r--doc/classes/OS.xml14
-rw-r--r--doc/classes/RegEx.xml10
-rw-r--r--doc/classes/RegExMatch.xml10
-rw-r--r--doc/classes/VideoPlayer.xml9
-rw-r--r--doc/classes/VisualScript.xml48
-rw-r--r--doc/classes/VisualScriptBasicTypeConstant.xml4
-rw-r--r--doc/classes/VisualScriptBuiltinFunc.xml62
-rw-r--r--doc/classes/VisualScriptClassConstant.xml4
-rw-r--r--doc/classes/VisualScriptComment.xml6
-rw-r--r--doc/classes/VisualScriptCondition.xml2
-rw-r--r--doc/classes/VisualScriptConstant.xml4
-rw-r--r--doc/classes/VisualScriptConstructor.xml20
-rw-r--r--doc/classes/VisualScriptCustomNode.xml32
-rw-r--r--doc/classes/VisualScriptDeconstruct.xml3
-rw-r--r--doc/classes/VisualScriptEmitSignal.xml3
-rw-r--r--doc/classes/VisualScriptEngineSingleton.xml3
-rw-r--r--doc/classes/VisualScriptNode.xml13
-rw-r--r--doc/tools/doc_status.py15
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp10
-rw-r--r--drivers/gles3/shaders/scene.glsl149
-rw-r--r--drivers/unix/file_access_unix.cpp6
-rw-r--r--drivers/unix/file_access_unix.h1
-rw-r--r--drivers/unix/os_unix.cpp93
-rw-r--r--drivers/unix/os_unix.h12
-rw-r--r--drivers/unix/syslog_logger.cpp71
-rw-r--r--drivers/unix/syslog_logger.h48
-rw-r--r--drivers/windows/dir_access_windows.cpp2
-rw-r--r--drivers/windows/file_access_windows.cpp6
-rw-r--r--drivers/windows/file_access_windows.h1
-rw-r--r--editor/SCsub22
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/editor_autoload_settings.cpp4
-rw-r--r--editor/editor_export.cpp6
-rw-r--r--editor/editor_file_system.cpp2
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_settings.cpp26
-rw-r--r--editor/editor_settings.h6
-rw-r--r--editor/editor_themes.cpp56
-rw-r--r--editor/icons/icon_GUI_tree_updown.svg5
-rw-r--r--editor/icons/icon_mini_color.svg6
-rw-r--r--editor/icons/icon_mini_image.svg5
-rw-r--r--editor/icons/icon_mini_input.svg5
-rw-r--r--editor/import_dock.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp14
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h1
-rw-r--r--editor/plugins/curve_editor_plugin.cpp18
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
-rw-r--r--editor/plugins/script_text_editor.cpp40
-rw-r--r--editor/plugins/script_text_editor.h12
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp238
-rw-r--r--editor/plugins/spatial_editor_plugin.h6
-rw-r--r--editor/project_export.cpp2
-rw-r--r--editor/project_manager.cpp2
-rw-r--r--editor/project_settings_editor.cpp28
-rw-r--r--editor/settings_config_dialog.cpp2
-rw-r--r--main/main.cpp22
-rw-r--r--modules/gdnative/SCsub145
-rw-r--r--modules/gdnative/gd_native_library_editor.cpp4
-rw-r--r--modules/gdnative/gdnative.cpp11
-rw-r--r--modules/gdnative/gdnative.h2
-rw-r--r--modules/gdnative/gdnative_api.json4512
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h11
-rw-r--r--modules/gdnative/include/gdnative_api_struct.h723
-rw-r--r--modules/gdnative/include/nativescript/godot_nativescript.h36
-rw-r--r--modules/gdscript/gd_function.cpp2
-rw-r--r--modules/gridmap/grid_map.cpp15
-rw-r--r--modules/gridmap/grid_map.h2
-rw-r--r--modules/mobile_vr/config.py8
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml134
-rw-r--r--modules/mobile_vr/mobile_interface.cpp29
-rw-r--r--modules/mobile_vr/mobile_interface.h5
-rw-r--r--modules/mono/csharp_script.cpp53
-rw-r--r--modules/mono/editor/godotsharp_builds.cpp4
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp4
-rw-r--r--modules/mono/mono_reg_utils.py6
-rw-r--r--modules/visual_script/visual_script.cpp1
-rw-r--r--modules/visual_script/visual_script_editor.cpp172
-rw-r--r--modules/visual_script/visual_script_nodes.cpp8
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/file_access_android.cpp5
-rw-r--r--platform/android/file_access_android.h1
-rw-r--r--platform/android/file_access_jandroid.cpp3
-rw-r--r--platform/android/file_access_jandroid.h1
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java15
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotLib.java2
-rw-r--r--platform/android/java_glue.cpp16
-rw-r--r--platform/android/java_glue.h1
-rw-r--r--platform/android/os_android.cpp44
-rw-r--r--platform/android/os_android.h8
-rw-r--r--platform/iphone/gl_view.h2
-rw-r--r--platform/iphone/gl_view.mm40
-rw-r--r--platform/iphone/os_iphone.cpp19
-rw-r--r--platform/iphone/os_iphone.h5
-rw-r--r--platform/javascript/javascript_main.cpp16
-rw-r--r--platform/javascript/os_javascript.cpp25
-rw-r--r--platform/javascript/os_javascript.h11
-rw-r--r--platform/osx/detect.py2
-rw-r--r--platform/osx/export/export.cpp10
-rw-r--r--platform/osx/os_osx.h3
-rw-r--r--platform/osx/os_osx.mm90
-rw-r--r--platform/uwp/os_uwp.cpp60
-rw-r--r--platform/uwp/os_uwp.h4
-rw-r--r--platform/windows/SCsub1
-rw-r--r--platform/windows/os_windows.cpp143
-rw-r--r--platform/windows/os_windows.h4
-rw-r--r--platform/windows/windows_terminal_logger.cpp157
-rw-r--r--platform/windows/windows_terminal_logger.h47
-rw-r--r--scene/3d/arvr_nodes.cpp110
-rw-r--r--scene/3d/arvr_nodes.h7
-rw-r--r--scene/3d/camera.h8
-rw-r--r--scene/3d/gi_probe.cpp4
-rw-r--r--scene/3d/navigation.cpp4
-rw-r--r--scene/gui/file_dialog.cpp1
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/video_player.cpp7
-rw-r--r--scene/gui/video_player.h1
-rw-r--r--scene/register_scene_types.cpp7
-rw-r--r--scene/resources/curve.cpp10
-rw-r--r--servers/arvr/arvr_interface.cpp68
-rw-r--r--servers/arvr/arvr_interface.h51
-rw-r--r--servers/arvr/arvr_script_interface.cpp37
-rw-r--r--servers/arvr/arvr_script_interface.h13
-rw-r--r--servers/arvr_server.cpp4
-rw-r--r--servers/arvr_server.h7
-rw-r--r--servers/visual/visual_server_scene.cpp6
-rw-r--r--servers/visual/visual_server_scene.h5
161 files changed, 7306 insertions, 1613 deletions
diff --git a/.gitignore b/.gitignore
index d27b8b2b4b..b347b348a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ gmon.out
# Misc
.DS_Store
+logs/
# for projects that use SCons for building: http://http://www.scons.org/
.sconf_temp
diff --git a/compat.py b/compat.py
index 7338c479fb..e1bc0ed673 100644
--- a/compat.py
+++ b/compat.py
@@ -14,6 +14,17 @@ if sys.version_info < (3,):
return x
def iteritems(d):
return d.iteritems()
+ def escape_string(s):
+ if isinstance(s, unicode):
+ s = s.encode('ascii')
+ result = ''
+ for c in s:
+ if not (32 <= ord(c) < 127) or c in ('\\', '"'):
+ result += '\\%03o' % ord(c)
+ else:
+ result += c
+ return result
+
else:
def isbasestring(s):
return isinstance(s, (str, bytes))
@@ -29,3 +40,21 @@ else:
return codecs.utf_8_encode(x)[0]
def iteritems(d):
return iter(d.items())
+ def charcode_to_c_escapes(c):
+ rev_result = []
+ while c >= 256:
+ c, low = (c // 256, c % 256)
+ rev_result.append('\\%03o' % low)
+ rev_result.append('\\%03o' % c)
+ return ''.join(reversed(rev_result))
+ def escape_string(s):
+ result = ''
+ if isinstance(s, str):
+ s = s.encode('utf-8')
+ for c in s:
+ if not(32 <= c < 127) or c in (ord('\\'), ord('"')):
+ result += charcode_to_c_escapes(c)
+ else:
+ result += chr(c)
+ return result
+
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index f47d540351..b47e611a51 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -453,6 +453,11 @@ int _OS::get_power_percent_left() {
return OS::get_singleton()->get_power_percent_left();
}
+bool _OS::has_feature(const String &p_feature) const {
+
+ return OS::get_singleton()->has_feature(p_feature);
+}
+
/*
enum Weekday {
DAY_SUNDAY,
@@ -755,6 +760,11 @@ bool _OS::can_draw() const {
return OS::get_singleton()->can_draw();
}
+bool _OS::is_userfs_persistent() const {
+
+ return OS::get_singleton()->is_userfs_persistent();
+}
+
int _OS::get_processor_count() const {
return OS::get_singleton()->get_processor_count();
@@ -858,6 +868,10 @@ void _OS::hide_virtual_keyboard() {
OS::get_singleton()->hide_virtual_keyboard();
}
+int _OS::get_virtual_keyboard_height() {
+ return OS::get_singleton()->get_virtual_keyboard_height();
+}
+
void _OS::print_all_resources(const String &p_to_file) {
OS::get_singleton()->print_all_resources(p_to_file);
@@ -1051,6 +1065,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_model_name"), &_OS::get_model_name);
ClassDB::bind_method(D_METHOD("can_draw"), &_OS::can_draw);
+ ClassDB::bind_method(D_METHOD("is_userfs_persistent"), &_OS::is_userfs_persistent);
ClassDB::bind_method(D_METHOD("is_stdout_verbose"), &_OS::is_stdout_verbose);
ClassDB::bind_method(D_METHOD("can_use_threads"), &_OS::can_use_threads);
@@ -1064,6 +1079,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_virtual_keyboard"), &_OS::has_virtual_keyboard);
ClassDB::bind_method(D_METHOD("show_virtual_keyboard", "existing_text"), &_OS::show_virtual_keyboard, DEFVAL(""));
ClassDB::bind_method(D_METHOD("hide_virtual_keyboard"), &_OS::hide_virtual_keyboard);
+ ClassDB::bind_method(D_METHOD("get_virtual_keyboard_height"), &_OS::get_virtual_keyboard_height);
ClassDB::bind_method(D_METHOD("print_resources_in_use", "short"), &_OS::print_resources_in_use, DEFVAL(false));
ClassDB::bind_method(D_METHOD("print_all_resources", "tofile"), &_OS::print_all_resources, DEFVAL(""));
@@ -1099,6 +1115,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_vsync", "enable"), &_OS::set_use_vsync);
ClassDB::bind_method(D_METHOD("is_vsync_enabled"), &_OS::is_vsync_enabled);
+ ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature);
+
ClassDB::bind_method(D_METHOD("get_power_state"), &_OS::get_power_state);
ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index f12ab9f000..7f8c734e36 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -204,6 +204,7 @@ public:
bool has_virtual_keyboard() const;
void show_virtual_keyboard(const String &p_existing_text = "");
void hide_virtual_keyboard();
+ int get_virtual_keyboard_height();
void print_resources_in_use(bool p_short = false);
void print_all_resources(const String &p_to_file);
@@ -266,6 +267,8 @@ public:
bool can_draw() const;
+ bool is_userfs_persistent() const;
+
bool is_stdout_verbose() const;
int get_processor_count() const;
@@ -315,6 +318,8 @@ public:
int get_power_seconds_left();
int get_power_percent_left();
+ bool has_feature(const String &p_feature) const;
+
static _OS *get_singleton() { return singleton; }
_OS();
diff --git a/core/error_macros.cpp b/core/error_macros.cpp
index 5919d38375..170a22e8dd 100644
--- a/core/error_macros.cpp
+++ b/core/error_macros.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "error_macros.h"
+#include "io/logger.h"
#include "os/os.h"
bool _err_error_exists = false;
@@ -79,7 +80,7 @@ void remove_error_handler(ErrorHandlerList *p_handler) {
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, ErrorHandlerType p_type) {
- OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, _err_error_exists ? OS::get_singleton()->get_last_error() : "", (OS::ErrorType)p_type);
+ OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, _err_error_exists ? OS::get_singleton()->get_last_error() : "", (Logger::ErrorType)p_type);
_global_lock();
ErrorHandlerList *l = error_handler_list;
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 9e41834561..309fc16d09 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -76,6 +76,11 @@ protected:
};
public:
+ void flush() {
+
+ f.flush();
+ };
+
void store_8(uint8_t p_dest) {
f.store_8(p_dest);
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp
index 4750945854..514e3c65f0 100644
--- a/core/io/file_access_compressed.cpp
+++ b/core/io/file_access_compressed.cpp
@@ -338,6 +338,13 @@ Error FileAccessCompressed::get_error() const {
return read_eof ? ERR_FILE_EOF : OK;
}
+void FileAccessCompressed::flush() {
+ ERR_FAIL_COND(!f);
+ ERR_FAIL_COND(!writing);
+
+ // compressed files keep data in memory till close()
+}
+
void FileAccessCompressed::store_8(uint8_t p_dest) {
ERR_FAIL_COND(!f);
diff --git a/core/io/file_access_compressed.h b/core/io/file_access_compressed.h
index 1a57e2d4ee..1d99e5bfd4 100644
--- a/core/io/file_access_compressed.h
+++ b/core/io/file_access_compressed.h
@@ -84,6 +84,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_name); ///< return true if a file exists
diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp
index 461c5bafe2..c93e12f7da 100644
--- a/core/io/file_access_encrypted.cpp
+++ b/core/io/file_access_encrypted.cpp
@@ -268,6 +268,12 @@ void FileAccessEncrypted::store_buffer(const uint8_t *p_src, int p_length) {
}
}
+void FileAccessEncrypted::flush() {
+ ERR_FAIL_COND(!writing);
+
+ // encrypted files keep data in memory till close()
+}
+
void FileAccessEncrypted::store_8(uint8_t p_dest) {
ERR_FAIL_COND(!writing);
diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h
index 82f60ac654..d83fed3e0e 100644
--- a/core/io/file_access_encrypted.h
+++ b/core/io/file_access_encrypted.h
@@ -71,6 +71,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual void store_buffer(const uint8_t *p_src, int p_length); ///< store an array of bytes
diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp
index b948394385..0a5815fca8 100644
--- a/core/io/file_access_memory.cpp
+++ b/core/io/file_access_memory.cpp
@@ -170,6 +170,10 @@ Error FileAccessMemory::get_error() const {
return pos >= length ? ERR_FILE_EOF : OK;
}
+void FileAccessMemory::flush() {
+ ERR_FAIL_COND(!data);
+}
+
void FileAccessMemory::store_8(uint8_t p_byte) {
ERR_FAIL_COND(!data);
diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h
index b7b8430089..23392719b4 100644
--- a/core/io/file_access_memory.h
+++ b/core/io/file_access_memory.h
@@ -62,6 +62,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_byte); ///< store a byte
virtual void store_buffer(const uint8_t *p_src, int p_length); ///< store an array of bytes
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 8c624226a1..a224abd9e7 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -456,6 +456,10 @@ Error FileAccessNetwork::get_error() const {
return pos == total_size ? ERR_FILE_EOF : OK;
}
+void FileAccessNetwork::flush() {
+ ERR_FAIL();
+}
+
void FileAccessNetwork::store_8(uint8_t p_dest) {
ERR_FAIL();
diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h
index abbe378b60..20614476d0 100644
--- a/core/io/file_access_network.h
+++ b/core/io/file_access_network.h
@@ -155,6 +155,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_path); ///< return true if a file exists
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index ff4c28ec39..a7eb8ce6a9 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -293,6 +293,11 @@ Error FileAccessPack::get_error() const {
return OK;
}
+void FileAccessPack::flush() {
+
+ ERR_FAIL();
+}
+
void FileAccessPack::store_8(uint8_t p_dest) {
ERR_FAIL();
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 3deb0d2bd3..12187a353a 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -161,6 +161,7 @@ public:
virtual Error get_error() const;
+ virtual void flush();
virtual void store_8(uint8_t p_dest);
virtual void store_buffer(const uint8_t *p_src, int p_length);
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index 73b23ac702..ec809011a9 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -353,6 +353,11 @@ Error FileAccessZip::get_error() const {
return OK;
};
+void FileAccessZip::flush() {
+
+ ERR_FAIL();
+}
+
void FileAccessZip::store_8(uint8_t p_dest) {
ERR_FAIL();
diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h
index a40e1a753d..0977b241ee 100644
--- a/core/io/file_access_zip.h
+++ b/core/io/file_access_zip.h
@@ -108,6 +108,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_name); ///< return true if a file exists
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index dd56db9bf9..b8c0a2b616 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -297,7 +297,7 @@ Error HTTPClient::poll() {
case StreamPeerTCP::STATUS_CONNECTED: {
if (ssl) {
Ref<StreamPeerSSL> ssl = StreamPeerSSL::create();
- Error err = ssl->connect_to_stream(tcp_connection, true, ssl_verify_host ? conn_host : String());
+ Error err = ssl->connect_to_stream(tcp_connection, ssl_verify_host, ssl_verify_host ? conn_host : String());
if (err != OK) {
close();
status = STATUS_SSL_HANDSHAKE_ERROR;
diff --git a/core/io/logger.cpp b/core/io/logger.cpp
new file mode 100644
index 0000000000..b94007d316
--- /dev/null
+++ b/core/io/logger.cpp
@@ -0,0 +1,255 @@
+/*************************************************************************/
+/* logger.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "logger.h"
+#include "os/dir_access.h"
+#include "os/os.h"
+#include "print_string.h"
+
+bool Logger::should_log(bool p_err) {
+ return (!p_err || _print_error_enabled) && (p_err || _print_line_enabled);
+}
+
+void Logger::log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
+ if (!should_log(true)) {
+ return;
+ }
+
+ const char *err_type = "**ERROR**";
+ switch (p_type) {
+ case ERR_ERROR: err_type = "**ERROR**"; break;
+ case ERR_WARNING: err_type = "**WARNING**"; break;
+ case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break;
+ case ERR_SHADER: err_type = "**SHADER ERROR**"; break;
+ default: ERR_PRINT("Unknown error type"); break;
+ }
+
+ const char *err_details;
+ if (p_rationale && *p_rationale)
+ err_details = p_rationale;
+ else
+ err_details = p_code;
+
+ logf_error("%s: %s\n", err_type, err_details);
+ logf_error(" At: %s:%i:%s() - %s\n", p_file, p_line, p_function, p_code);
+}
+
+void Logger::logf(const char *p_format, ...) {
+ if (!should_log(false)) {
+ return;
+ }
+
+ va_list argp;
+ va_start(argp, p_format);
+
+ logv(p_format, argp, false);
+
+ va_end(argp);
+}
+
+void Logger::logf_error(const char *p_format, ...) {
+ if (!should_log(true)) {
+ return;
+ }
+
+ va_list argp;
+ va_start(argp, p_format);
+
+ logv(p_format, argp, true);
+
+ va_end(argp);
+}
+
+Logger::~Logger() {}
+
+void RotatedFileLogger::close_file() {
+ if (file) {
+ memdelete(file);
+ file = NULL;
+ }
+}
+
+void RotatedFileLogger::clear_old_backups() {
+ int max_backups = max_files - 1; // -1 for the current file
+
+ String basename = base_path.get_basename();
+ String extension = "." + base_path.get_extension();
+
+ DirAccess *da = DirAccess::open(base_path.get_base_dir());
+ if (!da) {
+ return;
+ }
+
+ da->list_dir_begin();
+ String f = da->get_next();
+ Set<String> backups;
+ while (f != String()) {
+ if (!da->current_is_dir() && f.begins_with(basename) && f.ends_with(extension) && f != base_path) {
+ backups.insert(f);
+ }
+ f = da->get_next();
+ }
+ da->list_dir_end();
+
+ if (backups.size() > max_backups) {
+ // since backups are appended with timestamp and Set iterates them in sorted order,
+ // first backups are the oldest
+ int to_delete = backups.size() - max_backups;
+ for (Set<String>::Element *E = backups.front(); E && to_delete > 0; E = E->next(), --to_delete) {
+ da->remove(E->get());
+ }
+ }
+
+ memdelete(da);
+}
+
+void RotatedFileLogger::rotate_file() {
+ close_file();
+
+ if (FileAccess::exists(base_path)) {
+ if (max_files > 1) {
+ char timestamp[21];
+ OS::Date date = OS::get_singleton()->get_date();
+ OS::Time time = OS::get_singleton()->get_time();
+ sprintf(timestamp, "-%04d-%02d-%02d-%02d-%02d-%02d", date.year, date.month, date.day + 1, time.hour, time.min, time.sec);
+
+ String backup_name = base_path.get_basename() + timestamp + "." + base_path.get_extension();
+
+ DirAccess *da = DirAccess::open(base_path.get_base_dir());
+ if (da) {
+ da->copy(base_path, backup_name);
+ memdelete(da);
+ }
+ clear_old_backups();
+ }
+ } else {
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_USERDATA);
+ if (da) {
+ da->make_dir_recursive(base_path.get_base_dir());
+ memdelete(da);
+ }
+ }
+
+ file = FileAccess::open(base_path, FileAccess::WRITE);
+}
+
+RotatedFileLogger::RotatedFileLogger(const String &p_base_path, int p_max_files) {
+ file = NULL;
+ base_path = p_base_path.simplify_path();
+ max_files = p_max_files > 0 ? p_max_files : 1;
+
+ rotate_file();
+}
+
+void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) {
+ if (!should_log(p_err)) {
+ return;
+ }
+
+ if (file) {
+ const int static_buf_size = 512;
+ char static_buf[static_buf_size];
+ char *buf = static_buf;
+ va_list list_copy;
+ va_copy(list_copy, p_list);
+ int len = vsnprintf(buf, static_buf_size, p_format, p_list);
+ if (len >= static_buf_size) {
+ buf = (char *)Memory::alloc_static(len + 1);
+ vsnprintf(buf, len + 1, p_format, list_copy);
+ }
+ va_end(list_copy);
+ file->store_buffer((uint8_t *)buf, len);
+ if (len >= static_buf_size) {
+ Memory::free_static(buf);
+ }
+#ifdef DEBUG_ENABLED
+ const bool need_flush = true;
+#else
+ bool need_flush = p_err;
+#endif
+ if (need_flush) {
+ file->flush();
+ }
+ }
+}
+
+RotatedFileLogger::~RotatedFileLogger() {
+ close_file();
+}
+
+void StdLogger::logv(const char *p_format, va_list p_list, bool p_err) {
+ if (!should_log(p_err)) {
+ return;
+ }
+
+ if (p_err) {
+ vfprintf(stderr, p_format, p_list);
+ } else {
+ vprintf(p_format, p_list);
+#ifdef DEBUG_ENABLED
+ fflush(stdout);
+#endif
+ }
+}
+
+StdLogger::~StdLogger() {}
+
+CompositeLogger::CompositeLogger(Vector<Logger *> p_loggers) {
+ loggers = p_loggers;
+}
+
+void CompositeLogger::logv(const char *p_format, va_list p_list, bool p_err) {
+ if (!should_log(p_err)) {
+ return;
+ }
+
+ for (int i = 0; i < loggers.size(); ++i) {
+ va_list list_copy;
+ va_copy(list_copy, p_list);
+ loggers[i]->logv(p_format, list_copy, p_err);
+ va_end(list_copy);
+ }
+}
+
+void CompositeLogger::log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
+ if (!should_log(true)) {
+ return;
+ }
+
+ for (int i = 0; i < loggers.size(); ++i) {
+ loggers[i]->log_error(p_function, p_file, p_line, p_code, p_rationale, p_type);
+ }
+}
+
+CompositeLogger::~CompositeLogger() {
+ for (int i = 0; i < loggers.size(); ++i) {
+ memdelete(loggers[i]);
+ }
+}
diff --git a/core/io/logger.h b/core/io/logger.h
new file mode 100644
index 0000000000..cf0cc7699f
--- /dev/null
+++ b/core/io/logger.h
@@ -0,0 +1,107 @@
+/*************************************************************************/
+/* logger.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef LOGGER_H
+#define LOGGER_H
+
+#include "os/file_access.h"
+#include "ustring.h"
+#include "vector.h"
+#include <stdarg.h>
+
+class Logger {
+protected:
+ bool should_log(bool p_err);
+
+public:
+ enum ErrorType {
+ ERR_ERROR,
+ ERR_WARNING,
+ ERR_SCRIPT,
+ ERR_SHADER
+ };
+
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) = 0;
+ virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
+
+ void logf(const char *p_format, ...);
+ void logf_error(const char *p_format, ...);
+
+ virtual ~Logger();
+};
+
+/**
+ * Writes messages to stdout/stderr.
+ */
+class StdLogger : public Logger {
+
+public:
+ virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual ~StdLogger();
+};
+
+/**
+ * Writes messages to the specified file. If the file already exists, creates a copy (backup)
+ * of it with timestamp appended to the file name. Maximum number of backups is configurable.
+ * When maximum is reached, the oldest backups are erased. With the maximum being equal to 1,
+ * it acts as a simple file logger.
+ */
+class RotatedFileLogger : public Logger {
+ String base_path;
+ int max_files;
+
+ FileAccess *file;
+
+ void rotate_file_without_closing();
+ void close_file();
+ void clear_old_backups();
+ void rotate_file();
+
+public:
+ RotatedFileLogger(const String &p_base_path, int p_max_files = 10);
+
+ virtual void logv(const char *p_format, va_list p_list, bool p_err);
+
+ virtual ~RotatedFileLogger();
+};
+
+class CompositeLogger : public Logger {
+ Vector<Logger *> loggers;
+
+public:
+ CompositeLogger(Vector<Logger *> p_loggers);
+
+ virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
+
+ virtual ~CompositeLogger();
+};
+
+#endif \ No newline at end of file
diff --git a/core/io/resource_import.cpp b/core/io/resource_import.cpp
index bc7ea47762..401d704222 100644
--- a/core/io/resource_import.cpp
+++ b/core/io/resource_import.cpp
@@ -77,7 +77,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
if (assign != String()) {
if (!path_found && assign.begins_with("path.") && r_path_and_type.path == String()) {
String feature = assign.get_slicec('.', 1);
- if (OS::get_singleton()->check_feature_support(feature)) {
+ if (OS::get_singleton()->has_feature(feature)) {
r_path_and_type.path = value;
path_found = true; //first match must have priority
}
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 89cb4a22c2..ed0d491679 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -492,7 +492,7 @@ void ResourceLoader::reload_translation_remaps() {
void ResourceLoader::load_translation_remaps() {
- if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
return;
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index b969b58bfb..fcb3b58fed 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -55,7 +55,7 @@ FileAccess *FileAccess::create(AccessType p_access) {
bool FileAccess::exists(const String &p_name) {
- if (PackedData::get_singleton()->has_path(p_name))
+ if (PackedData::get_singleton() && PackedData::get_singleton()->has_path(p_name))
return true;
FileAccess *f = open(p_name, READ);
diff --git a/core/os/file_access.h b/core/os/file_access.h
index 34e7549fa3..455dd1ea99 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -119,6 +119,7 @@ public:
virtual Error get_error() const = 0; ///< get last error
+ virtual void flush() = 0;
virtual void store_8(uint8_t p_dest) = 0; ///< store a byte
virtual void store_16(uint16_t p_dest); ///< store 16 bits uint
virtual void store_32(uint32_t p_dest); ///< store 32 bits uint
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 437ce01a5e..eb5d5be33d 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -62,20 +62,20 @@ void OS::debug_break(){
// something
};
-void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
- const char *err_type = "**ERROR**";
- switch (p_type) {
- case ERR_ERROR: err_type = "**ERROR**"; break;
- case ERR_WARNING: err_type = "**WARNING**"; break;
- case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break;
- case ERR_SHADER: err_type = "**SHADER ERROR**"; break;
- default: ERR_PRINT("Unknown error type"); break;
+void OS::_set_logger(Logger *p_logger) {
+ if (_logger) {
+ memdelete(_logger);
}
+ _logger = p_logger;
+}
+
+void OS::initialize_logger() {
+ _set_logger(memnew(StdLogger));
+}
+
+void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, Logger::ErrorType p_type) {
- if (p_rationale && *p_rationale)
- print("%s: %s\n ", err_type, p_rationale);
- print("%s: At: %s:%i:%s() - %s\n", err_type, p_file, p_line, p_function, p_code);
+ _logger->log_error(p_function, p_file, p_line, p_code, p_rationale, p_type);
}
void OS::print(const char *p_format, ...) {
@@ -83,17 +83,16 @@ void OS::print(const char *p_format, ...) {
va_list argp;
va_start(argp, p_format);
- vprint(p_format, argp);
+ _logger->logv(p_format, argp, false);
va_end(argp);
};
void OS::printerr(const char *p_format, ...) {
-
va_list argp;
va_start(argp, p_format);
- vprint(p_format, argp, true);
+ _logger->logv(p_format, argp, true);
va_end(argp);
};
@@ -194,6 +193,10 @@ void OS::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_scr
void OS::hide_virtual_keyboard() {
}
+int OS::get_virtual_keyboard_height() const {
+ return 0;
+}
+
void OS::print_all_resources(String p_to_file) {
ERR_FAIL_COND(p_to_file != "" && _OSPRF);
@@ -495,7 +498,7 @@ int OS::get_power_percent_left() {
return -1;
}
-bool OS::check_feature_support(const String &p_feature) {
+bool OS::has_feature(const String &p_feature) {
if (p_feature == get_name())
return true;
@@ -507,6 +510,13 @@ bool OS::check_feature_support(const String &p_feature) {
return true;
#endif
+ if (sizeof(void *) == 8 && p_feature == "64") {
+ return true;
+ }
+ if (sizeof(void *) == 4 && p_feature == "32") {
+ return true;
+ }
+
if (_check_internal_feature_support(p_feature))
return true;
@@ -531,11 +541,14 @@ OS::OS() {
_render_thread_mode = RENDER_THREAD_SAFE;
- _allow_hidpi = true;
+ _allow_hidpi = false;
_stack_bottom = (void *)(&stack_bottom);
+
+ _logger = NULL;
+ _set_logger(memnew(StdLogger));
}
OS::~OS() {
-
+ memdelete(_logger);
singleton = NULL;
}
diff --git a/core/os/os.h b/core/os/os.h
index 3806217f55..6fcfd71332 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -32,6 +32,7 @@
#include "engine.h"
#include "image.h"
+#include "io/logger.h"
#include "list.h"
#include "os/main_loop.h"
#include "ustring.h"
@@ -61,6 +62,11 @@ class OS {
void *_stack_bottom;
+ Logger *_logger;
+
+protected:
+ void _set_logger(Logger *p_logger);
+
public:
typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection);
@@ -108,6 +114,7 @@ protected:
virtual int get_audio_driver_count() const = 0;
virtual const char *get_audio_driver_name(int p_driver) const = 0;
+ virtual void initialize_logger();
virtual void initialize_core() = 0;
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) = 0;
@@ -127,18 +134,10 @@ public:
static OS *get_singleton();
- enum ErrorType {
- ERR_ERROR,
- ERR_WARNING,
- ERR_SCRIPT,
- ERR_SHADER
- };
+ void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, Logger::ErrorType p_type = Logger::ERR_ERROR);
+ void print(const char *p_format, ...);
+ void printerr(const char *p_format, ...);
- virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
-
- virtual void print(const char *p_format, ...);
- virtual void printerr(const char *p_format, ...);
- virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false) = 0;
virtual void alert(const String &p_alert, const String &p_title = "ALERT!") = 0;
virtual String get_stdin_string(bool p_block = true) = 0;
@@ -284,6 +283,8 @@ public:
virtual bool can_draw() const = 0;
+ virtual bool is_userfs_persistent() const { return true; }
+
bool is_stdout_verbose() const;
virtual void disable_crash_handler() {}
@@ -314,6 +315,9 @@ public:
virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2());
virtual void hide_virtual_keyboard();
+ // returns height of the currently shown virtual keyboard (0 if keyboard is hidden)
+ virtual int get_virtual_keyboard_height() const;
+
virtual void set_cursor_shape(CursorShape p_shape) = 0;
virtual bool get_swap_ok_cancel() { return false; }
@@ -426,7 +430,7 @@ public:
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
- bool check_feature_support(const String &p_feature);
+ bool has_feature(const String &p_feature);
/**
* Returns the stack bottom of the main thread of the application.
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 14ebe87dc5..ff2be87b07 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -152,7 +152,7 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
bool override_valid = false;
for (int i = 1; i < s.size(); i++) {
String feature = s[i].strip_edges();
- if (OS::get_singleton()->check_feature_support(feature) || custom_features.has(feature)) {
+ if (OS::get_singleton()->has_feature(feature) || custom_features.has(feature)) {
override_valid = true;
break;
}
@@ -420,7 +420,7 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
return OK;
}
-bool ProjectSettings::has(String p_var) const {
+bool ProjectSettings::has_setting(String p_var) const {
_THREAD_SAFE_METHOD_
@@ -800,7 +800,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default) {
Variant ret;
- if (ProjectSettings::get_singleton()->has(p_var)) {
+ if (ProjectSettings::get_singleton()->has_setting(p_var)) {
ret = ProjectSettings::get_singleton()->get(p_var);
} else {
ProjectSettings::get_singleton()->set(p_var, p_default);
@@ -907,9 +907,19 @@ Variant ProjectSettings::property_get_revert(const String &p_name) {
return props[p_name].initial;
}
+void ProjectSettings::set_setting(const String &p_setting, const Variant &p_value) {
+ set(p_setting, p_value);
+}
+
+Variant ProjectSettings::get_setting(const String &p_setting) const {
+ return get(p_setting);
+}
+
void ProjectSettings::_bind_methods() {
- ClassDB::bind_method(D_METHOD("has", "name"), &ProjectSettings::has);
+ ClassDB::bind_method(D_METHOD("has_setting", "name"), &ProjectSettings::has_setting);
+ ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &ProjectSettings::set_setting);
+ ClassDB::bind_method(D_METHOD("get_setting", "name"), &ProjectSettings::get_setting);
ClassDB::bind_method(D_METHOD("set_order", "name", "position"), &ProjectSettings::set_order);
ClassDB::bind_method(D_METHOD("get_order", "name"), &ProjectSettings::get_order);
ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &ProjectSettings::set_initial_value);
diff --git a/core/project_settings.h b/core/project_settings.h
index 718ab2a011..ea6034dc84 100644
--- a/core/project_settings.h
+++ b/core/project_settings.h
@@ -119,7 +119,10 @@ protected:
static void _bind_methods();
public:
- bool has(String p_var) const;
+ void set_setting(const String &p_setting, const Variant &p_value);
+ Variant get_setting(const String &p_setting) const;
+
+ bool has_setting(String p_var) const;
String localize_path(const String &p_path) const;
String globalize_path(const String &p_path) const;
diff --git a/core/translation.cpp b/core/translation.cpp
index f1f9c72b85..27e3b202d0 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -1052,7 +1052,7 @@ TranslationServer *TranslationServer::singleton = NULL;
bool TranslationServer::_load_translations(const String &p_from) {
- if (ProjectSettings::get_singleton()->has(p_from)) {
+ if (ProjectSettings::get_singleton()->has_setting(p_from)) {
PoolVector<String> translations = ProjectSettings::get_singleton()->get(p_from);
int tcount = translations.size();
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml
index 2392e3ecca..fe40bc45e9 100644
--- a/doc/classes/@VisualScript.xml
+++ b/doc/classes/@VisualScript.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@VisualScript" category="Core" version="3.0.alpha.custom_build">
<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/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index 4ff39390b2..6e11034073 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -34,6 +34,13 @@
Returns true if the anchor is being tracked and false if no anchor with this id is currently known.
</description>
</method>
+ <method name="get_plane" qualifiers="const">
+ <return type="Plane">
+ </return>
+ <description>
+ Returns a plane aligned with our anchor, handy for intersection testing
+ </description>
+ </method>
<method name="get_size" qualifiers="const">
<return type="Vector3">
</return>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index fad9571628..1c2e761b57 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -12,6 +12,20 @@
<demos>
</demos>
<methods>
+ <method name="get_anchor_detection_is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if achor detection is enabled (AR only).
+ </description>
+ </method>
+ <method name="get_capabilities" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns a combination of flags providing information about the capabilities of this interface.
+ </description>
+ </method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
@@ -26,11 +40,11 @@
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
</description>
</method>
- <method name="hmd_is_present">
- <return type="bool">
+ <method name="get_tracking_status" qualifiers="const">
+ <return type="int" enum="ARVRInterface.Tracking_status">
</return>
<description>
- Returns true if an HMD is available for this interface.
+ If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
<method name="initialize">
@@ -51,34 +65,45 @@
Returns true if this interface is active.
</description>
</method>
- <method name="is_installed">
+ <method name="is_primary">
<return type="bool">
</return>
<description>
- Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false.
+ Returns true if this interface is currently the primary interface (the interface responsible for showing the output).
</description>
</method>
- <method name="is_primary">
+ <method name="is_stereo">
<return type="bool">
</return>
<description>
- Returns true if this interface is currently the primary interface (the interface responsible for showing the output).
+ Returns true if the current output of this interface is in stereo.
</description>
</method>
- <method name="set_is_primary">
+ <method name="set_anchor_detection_is_enabled">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set this interface to the primary interface (unset the old one).
+ Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points.
</description>
</method>
- <method name="supports_hmd">
- <return type="bool">
+ <method name="set_is_initialized">
+ <return type="void">
+ </return>
+ <argument index="0" name="initialized" type="bool">
+ </argument>
+ <description>
+ Initialise/uninitilise this interface (same effect as calling intialize/uninitialize).
+ </description>
+ </method>
+ <method name="set_is_primary">
+ <return type="void">
</return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
<description>
- Returns true if this interface supports HMDs and by extension uses stereo scopic rendering.
+ Set this interface to the primary interface (unset the old one).
</description>
</method>
<method name="uninitialize">
@@ -90,10 +115,32 @@
</method>
</methods>
<members>
- <member name="primary" type="bool" setter="set_is_primary" getter="is_primary">
+ <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled">
+ On an AR interface, is our anchor detection enabled?
+ </member>
+ <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized">
+ Has this interface been initialized?
+ </member>
+ <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary">
+ Is this our primary interface?
</member>
</members>
<constants>
+ <constant name="ARVR_NONE" value="0">
+ No ARVR capabilities.
+ </constant>
+ <constant name="ARVR_MONO" value="1">
+ This interface can work with normal rendering output (non-HMD based AR).
+ </constant>
+ <constant name="ARVR_STEREO" value="2">
+ This interface supports stereoscopic rendering.
+ </constant>
+ <constant name="ARVR_AR" value="4">
+ This interface support AR (video background and real world tracking).
+ </constant>
+ <constant name="ARVR_EXTERNAL" value="8">
+ This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_recommended_render_targetsize. Using a seperate viewport node frees up the main viewport for other purposes.
+ </constant>
<constant name="EYE_MONO" value="0">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
</constant>
@@ -103,5 +150,20 @@
<constant name="EYE_RIGHT" value="2">
Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
</constant>
+ <constant name="ARVR_NORMAL_TRACKING" value="0">
+ Tracking is behaving as expected.
+ </constant>
+ <constant name="ARVR_EXCESSIVE_MOTION" value="1">
+ Tracking is hindered by excessive motion, player is moving faster then tracking can keep up.
+ </constant>
+ <constant name="ARVR_INSUFFICIENT_FEATURES" value="2">
+ Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc.
+ </constant>
+ <constant name="ARVR_UNKNOWN_TRACKING" value="3">
+ We don't know the status of the tracking or this interface does not provide feedback.
+ </constant>
+ <constant name="ARVR_NOT_TRACKING" value="4">
+ Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.)
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml
index 54415539e0..182147a015 100644
--- a/doc/classes/ARVRScriptInterface.xml
+++ b/doc/classes/ARVRScriptInterface.xml
@@ -29,6 +29,20 @@
Outputs a finished render buffer to the AR/VR device for the given eye.
</description>
</method>
+ <method name="get_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if achor detection is enabled (AR only).
+ </description>
+ </method>
+ <method name="get_capabilities" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ Returns a combination of flags providing information about the capabilities of this interface.
+ </description>
+ </method>
<method name="get_recommended_render_targetsize" qualifiers="virtual">
<return type="Vector2">
</return>
@@ -36,6 +50,13 @@
Returns the size at which we should render our scene to get optimal quality on the output device.
</description>
</method>
+ <method name="get_tracking_status" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
+ </description>
+ </method>
<method name="get_transform_for_eye" qualifiers="virtual">
<return type="Transform">
</return>
@@ -47,13 +68,6 @@
Get the location and orientation transform used when rendering a specific eye.
</description>
</method>
- <method name="hmd_is_present" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Return true is an HMD is available.
- </description>
- </method>
<method name="initialize" qualifiers="virtual">
<return type="bool">
</return>
@@ -68,13 +82,6 @@
Returns true if this interface has been initialized and is active.
</description>
</method>
- <method name="is_installed" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Returns true if the required middleware is installed.
- </description>
- </method>
<method name="is_stereo" qualifiers="virtual">
<return type="bool">
</return>
@@ -89,11 +96,13 @@
Gets called before rendering each frame so tracking data gets updated in time.
</description>
</method>
- <method name="supports_hmd" qualifiers="virtual">
- <return type="bool">
+ <method name="set_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="void">
</return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
<description>
- Returns true if this interface supports HMDs.
+ Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points.
</description>
</method>
<method name="uninitialize" qualifiers="virtual">
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 282f25bec9..6a7262bd14 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -20,6 +20,22 @@
Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server.
</description>
</method>
+ <method name="center_on_hmd">
+ <return type="void">
+ </return>
+ <argument index="0" name="ignore_tilt" type="bool">
+ </argument>
+ <argument index="1" name="keep_height" type="bool">
+ </argument>
+ <description>
+ This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
+ For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world.
+ For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera.
+ This method allows you to center our tracker on the location of the HMD, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world.
+ For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game.
+ You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
+ </description>
+ </method>
<method name="find_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
@@ -84,22 +100,6 @@
Removes a registered interface, again exposed mostly for GDNative based interfaces.
</description>
</method>
- <method name="request_reference_frame">
- <return type="void">
- </return>
- <argument index="0" name="ignore_tilt" type="bool">
- </argument>
- <argument index="1" name="keep_height" type="bool">
- </argument>
- <description>
- This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
- For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world.
- For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera.
- This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world.
- For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game.
- You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
- </description>
- </method>
<method name="set_primary_interface">
<return type="void">
</return>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 65200c4769..d411d07979 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -326,6 +326,7 @@
<return type="int">
</return>
<description>
+ Returns the amount of static memory being used by the program in bytes.
</description>
</method>
<method name="get_system_dir" qualifiers="const">
@@ -340,6 +341,7 @@
<return type="int">
</return>
<description>
+ Returns the epoch time of the operating system in seconds.
</description>
</method>
<method name="get_ticks_msec" qualifiers="const">
@@ -435,6 +437,9 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the build is a debug build.
+ Returns [code]true[/code] when running in the editor.
+ Returns [code]false[/code] if the build is a release build.
</description>
</method>
<method name="is_in_low_processor_usage_mode" qualifiers="const">
@@ -472,10 +477,18 @@
Return true if the engine was executed with -v (verbose stdout).
</description>
</method>
+ <method name="is_userfs_persistent" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
+ </description>
+ </method>
<method name="is_vsync_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if synchronizing the framerate to the monitor's refresh rate is enabled.
</description>
</method>
<method name="is_window_fullscreen" qualifiers="const">
@@ -688,6 +701,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ If [code]true[/code] the framerate will synchronize to the monitor's refresh rate.
</description>
</method>
<method name="set_window_fullscreen">
diff --git a/doc/classes/RegEx.xml b/doc/classes/RegEx.xml
index 626f8f1a93..4577672c72 100644
--- a/doc/classes/RegEx.xml
+++ b/doc/classes/RegEx.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations.
- Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example:
+ Once created, the RegEx object needs to be compiled with the search pattern before it can be used. The search pattern must be escaped first for gdscript before it is escaped for the expression. For example:
[code]var exp = RegEx.new()[/code]
[code]exp.compile("\\d+")[/code]
would be read by RegEx as [code]\d+[/code]
@@ -47,7 +47,7 @@
<argument index="0" name="pattern" type="String">
</argument>
<description>
- Compiles and assign the regular expression pattern to use.
+ Compiles and assign the search pattern to use.
</description>
</method>
<method name="get_group_count" qualifiers="const">
@@ -68,14 +68,14 @@
<return type="String">
</return>
<description>
- Returns the expression used to compile the code.
+ Returns the search pattern used to compile the code.
</description>
</method>
<method name="is_valid" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this object has a valid regular expression assigned.
+ Returns whether this object has a valid search pattern assigned.
</description>
</method>
<method name="search" qualifiers="const">
@@ -88,7 +88,7 @@
<argument index="2" name="end" type="int" default="-1">
</argument>
<description>
- Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be.
+ Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be.
</description>
</method>
<method name="sub" qualifiers="const">
diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml
index 9e021ed6c8..abf2e383d5 100644
--- a/doc/classes/RegExMatch.xml
+++ b/doc/classes/RegExMatch.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RegExMatch" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Contains the results of a regex search.
</brief_description>
<description>
+ Contains the results of a regex search. [method RegEx.search] returns an instance of [code]RegExMatch[/code] if it finds the search pattern in the [source] string.
</description>
<tutorials>
</tutorials>
@@ -15,7 +17,7 @@
<argument index="0" name="name" type="Variant" default="0">
</argument>
<description>
- Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ Returns the end position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
</description>
</method>
<method name="get_group_count" qualifiers="const">
@@ -38,7 +40,7 @@
<argument index="0" name="name" type="Variant" default="0">
</argument>
<description>
- Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ Returns the starting position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
</description>
</method>
<method name="get_string" qualifiers="const">
@@ -47,19 +49,21 @@
<argument index="0" name="name" type="Variant" default="0">
</argument>
<description>
- Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ Returns the result of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
</description>
</method>
<method name="get_strings" qualifiers="const">
<return type="Array">
</return>
<description>
+ Returns an [Array] of the matches in the [source] string.
</description>
</method>
<method name="get_subject" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns the [source] string used with the search pattern to find this matching result.
</description>
</method>
</methods>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 57e417974e..bac7d1e3b0 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -156,6 +156,15 @@
Set the video stream for this player.
</description>
</method>
+ <method name="set_stream_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="float">
+ </argument>
+ <description>
+ Set the current position of the stream, in seconds.
+ </description>
+ </method>
<method name="set_volume">
<return type="void">
</return>
diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml
index 6473b074d3..e44547cd8f 100644
--- a/doc/classes/VisualScript.xml
+++ b/doc/classes/VisualScript.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScript" inherits="Script" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A script implemented in the Visual Script programming environment.
</brief_description>
<description>
+ A script implemented in the Visual Script programming environment. The script exends the functionality of all objects that instance it.
+ [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
+ You are most likely to use this class via the Visual Script editor or when writing plugins for it.
</description>
<tutorials>
</tutorials>
@@ -15,6 +19,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Add a custom signal with the specified name to the VisualScript.
</description>
</method>
<method name="add_function">
@@ -23,6 +28,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Add a function with the specified name to the VisualScript.
</description>
</method>
<method name="add_node">
@@ -37,6 +43,7 @@
<argument index="3" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
+ Add a node to a function of the VisualScript.
</description>
</method>
<method name="add_variable">
@@ -49,6 +56,7 @@
<argument index="2" name="export" type="bool" default="false">
</argument>
<description>
+ Add a variable to the VisualScript, optionally giving it a default value or marking it as exported.
</description>
</method>
<method name="custom_signal_add_argument">
@@ -63,6 +71,7 @@
<argument index="3" name="index" type="int" default="-1">
</argument>
<description>
+ Add an argument to a custom signal added with [method add_custom_signal].
</description>
</method>
<method name="custom_signal_get_argument_count" qualifiers="const">
@@ -71,6 +80,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Get the count of a custom signal's arguments.
</description>
</method>
<method name="custom_signal_get_argument_name" qualifiers="const">
@@ -81,6 +91,7 @@
<argument index="1" name="argidx" type="int">
</argument>
<description>
+ Get the name of a custom signal's argument.
</description>
</method>
<method name="custom_signal_get_argument_type" qualifiers="const">
@@ -91,6 +102,7 @@
<argument index="1" name="argidx" type="int">
</argument>
<description>
+ Get the type of a custom signal's argument.
</description>
</method>
<method name="custom_signal_remove_argument">
@@ -101,6 +113,7 @@
<argument index="1" name="argidx" type="int">
</argument>
<description>
+ Remove a specific custom signal's argument.
</description>
</method>
<method name="custom_signal_set_argument_name">
@@ -113,6 +126,7 @@
<argument index="2" name="argname" type="String">
</argument>
<description>
+ Rename a custom signal's argument.
</description>
</method>
<method name="custom_signal_set_argument_type">
@@ -125,6 +139,7 @@
<argument index="2" name="type" type="int" enum="Variant.Type">
</argument>
<description>
+ Change the type of a custom signal's argument.
</description>
</method>
<method name="custom_signal_swap_argument">
@@ -137,6 +152,7 @@
<argument index="2" name="withidx" type="int">
</argument>
<description>
+ Swap two of the arguments of a custom signal.
</description>
</method>
<method name="data_connect">
@@ -153,6 +169,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Connect two data ports. The value of [code]from_node[/code]'s [code]from_port[/code] would be fed into [code]to_node[/code]'s [code]to_port[/code].
</description>
</method>
<method name="data_disconnect">
@@ -169,6 +186,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Disconnect two data ports previously connected with [method data_connect].
</description>
</method>
<method name="get_function_node_id" qualifiers="const">
@@ -177,6 +195,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the id of a function's entry point node.
</description>
</method>
<method name="get_function_scroll" qualifiers="const">
@@ -185,6 +204,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the position of the center of the screen for a given function.
</description>
</method>
<method name="get_node" qualifiers="const">
@@ -195,6 +215,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Returns a node given its id and its function.
</description>
</method>
<method name="get_node_position" qualifiers="const">
@@ -205,6 +226,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Returns a node's position in pixels.
</description>
</method>
<method name="get_variable_default_value" qualifiers="const">
@@ -213,6 +235,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the default (initial) value of a variable.
</description>
</method>
<method name="get_variable_export" qualifiers="const">
@@ -221,6 +244,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns whether a variable is exported.
</description>
</method>
<method name="get_variable_info" qualifiers="const">
@@ -229,6 +253,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the info for a given variable as a dictionary. The information includes its name, type, hint and usage.
</description>
</method>
<method name="has_custom_signal" qualifiers="const">
@@ -237,6 +262,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns whether a signal exists with the specified name.
</description>
</method>
<method name="has_data_connection" qualifiers="const">
@@ -253,6 +279,7 @@
<argument index="4" name="to_port" type="int">
</argument>
<description>
+ Returns whether the specified data ports are connected.
</description>
</method>
<method name="has_function" qualifiers="const">
@@ -261,6 +288,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns whether a function exists with the specified name.
</description>
</method>
<method name="has_node" qualifiers="const">
@@ -271,6 +299,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Returns whether a node exists with the given id.
</description>
</method>
<method name="has_sequence_connection" qualifiers="const">
@@ -285,6 +314,7 @@
<argument index="3" name="to_node" type="int">
</argument>
<description>
+ Returns whether the specified sequence ports are connected.
</description>
</method>
<method name="has_variable" qualifiers="const">
@@ -293,6 +323,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns whether a variable exists with the specified name.
</description>
</method>
<method name="remove_custom_signal">
@@ -301,6 +332,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Remove a custom signal with the given name.
</description>
</method>
<method name="remove_function">
@@ -309,6 +341,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Remove a specific function and its nodes from the script.
</description>
</method>
<method name="remove_node">
@@ -319,6 +352,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Remove a specific node.
</description>
</method>
<method name="remove_variable">
@@ -327,6 +361,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Remove a variable with the given name.
</description>
</method>
<method name="rename_custom_signal">
@@ -337,6 +372,7 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
+ Change the name of a custom signal.
</description>
</method>
<method name="rename_function">
@@ -347,6 +383,7 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
+ Change the name of a function.
</description>
</method>
<method name="rename_variable">
@@ -357,6 +394,7 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
+ Change the name of a variable.
</description>
</method>
<method name="sequence_connect">
@@ -371,6 +409,8 @@
<argument index="3" name="to_node" type="int">
</argument>
<description>
+ Connect two sequence ports. The execution will flow from of [code]from_node[/code]'s [code]from_output[/code] into [code]to_node[/code].
+ Unlike [method data_connect], there isn't a [code]to_port[/code], since the target node can have only one sequence port.
</description>
</method>
<method name="sequence_disconnect">
@@ -385,6 +425,7 @@
<argument index="3" name="to_node" type="int">
</argument>
<description>
+ Disconnect two sequence ports previously connected with [method sequence_connect].
</description>
</method>
<method name="set_function_scroll">
@@ -395,6 +436,7 @@
<argument index="1" name="ofs" type="Vector2">
</argument>
<description>
+ Position the center of the screen for a function.
</description>
</method>
<method name="set_instance_base_type">
@@ -403,6 +445,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
+ Set the base type of the script.
</description>
</method>
<method name="set_node_position">
@@ -415,6 +458,7 @@
<argument index="2" name="position" type="Vector2">
</argument>
<description>
+ Position a node on the screen.
</description>
</method>
<method name="set_variable_default_value">
@@ -425,6 +469,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Change the default (initial) value of a variable.
</description>
</method>
<method name="set_variable_export">
@@ -435,6 +480,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
+ Change whether a variable is exported.
</description>
</method>
<method name="set_variable_info">
@@ -445,6 +491,7 @@
<argument index="1" name="value" type="Dictionary">
</argument>
<description>
+ Set a variable's info, using the same format as [method get_variable_info].
</description>
</method>
</methods>
@@ -459,6 +506,7 @@
<argument index="1" name="id" type="int">
</argument>
<description>
+ Emitted when the ports of a node are changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/VisualScriptBasicTypeConstant.xml b/doc/classes/VisualScriptBasicTypeConstant.xml
index 5b066f9925..cc09815481 100644
--- a/doc/classes/VisualScriptBasicTypeConstant.xml
+++ b/doc/classes/VisualScriptBasicTypeConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node representing a constant from the base types.
</brief_description>
<description>
+ A Visual Script node representing a constant from base types, such as [Vector3.AXIS_X].
</description>
<tutorials>
</tutorials>
@@ -40,8 +42,10 @@
</methods>
<members>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
+ The type to get the constant from.
</member>
<member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant">
+ The name of the constant to return.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml
index a88633749e..f48f5a5308 100644
--- a/doc/classes/VisualScriptBuiltinFunc.xml
+++ b/doc/classes/VisualScriptBuiltinFunc.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node used to call built-in functions.
</brief_description>
<description>
+ A built-in function used inside a [VisualScript]. It is usually a math function or an utility function.
+ See also [@GDScript], for the same functions in the GDScript language.
</description>
<tutorials>
</tutorials>
@@ -26,124 +29,183 @@
</methods>
<members>
<member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc">
+ The function to be executed.
</member>
</members>
<constants>
<constant name="MATH_SIN" value="0">
+ Return the sine of the input.
</constant>
<constant name="MATH_COS" value="1">
+ Return the cosine of the input.
</constant>
<constant name="MATH_TAN" value="2">
+ Return the tangent of the input.
</constant>
<constant name="MATH_SINH" value="3">
+ Return the hyperbolic sine of the input.
</constant>
<constant name="MATH_COSH" value="4">
+ Return the hyperbolic cosine of the input.
</constant>
<constant name="MATH_TANH" value="5">
+ Return the hyperbolic tangent of the input.
</constant>
<constant name="MATH_ASIN" value="6">
+ Return the arc sine of the input.
</constant>
<constant name="MATH_ACOS" value="7">
+ Return the arc cosine of the input.
</constant>
<constant name="MATH_ATAN" value="8">
+ Return the arc tangent of the input.
</constant>
<constant name="MATH_ATAN2" value="9">
+ Return the arc tangent of the input, using the signs of both parameters to determine the exact angle.
</constant>
<constant name="MATH_SQRT" value="10">
+ Return the square root of the input.
</constant>
<constant name="MATH_FMOD" value="11">
+ Return the remainder of one input divided by the other, using floating-point numbers.
</constant>
<constant name="MATH_FPOSMOD" value="12">
+ Return the positive remainder of one input divided by the other, using floating-point numbers.
</constant>
<constant name="MATH_FLOOR" value="13">
+ Return the input rounded down.
</constant>
<constant name="MATH_CEIL" value="14">
+ Return the input rounded up.
</constant>
<constant name="MATH_ROUND" value="15">
+ Return the input rounded to the nearest integer.
</constant>
<constant name="MATH_ABS" value="16">
+ Return the absolute value of the input.
</constant>
<constant name="MATH_SIGN" value="17">
+ Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative.
</constant>
<constant name="MATH_POW" value="18">
+ Return the input raised to a given power.
</constant>
<constant name="MATH_LOG" value="19">
+ Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use.
</constant>
<constant name="MATH_EXP" value="20">
+ Return [b]e[/b] raised to the power of the input. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828.
</constant>
<constant name="MATH_ISNAN" value="21">
+ Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist.
</constant>
<constant name="MATH_ISINF" value="22">
+ Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist.
</constant>
<constant name="MATH_EASE" value="23">
+ 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.
</constant>
<constant name="MATH_DECIMALS" value="24">
+ Return the number of digit places after the decimal that the first non-zero digit occurs.
</constant>
<constant name="MATH_STEPIFY" value="25">
+ Return the input snapped to a given step.
</constant>
<constant name="MATH_LERP" value="26">
+ Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code].
</constant>
<constant name="MATH_DECTIME" value="27">
+ Return the result of 'value' decreased by 'step' * 'amount'.
</constant>
<constant name="MATH_RANDOMIZE" value="28">
+ Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
</constant>
<constant name="MATH_RAND" value="29">
+ Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function.
</constant>
<constant name="MATH_RANDF" value="30">
+ Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication.
</constant>
<constant name="MATH_RANDOM" value="31">
+ Return a random floating-point value between the two inputs.
</constant>
<constant name="MATH_SEED" value="32">
+ Set the seed for the random number generator.
</constant>
<constant name="MATH_RANDSEED" value="33">
+ Return a random value from the given seed, along with the new seed.
</constant>
<constant name="MATH_DEG2RAD" value="34">
+ Convert the input from degrees to radians.
</constant>
<constant name="MATH_RAD2DEG" value="35">
+ Convert the input from radians to degrees.
</constant>
<constant name="MATH_LINEAR2DB" value="36">
+ Convert the input from linear volume to decibel volume.
</constant>
<constant name="MATH_DB2LINEAR" value="37">
+ Convert the input from decibel volume to linear volume.
</constant>
<constant name="LOGIC_MAX" value="38">
+ Return the greater of the two numbers, also known as their maximum.
</constant>
<constant name="LOGIC_MIN" value="39">
+ Return the lesser of the two numbers, also known as their minimum.
</constant>
<constant name="LOGIC_CLAMP" value="40">
+ Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)`
</constant>
<constant name="LOGIC_NEAREST_PO2" value="41">
+ Return the nearest power of 2 to the input.
</constant>
<constant name="OBJ_WEAKREF" value="42">
+ Create a [WeakRef] from the input.
</constant>
<constant name="FUNC_FUNCREF" value="43">
+ Create a [FuncRef] from the input.
</constant>
<constant name="TYPE_CONVERT" value="44">
+ Convert between types.
</constant>
<constant name="TYPE_OF" value="45">
+ Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned.
</constant>
<constant name="TYPE_EXISTS" value="46">
+ Checks if a type is registered in the [ClassDB].
</constant>
<constant name="TEXT_CHAR" value="47">
+ Return a character with the given ascii value.
</constant>
<constant name="TEXT_STR" value="48">
+ Convert the input to a string.
</constant>
<constant name="TEXT_PRINT" value="49">
+ Print the given string to the output window.
</constant>
<constant name="TEXT_PRINTERR" value="50">
+ Print the given string to the standard error output.
</constant>
<constant name="TEXT_PRINTRAW" value="51">
+ Print the given string to the standard output, without adding a newline.
</constant>
<constant name="VAR_TO_STR" value="52">
+ Serialize a [Variant] to a string.
</constant>
<constant name="STR_TO_VAR" value="53">
+ Deserialize a [Variant] from a string serialized using [VAR_TO_STR].
</constant>
<constant name="VAR_TO_BYTES" value="54">
+ Serialize a [Variant] to a [PoolByteArray].
</constant>
<constant name="BYTES_TO_VAR" value="55">
+ Deserialize a [Variant] from a [PoolByteArray] serialized using [VAR_TO_BYTES].
</constant>
<constant name="COLORN" value="56">
+ Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc.
</constant>
<constant name="FUNC_MAX" value="57">
+ The maximum value the [member function] property can have.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptClassConstant.xml b/doc/classes/VisualScriptClassConstant.xml
index 5e43b4972c..70e7de5dd9 100644
--- a/doc/classes/VisualScriptClassConstant.xml
+++ b/doc/classes/VisualScriptClassConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node representing a constant from a class.
</brief_description>
<description>
+ A Visual Script node representing a constant from the classes, such as [@GlobalScope.TYPE_INT].
</description>
<tutorials>
</tutorials>
@@ -40,8 +42,10 @@
</methods>
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ The type to get the constant from.
</member>
<member name="constant" type="String" setter="set_class_constant" getter="get_class_constant">
+ The name of the constant to return.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptComment.xml b/doc/classes/VisualScriptComment.xml
index be4eefd775..da65998e78 100644
--- a/doc/classes/VisualScriptComment.xml
+++ b/doc/classes/VisualScriptComment.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node used to store information for the developer.
</brief_description>
<description>
+ A Visual Script node used to display text, so that code is more readable and better documented.
+ Comment nodes can be resized so they encompass a group of nodes.
</description>
<tutorials>
</tutorials>
@@ -54,10 +57,13 @@
</methods>
<members>
<member name="description" type="String" setter="set_description" getter="get_description">
+ The text inside the comment node.
</member>
<member name="size" type="Vector2" setter="set_size" getter="get_size">
+ The size (in pixels) of the comment node.
</member>
<member name="title" type="String" setter="set_title" getter="get_title">
+ The title of the comment node.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml
index 73f1b69c02..de814a6b17 100644
--- a/doc/classes/VisualScriptCondition.xml
+++ b/doc/classes/VisualScriptCondition.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node which branches the flow.
</brief_description>
<description>
+ A Visual Script node which switches the flow based on a boolean. It acts similar to if/else in typical programming languages.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualScriptConstant.xml b/doc/classes/VisualScriptConstant.xml
index b0af3bda98..508087a928 100644
--- a/doc/classes/VisualScriptConstant.xml
+++ b/doc/classes/VisualScriptConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node which returns a constant value.
</brief_description>
<description>
+ A Visual Script node which returns the specified constant value.
</description>
<tutorials>
</tutorials>
@@ -40,8 +42,10 @@
</methods>
<members>
<member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type">
+ The constant's type.
</member>
<member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value">
+ The constant's value.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptConstructor.xml b/doc/classes/VisualScriptConstructor.xml
index e8afd36b9c..3b1fc5e385 100644
--- a/doc/classes/VisualScriptConstructor.xml
+++ b/doc/classes/VisualScriptConstructor.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node which calls a base type constructor.
</brief_description>
<description>
+ A Visual Script node which calls a base type constructor. It can be used for type conversion as well.
</description>
<tutorials>
</tutorials>
@@ -40,8 +42,26 @@
</methods>
<members>
<member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor">
+ The constructor function's method info. Has roughly the following structure:
+ [codeblock]
+ {
+ name = "string",
+ args = [{
+ name = "string"
+ class_name = "string"
+ type = TYPE_*
+ hint = PROPERTY_HINT_*
+ hint_string = "string"
+ }]
+ default_args = [] # Array of variants
+ flags = METHOD_FLAG_*
+ id = 0
+ return = {type = TYPE_*}
+ }
+ [/codeblock]
</member>
<member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" enum="Variant.Type">
+ The type to be constructed.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml
index ec442e993c..e321c8854a 100644
--- a/doc/classes/VisualScriptCustomNode.xml
+++ b/doc/classes/VisualScriptCustomNode.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A scripted Visual Script node.
</brief_description>
<description>
+ A custom Visual Script node which can be scripted in powerful ways.
</description>
<tutorials>
</tutorials>
@@ -13,18 +15,21 @@
<return type="String">
</return>
<description>
+ Return the node's title.
</description>
</method>
<method name="_get_category" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Return the node's category.
</description>
</method>
<method name="_get_input_value_port_count" qualifiers="virtual">
<return type="int">
</return>
<description>
+ Return the count of input value ports.
</description>
</method>
<method name="_get_input_value_port_name" qualifiers="virtual">
@@ -33,6 +38,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Return the specified input port's name.
</description>
</method>
<method name="_get_input_value_port_type" qualifiers="virtual">
@@ -41,12 +47,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Return the specified input port's type. See the TYPE_* enum in [@GlobalScope].
</description>
</method>
<method name="_get_output_sequence_port_count" qualifiers="virtual">
<return type="int">
</return>
<description>
+ Return the amount of output [b]sequence[/b] ports.
</description>
</method>
<method name="_get_output_sequence_port_text" qualifiers="virtual">
@@ -55,12 +63,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Return the specified [b]sequence[/b] output's name.
</description>
</method>
<method name="_get_output_value_port_count" qualifiers="virtual">
<return type="int">
</return>
<description>
+ Return the amount of output value ports.
</description>
</method>
<method name="_get_output_value_port_name" qualifiers="virtual">
@@ -69,6 +79,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Return the specified output's name.
</description>
</method>
<method name="_get_output_value_port_type" qualifiers="virtual">
@@ -77,24 +88,28 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Return the specified output's type. See the TYPE_* enum in [@GlobalScope].
</description>
</method>
<method name="_get_text" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it).
</description>
</method>
<method name="_get_working_memory_size" qualifiers="virtual">
<return type="int">
</return>
<description>
+ Return the size of the custom node's working memory. See [method _step] for more details.
</description>
</method>
<method name="_has_input_sequence_port" qualifiers="virtual">
<return type="bool">
</return>
<description>
+ Return whether the custom node has an input [b]sequence[/b] port.
</description>
</method>
<method name="_step" qualifiers="virtual">
@@ -109,25 +124,42 @@
<argument index="3" name="working_mem" type="Array">
</argument>
<description>
+ Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error.
+
+ The [code]inputs[/code] array contains the values of the input ports.
+ [code]outputs[/code] is an array whose indices should be set to the respective outputs.
+ The [code]start_mode[/code] is usually [code]START_MODE_BEGIN_SEQUENCE[/code], unless you have used the STEP_* constants.
+ [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node.
+
+ When returning, you can mask the returned value with one of the STEP_* constants.
</description>
</method>
</methods>
<constants>
<constant name="START_MODE_BEGIN_SEQUENCE" value="0">
+ The start mode used the first time when [method _step] is called.
</constant>
<constant name="START_MODE_CONTINUE_SEQUENCE" value="1">
+ The start mode used when [method _step] is called after coming back from a STEP_PUSH_STACK_BIT.
</constant>
<constant name="START_MODE_RESUME_YIELD" value="2">
+ The start mode used when [method _step] is called after resuming from STEP_YIELD_BIT.
</constant>
<constant name="STEP_PUSH_STACK_BIT" value="16777216" enum="">
+ Hint used by [method _step] to tell that control should return to it when there is no other node left to execute.
+ This is used by [VisualScriptCondition] to redirect the sequence to the "Done" port after the true/false branch has finished execution.
</constant>
<constant name="STEP_GO_BACK_BIT" value="33554432" enum="">
+ Hint used by [method _step] to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function.
</constant>
<constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum="">
</constant>
<constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum="">
+ Hint used by [method _step] to tell that control should stop and exit the function.
</constant>
<constant name="STEP_YIELD_BIT" value="268435456" enum="">
+ Hint used by [method _step] to tell that the function should be yielded.
+ Using this requires you to have at least one working memory slot, which is used for the [VisualScriptFunctionState].
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptDeconstruct.xml b/doc/classes/VisualScriptDeconstruct.xml
index 5bb12539af..cd7d79ae56 100644
--- a/doc/classes/VisualScriptDeconstruct.xml
+++ b/doc/classes/VisualScriptDeconstruct.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node which deconstructs a base type instance into its parts.
</brief_description>
<description>
+ A Visual Script node which deconstructs a base type instance into its parts.
</description>
<tutorials>
</tutorials>
@@ -28,6 +30,7 @@
<member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache">
</member>
<member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type">
+ The type to deconstruct.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptEmitSignal.xml b/doc/classes/VisualScriptEmitSignal.xml
index 21af3c6ea0..844b5a40ec 100644
--- a/doc/classes/VisualScriptEmitSignal.xml
+++ b/doc/classes/VisualScriptEmitSignal.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node which emits a specified signal.
</brief_description>
<description>
+ A Visual Script node which emits a specified signal when it is executed.
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="signal" type="String" setter="set_signal" getter="get_signal">
+ The signal to emit.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptEngineSingleton.xml b/doc/classes/VisualScriptEngineSingleton.xml
index c00fd2a0a4..6606f10f11 100644
--- a/doc/classes/VisualScriptEngineSingleton.xml
+++ b/doc/classes/VisualScriptEngineSingleton.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A Visual Script node returning a singleton from [@GlobalScope]
</brief_description>
<description>
+ A Visual Script node returning a singleton from [@GlobalScope]
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="constant" type="String" setter="set_singleton" getter="get_singleton">
+ The singleton's name.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualScriptNode.xml b/doc/classes/VisualScriptNode.xml
index dbb75e69fa..74ec9bdc2e 100644
--- a/doc/classes/VisualScriptNode.xml
+++ b/doc/classes/VisualScriptNode.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A node which is part of a [VisualScript].
</brief_description>
<description>
+ A node which is part of a [VisualScript]. Not to be confused with [Node], which is a part of a [SceneTree].
</description>
<tutorials>
</tutorials>
@@ -15,12 +17,21 @@
<argument index="0" name="port_idx" type="int">
</argument>
<description>
+ Returns the default value of a given port. The default value is used when nothing is connected to the port.
</description>
</method>
<method name="get_visual_script" qualifiers="const">
<return type="VisualScript">
</return>
<description>
+ Returns the [VisualScript] instance the node is bound to.
+ </description>
+ </method>
+ <method name="ports_changed_notify">
+ <return type="void">
+ </return>
+ <description>
+ Notify that the node's ports have changed. Usually used in conjunction with [VisualScriptCustomNode] .
</description>
</method>
<method name="set_default_input_value">
@@ -31,6 +42,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Change the default value of a given port.
</description>
</method>
</methods>
@@ -41,6 +53,7 @@
<signals>
<signal name="ports_changed">
<description>
+ Emitted when the available input/output ports are changed.
</description>
</signal>
</signals>
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py
index 75e18bbe81..6b936899d8 100644
--- a/doc/tools/doc_status.py
+++ b/doc/tools/doc_status.py
@@ -23,6 +23,7 @@ flags = {
'o': True,
'i': False,
'a': True,
+ 'e': False,
}
flag_descriptions = {
'c': 'Toggle colors when outputting.',
@@ -35,6 +36,7 @@ flag_descriptions = {
'o': 'Toggle overall column.',
'i': 'Toggle collapse of class items columns.',
'a': 'Toggle showing all items.',
+ 'e': 'Toggle hiding empty items.',
}
long_flags = {
'colors': 'c',
@@ -64,6 +66,8 @@ long_flags = {
'collapse': 'i',
'all': 'a',
+
+ 'empty': 'e',
}
table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals']
table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals']
@@ -192,6 +196,14 @@ class ClassStatus:
ok = ok and self.progresses[k].is_ok()
return ok
+ def is_empty(self):
+ sum = 0
+ for k in self.progresses:
+ if self.progresses[k].is_ok():
+ continue
+ sum += self.progresses[k].total
+ return sum < 1
+
def make_output(self):
output = {}
output['name'] = color('name', self.name)
@@ -396,6 +408,9 @@ for cn in filtered_classes:
if (flags['b'] and status.is_ok()) or (flags['g'] and not status.is_ok()) or (not flags['a']):
continue
+ if flags['e'] and status.is_empty():
+ continue
+
out = status.make_output()
row = []
for column in table_columns:
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index ae41a936c6..44a9909bd7 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -2473,7 +2473,7 @@ void RasterizerStorageGLES3::_update_material(Material *material) {
glGenBuffers(1, &material->ubo_id);
glBindBuffer(GL_UNIFORM_BUFFER, material->ubo_id);
- glBufferData(GL_UNIFORM_BUFFER, material->shader->ubo_size, NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_UNIFORM_BUFFER, material->shader->ubo_size, NULL, GL_STATIC_DRAW);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
material->ubo_size = material->shader->ubo_size;
}
@@ -3768,7 +3768,7 @@ void RasterizerStorageGLES3::multimesh_allocate(RID p_multimesh, int p_instances
glGenBuffers(1, &multimesh->buffer);
glBindBuffer(GL_ARRAY_BUFFER, multimesh->buffer);
- glBufferData(GL_ARRAY_BUFFER, multimesh->data.size() * sizeof(float), NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, multimesh->data.size() * sizeof(float), NULL, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
@@ -5215,7 +5215,7 @@ void RasterizerStorageGLES3::particles_set_amount(RID p_particles, int p_amount)
glBindVertexArray(particles->particle_vaos[i]);
glBindBuffer(GL_ARRAY_BUFFER, particles->particle_buffers[i]);
- glBufferData(GL_ARRAY_BUFFER, floats * sizeof(float), data, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, floats * sizeof(float), data, GL_STATIC_DRAW);
for (int i = 0; i < 6; i++) {
glEnableVertexAttribArray(i);
@@ -6198,7 +6198,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
rt->buffers.effects_active = true;
}
- if (!rt->flags[RENDER_TARGET_NO_SAMPLING]) {
+ if (!rt->flags[RENDER_TARGET_NO_SAMPLING] && rt->width >= 2 && rt->height >= 2) {
for (int i = 0; i < 2; i++) {
@@ -6511,7 +6511,7 @@ void RasterizerStorageGLES3::canvas_light_occluder_set_polylines(RID p_occluder,
if (!co->vertex_id) {
glGenBuffers(1, &co->vertex_id);
glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id);
- glBufferData(GL_ARRAY_BUFFER, lc * 6 * sizeof(real_t), vw.ptr(), GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, lc * 6 * sizeof(real_t), vw.ptr(), GL_STATIC_DRAW);
} else {
glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id);
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index dee5994124..341a5bf2c7 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -164,7 +164,7 @@ uniform int spot_light_count;
out vec4 diffuse_light_interp;
out vec4 specular_light_interp;
-void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color,float roughness,inout vec3 diffuse, inout vec3 specular) {
+void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, inout vec3 diffuse, inout vec3 specular) {
float dotNL = max(dot(N,L), 0.0 );
diffuse += dotNL * light_color / M_PI;
@@ -888,9 +888,13 @@ float GTR1(float NdotH, float a)
return (a2-1.0) / (M_PI*log(a2)*t);
}
+vec3 metallic_to_specular_color(float metallic, float specular, vec3 albedo) {
+ float dielectric = (0.034 * 2.0) * specular;
+ // energy conservation
+ return mix(vec3(dielectric), albedo, metallic); // TODO: reference?
+}
-
-void light_compute(vec3 N, vec3 L,vec3 V,vec3 B, vec3 T,vec3 light_color,vec3 attenuation,vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float rim,float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,inout vec3 diffuse, inout vec3 specular) {
+void light_compute(vec3 N, vec3 L, vec3 V, vec3 B, vec3 T, vec3 light_color, vec3 attenuation, vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, inout vec3 diffuse_light, inout vec3 specular_light) {
#if defined(USE_LIGHT_SHADER_CODE)
//light is written by the light shader
@@ -904,41 +908,42 @@ LIGHT_SHADER_CODE
#else
-
- float dotNL = max(dot(N,L), 0.0 );
+ float NdotL = dot(N,L);
+ float cNdotL = max(NdotL, 0.0); // clamped NdotL
+ float NdotV = dot(N, V);
+ float cNdotV = max(NdotV, 0.0);
#if defined(DIFFUSE_OREN_NAYAR)
- vec3 light_amount;
+ vec3 diffuse_brdf_NL;
#else
- float light_amount;
+ float diffuse_brdf_NL; // BRDF times N.L for calculating diffuse radiance
#endif
#if defined(DIFFUSE_LAMBERT_WRAP)
//energy conserving lambert wrap shader
- light_amount = max(0.0,(dot(N,L) + roughness) / ((1.0 + roughness) * (1.0 + roughness)));
+ diffuse_brdf_NL = max(0.0,(NdotL + roughness) / ((1.0 + roughness) * (1.0 + roughness)));
#elif defined(DIFFUSE_OREN_NAYAR)
{
// see http://mimosa-pudica.net/improved-oren-nayar.html
float LdotV = dot(L, V);
- float NdotL = dot(L, N);
- float NdotV = dot(N, V);
+
float s = LdotV - NdotL * NdotV;
float t = mix(1.0, max(NdotL, NdotV), step(0.0, s));
- float sigma2 = roughness * roughness;
+ float sigma2 = roughness * roughness; // TODO: this needs checking
vec3 A = 1.0 + sigma2 * (- 0.5 / (sigma2 + 0.33) + 0.17*diffuse_color / (sigma2 + 0.13) );
float B = 0.45 * sigma2 / (sigma2 + 0.09);
- light_amount = dotNL * (A + vec3(B) * s / t) / M_PI;
+ diffuse_brdf_NL = cNdotL * (A + vec3(B) * s / t) * (1.0 / M_PI);
}
#elif defined(DIFFUSE_TOON)
- light_amount = smoothstep(-roughness,max(roughness,0.01),dot(N,L));
+ diffuse_brdf_NL = smoothstep(-roughness,max(roughness,0.01),NdotL);
#elif defined(DIFFUSE_BURLEY)
@@ -946,40 +951,38 @@ LIGHT_SHADER_CODE
vec3 H = normalize(V + L);
- float NoL = max(0.0,dot(N, L));
- float LoH = max(0.0,dot(L, H));
- float NoV = max(0.0,dot(N, V));
-
- float FD90 = 0.5 + 2.0 * LoH * LoH * roughness;
- float FdV = 1.0 + (FD90 - 1.0) * SchlickFresnel(NoV);
- float FdL = 1.0 + (FD90 - 1.0) * SchlickFresnel(NoL);
- light_amount = ( (1.0 / M_PI) * FdV * FdL ) * NoL;
+ float cLdotH = max(0.0,dot(L, H));
+
+ float FD90 = 0.5 + 2.0 * cLdotH * cLdotH * roughness;
+ float FdV = 1.0 + (FD90 - 1.0) * SchlickFresnel(cNdotV);
+ float FdL = 1.0 + (FD90 - 1.0) * SchlickFresnel(cNdotL);
+ diffuse_brdf_NL = (1.0 / M_PI) * FdV * FdL * cNdotL;
/*
float energyBias = mix(roughness, 0.0, 0.5);
float energyFactor = mix(roughness, 1.0, 1.0 / 1.51);
float fd90 = energyBias + 2.0 * VoH * VoH * roughness;
float f0 = 1.0;
- float lightScatter = f0 + (fd90 - f0) * pow(1.0 - NoL, 5.0);
- float viewScatter = f0 + (fd90 - f0) * pow(1.0 - NoV, 5.0);
+ float lightScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotL, 5.0);
+ float viewScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotV, 5.0);
- light_amount = lightScatter * viewScatter * energyFactor;*/
+ diffuse_brdf_NL = lightScatter * viewScatter * energyFactor;*/
}
#else
//lambert
- light_amount = dotNL / M_PI;
+ diffuse_brdf_NL = cNdotL * (1.0 / M_PI);
#endif
#if defined(TRANSMISSION_USED)
- diffuse += light_color * diffuse_color * mix(vec3(light_amount),vec3(M_PI),transmission) * attenuation;
+ diffuse_light += light_color * diffuse_color * mix(vec3(diffuse_brdf_NL), vec3(M_PI), transmission) * attenuation;
#else
- diffuse += light_color * diffuse_color * light_amount * attenuation;
+ diffuse_light += light_color * diffuse_color * diffuse_brdf_NL * attenuation;
#endif
- float dotNV = max(dot(N,V), 0.0 );
+
#if defined(LIGHT_USE_RIM)
- float rim_light = pow(1.0-dotNV,(1.0-roughness)*16.0);
- diffuse += rim_light * rim * mix(vec3(1.0),diffuse_color,rim_tint) * light_color;
+ float rim_light = pow(1.0-cNdotV, (1.0-roughness)*16.0);
+ diffuse_light += rim_light * rim * mix(vec3(1.0),diffuse_color,rim_tint) * light_color;
#endif
@@ -991,25 +994,25 @@ LIGHT_SHADER_CODE
#if defined(SPECULAR_BLINN)
vec3 H = normalize(V + L);
- float dotNH = max(dot(N,H), 0.0 );
- float intensity = pow( dotNH, (1.0-roughness) * 256.0);
- specular += light_color * intensity * specular_blob_intensity * attenuation;
+ float cNdotH = max(dot(N,H), 0.0 );
+ float intensity = pow( cNdotH, (1.0-roughness) * 256.0);
+ specular_light += light_color * intensity * specular_blob_intensity * attenuation;
#elif defined(SPECULAR_PHONG)
vec3 R = normalize(-reflect(L,N));
- float dotNV = max(0.0,dot(R,V));
- float intensity = pow( dotNV, (1.0-roughness) * 256.0);
- specular += light_color * intensity * specular_blob_intensity * attenuation;
+ float cRdotV = max(0.0,dot(R,V));
+ float intensity = pow( cRdotV, (1.0-roughness) * 256.0);
+ specular_light += light_color * intensity * specular_blob_intensity * attenuation;
#elif defined(SPECULAR_TOON)
vec3 R = normalize(-reflect(L,N));
- float dotNV = dot(R,V);
+ float RdotV = dot(R,V);
float mid = 1.0-roughness;
mid*=mid;
- float intensity = smoothstep(mid-roughness*0.5,mid+roughness*0.5,dotNV) * mid;
- diffuse += light_color * intensity * specular_blob_intensity * attenuation; //write to diffuse, as in toon shading you generally want no reflection
+ float intensity = smoothstep(mid-roughness*0.5, mid+roughness*0.5, RdotV) * mid;
+ diffuse_light += light_color * intensity * specular_blob_intensity * attenuation; // write to diffuse_light, as in toon shading you generally want no reflection
#elif defined(SPECULAR_DISABLED)
//none..
@@ -1020,8 +1023,8 @@ LIGHT_SHADER_CODE
vec3 H = normalize(V + L);
- float dotNH = max(dot(N,H), 0.0 );
- float dotLH = max(dot(L,H), 0.0 );
+ float cNdotH = max(dot(N,H), 0.0);
+ float cLdotH = max(dot(L,H), 0.0);
#if defined(LIGHT_USE_ANISOTROPY)
@@ -1030,44 +1033,46 @@ LIGHT_SHADER_CODE
float ry = roughness*aspect;
float ax = rx*rx;
float ay = ry*ry;
- float dotXH = dot( T, H );
- float dotYH = dot( B, H );
- float pi = M_PI;
- float denom = dotXH*dotXH / (ax*ax) + dotYH*dotYH / (ay*ay) + dotNH*dotNH;
- float D = 1.0 / ( pi * ax*ay * denom*denom );
+ float XdotH = dot( T, H );
+ float YdotH = dot( B, H );
+ float denom = XdotH*XdotH / (ax*ax) + YdotH*YdotH / (ay*ay) + cNdotH*cNdotH;
+ float D = 1.0 / ( M_PI * ax*ay * denom*denom );
#else
float alphaSqr = alpha * alpha;
- float pi = M_PI;
- float denom = dotNH * dotNH * (alphaSqr - 1.0) + 1.0;
- float D = alphaSqr / (pi * denom * denom);
+ float denom = cNdotH * cNdotH * (alphaSqr - 1.0) + 1.0;
+ float D = alphaSqr / (M_PI * denom * denom);
#endif
// F
- float F0 = 1.0;
- float dotLH5 = SchlickFresnel( dotLH );
- float F = F0 + (1.0 - F0) * (dotLH5);
+ float F0 = 1.0; // FIXME
+ float cLdotH5 = SchlickFresnel(cLdotH);
+ float F = mix(cLdotH5, 1.0, F0);
// V
float k = alpha / 2.0f;
- float vis = G1V(dotNL, k) * G1V(dotNV, k);
+ float vis = G1V(cNdotL, k) * G1V(cNdotV, k);
- float speci = dotNL * D * F * vis;
+ float speci = cNdotL * D * F * vis;
- specular += speci * light_color * specular_blob_intensity * attenuation;
+ specular_light += speci * light_color * specular_blob_intensity * attenuation;
#endif
#if defined(LIGHT_USE_CLEARCOAT)
-# if !defined(SPECULAR_SCHLICK_GGX)
+
+# if !defined(SPECULAR_SCHLICK_GGX) && !defined(SPECULAR_BLINN)
vec3 H = normalize(V + L);
- float dotLH5 = SchlickFresnel( dotLH );
- float dotNH = max(dot(N,H), 0.0 );
# endif
+# if !defined(SPECULAR_SCHLICK_GGX)
+ float cNdotH = max(dot(N,H), 0.0);
+ float cLdotH = max(dot(L,H), 0.0);
+ float cLdotH5 = SchlickFresnel(cLdotH);
+#endif
+ float Dr = GTR1(cNdotH, mix(.1, .001, clearcoat_gloss));
+ float Fr = mix(.04, 1.0, cLdotH5);
+ float Gr = G1V(cNdotL, .25) * G1V(cNdotV, .25);
- float Dr = GTR1(dotNH, mix(.1,.001,clearcoat_gloss));
- float Fr = mix(.04, 1.0, dotLH5);
- float Gr = G1V(dotNL, .25) * G1V(dotNV, .25);
- specular += .25*clearcoat*Gr*Fr*Dr;
+ specular_light += .25*clearcoat*Gr*Fr*Dr;
#endif
}
@@ -1095,9 +1100,7 @@ float sample_shadow(highp sampler2DShadow shadow, vec2 shadow_pixel_size, vec2 p
avg+=textureProj(shadow,vec4(pos+vec2(0.0,-shadow_pixel_size.y*2.0),depth,1.0));
return avg*(1.0/13.0);
-#endif
-
-#ifdef SHADOW_MODE_PCF_5
+#elif defined(SHADOW_MODE_PCF_5)
float avg=textureProj(shadow,vec4(pos,depth,1.0));
avg+=textureProj(shadow,vec4(pos+vec2(shadow_pixel_size.x,0.0),depth,1.0));
@@ -1105,11 +1108,11 @@ float sample_shadow(highp sampler2DShadow shadow, vec2 shadow_pixel_size, vec2 p
avg+=textureProj(shadow,vec4(pos+vec2(0.0,shadow_pixel_size.y),depth,1.0));
avg+=textureProj(shadow,vec4(pos+vec2(0.0,-shadow_pixel_size.y),depth,1.0));
return avg*(1.0/5.0);
-#endif
-#if !defined(SHADOW_MODE_PCF_5) && !defined(SHADOW_MODE_PCF_13)
+#else
return textureProj(shadow,vec4(pos,depth,1.0));
+
#endif
}
@@ -1151,7 +1154,7 @@ vec3 light_transmittance(float translucency,vec3 light_vec, vec3 normal, vec3 po
}
#endif
-void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float rim, float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,float p_blob_intensity,inout vec3 diffuse_light, inout vec3 specular_light) {
+void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) {
vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz-vertex;
float light_length = length( light_rel_vec );
@@ -1940,9 +1943,9 @@ FRAGMENT_SHADER_CODE
- //energu conservation
- diffuse_light=mix(diffuse_light,vec3(0.0),metallic);
- ambient_light=mix(ambient_light,vec3(0.0),metallic);
+ //energy conservation
+ diffuse_light *= 1.0-metallic; // TODO: avoid diffuse and ambient light calculations when metallic == 1
+ ambient_light *= 1.0-metallic;
{
@@ -1951,9 +1954,6 @@ FRAGMENT_SHADER_CODE
//simplify for toon, as
specular_light *= specular * metallic * albedo * 2.0;
#else
- //energy conservation
- vec3 dielectric = vec3(0.034) * specular * 2.0;
- vec3 specular_color = mix(dielectric, albedo, metallic);
// Environment brdf approximation (Lazarov 2013)
// see https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile
const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
@@ -1963,6 +1963,7 @@ FRAGMENT_SHADER_CODE
float a004 = min( r.x * r.x, exp2( -9.28 * ndotv ) ) * r.x + r.y;
vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;
+ vec3 specular_color = metallic_to_specular_color(metallic, specular, albedo);
specular_light *= AB.x * specular_color + AB.y;
#endif
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 649f874cf4..206f57d4a2 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -223,6 +223,12 @@ Error FileAccessUnix::get_error() const {
return last_error;
}
+void FileAccessUnix::flush() {
+
+ ERR_FAIL_COND(!f);
+ fflush(f);
+}
+
void FileAccessUnix::store_8(uint8_t p_dest) {
ERR_FAIL_COND(!f);
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index e2848e4128..96f2ff8e26 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -72,6 +72,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_path); ///< return true if a file exists
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 75c8a153f6..29fe73f170 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -64,39 +64,7 @@
#include <string.h>
#include <sys/time.h>
#include <sys/wait.h>
-
-extern bool _print_error_enabled;
-
-void OS_Unix::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
- if (!_print_error_enabled)
- return;
-
- const char *err_details;
- if (p_rationale && p_rationale[0])
- err_details = p_rationale;
- else
- err_details = p_code;
-
- switch (p_type) {
- case ERR_ERROR:
- print("\E[1;31mERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;31m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_WARNING:
- print("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;33m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_SCRIPT:
- print("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;35m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_SHADER:
- print("\E[1;36mSHADER ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;36m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- }
-}
+#include <unistd.h>
void OS_Unix::debug_break() {
@@ -165,29 +133,16 @@ void OS_Unix::initialize_core() {
}
}
-void OS_Unix::finalize_core() {
+void OS_Unix::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(UnixTerminalLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
}
-void OS_Unix::vprint(const char *p_format, va_list p_list, bool p_stder) {
-
- if (p_stder) {
-
- vfprintf(stderr, p_format, p_list);
- fflush(stderr);
- } else {
-
- vprintf(p_format, p_list);
- fflush(stdout);
- }
+void OS_Unix::finalize_core() {
}
-void OS_Unix::print(const char *p_format, ...) {
-
- va_list argp;
- va_start(argp, p_format);
- vprintf(p_format, argp);
- va_end(argp);
-}
void OS_Unix::alert(const String &p_alert, const String &p_title) {
fprintf(stderr, "ERROR: %s\n", p_alert.utf8().get_data());
@@ -559,4 +514,38 @@ String OS_Unix::get_executable_path() const {
#endif
}
+void UnixTerminalLogger::log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
+ if (!should_log(true)) {
+ return;
+ }
+
+ const char *err_details;
+ if (p_rationale && p_rationale[0])
+ err_details = p_rationale;
+ else
+ err_details = p_code;
+
+ switch (p_type) {
+ case ERR_WARNING:
+ logf_error("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n", p_function, err_details);
+ logf_error("\E[0;33m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_SCRIPT:
+ logf_error("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
+ logf_error("\E[0;35m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_SHADER:
+ logf_error("\E[1;36mSHADER ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
+ logf_error("\E[0;36m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_ERROR:
+ default:
+ logf_error("\E[1;31mERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
+ logf_error("\E[0;31m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ }
+}
+
+UnixTerminalLogger::~UnixTerminalLogger() {}
+
#endif
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 19e79728fb..1cc44c0ffd 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -54,11 +54,11 @@ protected:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual int unix_initialize_audio(int p_audio_driver);
//virtual void initialize(int p_video_driver,int p_audio_driver);
- //virtual void finalize();
virtual void finalize_core();
String stdin_buf;
@@ -66,10 +66,6 @@ protected:
String get_global_settings_path() const;
public:
- virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
-
- virtual void print(const char *p_format, ...);
- virtual void vprint(const char *p_format, va_list p_list, bool p_stder = false);
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
virtual String get_stdin_string(bool p_block);
@@ -120,6 +116,12 @@ public:
//virtual void run( MainLoop * p_main_loop );
};
+class UnixTerminalLogger : public StdLogger {
+public:
+ virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
+ virtual ~UnixTerminalLogger();
+};
+
#endif
#endif
diff --git a/drivers/unix/syslog_logger.cpp b/drivers/unix/syslog_logger.cpp
new file mode 100644
index 0000000000..d57f391325
--- /dev/null
+++ b/drivers/unix/syslog_logger.cpp
@@ -0,0 +1,71 @@
+/*************************************************************************/
+/* syslog_logger.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifdef UNIX_ENABLED
+
+#include "syslog_logger.h"
+#include "print_string.h"
+#include <syslog.h>
+
+void SyslogLogger::logv(const char *p_format, va_list p_list, bool p_err) {
+ if (!should_log(p_err)) {
+ return;
+ }
+
+ vsyslog(p_err ? LOG_ERR : LOG_INFO, p_format, p_list);
+}
+
+void SyslogLogger::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
+ if (!should_log(true)) {
+ return;
+ }
+
+ const char *err_type = "**ERROR**";
+ switch (p_type) {
+ case ERR_ERROR: err_type = "**ERROR**"; break;
+ case ERR_WARNING: err_type = "**WARNING**"; break;
+ case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break;
+ case ERR_SHADER: err_type = "**SHADER ERROR**"; break;
+ default: ERR_PRINT("Unknown error type"); break;
+ }
+
+ const char *err_details;
+ if (p_rationale && *p_rationale)
+ err_details = p_rationale;
+ else
+ err_details = p_code;
+
+ syslog(p_type == ERR_WARNING ? LOG_WARNING : LOG_ERR, "%s: %s\n At: %s:%i:%s() - %s", err_type, err_details, p_file, p_line, p_function, p_code);
+}
+
+SyslogLogger::~SyslogLogger() {
+}
+
+#endif \ No newline at end of file
diff --git a/drivers/unix/syslog_logger.h b/drivers/unix/syslog_logger.h
new file mode 100644
index 0000000000..b3cf2f9e3a
--- /dev/null
+++ b/drivers/unix/syslog_logger.h
@@ -0,0 +1,48 @@
+/*************************************************************************/
+/* syslog_logger.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef SYSLOG_LOGGER_H
+#define SYSLOG_LOGGER_H
+
+#ifdef UNIX_ENABLED
+
+#include "io/logger.h"
+
+class SyslogLogger : public Logger {
+public:
+ virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type);
+
+ virtual ~SyslogLogger();
+};
+
+#endif
+
+#endif \ No newline at end of file
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 6d6a6027d9..8d6e78dbee 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -162,10 +162,10 @@ Error DirAccessWindows::make_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
+ p_dir = fix_path(p_dir);
if (p_dir.is_rel_path())
p_dir = get_current_dir().plus_file(p_dir);
- p_dir = fix_path(p_dir);
p_dir = p_dir.replace("/", "\\");
bool success;
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index d128b58244..3b6e469c9c 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -207,6 +207,12 @@ Error FileAccessWindows::get_error() const {
return last_error;
}
+void FileAccessWindows::flush() {
+
+ ERR_FAIL_COND(!f);
+ fflush(f);
+}
+
void FileAccessWindows::store_8(uint8_t p_dest) {
ERR_FAIL_COND(!f);
diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h
index 15cbdca739..e5e7fd4a13 100644
--- a/drivers/windows/file_access_windows.h
+++ b/drivers/windows/file_access_windows.h
@@ -64,6 +64,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_name); ///< return true if a file exists
diff --git a/editor/SCsub b/editor/SCsub
index bf88ebb1b5..e44b4e4bb2 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -4,7 +4,7 @@ Import('env')
env.editor_sources = []
import os
-from compat import encode_utf8, byte_to_str, open_utf8
+from compat import encode_utf8, byte_to_str, open_utf8, escape_string
def make_certs_header(target, source, env):
@@ -162,7 +162,7 @@ def make_authors_header(target, source, env):
for line in f:
if reading:
if line.startswith(" "):
- g.write("\t\"" + line.strip() + "\",\n")
+ g.write("\t\"" + escape_string(line.strip()) + "\",\n")
continue
if line.startswith("## "):
if reading:
@@ -170,7 +170,7 @@ def make_authors_header(target, source, env):
reading = False
for i in range(len(sections)):
if line.strip().endswith(sections[i]):
- current_section = sections_id[i]
+ current_section = escape_string(sections_id[i])
reading = True
g.write("static const char *" + current_section + "[] = {\n")
break
@@ -204,7 +204,7 @@ def make_donors_header(target, source, env):
for line in f:
if reading >= 0:
if line.startswith(" "):
- g.write("\t\"" + line.strip() + "\",\n")
+ g.write("\t\"" + escape_string(line.strip()) + "\",\n")
continue
if line.startswith("## "):
if reading:
@@ -212,7 +212,7 @@ def make_donors_header(target, source, env):
reading = False
for i in range(len(sections)):
if line.strip().endswith(sections[i]):
- current_section = sections_id[i]
+ current_section = escape_string(sections_id[i])
reading = True
g.write("static const char *" + current_section + "[] = {\n")
break
@@ -237,7 +237,8 @@ def make_license_header(target, source, env):
g.write("static const char *about_license =")
for line in f:
- g.write("\n\t\"" + line.strip().replace("\"", "\\\"") + "\\n\"")
+ escaped_string = escape_string(line.strip().replace("\"", "\\\""))
+ g.write("\n\t\"" + escaped_string + "\\n\"")
g.write(";\n")
@@ -322,11 +323,13 @@ def make_license_header(target, source, env):
for k in j[0].split("\n"):
if file_body != "":
file_body += "\\n\"\n"
- file_body += "\t\"" + k.strip().replace("\"", "\\\"")
+ escaped_string = escape_string(k.strip().replace("\"", "\\\""))
+ file_body += "\t\"" + escaped_string
for k in j[1].split("\n"):
if copyright_body != "":
copyright_body += "\\n\"\n"
- copyright_body += "\t\"" + k.strip().replace("\"", "\\\"")
+ escaped_string = escape_string(k.strip().replace("\"", "\\\""))
+ copyright_body += "\t\"" + escaped_string
about_tp_file += "\t" + file_body + "\",\n"
about_tp_copyright += "\t" + copyright_body + "\",\n"
@@ -340,7 +343,8 @@ def make_license_header(target, source, env):
for j in i[1].split("\n"):
if body != "":
body += "\\n\"\n"
- body += "\t\"" + j.strip().replace("\"", "\\\"")
+ escaped_string = escape_string(j.strip().replace("\"", "\\\""))
+ body += "\t\"" + escaped_string
about_license_name += "\t\"" + i[0] + "\",\n"
about_license_body += "\t" + body + "\",\n"
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index ca68d84abd..520bf480fd 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -83,7 +83,7 @@ void CreateDialog::popup_create(bool p_dontclear) {
_update_favorite_list();
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has("interface/dialogs/create_new_node_bounds")) {
+ if (EditorSettings::get_singleton()->has_setting("interface/dialogs/create_new_node_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/create_new_node_bounds"));
} else {
popup_centered_ratio();
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index efa9572bf5..ae7ed7ce61 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -117,7 +117,7 @@ void EditorAutoloadSettings::_autoload_add() {
undo_redo->create_action(TTR("Add AutoLoad"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, "*" + path);
- if (ProjectSettings::get_singleton()->has(name)) {
+ if (ProjectSettings::get_singleton()->has_setting(name)) {
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, ProjectSettings::get_singleton()->get(name));
} else {
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, Variant());
@@ -169,7 +169,7 @@ void EditorAutoloadSettings::_autoload_edited() {
return;
}
- if (ProjectSettings::get_singleton()->has("autoload/" + name)) {
+ if (ProjectSettings::get_singleton()->has_setting("autoload/" + name)) {
ti->set_text(0, old_name);
EditorNode::get_singleton()->show_warning(vformat(TTR("Autoload '%s' already exists!"), name));
return;
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index db12998dd2..bc20a99809 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1141,6 +1141,12 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
if (p_preset->get("texture_format/etc2")) {
r_features->push_back("etc2");
}
+
+ if (p_preset->get("binary_format/64_bits")) {
+ r_features->push_back("64");
+ } else {
+ r_features->push_back("32");
+ }
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 481f2a8179..4ae786391b 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1383,7 +1383,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
}
}
- if (load_default && ProjectSettings::get_singleton()->has("importer_defaults/" + importer->get_importer_name())) {
+ if (load_default && ProjectSettings::get_singleton()->has_setting("importer_defaults/" + importer->get_importer_name())) {
//use defaults if exist
Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name());
List<Variant> v;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index a04ded7b5b..4e0ad38320 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5613,7 +5613,7 @@ EditorNode::EditorNode() {
{
_initializing_addons = true;
Vector<String> addons;
- if (ProjectSettings::get_singleton()->has("editor_plugins/enabled")) {
+ if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
}
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 1b6b66c198..b532bb793a 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -195,7 +195,17 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); //do not edit
}
-bool EditorSettings::has(String p_var) const {
+void EditorSettings::set_setting(const String &p_setting, const Variant &p_value) {
+ _THREAD_SAFE_METHOD_
+ set(p_setting, p_value);
+}
+
+Variant EditorSettings::get_setting(const String &p_setting) const {
+ _THREAD_SAFE_METHOD_
+ return get(p_setting);
+}
+
+bool EditorSettings::has_setting(String p_var) const {
_THREAD_SAFE_METHOD_
@@ -218,7 +228,7 @@ void EditorSettings::raise_order(const String &p_name) {
Variant _EDITOR_DEF(const String &p_var, const Variant &p_default) {
- if (EditorSettings::get_singleton()->has(p_var))
+ if (EditorSettings::get_singleton()->has_setting(p_var))
return EditorSettings::get_singleton()->get(p_var);
EditorSettings::get_singleton()->set(p_var, p_default);
EditorSettings::get_singleton()->set_initial_value(p_var, p_default);
@@ -228,7 +238,7 @@ Variant _EDITOR_DEF(const String &p_var, const Variant &p_default) {
Variant _EDITOR_GET(const String &p_var) {
- ERR_FAIL_COND_V(!EditorSettings::get_singleton()->has(p_var), Variant())
+ ERR_FAIL_COND_V(!EditorSettings::get_singleton()->has_setting(p_var), Variant())
return EditorSettings::get_singleton()->get(p_var);
}
@@ -471,8 +481,8 @@ void EditorSettings::setup_network() {
IP::get_singleton()->get_local_addresses(&local_ip);
String lip = "127.0.0.1";
String hint;
- String current = has("network/debug/remote_host") ? get("network/debug/remote_host") : "";
- int port = has("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
+ String current = has_setting("network/debug/remote_host") ? get("network/debug/remote_host") : "";
+ int port = has_setting("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
@@ -989,7 +999,7 @@ void EditorSettings::load_text_editor_theme() {
String val = cf->get_value("color_theme", key);
// don't load if it's not already there!
- if (has("text_editor/highlighting/" + key)) {
+ if (has_setting("text_editor/highlighting/" + key)) {
// make sure it is actually a color
if (val.is_valid_html_color() && key.find("color") >= 0) {
@@ -1194,6 +1204,10 @@ void EditorSettings::set_initial_value(const StringName &p_name, const Variant &
void EditorSettings::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("has_setting", "name"), &EditorSettings::has_setting);
+ ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &EditorSettings::set_setting);
+ ClassDB::bind_method(D_METHOD("get_setting", "name"), &EditorSettings::get_setting);
+
ClassDB::bind_method(D_METHOD("erase", "property"), &EditorSettings::erase);
ClassDB::bind_method(D_METHOD("get_settings_path"), &EditorSettings::get_settings_path);
ClassDB::bind_method(D_METHOD("get_project_settings_path"), &EditorSettings::get_project_settings_path);
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 19cf367d57..c5d2670650 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -129,7 +129,11 @@ public:
void set_manually(const StringName &p_name, const Variant &p_value, bool p_emit_signal = false) {
_set(p_name, p_value, p_emit_signal);
}
- bool has(String p_var) const;
+
+ void set_setting(const String &p_setting, const Variant &p_value);
+ Variant get_setting(const String &p_setting) const;
+
+ bool has_setting(String p_var) const;
static EditorSettings *get_singleton();
void erase(String p_var);
String get_settings_path() const;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index b51fc7c362..0436ac78df 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -146,6 +146,25 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#84c2ff", "#5caeff"); // selection (blue)
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ea686c", "#e3383d"); // key xform (red)
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#69ecbd", "#25e3a0"); // VS variant
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#8da6f0", "#6d8eeb"); // VS bool
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#7dc6ef", "#4fb2e9"); // VS int
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#61daf4", "#27ccf0"); // VS float
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#6ba7ec", "#4690e7"); // VS string
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#bd91f1", "#ad76ee"); // VS vector2
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f191a5", "#ee758e"); // VS rect
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e286f0", "#dc6aed"); // VS vector3
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#c4ec69", "#96ce1a"); // VS transform2D
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f77070", "#f77070"); // VS plane
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ec69a3", "#ec69a3"); // VS quat
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ee7991", "#ee7991"); // VS aabb
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e3ec69", "#b2bb19"); // VS basis
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f6a86e", "#f49047"); // VS transform
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#6993ec", "#6993ec"); // VS path
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#69ec9a", "#2ce573"); // VS rid
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#79f3e8", "#12d5c3"); // VS object
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#77edb1", "#57e99f"); // VS dict
}
// these ones should be converted even if we are using a dark theme
@@ -393,7 +412,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_default->set_draw_center(true);
// Button and widgets
- const float extra_spacing = EDITOR_DEF("interface/theme/additional_spacing", 0.0);
+ const float extra_spacing = EDITOR_GET("interface/theme/additional_spacing");
Ref<StyleBoxFlat> style_widget = style_default->duplicate();
style_widget->set_default_margin(MARGIN_LEFT, (extra_spacing + 6) * EDSCALE);
@@ -437,14 +456,20 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxEmpty> style_empty = make_empty_stylebox(default_margin_size, default_margin_size, default_margin_size, default_margin_size);
// Tabs
+
+ const int tab_default_margin_side = 10 * EDSCALE + extra_spacing * EDSCALE;
+ const int tab_default_margin_vertical = 5 * EDSCALE + extra_spacing * EDSCALE;
+
Ref<StyleBoxFlat> style_tab_selected = style_widget->duplicate();
style_tab_selected->set_border_width_all(border_width);
style_tab_selected->set_border_width(MARGIN_BOTTOM, 0);
style_tab_selected->set_border_color_all(dark_color_3);
style_tab_selected->set_expand_margin_size(MARGIN_BOTTOM, border_width);
- style_tab_selected->set_default_margin(MARGIN_LEFT, 10 * EDSCALE);
- style_tab_selected->set_default_margin(MARGIN_RIGHT, 10 * EDSCALE);
+ style_tab_selected->set_default_margin(MARGIN_LEFT, tab_default_margin_side);
+ style_tab_selected->set_default_margin(MARGIN_RIGHT, tab_default_margin_side);
+ style_tab_selected->set_default_margin(MARGIN_BOTTOM, tab_default_margin_vertical);
+ style_tab_selected->set_default_margin(MARGIN_TOP, tab_default_margin_vertical);
style_tab_selected->set_bg_color(tab_color);
Ref<StyleBoxFlat> style_tab_unselected = style_tab_selected->duplicate();
@@ -468,7 +493,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
// Script Editor
- theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(4, 0, 4, 4));
+ theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(default_margin_size, 0, default_margin_size, default_margin_size));
theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
// Play button group
@@ -539,7 +564,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color_disabled", "OptionButton", font_color_disabled);
theme->set_color("icon_color_hover", "OptionButton", font_color_hl);
theme->set_icon("arrow", "OptionButton", theme->get_icon("GuiOptionArrow", "EditorIcons"));
- theme->set_constant("arrow_margin", "OptionButton", 4 * EDSCALE);
+ theme->set_constant("arrow_margin", "OptionButton", default_margin_size * EDSCALE);
theme->set_constant("modulate_arrow", "OptionButton", true);
// CheckButton
@@ -591,6 +616,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("unchecked", "Tree", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("arrow", "Tree", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
+ theme->set_icon("updown", "Tree", theme->get_icon("GuiTreeUpdown", "EditorIcons"));
theme->set_icon("select_arrow", "Tree", theme->get_icon("GuiDropdown", "EditorIcons"));
theme->set_icon("select_option", "Tree", theme->get_icon("GuiTreeOption", "EditorIcons"));
theme->set_stylebox("bg_focus", "Tree", style_focus);
@@ -666,8 +692,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color", "ItemList", font_color);
theme->set_color("font_color_selected", "ItemList", mono_color);
theme->set_color("guide_color", "ItemList", guide_color);
- theme->set_constant("vseparation", "ItemList", 2);
- theme->set_constant("hseparation", "ItemList", 2);
+ theme->set_constant("vseparation", "ItemList", 2 * EDSCALE);
+ theme->set_constant("hseparation", "ItemList", 2 * EDSCALE);
theme->set_constant("icon_margin", "ItemList", default_margin_size * EDSCALE);
theme->set_constant("line_separation", "ItemList", 2 * EDSCALE);
@@ -874,21 +900,23 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// GraphNode
+ const float mv = dark_theme ? 0.0 : 1.0;
+ const float mv2 = 1.0 - mv;
const int gn_margin_side = 28;
- Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), gn_margin_side, 24, gn_margin_side, 5);
+ Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(mv, mv, mv, 0.7), gn_margin_side, 24, gn_margin_side, 5);
graphsb->set_border_width_all(border_width);
- graphsb->set_border_color_all(Color(1, 1, 1, 0.9));
- Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(0, 0, 0, 0.6), gn_margin_side, 24, gn_margin_side, 5);
+ graphsb->set_border_color_all(Color(mv2, mv2, mv2, 0.9));
+ Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(mv, mv, mv, 0.9), gn_margin_side, 24, gn_margin_side, 5);
graphsbselected->set_border_width_all(border_width);
graphsbselected->set_border_color_all(Color(accent_color.r, accent_color.g, accent_color.b, 0.9));
graphsbselected->set_shadow_size(8 * EDSCALE);
graphsbselected->set_shadow_color(shadow_color);
- Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(0, 0, 0, 0.3), gn_margin_side, 24, gn_margin_side, 5);
+ Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(mv, mv, mv, 0.3), gn_margin_side, 24, gn_margin_side, 5);
graphsbcomment->set_border_width_all(border_width);
- graphsbcomment->set_border_color_all(Color(1, 1, 1, 0.9));
- Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(Color(0, 0, 0, 0.4), gn_margin_side, 24, gn_margin_side, 5);
+ graphsbcomment->set_border_color_all(Color(mv2, mv2, mv2, 0.9));
+ Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(Color(mv, mv, mv, 0.4), gn_margin_side, 24, gn_margin_side, 5);
graphsbcommentselected->set_border_width_all(border_width);
- graphsbcommentselected->set_border_color_all(Color(1, 1, 1, 0.9));
+ graphsbcommentselected->set_border_color_all(Color(mv2, mv2, mv2, 0.9));
Ref<StyleBoxFlat> graphsbbreakpoint = graphsbselected->duplicate();
graphsbbreakpoint->set_draw_center(false);
graphsbbreakpoint->set_border_color_all(warning_color);
diff --git a/editor/icons/icon_GUI_tree_updown.svg b/editor/icons/icon_GUI_tree_updown.svg
new file mode 100644
index 0000000000..cdcd6c2441
--- /dev/null
+++ b/editor/icons/icon_GUI_tree_updown.svg
@@ -0,0 +1,5 @@
+<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1038.4)">
+<path transform="translate(0 1038.4)" d="m6.9844 1.002a1.0001 1.0001 0 0 0 -0.69141 0.29102l-3 3a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2.293-2.293 2.293 2.293a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-3-3a1.0001 1.0001 0 0 0 -0.72266 -0.29102zm3 6.998a1 1 0 0 0 -0.69141 0.29297l-2.293 2.293-2.293-2.293a1 1 0 0 0 -0.7207 -0.29102 1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l3 3a1.0001 1.0001 0 0 0 1.4141 0l3-3a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.72266 -0.29297z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fff" fill-opacity=".58824" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_mini_color.svg b/editor/icons/icon_mini_color.svg
index b70015a05d..623f922158 100644
--- a/editor/icons/icon_mini_color.svg
+++ b/editor/icons/icon_mini_color.svg
@@ -1,7 +1,7 @@
<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m4 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff7070"/>
-<path transform="translate(0 1040.4)" d="m14 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#70bfff"/>
-<path transform="translate(0 1040.4)" d="m6 2v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5h-2z" fill="#7aff70"/>
+<path transform="translate(0 1040.4)" d="m4 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff8484"/>
+<path transform="translate(0 1040.4)" d="m14 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#84c2ff"/>
+<path transform="translate(0 1040.4)" d="m6 2v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5h-2z" fill="#84ffb1"/>
</g>
</svg>
diff --git a/editor/icons/icon_mini_image.svg b/editor/icons/icon_mini_image.svg
deleted file mode 100644
index 735cb563cb..0000000000
--- a/editor/icons/icon_mini_image.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m0 1v2h2v-2h-2zm3 2v6h2v-4a1 1 0 0 1 1 1v3h2v-3-1a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2v0.17578a3 3 0 0 0 -1 -0.17578h-2zm8 3a3 3 0 0 0 3 3 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-6h-2a3 3 0 0 0 -3 3zm-11-1v4h2v-4h-2zm14 0v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#93f1b9"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_mini_input.svg b/editor/icons/icon_mini_input.svg
deleted file mode 100644
index 92cf763cf8..0000000000
--- a/editor/icons/icon_mini_input.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m0 2v2h2v-2h-2zm13 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2zm0 5a3 3 0 0 0 -3 -3h-2v3a3 3 0 0 0 -3 -3h-2v6h2v-4a1 1 0 0 1 1 1v3h2v2h2v-2a3 3 0 0 0 3 -3zm-13-1v4h2v-4h-2zm10 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#adf18f"/>
-</g>
-</svg>
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 112e3abcb5..77fd6d883a 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -137,7 +137,7 @@ void ImportDock::set_edit_path(const String &p_path) {
preset->get_popup()->add_separator();
preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT);
- if (ProjectSettings::get_singleton()->has("importer_defaults/" + params->importer->get_importer_name())) {
+ if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name())) {
preset->get_popup()->add_item(TTR("Load Default"), ITEM_LOAD_DEFAULT);
preset->get_popup()->add_separator();
preset->get_popup()->add_item(vformat(TTR("Clear Default for '%s'"), params->importer->get_visible_name()), ITEM_CLEAR_DEFAULT);
@@ -281,7 +281,7 @@ void ImportDock::_preset_selected(int p_idx) {
} break;
case ITEM_LOAD_DEFAULT: {
- ERR_FAIL_COND(!ProjectSettings::get_singleton()->has("importer_defaults/" + params->importer->get_importer_name()));
+ ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name()));
Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + params->importer->get_importer_name());
List<Variant> v;
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1aa24c8172..4f6c8f89ee 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -990,6 +990,7 @@ void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) {
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
+ se->pre_drag_rect = canvas_item->get_item_rect();
}
if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0])) {
@@ -1517,6 +1518,7 @@ void CanvasItemEditor::_viewport_base_gui_input(const Ref<InputEvent> &p_event)
if (Object::cast_to<Control>(canvas_item))
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
+ se->pre_drag_rect = canvas_item->get_item_rect();
return;
}
@@ -1539,6 +1541,7 @@ void CanvasItemEditor::_viewport_base_gui_input(const Ref<InputEvent> &p_event)
if (Object::cast_to<Control>(canvas_item))
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
+ se->pre_drag_rect = canvas_item->get_item_rect();
return;
}
@@ -1550,6 +1553,7 @@ void CanvasItemEditor::_viewport_base_gui_input(const Ref<InputEvent> &p_event)
drag_from = transform.affine_inverse().xform(click);
se->undo_state = canvas_item->edit_get_state();
se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
+ se->pre_drag_rect = canvas_item->get_item_rect();
return;
}
}
@@ -2206,16 +2210,16 @@ void CanvasItemEditor::_draw_selection() {
Rect2 rect = canvas_item->get_item_rect();
- if (drag != DRAG_NONE && drag != DRAG_PIVOT) {
+ if (show_helpers && drag != DRAG_NONE && drag != DRAG_PIVOT) {
const Transform2D pre_drag_xform = transform * se->pre_drag_xform;
const Color pre_drag_color = Color(0.4, 0.6, 1, 0.7);
Vector2 pre_drag_endpoints[4] = {
- pre_drag_xform.xform(rect.position),
- pre_drag_xform.xform(rect.position + Vector2(rect.size.x, 0)),
- pre_drag_xform.xform(rect.position + rect.size),
- pre_drag_xform.xform(rect.position + Vector2(0, rect.size.y))
+ pre_drag_xform.xform(se->pre_drag_rect.position),
+ pre_drag_xform.xform(se->pre_drag_rect.position + Vector2(se->pre_drag_rect.size.x, 0)),
+ pre_drag_xform.xform(se->pre_drag_rect.position + se->pre_drag_rect.size),
+ pre_drag_xform.xform(se->pre_drag_rect.position + Vector2(0, se->pre_drag_rect.size.y))
};
for (int i = 0; i < 4; i++) {
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index bb4e584f2a..f87bfef8ad 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -59,6 +59,7 @@ public:
float prev_anchors[4];
Transform2D pre_drag_xform;
+ Rect2 pre_drag_rect;
CanvasItemEditorSelectedItem() { prev_rot = 0; }
};
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 067629c460..2754aeed06 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -53,12 +53,12 @@ CurveEditor::CurveEditor() {
_presets_menu = memnew(PopupMenu);
_presets_menu->set_name("_presets_menu");
- _presets_menu->add_item("Flat0", PRESET_FLAT0);
- _presets_menu->add_item("Flat1", PRESET_FLAT1);
- _presets_menu->add_item("Linear", PRESET_LINEAR);
- _presets_menu->add_item("Ease in", PRESET_EASE_IN);
- _presets_menu->add_item("Ease out", PRESET_EASE_OUT);
- _presets_menu->add_item("Smoothstep", PRESET_SMOOTHSTEP);
+ _presets_menu->add_item(TTR("Flat0"), PRESET_FLAT0);
+ _presets_menu->add_item(TTR("Flat1"), PRESET_FLAT1);
+ _presets_menu->add_item(TTR("Linear"), PRESET_LINEAR);
+ _presets_menu->add_item(TTR("Ease in"), PRESET_EASE_IN);
+ _presets_menu->add_item(TTR("Ease out"), PRESET_EASE_OUT);
+ _presets_menu->add_item(TTR("Smoothstep"), PRESET_SMOOTHSTEP);
_presets_menu->connect("id_pressed", this, "_on_preset_item_selected");
_context_menu->add_child(_presets_menu);
}
@@ -344,19 +344,19 @@ void CurveEditor::open_context_menu(Vector2 pos) {
_curve_ref->get_point_left_mode(_selected_point) == Curve::TANGENT_LINEAR :
_curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR;
- _context_menu->set_item_checked(CONTEXT_LINEAR, is_linear);
+ _context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_LINEAR), is_linear);
} else {
_context_menu->add_separator();
if (_selected_point > 0) {
_context_menu->add_check_item(TTR("Left linear"), CONTEXT_LEFT_LINEAR);
- _context_menu->set_item_checked(CONTEXT_LEFT_LINEAR,
+ _context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_LEFT_LINEAR),
_curve_ref->get_point_left_mode(_selected_point) == Curve::TANGENT_LINEAR);
}
if (_selected_point + 1 < _curve_ref->get_point_count()) {
_context_menu->add_check_item(TTR("Right linear"), CONTEXT_RIGHT_LINEAR);
- _context_menu->set_item_checked(CONTEXT_RIGHT_LINEAR,
+ _context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_RIGHT_LINEAR),
_curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR);
}
}
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 9af5885a17..5e66488afb 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1683,9 +1683,8 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool
}
ERR_FAIL_COND_V(!se, false);
- // load script before adding as child else editor will crash at theme loading
- se->set_edited_script(p_script);
tab_container->add_child(se);
+ se->set_edited_script(p_script);
se->set_tooltip_request_func("_get_debug_tooltip", this);
if (se->get_edit_menu()) {
se->get_edit_menu()->hide();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index b66e9598f9..a24856dad7 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -168,14 +168,34 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 4));
+ colors_cache.symbol_color = symbol_color;
+ colors_cache.keyword_color = keyword_color;
+ colors_cache.basetype_color = basetype_color;
+ colors_cache.type_color = type_color;
+ colors_cache.comment_color = comment_color;
+ colors_cache.string_color = string_color;
+
+ theme_loaded = true;
+ if (!script.is_null())
+ _set_theme_for_script();
+}
+
+void ScriptTextEditor::_set_theme_for_script() {
+
+ if (!theme_loaded)
+ return;
+
+ TextEdit *text_edit = code_editor->get_text_edit();
+
List<String> keywords;
script->get_language()->get_reserved_words(&keywords);
for (List<String>::Element *E = keywords.front(); E; E = E->next()) {
- text_edit->add_keyword_color(E->get(), keyword_color);
+ text_edit->add_keyword_color(E->get(), colors_cache.keyword_color);
}
//colorize core types
+ const Color basetype_color = colors_cache.basetype_color;
text_edit->add_keyword_color("String", basetype_color);
text_edit->add_keyword_color("Vector2", basetype_color);
text_edit->add_keyword_color("Rect2", basetype_color);
@@ -210,7 +230,7 @@ void ScriptTextEditor::_load_theme_settings() {
if (n.begins_with("_"))
n = n.substr(1, n.length());
- text_edit->add_keyword_color(n, type_color);
+ text_edit->add_keyword_color(n, colors_cache.type_color);
}
//colorize comments
@@ -223,7 +243,7 @@ void ScriptTextEditor::_load_theme_settings() {
String beg = comment.get_slice(" ", 0);
String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String();
- text_edit->add_color_region(beg, end, comment_color, end == "");
+ text_edit->add_color_region(beg, end, colors_cache.comment_color, end == "");
}
//colorize strings
@@ -235,7 +255,7 @@ void ScriptTextEditor::_load_theme_settings() {
String string = E->get();
String beg = string.get_slice(" ", 0);
String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String();
- text_edit->add_color_region(beg, end, string_color, end == "");
+ text_edit->add_color_region(beg, end, colors_cache.string_color, end == "");
}
}
@@ -263,10 +283,10 @@ void ScriptTextEditor::reload_text() {
void ScriptTextEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_READY) {
-
- //emit_signal("name_changed");
- _load_theme_settings();
+ switch (p_what) {
+ case NOTIFICATION_READY:
+ _load_theme_settings();
+ break;
}
}
@@ -556,6 +576,8 @@ void ScriptTextEditor::set_edited_script(const Ref<Script> &p_script) {
emit_signal("name_changed");
code_editor->update_line_and_column();
+
+ _set_theme_for_script();
}
void ScriptTextEditor::_validate_script() {
@@ -1452,6 +1474,8 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color) {
ScriptTextEditor::ScriptTextEditor() {
+ theme_loaded = false;
+
code_editor = memnew(CodeTextEditor);
add_child(code_editor);
code_editor->add_constant_override("separation", 0);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index f8b7470ec8..83f3ea57c0 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -57,6 +57,17 @@ class ScriptTextEditor : public ScriptEditorBase {
int color_line;
String color_args;
+ struct ColorsCache {
+ Color symbol_color;
+ Color keyword_color;
+ Color basetype_color;
+ Color type_color;
+ Color comment_color;
+ Color string_color;
+ } colors_cache;
+
+ bool theme_loaded;
+
enum {
EDIT_UNDO,
EDIT_REDO,
@@ -101,6 +112,7 @@ protected:
void _validate_script();
void _code_complete_script(const String &p_code, List<String> *r_options, bool &r_force);
void _load_theme_settings();
+ void _set_theme_for_script();
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 69cfc05e2b..425390723c 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -49,13 +49,15 @@
#define DISTANCE_DEFAULT 4
-#define GIZMO_ARROW_SIZE 0.3
+#define GIZMO_ARROW_SIZE 0.35
#define GIZMO_RING_HALF_WIDTH 0.1
//#define GIZMO_SCALE_DEFAULT 0.28
#define GIZMO_SCALE_DEFAULT 0.15
#define GIZMO_PLANE_SIZE 0.2
#define GIZMO_PLANE_DST 0.3
-#define GIZMO_CIRCLE_SIZE 0.9
+#define GIZMO_CIRCLE_SIZE 1.1
+#define GIZMO_SCALE_OFFSET (GIZMO_CIRCLE_SIZE + 0.3)
+#define GIZMO_ARROW_OFFSET (GIZMO_CIRCLE_SIZE + 0.3)
#define ZOOM_MIN_DISTANCE 0.001
#define ZOOM_MULTIPLIER 1.08
@@ -538,8 +540,6 @@ void SpatialEditorViewport::_compute_edit(const Point2 &p_point) {
List<Node *> &selection = editor_selection->get_selected_node_list();
- //Vector3 center;
- //int nc=0;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Spatial *sp = Object::cast_to<Spatial>(E->get());
@@ -551,14 +551,8 @@ void SpatialEditorViewport::_compute_edit(const Point2 &p_point) {
continue;
se->original = se->sp->get_global_transform();
- //center+=se->original.origin;
- //nc++;
+ se->original_local = se->sp->get_transform();
}
-
- /*
- if (nc)
- _edit.center=center/float(nc);
- */
}
static int _get_key_modifier_setting(const String &p_property) {
@@ -609,7 +603,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
for (int i = 0; i < 3; i++) {
- Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i) * gs;
+ Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i) * gs * (GIZMO_ARROW_OFFSET + (GIZMO_ARROW_SIZE * 0.5));
float grabber_radius = gs * GIZMO_ARROW_SIZE;
Vector3 r;
@@ -624,7 +618,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
}
bool is_plane_translate = false;
- // second try
+ // plane select
if (col_axis == -1) {
col_d = 1e20;
@@ -710,6 +704,43 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
}
}
+ if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SCALE) {
+
+ int col_axis = -1;
+ float col_d = 1e20;
+
+ for (int i = 0; i < 3; i++) {
+
+ Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i) * gs * GIZMO_SCALE_OFFSET;
+ float grabber_radius = gs * GIZMO_ARROW_SIZE;
+
+ Vector3 r;
+
+ if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * 10000.0, grabber_pos, grabber_radius, &r)) {
+ float d = r.distance_to(ray_pos);
+ if (d < col_d) {
+ col_d = d;
+ col_axis = i;
+ }
+ }
+ }
+
+ if (col_axis != -1) {
+
+ if (p_highlight_only) {
+
+ spatial_editor->select_gizmo_highlight_axis(col_axis + 9);
+
+ } else {
+ //handle scale
+ _edit.mode = TRANSFORM_SCALE;
+ _compute_edit(Point2(p_screenpos.x, p_screenpos.y));
+ _edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis);
+ }
+ return true;
+ }
+ }
+
if (p_highlight_only)
spatial_editor->select_gizmo_highlight_axis(-1);
@@ -1182,7 +1213,28 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
case TRANSFORM_SCALE: {
- Plane plane = Plane(_edit.center, _get_camera_normal());
+ Vector3 motion_mask;
+ Plane plane;
+ bool plane_mv;
+
+ switch (_edit.plane) {
+ case TRANSFORM_VIEW:
+ motion_mask = Vector3(0, 0, 0);
+ plane = Plane(_edit.center, _get_camera_normal());
+ break;
+ case TRANSFORM_X_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
+ break;
+ case TRANSFORM_Y_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
+ break;
+ case TRANSFORM_Z_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
+ break;
+ }
Vector3 intersection;
if (!plane.intersects_ray(ray_pos, ray, &intersection))
@@ -1192,42 +1244,78 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
break;
- float center_click_dist = click.distance_to(_edit.center);
- float center_inters_dist = intersection.distance_to(_edit.center);
- if (center_click_dist == 0)
- break;
+ Vector3 motion = intersection - click;
+ print_line(String(intersection) + " --- " + String(click));
+ if (motion_mask != Vector3()) {
- float scale = (center_inters_dist / center_click_dist) * 100.0;
+ motion = motion_mask.dot(motion) * motion_mask;
+ } else {
- if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ float center_click_dist = click.distance_to(_edit.center);
+ float center_inters_dist = intersection.distance_to(_edit.center);
+ if (center_click_dist == 0)
+ break;
- scale = Math::stepify(scale, spatial_editor->get_scale_snap());
+ float scale = center_inters_dist - center_click_dist;
+ motion = Vector3(scale, scale, scale);
}
- set_message(vformat(TTR("Scaling to %s%%."), String::num(scale, 1)));
- scale /= 100.0;
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- Transform r;
- r.basis.scale(Vector3(scale, scale, scale));
+ bool local_coords = (spatial_editor->are_local_coords_enabled() && motion_mask != Vector3()); // Disable local transformation for TRANSFORM_VIEW
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ float snap = 0;
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
+
+ snap = spatial_editor->get_scale_snap() / 100;
+ }
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Spatial *sp = Object::cast_to<Spatial>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
Transform original = se->original;
-
+ Transform original_local = se->original_local;
Transform base = Transform(Basis(), _edit.center);
- Transform t = base * (r * (base.inverse() * original));
+ Transform t;
+ Vector3 local_scale;
- sp->set_global_transform(t);
+ if (local_coords) {
+
+ Basis g = original.basis.orthonormalized();
+ Vector3 local_motion = g.inverse().xform(motion);
+
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ local_motion.snap(Vector3(snap, snap, snap));
+ }
+
+ local_scale = original_local.basis.get_scale() * (local_motion + Vector3(1, 1, 1));
+
+ } else {
+
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ motion.snap(Vector3(snap, snap, snap));
+ }
+
+ Transform r;
+ r.basis.scale(motion + Vector3(1, 1, 1));
+ t = base * (r * (base.inverse() * original));
+ }
+
+ // Apply scale
+ if (local_coords) {
+ sp->set_scale(local_scale);
+ } else {
+ sp->set_global_transform(t);
+ }
}
surface->update();
@@ -2271,6 +2359,14 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
//VS::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(rotate_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
VS::get_singleton()->instance_set_layer_mask(rotate_gizmo_instance[i], layer);
+
+ scale_gizmo_instance[i] = VS::get_singleton()->instance_create();
+ VS::get_singleton()->instance_set_base(scale_gizmo_instance[i], spatial_editor->get_scale_gizmo(i)->get_rid());
+ VS::get_singleton()->instance_set_scenario(scale_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ VS::get_singleton()->instance_set_visible(scale_gizmo_instance[i], false);
+ //VS::get_singleton()->instance_geometry_set_flag(scale_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
+ VS::get_singleton()->instance_geometry_set_cast_shadows_setting(scale_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
+ VS::get_singleton()->instance_set_layer_mask(scale_gizmo_instance[i], layer);
}
}
@@ -2280,6 +2376,7 @@ void SpatialEditorViewport::_finish_gizmo_instances() {
VS::get_singleton()->free(move_gizmo_instance[i]);
VS::get_singleton()->free(move_plane_gizmo_instance[i]);
VS::get_singleton()->free(rotate_gizmo_instance[i]);
+ VS::get_singleton()->free(scale_gizmo_instance[i]);
}
}
void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
@@ -2374,6 +2471,8 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
VisualServer::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_MOVE));
VisualServer::get_singleton()->instance_set_transform(rotate_gizmo_instance[i], xform);
VisualServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_ROTATE));
+ VisualServer::get_singleton()->instance_set_transform(scale_gizmo_instance[i], xform);
+ VisualServer::get_singleton()->instance_set_visible(scale_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SCALE));
}
}
@@ -3259,6 +3358,7 @@ void SpatialEditor::select_gizmo_highlight_axis(int p_axis) {
move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_hl : gizmo_color[i]);
move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? gizmo_hl : plane_gizmo_color[i]);
rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_hl : gizmo_color[i]);
+ scale_gizmo[i]->surface_set_material(0, (i + 9) == p_axis ? gizmo_hl : gizmo_color[i]);
}
}
@@ -3269,7 +3369,7 @@ void SpatialEditor::update_transform_gizmo() {
bool first = true;
Basis gizmo_basis;
- bool local_gizmo_coords = transform_menu->get_popup()->is_item_checked(transform_menu->get_popup()->get_item_index(MENU_TRANSFORM_LOCAL_COORDS));
+ bool local_gizmo_coords = are_local_coords_enabled();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
@@ -3720,10 +3820,6 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
void SpatialEditor::_init_indicators() {
- //RID mat = VisualServer::get_singleton()->fixed_material_create();
- ///VisualServer::get_singleton()->fixed_material_set_flag(mat, VisualServer::FIXED_MATERIAL_FLAG_USE_ALPHA,true);
- //VisualServer::get_singleton()->fixed_material_set_flag(mat, VisualServer::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);
-
{
indicator_mat.instance();
@@ -3835,6 +3931,7 @@ void SpatialEditor::_init_indicators() {
move_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
move_plane_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
rotate_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
+ scale_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
Ref<SpatialMaterial> mat = memnew(SpatialMaterial);
mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
@@ -3857,25 +3954,25 @@ void SpatialEditor::_init_indicators() {
Vector3 ivec3;
ivec3[(i + 2) % 3] = 1;
+ //translate
{
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
- //translate
-
+ // Arrow profile
const int arrow_points = 5;
Vector3 arrow[5] = {
nivec * 0.0 + ivec * 0.0,
nivec * 0.01 + ivec * 0.0,
- nivec * 0.01 + ivec * 1.0,
- nivec * 0.1 + ivec * 1.0,
- nivec * 0.0 + ivec * (1 + GIZMO_ARROW_SIZE),
+ nivec * 0.01 + ivec * GIZMO_ARROW_OFFSET,
+ nivec * 0.065 + ivec * GIZMO_ARROW_OFFSET,
+ nivec * 0.0 + ivec * (GIZMO_ARROW_OFFSET + GIZMO_ARROW_SIZE),
};
int arrow_sides = 6;
- for (int k = 0; k < 7; k++) {
+ for (int k = 0; k < 6; k++) {
Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
@@ -3902,7 +3999,7 @@ void SpatialEditor::_init_indicators() {
surftool->commit(move_gizmo[i]);
}
- // plane translation
+ // Plane Translation
{
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
@@ -3945,6 +4042,7 @@ void SpatialEditor::_init_indicators() {
surftool->commit(move_plane_gizmo[i]);
}
+ // Rotate
{
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
@@ -3958,7 +4056,7 @@ void SpatialEditor::_init_indicators() {
ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
};
- for (int k = 0; k < 33; k++) {
+ for (int k = 0; k < 32; k++) {
Basis ma(ivec, Math_PI * 2 * float(k) / 32);
Basis mb(ivec, Math_PI * 2 * float(k + 1) / 32);
@@ -3984,19 +4082,55 @@ void SpatialEditor::_init_indicators() {
surftool->set_material(mat);
surftool->commit(rotate_gizmo[i]);
}
- }
- }
- /*for(int i=0;i<4;i++) {
+ // Scale
+ {
+ Ref<SurfaceTool> surftool = memnew(SurfaceTool);
+ surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
- viewports[i]->init_gizmo_instance(i);
- }*/
+ // Cube arrow profile
+ const int arrow_points = 6;
+ Vector3 arrow[6] = {
+ nivec * 0.0 + ivec * 0.0,
+ nivec * 0.01 + ivec * 0.0,
+ nivec * 0.01 + ivec * 1.0 * GIZMO_SCALE_OFFSET,
+ nivec * 0.07 + ivec * 1.0 * GIZMO_SCALE_OFFSET,
+ nivec * 0.07 + ivec * 1.11 * GIZMO_SCALE_OFFSET,
+ nivec * 0.0 + ivec * 1.11 * GIZMO_SCALE_OFFSET,
+ };
- _generate_selection_box();
+ int arrow_sides = 4;
+
+ for (int k = 0; k < 4; k++) {
- //Object::cast_to<EditorNode>(get_scene()->get_root_node())->get_scene_root()->add_child(camera);
+ Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
+ Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
- //current_camera=camera;
+ for (int j = 0; j < arrow_points - 1; j++) {
+
+ Vector3 points[4] = {
+ ma.xform(arrow[j]),
+ mb.xform(arrow[j]),
+ mb.xform(arrow[j + 1]),
+ ma.xform(arrow[j + 1]),
+ };
+ surftool->add_vertex(points[0]);
+ surftool->add_vertex(points[1]);
+ surftool->add_vertex(points[2]);
+
+ surftool->add_vertex(points[0]);
+ surftool->add_vertex(points[2]);
+ surftool->add_vertex(points[3]);
+ }
+ }
+
+ surftool->set_material(mat);
+ surftool->commit(scale_gizmo[i]);
+ }
+ }
+ }
+
+ _generate_selection_box();
}
void SpatialEditor::_finish_indicators() {
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index e0ded6e646..4f4c540048 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -245,7 +245,7 @@ private:
real_t zoom_indicator_delay;
- RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3];
+ RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3], scale_gizmo_instance[3];
String last_message;
String message;
@@ -319,6 +319,7 @@ class SpatialEditorSelectedItem : public Object {
public:
Rect3 aabb;
Transform original; // original location when moving
+ Transform original_local;
Transform last_xform; // last transform
Spatial *sp;
RID sbox_instance;
@@ -407,7 +408,7 @@ private:
bool grid_enable[3]; //should be always visible if true
bool grid_enabled;
- Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3];
+ Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3], scale_gizmo[3];
Ref<SpatialMaterial> gizmo_color[3];
Ref<SpatialMaterial> plane_gizmo_color[3];
Ref<SpatialMaterial> gizmo_hl;
@@ -557,6 +558,7 @@ public:
Ref<ArrayMesh> get_move_gizmo(int idx) const { return move_gizmo[idx]; }
Ref<ArrayMesh> get_move_plane_gizmo(int idx) const { return move_plane_gizmo[idx]; }
Ref<ArrayMesh> get_rotate_gizmo(int idx) const { return rotate_gizmo[idx]; }
+ Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; }
void update_transform_gizmo();
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index fafd6805ca..e5b6f8e406 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -71,7 +71,7 @@ void ProjectExportDialog::popup_export() {
_update_presets();
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has("interface/dialogs/export_bounds")) {
+ if (EditorSettings::get_singleton()->has_setting("interface/dialogs/export_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/export_bounds"));
} else {
popup_centered_ratio();
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 1a767dad05..1fb3fb2ed1 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -506,7 +506,7 @@ public:
if (current->setup(project_path->get_text(), "")) {
set_message(TTR("Couldn't get project.godot in the project path."), MESSAGE_ERROR);
- } else if (current->has("application/config/name")) {
+ } else if (current->has_setting("application/config/name")) {
project_name->set_text(current->get("application/config/name"));
}
project_name->grab_focus();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 56e593e34b..91ef9e36f3 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -146,7 +146,7 @@ void ProjectSettingsEditor::_action_edited() {
String action_prop = "input/" + new_name;
- if (ProjectSettings::get_singleton()->has(action_prop)) {
+ if (ProjectSettings::get_singleton()->has_setting(action_prop)) {
ti->set_text(0, old_name);
add_at = "input/" + old_name;
@@ -707,7 +707,7 @@ void ProjectSettingsEditor::_update_actions() {
void ProjectSettingsEditor::popup_project_settings() {
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has("interface/dialogs/project_settings_bounds")) {
+ if (EditorSettings::get_singleton()->has_setting("interface/dialogs/project_settings_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/project_settings_bounds"));
} else {
popup_centered_ratio();
@@ -753,7 +753,7 @@ void ProjectSettingsEditor::_item_add() {
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, value);
- if (ProjectSettings::get_singleton()->has(name)) {
+ if (ProjectSettings::get_singleton()->has_setting(name)) {
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, ProjectSettings::get_singleton()->get(name));
} else {
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, Variant());
@@ -782,7 +782,7 @@ void ProjectSettingsEditor::_item_del() {
String property = globals_editor->get_current_section().plus_file(path);
- if (!ProjectSettings::get_singleton()->has(property)) {
+ if (!ProjectSettings::get_singleton()->has_setting(property)) {
EditorNode::get_singleton()->show_warning(TTR("No property '" + property + "' exists."));
return;
}
@@ -823,7 +823,7 @@ void ProjectSettingsEditor::_action_check(String p_action) {
action_add->set_disabled(true);
return;
}
- if (ProjectSettings::get_singleton()->has("input/" + p_action)) {
+ if (ProjectSettings::get_singleton()->has_setting("input/" + p_action)) {
action_add->set_text(TTR("Already existing"));
action_add->set_disabled(true);
return;
@@ -907,6 +907,8 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
presets.insert("pvrtc");
presets.insert("debug");
presets.insert("release");
+ presets.insert("32");
+ presets.insert("64");
for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
List<String> p;
@@ -963,7 +965,7 @@ void ProjectSettingsEditor::_copy_to_platform(int p_which) {
String new_path = property + "." + feature;
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", new_path, value);
- if (ProjectSettings::get_singleton()->has(new_path)) {
+ if (ProjectSettings::get_singleton()->has_setting(new_path)) {
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", new_path, ProjectSettings::get_singleton()->get(new_path));
}
@@ -1040,7 +1042,7 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
Variant prev;
Dictionary remaps;
- if (ProjectSettings::get_singleton()->has("locale/translation_remaps")) {
+ if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
prev = remaps;
}
@@ -1066,7 +1068,7 @@ void ProjectSettingsEditor::_translation_res_option_file_open() {
}
void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
- ERR_FAIL_COND(!ProjectSettings::get_singleton()->has("locale/translation_remaps"));
+ ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"));
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1103,7 +1105,7 @@ void ProjectSettingsEditor::_translation_res_option_changed() {
if (updating_translations)
return;
- if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
return;
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1145,7 +1147,7 @@ void ProjectSettingsEditor::_translation_res_delete(Object *p_item, int p_column
if (updating_translations)
return;
- if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
return;
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1172,7 +1174,7 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p
if (updating_translations)
return;
- if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
return;
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1213,7 +1215,7 @@ void ProjectSettingsEditor::_update_translations() {
translation_list->clear();
TreeItem *root = translation_list->create_item(NULL);
translation_list->set_hide_root(true);
- if (ProjectSettings::get_singleton()->has("locale/translations")) {
+ if (ProjectSettings::get_singleton()->has_setting("locale/translations")) {
PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
for (int i = 0; i < translations.size(); i++) {
@@ -1251,7 +1253,7 @@ void ProjectSettingsEditor::_update_translations() {
langnames += names[i];
}
- if (ProjectSettings::get_singleton()->has("locale/translation_remaps")) {
+ if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
List<Variant> rk;
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 5f6ffcb14e..86979a1174 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -93,7 +93,7 @@ void EditorSettingsDialog::popup_edit_settings() {
_update_shortcuts();
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has("interface/dialogs/editor_settings_bounds")) {
+ if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
} else {
popup_centered_ratio(0.7);
diff --git a/main/main.cpp b/main/main.cpp
index f9422cdf0b..e06f423bfc 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -231,7 +231,6 @@ void Main::print_help(const char *p_binary) {
}
Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_phase) {
-
RID_OwnerBase::init_rid();
OS::get_singleton()->initialize_core();
@@ -254,6 +253,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
register_core_settings(); //here globals is present
+ OS::get_singleton()->initialize_logger();
+
translation_server = memnew(TranslationServer);
performance = memnew(Performance);
globals->add_singleton(ProjectSettings::Singleton("Performance", performance));
@@ -725,7 +726,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#ifdef TOOLS_ENABLED
- if (main_args.size() == 0 && (!ProjectSettings::get_singleton()->has("application/run/main_loop_type")) && (!ProjectSettings::get_singleton()->has("application/run/main_scene") || String(ProjectSettings::get_singleton()->get("application/run/main_scene")) == ""))
+ if (main_args.size() == 0 && (!ProjectSettings::get_singleton()->has_setting("application/run/main_loop_type")) && (!ProjectSettings::get_singleton()->has_setting("application/run/main_scene") || String(ProjectSettings::get_singleton()->get("application/run/main_scene")) == ""))
use_custom_res = false; //project manager (run without arguments)
#endif
@@ -738,21 +739,21 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
//if (video_driver == "") // useless for now, so removing
// video_driver = GLOBAL_DEF("display/driver/name", Variant((const char *)OS::get_singleton()->get_video_driver_name(0)));
- if (!force_res && use_custom_res && globals->has("display/window/size/width"))
+ if (!force_res && use_custom_res && globals->has_setting("display/window/size/width"))
video_mode.width = globals->get("display/window/size/width");
- if (!force_res && use_custom_res && globals->has("display/window/size/height"))
+ if (!force_res && use_custom_res && globals->has_setting("display/window/size/height"))
video_mode.height = globals->get("display/window/size/height");
- if (!editor && ((globals->has("display/window/dpi/allow_hidpi") && !globals->get("display/window/dpi/allow_hidpi")) || force_lowdpi)) {
+ if (!editor && ((globals->has_setting("display/window/dpi/allow_hidpi") && !globals->get("display/window/dpi/allow_hidpi")) || force_lowdpi)) {
OS::get_singleton()->_allow_hidpi = false;
}
- if (use_custom_res && globals->has("display/window/size/fullscreen"))
+ if (use_custom_res && globals->has_setting("display/window/size/fullscreen"))
video_mode.fullscreen = globals->get("display/window/size/fullscreen");
- if (use_custom_res && globals->has("display/window/size/resizable"))
+ if (use_custom_res && globals->has_setting("display/window/size/resizable"))
video_mode.resizable = globals->get("display/window/size/resizable");
- if (use_custom_res && globals->has("display/window/size/borderless"))
+ if (use_custom_res && globals->has_setting("display/window/size/borderless"))
video_mode.borderless_window = globals->get("display/window/size/borderless");
- if (!force_res && use_custom_res && globals->has("display/window/size/test_width") && globals->has("display/window/size/test_height")) {
+ if (!force_res && use_custom_res && globals->has_setting("display/window/size/test_width") && globals->has_setting("display/window/size/test_height")) {
int tw = globals->get("display/window/size/test_width");
int th = globals->get("display/window/size/test_height");
if (tw > 0 && th > 0) {
@@ -773,6 +774,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);
+ if (editor) {
+ OS::get_singleton()->_allow_hidpi = true; //editors always in hidpi
+ }
Engine::get_singleton()->_pixel_snap = GLOBAL_DEF("rendering/quality/2d/use_pixel_snap", false);
OS::get_singleton()->_keep_screen_on = GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
if (rtm == -1) {
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 39f5ec5378..be0975b53c 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -4,14 +4,151 @@ Import('env')
gdn_env = env.Clone()
-gdn_env.add_source_files(env.modules_sources, "*.cpp")
+gdn_env.add_source_files(env.modules_sources, "gd_native_library_editor.cpp")
+gdn_env.add_source_files(env.modules_sources, "gdnative.cpp")
+gdn_env.add_source_files(env.modules_sources, "register_types.cpp")
gdn_env.add_source_files(env.modules_sources, "gdnative/*.cpp")
gdn_env.add_source_files(env.modules_sources, "nativescript/*.cpp")
-gdn_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
gdn_env.Append(CPPPATH=['#modules/gdnative/include/'])
-if "platform" in env and env["platform"] in ["x11", "iphone"]:
- env.Append(LINKFLAGS=["-rdynamic"])
+def _spaced(e):
+ return e if e[-1] == '*' else e + ' '
+
+def _build_gdnative_api_struct_header(api):
+ out = [
+ '/* THIS FILE IS GENERATED DO NOT EDIT */',
+ '#ifndef GODOT_GDNATIVE_API_STRUCT_H',
+ '#define GODOT_GDNATIVE_API_STRUCT_H',
+ '',
+ '#include <gdnative/gdnative.h>',
+ '#include <nativescript/godot_nativescript.h>',
+ '',
+ '#define GDNATIVE_API_INIT(options) do { extern const godot_gdnative_api_struct *_gdnative_wrapper_api_struct; _gdnative_wrapper_api_struct = options->api_struct; } while (0)',
+ '',
+ '#ifdef __cplusplus',
+ 'extern "C" {',
+ '#endif',
+ '',
+ 'typedef struct godot_gdnative_api_struct {',
+ '\tvoid *next;',
+ '\tconst char *version;',
+ ]
+
+ for funcname, funcdef in api['api'].items():
+ args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
+ out.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcname, args))
+
+ out += [
+ '} godot_gdnative_api_struct;',
+ '',
+ '#ifdef __cplusplus',
+ '}',
+ '#endif',
+ '',
+ '#endif // GODOT_GDNATIVE_API_STRUCT_H',
+ ''
+ ]
+ return '\n'.join(out)
+
+def _build_gdnative_api_struct_source(api):
+ out = [
+ '/* THIS FILE IS GENERATED DO NOT EDIT */',
+ '',
+ '#include <gdnative_api_struct.gen.h>',
+ '',
+ 'const char *_gdnative_api_version = "%s";' % api['version'],
+ 'extern const godot_gdnative_api_struct api_struct = {',
+ '\tNULL,',
+ '\t_gdnative_api_version,',
+ ]
+
+ for funcname in api['api'].keys():
+ out.append('\t%s,' % funcname)
+ out.append('};\n')
+
+ return '\n'.join(out)
+
+def build_gdnative_api_struct(target, source, env):
+ import json
+ from collections import OrderedDict
+
+ with open(source[0].path, 'r') as fd:
+ # Keep the json ordered
+ api = json.load(fd, object_pairs_hook=OrderedDict)
+
+ header, source = target
+ with open(header.path, 'w') as fd:
+ fd.write(_build_gdnative_api_struct_header(api))
+ with open(source.path, 'w') as fd:
+ fd.write(_build_gdnative_api_struct_source(api))
+
+_, gensource = gdn_env.Command(['include/gdnative_api_struct.gen.h', 'gdnative_api_struct.gen.cpp'],
+ 'gdnative_api.json', build_gdnative_api_struct)
+gdn_env.add_source_files(env.modules_sources, [gensource])
env.use_ptrcall = True
+
+
+def _build_gdnative_wrapper_code(api):
+ out = [
+ '/* THIS FILE IS GENERATED DO NOT EDIT */',
+ '',
+ '#include <gdnative/gdnative.h>',
+ '#include <nativescript/godot_nativescript.h>',
+ '',
+ '#include <gdnative_api_struct.gen.h>',
+ '',
+ 'godot_gdnative_api_struct *_gdnative_wrapper_api_struct = 0;',
+ '',
+ '#ifdef __cplusplus',
+ 'extern "C" {',
+ '#endif',
+ ''
+ ]
+
+ for funcname, funcdef in api['api'].items():
+ args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
+ out.append('%s %s(%s) {' % (_spaced(funcdef['return_type']), funcname, args))
+
+ args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
+
+ return_line = '\treturn ' if funcdef['return_type'] != 'void' else '\t'
+ return_line += '_gdnative_wrapper_api_struct->' + funcname + '(' + args + ');'
+
+ out.append(return_line)
+ out.append('}')
+ out.append('')
+
+ out += [
+ '#ifdef __cplusplus',
+ '}',
+ '#endif'
+ ]
+
+ return '\n'.join(out)
+
+
+def build_gdnative_wrapper_code(target, source, env):
+ import json
+ with open(source[0].path, 'r') as fd:
+#Keep the json ordered
+ api = json.load(fd)
+
+ wrapper_file = target[0]
+ with open(wrapper_file.path, 'w') as fd:
+ fd.write(_build_gdnative_wrapper_code(api))
+
+
+
+if ARGUMENTS.get('gdnative_wrapper', False):
+ #build wrapper code
+ gdn_env.Command('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code)
+
+ gd_wrapper_env = env.Clone()
+ gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/'])
+
+ # I think this doesn't work on MSVC yet...
+ gd_wrapper_env.Append(CCFLAGS=['-fPIC'])
+
+ gd_wrapper_env.Library("#bin/gdnative_wrapper_code", ["#modules/gdnative/gdnative_wrapper_code.gen.cpp"])
diff --git a/modules/gdnative/gd_native_library_editor.cpp b/modules/gdnative/gd_native_library_editor.cpp
index cc2c2b69a6..c37b7f473d 100644
--- a/modules/gdnative/gd_native_library_editor.cpp
+++ b/modules/gdnative/gd_native_library_editor.cpp
@@ -72,7 +72,7 @@ void GDNativeLibraryEditor::_update_libraries() {
libraries->create_item(); //rppt
Vector<String> enabled_paths;
- if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
+ if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) {
enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
}
Set<String> enabled_list;
@@ -100,7 +100,7 @@ void GDNativeLibraryEditor::_item_edited() {
String path = item->get_metadata(0);
Vector<String> enabled_paths;
- if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
+ if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) {
enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
}
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index f0c09a3370..373b98dc8b 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -40,15 +40,8 @@
const String init_symbol = "godot_gdnative_init";
const String terminate_symbol = "godot_gdnative_terminate";
-#define GDAPI_FUNC(name, ret_type, ...) name,
-#define GDAPI_FUNC_VOID(name, ...) name,
-
-const godot_gdnative_api_struct api_struct = {
- GODOT_GDNATIVE_API_FUNCTIONS
-};
-
-#undef GDAPI_FUNC
-#undef GDAPI_FUNC_VOID
+// Defined in gdnative_api_struct.gen.cpp
+extern const godot_gdnative_api_struct api_struct;
String GDNativeLibrary::platform_names[NUM_PLATFORMS + 1] = {
"X11_32bit",
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 29c6201641..7bbad842eb 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -36,7 +36,7 @@
#include "resource.h"
#include "gdnative/gdnative.h"
-#include "gdnative_api_struct.h"
+#include "gdnative_api_struct.gen.h"
class GDNativeLibrary : public Resource {
GDCLASS(GDNativeLibrary, Resource)
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
new file mode 100644
index 0000000000..8b6593c9c3
--- /dev/null
+++ b/modules/gdnative/gdnative_api.json
@@ -0,0 +1,4512 @@
+{
+ "version": "1.0.0",
+ "api": {
+ "godot_color_new_rgba": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "r_dest"],
+ ["const godot_real", "p_r"],
+ ["const godot_real", "p_g"],
+ ["const godot_real", "p_b"],
+ ["const godot_real", "p_a"]
+ ]
+ },
+ "godot_color_new_rgb": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "r_dest"],
+ ["const godot_real", "p_r"],
+ ["const godot_real", "p_g"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_color_get_r": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_set_r": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "p_self"],
+ ["const godot_real", "r"]
+ ]
+ },
+ "godot_color_get_g": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_set_g": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "p_self"],
+ ["const godot_real", "g"]
+ ]
+ },
+ "godot_color_get_b": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_set_b": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "p_self"],
+ ["const godot_real", "b"]
+ ]
+ },
+ "godot_color_get_a": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_set_a": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_color *", "p_self"],
+ ["const godot_real", "a"]
+ ]
+ },
+ "godot_color_get_h": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_get_s": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_get_v": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_to_rgba32": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_to_argb32": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_gray": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_inverted": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_contrasted": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_color *", "p_self"]
+ ]
+ },
+ "godot_color_linear_interpolate": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_color *", "p_self"],
+ ["const godot_color *", "p_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_color_blend": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_color *", "p_self"],
+ ["const godot_color *", "p_over"]
+ ]
+ },
+ "godot_color_to_html": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_color *", "p_self"],
+ ["const godot_bool", "p_with_alpha"]
+ ]
+ },
+ "godot_color_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_color *", "p_self"],
+ ["const godot_color *", "p_b"]
+ ]
+ },
+ "godot_color_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_color *", "p_self"],
+ ["const godot_color *", "p_b"]
+ ]
+ },
+ "godot_vector2_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_vector2 *", "r_dest"],
+ ["const godot_real", "p_x"],
+ ["const godot_real", "p_y"]
+ ]
+ },
+ "godot_vector2_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_normalized": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_length": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_angle": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_length_squared": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_is_normalized": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_distance_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_to"]
+ ]
+ },
+ "godot_vector2_distance_squared_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_to"]
+ ]
+ },
+ "godot_vector2_angle_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_to"]
+ ]
+ },
+ "godot_vector2_angle_to_point": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_to"]
+ ]
+ },
+ "godot_vector2_linear_interpolate": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_vector2_cubic_interpolate": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"],
+ ["const godot_vector2 *", "p_pre_a"],
+ ["const godot_vector2 *", "p_post_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_vector2_rotated": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_vector2_tangent": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_floor": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_snapped": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_by"]
+ ]
+ },
+ "godot_vector2_aspect": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_dot": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_with"]
+ ]
+ },
+ "godot_vector2_slide": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_n"]
+ ]
+ },
+ "godot_vector2_bounce": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_n"]
+ ]
+ },
+ "godot_vector2_reflect": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_n"]
+ ]
+ },
+ "godot_vector2_abs": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_clamped": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_real", "p_length"]
+ ]
+ },
+ "godot_vector2_operator_add": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_substract": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_multiply_vector": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_multiply_scalar": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_divide_vector": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_divide_scalar": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"],
+ ["const godot_vector2 *", "p_b"]
+ ]
+ },
+ "godot_vector2_operator_neg": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_set_x": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_vector2 *", "p_self"],
+ ["const godot_real", "p_x"]
+ ]
+ },
+ "godot_vector2_set_y": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_vector2 *", "p_self"],
+ ["const godot_real", "p_y"]
+ ]
+ },
+ "godot_vector2_get_x": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_vector2_get_y": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector2 *", "p_self"]
+ ]
+ },
+ "godot_quat_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "r_dest"],
+ ["const godot_real", "p_x"],
+ ["const godot_real", "p_y"],
+ ["const godot_real", "p_z"],
+ ["const godot_real", "p_w"]
+ ]
+ },
+ "godot_quat_new_with_axis_angle": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "r_dest"],
+ ["const godot_vector3 *", "p_axis"],
+ ["const godot_real", "p_angle"]
+ ]
+ },
+ "godot_quat_get_x": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_set_x": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "p_self"],
+ ["const godot_real", "val"]
+ ]
+ },
+ "godot_quat_get_y": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_set_y": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "p_self"],
+ ["const godot_real", "val"]
+ ]
+ },
+ "godot_quat_get_z": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_set_z": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "p_self"],
+ ["const godot_real", "val"]
+ ]
+ },
+ "godot_quat_get_w": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_set_w": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_quat *", "p_self"],
+ ["const godot_real", "val"]
+ ]
+ },
+ "godot_quat_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_length": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_length_squared": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_normalized": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_is_normalized": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_inverse": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_quat_dot": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"]
+ ]
+ },
+ "godot_quat_xform": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_quat_slerp": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_quat_slerpni": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_quat_cubic_slerp": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"],
+ ["const godot_quat *", "p_pre_a"],
+ ["const godot_quat *", "p_post_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_quat_operator_multiply": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_quat_operator_add": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"]
+ ]
+ },
+ "godot_quat_operator_substract": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"]
+ ]
+ },
+ "godot_quat_operator_divide": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_quat_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_quat *", "p_self"],
+ ["const godot_quat *", "p_b"]
+ ]
+ },
+ "godot_quat_operator_neg": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_quat *", "p_self"]
+ ]
+ },
+ "godot_basis_new_with_rows": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "r_dest"],
+ ["const godot_vector3 *", "p_x_axis"],
+ ["const godot_vector3 *", "p_y_axis"],
+ ["const godot_vector3 *", "p_z_axis"]
+ ]
+ },
+ "godot_basis_new_with_axis_and_angle": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "r_dest"],
+ ["const godot_vector3 *", "p_axis"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_basis_new_with_euler": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "r_dest"],
+ ["const godot_vector3 *", "p_euler"]
+ ]
+ },
+ "godot_basis_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_inverse": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_transposed": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_orthonormalized": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_determinant": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_rotated": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_axis"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_basis_scaled": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_scale"]
+ ]
+ },
+ "godot_basis_get_scale": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_get_euler": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_tdotx": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_with"]
+ ]
+ },
+ "godot_basis_tdoty": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_with"]
+ ]
+ },
+ "godot_basis_tdotz": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_with"]
+ ]
+ },
+ "godot_basis_xform": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_basis_xform_inv": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_basis_get_orthogonal_index": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_basis *", "p_self"]
+ ]
+ },
+ "godot_basis_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "r_dest"]
+ ]
+ },
+ "godot_basis_new_with_euler_quat": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "r_dest"],
+ ["const godot_quat *", "p_euler"]
+ ]
+ },
+ "godot_basis_get_elements": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "p_self"],
+ ["godot_vector3 *", "p_elements"]
+ ]
+ },
+ "godot_basis_get_axis": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_int", "p_axis"]
+ ]
+ },
+ "godot_basis_set_axis": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "p_self"],
+ ["const godot_int", "p_axis"],
+ ["const godot_vector3 *", "p_value"]
+ ]
+ },
+ "godot_basis_get_row": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_int", "p_row"]
+ ]
+ },
+ "godot_basis_set_row": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_basis *", "p_self"],
+ ["const godot_int", "p_row"],
+ ["const godot_vector3 *", "p_value"]
+ ]
+ },
+ "godot_basis_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_basis *", "p_b"]
+ ]
+ },
+ "godot_basis_operator_add": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_basis *", "p_b"]
+ ]
+ },
+ "godot_basis_operator_substract": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_basis *", "p_b"]
+ ]
+ },
+ "godot_basis_operator_multiply_vector": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_basis *", "p_b"]
+ ]
+ },
+ "godot_basis_operator_multiply_scalar": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_basis *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_vector3_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_vector3 *", "r_dest"],
+ ["const godot_real", "p_x"],
+ ["const godot_real", "p_y"],
+ ["const godot_real", "p_z"]
+ ]
+ },
+ "godot_vector3_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_min_axis": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_max_axis": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_length": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_length_squared": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_is_normalized": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_normalized": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_inverse": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_snapped": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_by"]
+ ]
+ },
+ "godot_vector3_rotated": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_axis"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_vector3_linear_interpolate": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_vector3_cubic_interpolate": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"],
+ ["const godot_vector3 *", "p_pre_a"],
+ ["const godot_vector3 *", "p_post_b"],
+ ["const godot_real", "p_t"]
+ ]
+ },
+ "godot_vector3_dot": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_cross": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_outer": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_to_diagonal_matrix": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_abs": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_floor": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_ceil": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_distance_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_distance_squared_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_angle_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_to"]
+ ]
+ },
+ "godot_vector3_slide": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_n"]
+ ]
+ },
+ "godot_vector3_bounce": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_n"]
+ ]
+ },
+ "godot_vector3_reflect": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_n"]
+ ]
+ },
+ "godot_vector3_operator_add": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_substract": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_multiply_vector": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_multiply_scalar": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_divide_vector": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_divide_scalar": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_real", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3 *", "p_b"]
+ ]
+ },
+ "godot_vector3_operator_neg": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"]
+ ]
+ },
+ "godot_vector3_set_axis": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_vector3 *", "p_self"],
+ ["const godot_vector3_axis", "p_axis"],
+ ["const godot_real", "p_val"]
+ ]
+ },
+ "godot_vector3_get_axis": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_vector3 *", "p_self"],
+ ["const godot_vector3_axis", "p_axis"]
+ ]
+ },
+ "godot_pool_byte_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_byte_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "r_dest"],
+ ["const godot_pool_byte_array *", "p_src"]
+ ]
+ },
+ "godot_pool_byte_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_byte_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const uint8_t", "p_data"]
+ ]
+ },
+ "godot_pool_byte_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const godot_pool_byte_array *", "p_array"]
+ ]
+ },
+ "godot_pool_byte_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const uint8_t", "p_data"]
+ ]
+ },
+ "godot_pool_byte_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"]
+ ]
+ },
+ "godot_pool_byte_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const uint8_t", "p_data"]
+ ]
+ },
+ "godot_pool_byte_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_byte_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_byte_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const uint8_t", "p_data"]
+ ]
+ },
+ "godot_pool_byte_array_get": {
+ "return_type": "uint8_t",
+ "arguments": [
+ ["const godot_pool_byte_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_byte_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_byte_array *", "p_self"]
+ ]
+ },
+ "godot_pool_byte_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_byte_array *", "p_self"]
+ ]
+ },
+ "godot_pool_int_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_int_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "r_dest"],
+ ["const godot_pool_int_array *", "p_src"]
+ ]
+ },
+ "godot_pool_int_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_int_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_data"]
+ ]
+ },
+ "godot_pool_int_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_pool_int_array *", "p_array"]
+ ]
+ },
+ "godot_pool_int_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_int", "p_data"]
+ ]
+ },
+ "godot_pool_int_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"]
+ ]
+ },
+ "godot_pool_int_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_data"]
+ ]
+ },
+ "godot_pool_int_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_int_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_int_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_int", "p_data"]
+ ]
+ },
+ "godot_pool_int_array_get": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_int_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_int_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_int_array *", "p_self"]
+ ]
+ },
+ "godot_pool_int_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_int_array *", "p_self"]
+ ]
+ },
+ "godot_pool_real_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_real_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "r_dest"],
+ ["const godot_pool_real_array *", "p_src"]
+ ]
+ },
+ "godot_pool_real_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_real_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_real", "p_data"]
+ ]
+ },
+ "godot_pool_real_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_pool_real_array *", "p_array"]
+ ]
+ },
+ "godot_pool_real_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_real", "p_data"]
+ ]
+ },
+ "godot_pool_real_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"]
+ ]
+ },
+ "godot_pool_real_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_real", "p_data"]
+ ]
+ },
+ "godot_pool_real_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_real_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_real_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_real", "p_data"]
+ ]
+ },
+ "godot_pool_real_array_get": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_pool_real_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_real_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_real_array *", "p_self"]
+ ]
+ },
+ "godot_pool_real_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_real_array *", "p_self"]
+ ]
+ },
+ "godot_pool_string_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_string_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "r_dest"],
+ ["const godot_pool_string_array *", "p_src"]
+ ]
+ },
+ "godot_pool_string_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_string_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_string *", "p_data"]
+ ]
+ },
+ "godot_pool_string_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_pool_string_array *", "p_array"]
+ ]
+ },
+ "godot_pool_string_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_string *", "p_data"]
+ ]
+ },
+ "godot_pool_string_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"]
+ ]
+ },
+ "godot_pool_string_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_string *", "p_data"]
+ ]
+ },
+ "godot_pool_string_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_string_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_string_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_string *", "p_data"]
+ ]
+ },
+ "godot_pool_string_array_get": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_pool_string_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_string_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_string_array *", "p_self"]
+ ]
+ },
+ "godot_pool_string_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_string_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector2_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_vector2_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "r_dest"],
+ ["const godot_pool_vector2_array *", "p_src"]
+ ]
+ },
+ "godot_pool_vector2_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_vector2_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_vector2 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector2_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_pool_vector2_array *", "p_array"]
+ ]
+ },
+ "godot_pool_vector2_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_vector2 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector2_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector2_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_vector2 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector2_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_vector2_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_vector2_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_vector2 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector2_array_get": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_pool_vector2_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_vector2_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_vector2_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector2_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector2_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector3_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_vector3_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "r_dest"],
+ ["const godot_pool_vector3_array *", "p_src"]
+ ]
+ },
+ "godot_pool_vector3_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_vector3_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_vector3 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector3_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_pool_vector3_array *", "p_array"]
+ ]
+ },
+ "godot_pool_vector3_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_vector3 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector3_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector3_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_vector3 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector3_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_vector3_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_vector3_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_vector3 *", "p_data"]
+ ]
+ },
+ "godot_pool_vector3_array_get": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_pool_vector3_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_vector3_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_vector3_array *", "p_self"]
+ ]
+ },
+ "godot_pool_vector3_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_vector3_array *", "p_self"]
+ ]
+ },
+ "godot_pool_color_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "r_dest"]
+ ]
+ },
+ "godot_pool_color_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "r_dest"],
+ ["const godot_pool_color_array *", "p_src"]
+ ]
+ },
+ "godot_pool_color_array_new_with_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "r_dest"],
+ ["const godot_array *", "p_a"]
+ ]
+ },
+ "godot_pool_color_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_color *", "p_data"]
+ ]
+ },
+ "godot_pool_color_array_append_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_pool_color_array *", "p_array"]
+ ]
+ },
+ "godot_pool_color_array_insert": {
+ "return_type": "godot_error",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_color *", "p_data"]
+ ]
+ },
+ "godot_pool_color_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"]
+ ]
+ },
+ "godot_pool_color_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_color *", "p_data"]
+ ]
+ },
+ "godot_pool_color_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_color_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_pool_color_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_color *", "p_data"]
+ ]
+ },
+ "godot_pool_color_array_get": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_pool_color_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_pool_color_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_pool_color_array *", "p_self"]
+ ]
+ },
+ "godot_pool_color_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_pool_color_array *", "p_self"]
+ ]
+ },
+ "godot_array_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"]
+ ]
+ },
+ "godot_array_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_array *", "p_src"]
+ ]
+ },
+ "godot_array_new_pool_color_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_color_array *", "p_pca"]
+ ]
+ },
+ "godot_array_new_pool_vector3_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_vector3_array *", "p_pv3a"]
+ ]
+ },
+ "godot_array_new_pool_vector2_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_vector2_array *", "p_pv2a"]
+ ]
+ },
+ "godot_array_new_pool_string_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_string_array *", "p_psa"]
+ ]
+ },
+ "godot_array_new_pool_real_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_real_array *", "p_pra"]
+ ]
+ },
+ "godot_array_new_pool_int_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_int_array *", "p_pia"]
+ ]
+ },
+ "godot_array_new_pool_byte_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "r_dest"],
+ ["const godot_pool_byte_array *", "p_pba"]
+ ]
+ },
+ "godot_array_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_int", "p_idx"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_get": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_array_operator_index": {
+ "return_type": "godot_variant *",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_array_append": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_clear": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_count": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_empty": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_erase": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_front": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["const godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_back": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["const godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_find": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_variant *", "p_what"],
+ ["const godot_int", "p_from"]
+ ]
+ },
+ "godot_array_find_last": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_variant *", "p_what"]
+ ]
+ },
+ "godot_array_has": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_hash": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_insert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_int", "p_pos"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_invert": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_pop_back": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_pop_front": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_push_back": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_push_front": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_array_remove": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_array_resize": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_int", "p_size"]
+ ]
+ },
+ "godot_array_rfind": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"],
+ ["const godot_variant *", "p_what"],
+ ["const godot_int", "p_from"]
+ ]
+ },
+ "godot_array_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_sort": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_array_sort_custom": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["godot_object *", "p_obj"],
+ ["const godot_string *", "p_func"]
+ ]
+ },
+ "godot_array_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_array *", "p_self"]
+ ]
+ },
+ "godot_dictionary_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "r_dest"]
+ ]
+ },
+ "godot_dictionary_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "r_dest"],
+ ["const godot_dictionary *", "p_src"]
+ ]
+ },
+ "godot_dictionary_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_size": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_empty": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_clear": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_has": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ "godot_dictionary_has_all": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_array *", "p_keys"]
+ ]
+ },
+ "godot_dictionary_erase": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ "godot_dictionary_hash": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_keys": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_values": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_dictionary_get": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ "godot_dictionary_set": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"],
+ ["const godot_variant *", "p_value"]
+ ]
+ },
+ "godot_dictionary_operator_index": {
+ "return_type": "godot_variant *",
+ "arguments": [
+ ["godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ "godot_dictionary_next": {
+ "return_type": "godot_variant *",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ "godot_dictionary_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_dictionary *", "p_b"]
+ ]
+ },
+ "godot_dictionary_to_json": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"]
+ ]
+ },
+ "godot_node_path_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_node_path *", "r_dest"],
+ ["const godot_string *", "p_from"]
+ ]
+ },
+ "godot_node_path_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_node_path *", "r_dest"],
+ ["const godot_node_path *", "p_src"]
+ ]
+ },
+ "godot_node_path_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_is_absolute": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_get_name_count": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_get_name": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_node_path *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_node_path_get_subname_count": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_get_subname": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_node_path *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_node_path_get_property": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_is_empty": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_node_path *", "p_self"]
+ ]
+ },
+ "godot_node_path_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_node_path *", "p_self"],
+ ["const godot_node_path *", "p_b"]
+ ]
+ },
+ "godot_plane_new_with_reals": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_plane *", "r_dest"],
+ ["const godot_real", "p_a"],
+ ["const godot_real", "p_b"],
+ ["const godot_real", "p_c"],
+ ["const godot_real", "p_d"]
+ ]
+ },
+ "godot_plane_new_with_vectors": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_plane *", "r_dest"],
+ ["const godot_vector3 *", "p_v1"],
+ ["const godot_vector3 *", "p_v2"],
+ ["const godot_vector3 *", "p_v3"]
+ ]
+ },
+ "godot_plane_new_with_normal": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_plane *", "r_dest"],
+ ["const godot_vector3 *", "p_normal"],
+ ["const godot_real", "p_d"]
+ ]
+ },
+ "godot_plane_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_normalized": {
+ "return_type": "godot_plane",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_center": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_get_any_point": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_is_point_over": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["const godot_vector3 *", "p_point"]
+ ]
+ },
+ "godot_plane_distance_to": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["const godot_vector3 *", "p_point"]
+ ]
+ },
+ "godot_plane_has_point": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["const godot_vector3 *", "p_point"],
+ ["const godot_real", "p_epsilon"]
+ ]
+ },
+ "godot_plane_project": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["const godot_vector3 *", "p_point"]
+ ]
+ },
+ "godot_plane_intersect_3": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["godot_vector3 *", "r_dest"],
+ ["const godot_plane *", "p_b"],
+ ["const godot_plane *", "p_c"]
+ ]
+ },
+ "godot_plane_intersects_ray": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["godot_vector3 *", "r_dest"],
+ ["const godot_vector3 *", "p_from"],
+ ["const godot_vector3 *", "p_dir"]
+ ]
+ },
+ "godot_plane_intersects_segment": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["godot_vector3 *", "r_dest"],
+ ["const godot_vector3 *", "p_begin"],
+ ["const godot_vector3 *", "p_end"]
+ ]
+ },
+ "godot_plane_operator_neg": {
+ "return_type": "godot_plane",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_plane *", "p_self"],
+ ["const godot_plane *", "p_b"]
+ ]
+ },
+ "godot_plane_set_normal": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_plane *", "p_self"],
+ ["const godot_vector3 *", "p_normal"]
+ ]
+ },
+ "godot_plane_get_normal": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_get_d": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_plane *", "p_self"]
+ ]
+ },
+ "godot_plane_set_d": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_plane *", "p_self"],
+ ["const godot_real", "p_d"]
+ ]
+ },
+ "godot_rect2_new_with_position_and_size": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rect2 *", "r_dest"],
+ ["const godot_vector2 *", "p_pos"],
+ ["const godot_vector2 *", "p_size"]
+ ]
+ },
+ "godot_rect2_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rect2 *", "r_dest"],
+ ["const godot_real", "p_x"],
+ ["const godot_real", "p_y"],
+ ["const godot_real", "p_width"],
+ ["const godot_real", "p_height"]
+ ]
+ },
+ "godot_rect2_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"]
+ ]
+ },
+ "godot_rect2_get_area": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"]
+ ]
+ },
+ "godot_rect2_intersects": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_rect2 *", "p_b"]
+ ]
+ },
+ "godot_rect2_encloses": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_rect2 *", "p_b"]
+ ]
+ },
+ "godot_rect2_has_no_area": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"]
+ ]
+ },
+ "godot_rect2_clip": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_rect2 *", "p_b"]
+ ]
+ },
+ "godot_rect2_merge": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_rect2 *", "p_b"]
+ ]
+ },
+ "godot_rect2_has_point": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_vector2 *", "p_point"]
+ ]
+ },
+ "godot_rect2_grow": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_real", "p_by"]
+ ]
+ },
+ "godot_rect2_expand": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_vector2 *", "p_to"]
+ ]
+ },
+ "godot_rect2_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"],
+ ["const godot_rect2 *", "p_b"]
+ ]
+ },
+ "godot_rect2_get_position": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"]
+ ]
+ },
+ "godot_rect2_get_size": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_rect2 *", "p_self"]
+ ]
+ },
+ "godot_rect2_set_position": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rect2 *", "p_self"],
+ ["const godot_vector2 *", "p_pos"]
+ ]
+ },
+ "godot_rect2_set_size": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rect2 *", "p_self"],
+ ["const godot_vector2 *", "p_size"]
+ ]
+ },
+ "godot_rect3_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rect3 *", "r_dest"],
+ ["const godot_vector3 *", "p_pos"],
+ ["const godot_vector3 *", "p_size"]
+ ]
+ },
+ "godot_rect3_get_position": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_set_position": {
+ "return_type": "void",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_rect3_get_size": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_set_size": {
+ "return_type": "void",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_rect3_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_area": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_has_no_area": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_has_no_surface": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_intersects": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_rect3 *", "p_with"]
+ ]
+ },
+ "godot_rect3_encloses": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_rect3 *", "p_with"]
+ ]
+ },
+ "godot_rect3_merge": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_rect3 *", "p_with"]
+ ]
+ },
+ "godot_rect3_intersection": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_rect3 *", "p_with"]
+ ]
+ },
+ "godot_rect3_intersects_plane": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_plane *", "p_plane"]
+ ]
+ },
+ "godot_rect3_intersects_segment": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_from"],
+ ["const godot_vector3 *", "p_to"]
+ ]
+ },
+ "godot_rect3_has_point": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_point"]
+ ]
+ },
+ "godot_rect3_get_support": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_dir"]
+ ]
+ },
+ "godot_rect3_get_longest_axis": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_longest_axis_index": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_longest_axis_size": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_shortest_axis": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_shortest_axis_index": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_get_shortest_axis_size": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"]
+ ]
+ },
+ "godot_rect3_expand": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_vector3 *", "p_to_point"]
+ ]
+ },
+ "godot_rect3_grow": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_real", "p_by"]
+ ]
+ },
+ "godot_rect3_get_endpoint": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_rect3_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rect3 *", "p_self"],
+ ["const godot_rect3 *", "p_b"]
+ ]
+ },
+ "godot_rid_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rid *", "r_dest"]
+ ]
+ },
+ "godot_rid_get_id": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_rid *", "p_self"]
+ ]
+ },
+ "godot_rid_new_with_resource": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_rid *", "r_dest"],
+ ["const godot_object *", "p_from"]
+ ]
+ },
+ "godot_rid_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rid *", "p_self"],
+ ["const godot_rid *", "p_b"]
+ ]
+ },
+ "godot_rid_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_rid *", "p_self"],
+ ["const godot_rid *", "p_b"]
+ ]
+ },
+ "godot_transform_new_with_axis_origin": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform *", "r_dest"],
+ ["const godot_vector3 *", "p_x_axis"],
+ ["const godot_vector3 *", "p_y_axis"],
+ ["const godot_vector3 *", "p_z_axis"],
+ ["const godot_vector3 *", "p_origin"]
+ ]
+ },
+ "godot_transform_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform *", "r_dest"],
+ ["const godot_basis *", "p_basis"],
+ ["const godot_vector3 *", "p_origin"]
+ ]
+ },
+ "godot_transform_get_basis": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_set_basis": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform *", "p_self"],
+ ["godot_basis *", "p_v"]
+ ]
+ },
+ "godot_transform_get_origin": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_set_origin": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform *", "p_self"],
+ ["godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_transform_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_inverse": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_affine_inverse": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_orthonormalized": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"]
+ ]
+ },
+ "godot_transform_rotated": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_axis"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_transform_scaled": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_scale"]
+ ]
+ },
+ "godot_transform_translated": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_ofs"]
+ ]
+ },
+ "godot_transform_looking_at": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_target"],
+ ["const godot_vector3 *", "p_up"]
+ ]
+ },
+ "godot_transform_xform_plane": {
+ "return_type": "godot_plane",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_plane *", "p_v"]
+ ]
+ },
+ "godot_transform_xform_inv_plane": {
+ "return_type": "godot_plane",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_plane *", "p_v"]
+ ]
+ },
+ "godot_transform_new_identity": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform *", "r_dest"]
+ ]
+ },
+ "godot_transform_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_transform *", "p_b"]
+ ]
+ },
+ "godot_transform_operator_multiply": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_transform *", "p_b"]
+ ]
+ },
+ "godot_transform_xform_vector3": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_transform_xform_inv_vector3": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_vector3 *", "p_v"]
+ ]
+ },
+ "godot_transform_xform_rect3": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_rect3 *", "p_v"]
+ ]
+ },
+ "godot_transform_xform_inv_rect3": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_transform *", "p_self"],
+ ["const godot_rect3 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform2d *", "r_dest"],
+ ["const godot_real", "p_rot"],
+ ["const godot_vector2 *", "p_pos"]
+ ]
+ },
+ "godot_transform2d_new_axis_origin": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform2d *", "r_dest"],
+ ["const godot_vector2 *", "p_x_axis"],
+ ["const godot_vector2 *", "p_y_axis"],
+ ["const godot_vector2 *", "p_origin"]
+ ]
+ },
+ "godot_transform2d_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_inverse": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_affine_inverse": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_get_rotation": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_get_origin": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_get_scale": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_orthonormalized": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"]
+ ]
+ },
+ "godot_transform2d_rotated": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_real", "p_phi"]
+ ]
+ },
+ "godot_transform2d_scaled": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_scale"]
+ ]
+ },
+ "godot_transform2d_translated": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_offset"]
+ ]
+ },
+ "godot_transform2d_xform_vector2": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_xform_inv_vector2": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_basis_xform_vector2": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_basis_xform_inv_vector2": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_vector2 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_interpolate_with": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_transform2d *", "p_m"],
+ ["const godot_real", "p_c"]
+ ]
+ },
+ "godot_transform2d_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_transform2d *", "p_b"]
+ ]
+ },
+ "godot_transform2d_operator_multiply": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_transform2d *", "p_b"]
+ ]
+ },
+ "godot_transform2d_new_identity": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_transform2d *", "r_dest"]
+ ]
+ },
+ "godot_transform2d_xform_rect2": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_rect2 *", "p_v"]
+ ]
+ },
+ "godot_transform2d_xform_inv_rect2": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_transform2d *", "p_self"],
+ ["const godot_rect2 *", "p_v"]
+ ]
+ },
+ "godot_variant_get_type": {
+ "return_type": "godot_variant_type",
+ "arguments": [
+ ["const godot_variant *", "p_v"]
+ ]
+ },
+ "godot_variant_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_variant *", "p_src"]
+ ]
+ },
+ "godot_variant_new_nil": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"]
+ ]
+ },
+ "godot_variant_new_bool": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "p_v"],
+ ["const godot_bool", "p_b"]
+ ]
+ },
+ "godot_variant_new_uint": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const uint64_t", "p_i"]
+ ]
+ },
+ "godot_variant_new_int": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const int64_t", "p_i"]
+ ]
+ },
+ "godot_variant_new_real": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const double", "p_r"]
+ ]
+ },
+ "godot_variant_new_string": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_string *", "p_s"]
+ ]
+ },
+ "godot_variant_new_vector2": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_vector2 *", "p_v2"]
+ ]
+ },
+ "godot_variant_new_rect2": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_rect2 *", "p_rect2"]
+ ]
+ },
+ "godot_variant_new_vector3": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_vector3 *", "p_v3"]
+ ]
+ },
+ "godot_variant_new_transform2d": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_transform2d *", "p_t2d"]
+ ]
+ },
+ "godot_variant_new_plane": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_plane *", "p_plane"]
+ ]
+ },
+ "godot_variant_new_quat": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_quat *", "p_quat"]
+ ]
+ },
+ "godot_variant_new_rect3": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_rect3 *", "p_rect3"]
+ ]
+ },
+ "godot_variant_new_basis": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_basis *", "p_basis"]
+ ]
+ },
+ "godot_variant_new_transform": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_transform *", "p_trans"]
+ ]
+ },
+ "godot_variant_new_color": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_color *", "p_color"]
+ ]
+ },
+ "godot_variant_new_node_path": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_node_path *", "p_np"]
+ ]
+ },
+ "godot_variant_new_rid": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_rid *", "p_rid"]
+ ]
+ },
+ "godot_variant_new_object": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_object *", "p_obj"]
+ ]
+ },
+ "godot_variant_new_dictionary": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_dictionary *", "p_dict"]
+ ]
+ },
+ "godot_variant_new_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_array *", "p_arr"]
+ ]
+ },
+ "godot_variant_new_pool_byte_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_byte_array *", "p_pba"]
+ ]
+ },
+ "godot_variant_new_pool_int_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_int_array *", "p_pia"]
+ ]
+ },
+ "godot_variant_new_pool_real_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_real_array *", "p_pra"]
+ ]
+ },
+ "godot_variant_new_pool_string_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_string_array *", "p_psa"]
+ ]
+ },
+ "godot_variant_new_pool_vector2_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_vector2_array *", "p_pv2a"]
+ ]
+ },
+ "godot_variant_new_pool_vector3_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_vector3_array *", "p_pv3a"]
+ ]
+ },
+ "godot_variant_new_pool_color_array": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "r_dest"],
+ ["const godot_pool_color_array *", "p_pca"]
+ ]
+ },
+ "godot_variant_as_bool": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_uint": {
+ "return_type": "uint64_t",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_int": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_real": {
+ "return_type": "double",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_string": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_vector2": {
+ "return_type": "godot_vector2",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_rect2": {
+ "return_type": "godot_rect2",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_vector3": {
+ "return_type": "godot_vector3",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_transform2d": {
+ "return_type": "godot_transform2d",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_plane": {
+ "return_type": "godot_plane",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_quat": {
+ "return_type": "godot_quat",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_rect3": {
+ "return_type": "godot_rect3",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_basis": {
+ "return_type": "godot_basis",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_transform": {
+ "return_type": "godot_transform",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_color": {
+ "return_type": "godot_color",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_node_path": {
+ "return_type": "godot_node_path",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_rid": {
+ "return_type": "godot_rid",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_object": {
+ "return_type": "godot_object *",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_dictionary": {
+ "return_type": "godot_dictionary",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_array": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_byte_array": {
+ "return_type": "godot_pool_byte_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_int_array": {
+ "return_type": "godot_pool_int_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_real_array": {
+ "return_type": "godot_pool_real_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_string_array": {
+ "return_type": "godot_pool_string_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_vector2_array": {
+ "return_type": "godot_pool_vector2_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_vector3_array": {
+ "return_type": "godot_pool_vector3_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_as_pool_color_array": {
+ "return_type": "godot_pool_color_array",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_call": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["godot_variant *", "p_self"],
+ ["const godot_string *", "p_method"],
+ ["const godot_variant **", "p_args"],
+ ["const godot_int", "p_argcount"],
+ ["godot_variant_call_error *", "r_error"]
+ ]
+ },
+ "godot_variant_has_method": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"],
+ ["const godot_string *", "p_method"]
+ ]
+ },
+ "godot_variant_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"],
+ ["const godot_variant *", "p_other"]
+ ]
+ },
+ "godot_variant_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"],
+ ["const godot_variant *", "p_other"]
+ ]
+ },
+ "godot_variant_hash_compare": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"],
+ ["const godot_variant *", "p_other"]
+ ]
+ },
+ "godot_variant_booleanize": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_variant *", "p_self"]
+ ]
+ },
+ "godot_variant_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_variant *", "p_self"]
+ ]
+ },
+ "godot_string_new": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "r_dest"]
+ ]
+ },
+ "godot_string_new_copy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "r_dest"],
+ ["const godot_string *", "p_src"]
+ ]
+ },
+ "godot_string_new_data": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "r_dest"],
+ ["const char *", "p_contents"],
+ ["const int", "p_size"]
+ ]
+ },
+ "godot_string_new_unicode_data": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "r_dest"],
+ ["const wchar_t *", "p_contents"],
+ ["const int", "p_size"]
+ ]
+ },
+ "godot_string_get_data": {
+ "return_type": "void",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["char *", "p_dest"],
+ ["int *", "p_size"]
+ ]
+ },
+ "godot_string_operator_index": {
+ "return_type": "wchar_t *",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["const godot_int", "p_idx"]
+ ]
+ },
+ "godot_string_c_str": {
+ "return_type": "const char *",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_unicode_str": {
+ "return_type": "const wchar_t *",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_operator_equal": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_b"]
+ ]
+ },
+ "godot_string_operator_less": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_b"]
+ ]
+ },
+ "godot_string_operator_plus": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_b"]
+ ]
+ },
+ "godot_string_length": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_begins_with": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_string"]
+ ]
+ },
+ "godot_string_begins_with_char_array": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const char *", "p_char_array"]
+ ]
+ },
+ "godot_string_bigrams": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_chr": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["wchar_t", "p_character"]
+ ]
+ },
+ "godot_string_ends_with": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_string"]
+ ]
+ },
+ "godot_string_find": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"]
+ ]
+ },
+ "godot_string_find_from": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"],
+ ["godot_int", "p_from"]
+ ]
+ },
+ "godot_string_findmk": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_keys"]
+ ]
+ },
+ "godot_string_findmk_from": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_keys"],
+ ["godot_int", "p_from"]
+ ]
+ },
+ "godot_string_findmk_from_in_place": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_keys"],
+ ["godot_int", "p_from"],
+ ["godot_int *", "r_key"]
+ ]
+ },
+ "godot_string_findn": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"]
+ ]
+ },
+ "godot_string_findn_from": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"],
+ ["godot_int", "p_from"]
+ ]
+ },
+ "godot_string_find_last": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"]
+ ]
+ },
+ "godot_string_format": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_variant *", "p_values"]
+ ]
+ },
+ "godot_string_format_with_custom_placeholder": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_variant *", "p_values"],
+ ["const char *", "p_placeholder"]
+ ]
+ },
+ "godot_string_hex_encode_buffer": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const uint8_t *", "p_buffer"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_hex_to_int": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_hex_to_int_without_prefix": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_insert": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_at_pos"],
+ ["godot_string", "p_string"]
+ ]
+ },
+ "godot_string_is_numeric": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_subsequence_of": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_string"]
+ ]
+ },
+ "godot_string_is_subsequence_ofi": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_string"]
+ ]
+ },
+ "godot_string_lpad": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_min_length"]
+ ]
+ },
+ "godot_string_lpad_with_custom_character": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_min_length"],
+ ["const godot_string *", "p_character"]
+ ]
+ },
+ "godot_string_match": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_wildcard"]
+ ]
+ },
+ "godot_string_matchn": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_wildcard"]
+ ]
+ },
+ "godot_string_md5": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const uint8_t *", "p_md5"]
+ ]
+ },
+ "godot_string_num": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["double", "p_num"]
+ ]
+ },
+ "godot_string_num_int64": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["int64_t", "p_num"],
+ ["godot_int", "p_base"]
+ ]
+ },
+ "godot_string_num_int64_capitalized": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["int64_t", "p_num"],
+ ["godot_int", "p_base"],
+ ["godot_bool", "p_capitalize_hex"]
+ ]
+ },
+ "godot_string_num_real": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["double", "p_num"]
+ ]
+ },
+ "godot_string_num_scientific": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["double", "p_num"]
+ ]
+ },
+ "godot_string_num_with_decimals": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["double", "p_num"],
+ ["godot_int", "p_decimals"]
+ ]
+ },
+ "godot_string_pad_decimals": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_digits"]
+ ]
+ },
+ "godot_string_pad_zeros": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_digits"]
+ ]
+ },
+ "godot_string_replace_first": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_key"],
+ ["godot_string", "p_with"]
+ ]
+ },
+ "godot_string_replace": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_key"],
+ ["godot_string", "p_with"]
+ ]
+ },
+ "godot_string_replacen": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_key"],
+ ["godot_string", "p_with"]
+ ]
+ },
+ "godot_string_rfind": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"]
+ ]
+ },
+ "godot_string_rfindn": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"]
+ ]
+ },
+ "godot_string_rfind_from": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"],
+ ["godot_int", "p_from"]
+ ]
+ },
+ "godot_string_rfindn_from": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_what"],
+ ["godot_int", "p_from"]
+ ]
+ },
+ "godot_string_rpad": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_min_length"]
+ ]
+ },
+ "godot_string_rpad_with_custom_character": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_min_length"],
+ ["const godot_string *", "p_character"]
+ ]
+ },
+ "godot_string_similarity": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_string"]
+ ]
+ },
+ "godot_string_sprintf": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_values"],
+ ["godot_bool *", "p_error"]
+ ]
+ },
+ "godot_string_substr": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_from"],
+ ["godot_int", "p_chars"]
+ ]
+ },
+ "godot_string_to_double": {
+ "return_type": "double",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_to_float": {
+ "return_type": "godot_real",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_to_int": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_camelcase_to_underscore": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_camelcase_to_underscore_lowercased": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_capitalize": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_char_to_double": {
+ "return_type": "double",
+ "arguments": [
+ ["const char *", "p_what"]
+ ]
+ },
+ "godot_string_char_to_int": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const char *", "p_what"]
+ ]
+ },
+ "godot_string_wchar_to_int": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const wchar_t *", "p_str"]
+ ]
+ },
+ "godot_string_char_to_int_with_len": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const char *", "p_what"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_char_to_int64_with_len": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const wchar_t *", "p_str"],
+ ["int", "p_len"]
+ ]
+ },
+ "godot_string_hex_to_int64": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_hex_to_int64_with_prefix": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_to_int64": {
+ "return_type": "int64_t",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_unicode_char_to_double": {
+ "return_type": "double",
+ "arguments": [
+ ["const wchar_t *", "p_str"],
+ ["const wchar_t **", "r_end"]
+ ]
+ },
+ "godot_string_get_slice_count": {
+ "return_type": "godot_int",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_splitter"]
+ ]
+ },
+ "godot_string_get_slice": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_string", "p_splitter"],
+ ["godot_int", "p_slice"]
+ ]
+ },
+ "godot_string_get_slicec": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["wchar_t", "p_splitter"],
+ ["godot_int", "p_slice"]
+ ]
+ },
+ "godot_string_split": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_allow_empty": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_floats": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_floats_allows_empty": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_floats_mk": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_splitters"]
+ ]
+ },
+ "godot_string_split_floats_mk_allows_empty": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_splitters"]
+ ]
+ },
+ "godot_string_split_ints": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_ints_allows_empty": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_splitter"]
+ ]
+ },
+ "godot_string_split_ints_mk": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_splitters"]
+ ]
+ },
+ "godot_string_split_ints_mk_allows_empty": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_array *", "p_splitters"]
+ ]
+ },
+ "godot_string_split_spaces": {
+ "return_type": "godot_array",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_char_lowercase": {
+ "return_type": "wchar_t",
+ "arguments": [
+ ["wchar_t", "p_char"]
+ ]
+ },
+ "godot_string_char_uppercase": {
+ "return_type": "wchar_t",
+ "arguments": [
+ ["wchar_t", "p_char"]
+ ]
+ },
+ "godot_string_to_lower": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_to_upper": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_get_basename": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_get_extension": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_left": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_pos"]
+ ]
+ },
+ "godot_string_ord_at": {
+ "return_type": "wchar_t",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_idx"]
+ ]
+ },
+ "godot_string_plus_file": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_file"]
+ ]
+ },
+ "godot_string_right": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_pos"]
+ ]
+ },
+ "godot_string_strip_edges": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_bool", "p_left"],
+ ["godot_bool", "p_right"]
+ ]
+ },
+ "godot_string_strip_escapes": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_erase": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["godot_int", "p_pos"],
+ ["godot_int", "p_chars"]
+ ]
+ },
+ "godot_string_ascii": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["char *", "result"]
+ ]
+ },
+ "godot_string_ascii_extended": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["char *", "result"]
+ ]
+ },
+ "godot_string_utf8": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["char *", "result"]
+ ]
+ },
+ "godot_string_parse_utf8": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["const char *", "p_utf8"]
+ ]
+ },
+ "godot_string_parse_utf8_with_len": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["godot_string *", "p_self"],
+ ["const char *", "p_utf8"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_chars_to_utf8": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const char *", "p_utf8"]
+ ]
+ },
+ "godot_string_chars_to_utf8_with_len": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const char *", "p_utf8"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_hash": {
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_hash64": {
+ "return_type": "uint64_t",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_hash_chars": {
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const char *", "p_cstr"]
+ ]
+ },
+ "godot_string_hash_chars_with_len": {
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const char *", "p_cstr"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_hash_utf8_chars": {
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const wchar_t *", "p_str"]
+ ]
+ },
+ "godot_string_hash_utf8_chars_with_len": {
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const wchar_t *", "p_str"],
+ ["godot_int", "p_len"]
+ ]
+ },
+ "godot_string_md5_buffer": {
+ "return_type": "godot_pool_byte_array",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_md5_text": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_sha256_buffer": {
+ "return_type": "godot_pool_byte_array",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_sha256_text": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_empty": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_get_base_dir": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_get_file": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_humanize_size": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["size_t", "p_size"]
+ ]
+ },
+ "godot_string_is_abs_path": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_rel_path": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_resource_file": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_path_to": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_path"]
+ ]
+ },
+ "godot_string_path_to_file": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["const godot_string *", "p_path"]
+ ]
+ },
+ "godot_string_simplify_path": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_c_escape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_c_escape_multiline": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_c_unescape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_http_escape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_http_unescape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_json_escape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_word_wrap": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_int", "p_chars_per_line"]
+ ]
+ },
+ "godot_string_xml_escape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_xml_escape_with_quotes": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_xml_unescape": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_percent_decode": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_percent_encode": {
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_valid_float": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_valid_hex_number": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"],
+ ["godot_bool", "p_with_prefix"]
+ ]
+ },
+ "godot_string_is_valid_html_color": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_valid_identifier": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_valid_integer": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_is_valid_ip_address": {
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string *", "p_self"]
+ ]
+ },
+ "godot_string_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_string *", "p_self"]
+ ]
+ },
+ "godot_object_destroy": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_object *", "p_o"]
+ ]
+ },
+ "godot_global_get_singleton": {
+ "return_type": "godot_object *",
+ "arguments": [
+ ["char *", "p_name"]
+ ]
+ },
+ "godot_method_bind_get_method": {
+ "return_type": "godot_method_bind *",
+ "arguments": [
+ ["const char *", "p_classname"],
+ ["const char *", "p_methodname"]
+ ]
+ },
+ "godot_method_bind_ptrcall": {
+ "return_type": "void",
+ "arguments": [
+ ["godot_method_bind *", "p_method_bind"],
+ ["godot_object *", "p_instance"],
+ ["const void **", "p_args"],
+ ["void *", "p_ret"]
+ ]
+ },
+ "godot_method_bind_call": {
+ "return_type": "godot_variant",
+ "arguments": [
+ ["godot_method_bind *", "p_method_bind"],
+ ["godot_object *", "p_instance"],
+ ["const godot_variant **", "p_args"],
+ ["const int", "p_arg_count"],
+ ["godot_variant_call_error *", "p_call_error"]
+ ]
+ },
+ "godot_get_class_constructor": {
+ "return_type": "godot_class_constructor",
+ "arguments": [
+ ["const char *", "p_classname"]
+ ]
+ },
+ "godot_alloc": {
+ "return_type": "void *",
+ "arguments": [
+ ["int", "p_bytes"]
+ ]
+ },
+ "godot_realloc": {
+ "return_type": "void *",
+ "arguments": [
+ ["void *", "p_ptr"],
+ ["int", "p_bytes"]
+ ]
+ },
+ "godot_free": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_ptr"]
+ ]
+ },
+ "godot_print_error": {
+ "return_type": "void",
+ "arguments": [
+ ["const char *", "p_description"],
+ ["const char *", "p_function"],
+ ["const char *", "p_file"],
+ ["int", "p_line"]
+ ]
+ },
+ "godot_print_warning": {
+ "return_type": "void",
+ "arguments": [
+ ["const char *", "p_description"],
+ ["const char *", "p_function"],
+ ["const char *", "p_file"],
+ ["int", "p_line"]
+ ]
+ },
+ "godot_print": {
+ "return_type": "void",
+ "arguments": [
+ ["const godot_string *", "p_message"]
+ ]
+ },
+ "godot_nativescript_register_class": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_gdnative_handle"],
+ ["const char *", "p_name"],
+ ["const char *", "p_base"],
+ ["godot_instance_create_func", "p_create_func"],
+ ["godot_instance_destroy_func", "p_destroy_func"]
+ ]
+ },
+ "godot_nativescript_register_tool_class": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_gdnative_handle"],
+ ["const char *", "p_name"],
+ ["const char *", "p_base"],
+ ["godot_instance_create_func", "p_create_func"],
+ ["godot_instance_destroy_func", "p_destroy_func"]
+ ]
+ },
+ "godot_nativescript_register_method": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_gdnative_handle"],
+ ["const char *", "p_name"],
+ ["const char *", "p_function_name"],
+ ["godot_method_attributes", "p_attr"],
+ ["godot_instance_method", "p_method"]
+ ]
+ },
+ "godot_nativescript_register_property": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_gdnative_handle"],
+ ["const char *", "p_name"],
+ ["const char *", "p_path"],
+ ["godot_property_attributes *", "p_attr"],
+ ["godot_property_set_func", "p_set_func"],
+ ["godot_property_get_func", "p_get_func"]
+ ]
+ },
+ "godot_nativescript_register_signal": {
+ "return_type": "void",
+ "arguments": [
+ ["void *", "p_gdnative_handle"],
+ ["const char *", "p_name"],
+ ["const godot_signal *", "p_signal"]
+ ]
+ },
+ "godot_nativescript_get_userdata": {
+ "return_type": "void *",
+ "arguments": [
+ ["godot_object *", "p_instance"]
+ ]
+ }
+ }
+}
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 9134f1c581..008968a5e5 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -34,18 +34,9 @@
extern "C" {
#endif
-#ifdef GDAPI_BUILT_IN
-#define GDAPI_EXPORT
-#endif
-
#ifdef _WIN32
-#if defined(GDAPI_EXPORT)
-#define GDCALLINGCONV
-#define GDAPI __declspec(dllexport) GDCALLINGCONV
-#else
#define GDCALLINGCONV
-#define GDAPI __declspec(dllimport) GDCALLINGCONV
-#endif
+#define GDAPI GDCALLINGCONV
#elif defined(__APPLE__)
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
diff --git a/modules/gdnative/include/gdnative_api_struct.h b/modules/gdnative/include/gdnative_api_struct.h
deleted file mode 100644
index c345e27227..0000000000
--- a/modules/gdnative/include/gdnative_api_struct.h
+++ /dev/null
@@ -1,723 +0,0 @@
-/*************************************************************************/
-/* gdnative_api_struct.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef GODOT_GDNATIVE_API_STRUCT_H
-#define GODOT_GDNATIVE_API_STRUCT_H
-
-#include <gdnative/gdnative.h>
-#include <nativescript/godot_nativescript.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Using X_MACRO to keep api function signatures in a single list
-#define GODOT_GDNATIVE_API_FUNCTIONS \
- GDAPI_FUNC_VOID(godot_color_new_rgba, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) \
- GDAPI_FUNC_VOID(godot_color_new_rgb, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b) \
- GDAPI_FUNC(godot_color_get_r, godot_real, const godot_color *p_self) \
- GDAPI_FUNC_VOID(godot_color_set_r, godot_color *p_self, const godot_real r) \
- GDAPI_FUNC(godot_color_get_g, godot_real, const godot_color *p_self) \
- GDAPI_FUNC_VOID(godot_color_set_g, godot_color *p_self, const godot_real g) \
- GDAPI_FUNC(godot_color_get_b, godot_real, const godot_color *p_self) \
- GDAPI_FUNC_VOID(godot_color_set_b, godot_color *p_self, const godot_real b) \
- GDAPI_FUNC(godot_color_get_a, godot_real, const godot_color *p_self) \
- GDAPI_FUNC_VOID(godot_color_set_a, godot_color *p_self, const godot_real a) \
- GDAPI_FUNC(godot_color_get_h, godot_real, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_get_s, godot_real, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_get_v, godot_real, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_as_string, godot_string, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_to_rgba32, godot_int, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_to_argb32, godot_int, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_gray, godot_real, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_inverted, godot_color, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_contrasted, godot_color, const godot_color *p_self) \
- GDAPI_FUNC(godot_color_linear_interpolate, godot_color, const godot_color *p_self, const godot_color *p_b, const godot_real p_t) \
- GDAPI_FUNC(godot_color_blend, godot_color, const godot_color *p_self, const godot_color *p_over) \
- GDAPI_FUNC(godot_color_to_html, godot_string, const godot_color *p_self, const godot_bool p_with_alpha) \
- GDAPI_FUNC(godot_color_operator_equal, godot_bool, const godot_color *p_self, const godot_color *p_b) \
- GDAPI_FUNC(godot_color_operator_less, godot_bool, const godot_color *p_self, const godot_color *p_b) \
- GDAPI_FUNC_VOID(godot_vector2_new, godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) \
- GDAPI_FUNC(godot_vector2_as_string, godot_string, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_normalized, godot_vector2, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_length, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_angle, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_length_squared, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_is_normalized, godot_bool, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_distance_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
- GDAPI_FUNC(godot_vector2_distance_squared_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
- GDAPI_FUNC(godot_vector2_angle_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
- GDAPI_FUNC(godot_vector2_angle_to_point, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
- GDAPI_FUNC(godot_vector2_linear_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t) \
- GDAPI_FUNC(godot_vector2_cubic_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t) \
- GDAPI_FUNC(godot_vector2_rotated, godot_vector2, const godot_vector2 *p_self, const godot_real p_phi) \
- GDAPI_FUNC(godot_vector2_tangent, godot_vector2, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_floor, godot_vector2, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_snapped, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_by) \
- GDAPI_FUNC(godot_vector2_aspect, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_dot, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_with) \
- GDAPI_FUNC(godot_vector2_slide, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
- GDAPI_FUNC(godot_vector2_bounce, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
- GDAPI_FUNC(godot_vector2_reflect, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
- GDAPI_FUNC(godot_vector2_abs, godot_vector2, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_clamped, godot_vector2, const godot_vector2 *p_self, const godot_real p_length) \
- GDAPI_FUNC(godot_vector2_operator_add, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_substract, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_multiply_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_multiply_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_vector2_operator_divide_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_divide_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_vector2_operator_equal, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_less, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
- GDAPI_FUNC(godot_vector2_operator_neg, godot_vector2, const godot_vector2 *p_self) \
- GDAPI_FUNC_VOID(godot_vector2_set_x, godot_vector2 *p_self, const godot_real p_x) \
- GDAPI_FUNC_VOID(godot_vector2_set_y, godot_vector2 *p_self, const godot_real p_y) \
- GDAPI_FUNC(godot_vector2_get_x, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC(godot_vector2_get_y, godot_real, const godot_vector2 *p_self) \
- GDAPI_FUNC_VOID(godot_quat_new, godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) \
- GDAPI_FUNC_VOID(godot_quat_new_with_axis_angle, godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle) \
- GDAPI_FUNC(godot_quat_get_x, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC_VOID(godot_quat_set_x, godot_quat *p_self, const godot_real val) \
- GDAPI_FUNC(godot_quat_get_y, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC_VOID(godot_quat_set_y, godot_quat *p_self, const godot_real val) \
- GDAPI_FUNC(godot_quat_get_z, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC_VOID(godot_quat_set_z, godot_quat *p_self, const godot_real val) \
- GDAPI_FUNC(godot_quat_get_w, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC_VOID(godot_quat_set_w, godot_quat *p_self, const godot_real val) \
- GDAPI_FUNC(godot_quat_as_string, godot_string, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_length, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_length_squared, godot_real, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_normalized, godot_quat, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_is_normalized, godot_bool, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_inverse, godot_quat, const godot_quat *p_self) \
- GDAPI_FUNC(godot_quat_dot, godot_real, const godot_quat *p_self, const godot_quat *p_b) \
- GDAPI_FUNC(godot_quat_xform, godot_vector3, const godot_quat *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_quat_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
- GDAPI_FUNC(godot_quat_slerpni, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
- GDAPI_FUNC(godot_quat_cubic_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t) \
- GDAPI_FUNC(godot_quat_operator_multiply, godot_quat, const godot_quat *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_quat_operator_add, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
- GDAPI_FUNC(godot_quat_operator_substract, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
- GDAPI_FUNC(godot_quat_operator_divide, godot_quat, const godot_quat *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_quat_operator_equal, godot_bool, const godot_quat *p_self, const godot_quat *p_b) \
- GDAPI_FUNC(godot_quat_operator_neg, godot_quat, const godot_quat *p_self) \
- GDAPI_FUNC_VOID(godot_basis_new_with_rows, godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) \
- GDAPI_FUNC_VOID(godot_basis_new_with_axis_and_angle, godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi) \
- GDAPI_FUNC_VOID(godot_basis_new_with_euler, godot_basis *r_dest, const godot_vector3 *p_euler) \
- GDAPI_FUNC(godot_basis_as_string, godot_string, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_inverse, godot_basis, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_transposed, godot_basis, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_orthonormalized, godot_basis, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_determinant, godot_real, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_rotated, godot_basis, const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
- GDAPI_FUNC(godot_basis_scaled, godot_basis, const godot_basis *p_self, const godot_vector3 *p_scale) \
- GDAPI_FUNC(godot_basis_get_scale, godot_vector3, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_get_euler, godot_vector3, const godot_basis *p_self) \
- GDAPI_FUNC(godot_basis_tdotx, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
- GDAPI_FUNC(godot_basis_tdoty, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
- GDAPI_FUNC(godot_basis_tdotz, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
- GDAPI_FUNC(godot_basis_xform, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_basis_xform_inv, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_basis_get_orthogonal_index, godot_int, const godot_basis *p_self) \
- GDAPI_FUNC_VOID(godot_basis_new, godot_basis *r_dest) \
- GDAPI_FUNC_VOID(godot_basis_new_with_euler_quat, godot_basis *r_dest, const godot_quat *p_euler) \
- GDAPI_FUNC_VOID(godot_basis_get_elements, godot_basis *p_self, godot_vector3 *p_elements) \
- GDAPI_FUNC(godot_basis_get_axis, godot_vector3, const godot_basis *p_self, const godot_int p_axis) \
- GDAPI_FUNC_VOID(godot_basis_set_axis, godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value) \
- GDAPI_FUNC(godot_basis_get_row, godot_vector3, const godot_basis *p_self, const godot_int p_row) \
- GDAPI_FUNC_VOID(godot_basis_set_row, godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value) \
- GDAPI_FUNC(godot_basis_operator_equal, godot_bool, const godot_basis *p_self, const godot_basis *p_b) \
- GDAPI_FUNC(godot_basis_operator_add, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
- GDAPI_FUNC(godot_basis_operator_substract, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
- GDAPI_FUNC(godot_basis_operator_multiply_vector, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
- GDAPI_FUNC(godot_basis_operator_multiply_scalar, godot_basis, const godot_basis *p_self, const godot_real p_b) \
- GDAPI_FUNC_VOID(godot_vector3_new, godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) \
- GDAPI_FUNC(godot_vector3_as_string, godot_string, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_min_axis, godot_int, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_max_axis, godot_int, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_length, godot_real, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_length_squared, godot_real, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_is_normalized, godot_bool, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_normalized, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_inverse, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_snapped, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_by) \
- GDAPI_FUNC(godot_vector3_rotated, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
- GDAPI_FUNC(godot_vector3_linear_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t) \
- GDAPI_FUNC(godot_vector3_cubic_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t) \
- GDAPI_FUNC(godot_vector3_dot, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_cross, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_outer, godot_basis, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_to_diagonal_matrix, godot_basis, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_abs, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_floor, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_ceil, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC(godot_vector3_distance_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_distance_squared_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_angle_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_to) \
- GDAPI_FUNC(godot_vector3_slide, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
- GDAPI_FUNC(godot_vector3_bounce, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
- GDAPI_FUNC(godot_vector3_reflect, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
- GDAPI_FUNC(godot_vector3_operator_add, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_substract, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_multiply_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_multiply_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_vector3_operator_divide_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_divide_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
- GDAPI_FUNC(godot_vector3_operator_equal, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_less, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
- GDAPI_FUNC(godot_vector3_operator_neg, godot_vector3, const godot_vector3 *p_self) \
- GDAPI_FUNC_VOID(godot_vector3_set_axis, godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val) \
- GDAPI_FUNC(godot_vector3_get_axis, godot_real, const godot_vector3 *p_self, const godot_vector3_axis p_axis) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_new, godot_pool_byte_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_new_copy, godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_new_with_array, godot_pool_byte_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_append, godot_pool_byte_array *p_self, const uint8_t p_data) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_append_array, godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array) \
- GDAPI_FUNC(godot_pool_byte_array_insert, godot_error, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_invert, godot_pool_byte_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_push_back, godot_pool_byte_array *p_self, const uint8_t p_data) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_remove, godot_pool_byte_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_resize, godot_pool_byte_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_set, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
- GDAPI_FUNC(godot_pool_byte_array_get, uint8_t, const godot_pool_byte_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_byte_array_size, godot_int, const godot_pool_byte_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_byte_array_destroy, godot_pool_byte_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_int_array_new, godot_pool_int_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_int_array_new_copy, godot_pool_int_array *r_dest, const godot_pool_int_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_int_array_new_with_array, godot_pool_int_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_int_array_append, godot_pool_int_array *p_self, const godot_int p_data) \
- GDAPI_FUNC_VOID(godot_pool_int_array_append_array, godot_pool_int_array *p_self, const godot_pool_int_array *p_array) \
- GDAPI_FUNC(godot_pool_int_array_insert, godot_error, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
- GDAPI_FUNC_VOID(godot_pool_int_array_invert, godot_pool_int_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_int_array_push_back, godot_pool_int_array *p_self, const godot_int p_data) \
- GDAPI_FUNC_VOID(godot_pool_int_array_remove, godot_pool_int_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_int_array_resize, godot_pool_int_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_int_array_set, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
- GDAPI_FUNC(godot_pool_int_array_get, godot_int, const godot_pool_int_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_int_array_size, godot_int, const godot_pool_int_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_int_array_destroy, godot_pool_int_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_real_array_new, godot_pool_real_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_real_array_new_copy, godot_pool_real_array *r_dest, const godot_pool_real_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_real_array_new_with_array, godot_pool_real_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_real_array_append, godot_pool_real_array *p_self, const godot_real p_data) \
- GDAPI_FUNC_VOID(godot_pool_real_array_append_array, godot_pool_real_array *p_self, const godot_pool_real_array *p_array) \
- GDAPI_FUNC(godot_pool_real_array_insert, godot_error, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
- GDAPI_FUNC_VOID(godot_pool_real_array_invert, godot_pool_real_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_real_array_push_back, godot_pool_real_array *p_self, const godot_real p_data) \
- GDAPI_FUNC_VOID(godot_pool_real_array_remove, godot_pool_real_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_real_array_resize, godot_pool_real_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_real_array_set, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
- GDAPI_FUNC(godot_pool_real_array_get, godot_real, const godot_pool_real_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_real_array_size, godot_int, const godot_pool_real_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_real_array_destroy, godot_pool_real_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_string_array_new, godot_pool_string_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_string_array_new_copy, godot_pool_string_array *r_dest, const godot_pool_string_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_string_array_new_with_array, godot_pool_string_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_string_array_append, godot_pool_string_array *p_self, const godot_string *p_data) \
- GDAPI_FUNC_VOID(godot_pool_string_array_append_array, godot_pool_string_array *p_self, const godot_pool_string_array *p_array) \
- GDAPI_FUNC(godot_pool_string_array_insert, godot_error, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
- GDAPI_FUNC_VOID(godot_pool_string_array_invert, godot_pool_string_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_string_array_push_back, godot_pool_string_array *p_self, const godot_string *p_data) \
- GDAPI_FUNC_VOID(godot_pool_string_array_remove, godot_pool_string_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_string_array_resize, godot_pool_string_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_string_array_set, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
- GDAPI_FUNC(godot_pool_string_array_get, godot_string, const godot_pool_string_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_string_array_size, godot_int, const godot_pool_string_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_string_array_destroy, godot_pool_string_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_new, godot_pool_vector2_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_new_copy, godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_new_with_array, godot_pool_vector2_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_append, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_append_array, godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array) \
- GDAPI_FUNC(godot_pool_vector2_array_insert, godot_error, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_invert, godot_pool_vector2_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_push_back, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_remove, godot_pool_vector2_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_resize, godot_pool_vector2_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_set, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
- GDAPI_FUNC(godot_pool_vector2_array_get, godot_vector2, const godot_pool_vector2_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_vector2_array_size, godot_int, const godot_pool_vector2_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector2_array_destroy, godot_pool_vector2_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_new, godot_pool_vector3_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_new_copy, godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_new_with_array, godot_pool_vector3_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_append, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_append_array, godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array) \
- GDAPI_FUNC(godot_pool_vector3_array_insert, godot_error, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_invert, godot_pool_vector3_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_push_back, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_remove, godot_pool_vector3_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_resize, godot_pool_vector3_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_set, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
- GDAPI_FUNC(godot_pool_vector3_array_get, godot_vector3, const godot_pool_vector3_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_vector3_array_size, godot_int, const godot_pool_vector3_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_vector3_array_destroy, godot_pool_vector3_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_color_array_new, godot_pool_color_array *r_dest) \
- GDAPI_FUNC_VOID(godot_pool_color_array_new_copy, godot_pool_color_array *r_dest, const godot_pool_color_array *p_src) \
- GDAPI_FUNC_VOID(godot_pool_color_array_new_with_array, godot_pool_color_array *r_dest, const godot_array *p_a) \
- GDAPI_FUNC_VOID(godot_pool_color_array_append, godot_pool_color_array *p_self, const godot_color *p_data) \
- GDAPI_FUNC_VOID(godot_pool_color_array_append_array, godot_pool_color_array *p_self, const godot_pool_color_array *p_array) \
- GDAPI_FUNC(godot_pool_color_array_insert, godot_error, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
- GDAPI_FUNC_VOID(godot_pool_color_array_invert, godot_pool_color_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_color_array_push_back, godot_pool_color_array *p_self, const godot_color *p_data) \
- GDAPI_FUNC_VOID(godot_pool_color_array_remove, godot_pool_color_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_pool_color_array_resize, godot_pool_color_array *p_self, const godot_int p_size) \
- GDAPI_FUNC_VOID(godot_pool_color_array_set, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
- GDAPI_FUNC(godot_pool_color_array_get, godot_color, const godot_pool_color_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_pool_color_array_size, godot_int, const godot_pool_color_array *p_self) \
- GDAPI_FUNC_VOID(godot_pool_color_array_destroy, godot_pool_color_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_new, godot_array *r_dest) \
- GDAPI_FUNC_VOID(godot_array_new_copy, godot_array *r_dest, const godot_array *p_src) \
- GDAPI_FUNC_VOID(godot_array_new_pool_color_array, godot_array *r_dest, const godot_pool_color_array *p_pca) \
- GDAPI_FUNC_VOID(godot_array_new_pool_vector3_array, godot_array *r_dest, const godot_pool_vector3_array *p_pv3a) \
- GDAPI_FUNC_VOID(godot_array_new_pool_vector2_array, godot_array *r_dest, const godot_pool_vector2_array *p_pv2a) \
- GDAPI_FUNC_VOID(godot_array_new_pool_string_array, godot_array *r_dest, const godot_pool_string_array *p_psa) \
- GDAPI_FUNC_VOID(godot_array_new_pool_real_array, godot_array *r_dest, const godot_pool_real_array *p_pra) \
- GDAPI_FUNC_VOID(godot_array_new_pool_int_array, godot_array *r_dest, const godot_pool_int_array *p_pia) \
- GDAPI_FUNC_VOID(godot_array_new_pool_byte_array, godot_array *r_dest, const godot_pool_byte_array *p_pba) \
- GDAPI_FUNC_VOID(godot_array_set, godot_array *p_self, const godot_int p_idx, const godot_variant *p_value) \
- GDAPI_FUNC(godot_array_get, godot_variant, const godot_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_array_operator_index, godot_variant *, godot_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_array_append, godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC_VOID(godot_array_clear, godot_array *p_self) \
- GDAPI_FUNC(godot_array_count, godot_int, const godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC(godot_array_empty, godot_bool, const godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_erase, godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC(godot_array_front, godot_variant, const godot_array *p_self) \
- GDAPI_FUNC(godot_array_back, godot_variant, const godot_array *p_self) \
- GDAPI_FUNC(godot_array_find, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
- GDAPI_FUNC(godot_array_find_last, godot_int, const godot_array *p_self, const godot_variant *p_what) \
- GDAPI_FUNC(godot_array_has, godot_bool, const godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC(godot_array_hash, godot_int, const godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_insert, godot_array *p_self, const godot_int p_pos, const godot_variant *p_value) \
- GDAPI_FUNC_VOID(godot_array_invert, godot_array *p_self) \
- GDAPI_FUNC(godot_array_pop_back, godot_variant, godot_array *p_self) \
- GDAPI_FUNC(godot_array_pop_front, godot_variant, godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_push_back, godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC_VOID(godot_array_push_front, godot_array *p_self, const godot_variant *p_value) \
- GDAPI_FUNC_VOID(godot_array_remove, godot_array *p_self, const godot_int p_idx) \
- GDAPI_FUNC_VOID(godot_array_resize, godot_array *p_self, const godot_int p_size) \
- GDAPI_FUNC(godot_array_rfind, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
- GDAPI_FUNC(godot_array_size, godot_int, const godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_sort, godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_array_sort_custom, godot_array *p_self, godot_object *p_obj, const godot_string *p_func) \
- GDAPI_FUNC_VOID(godot_array_destroy, godot_array *p_self) \
- GDAPI_FUNC_VOID(godot_dictionary_new, godot_dictionary *r_dest) \
- GDAPI_FUNC_VOID(godot_dictionary_new_copy, godot_dictionary *r_dest, const godot_dictionary *p_src) \
- GDAPI_FUNC_VOID(godot_dictionary_destroy, godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_size, godot_int, const godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_empty, godot_bool, const godot_dictionary *p_self) \
- GDAPI_FUNC_VOID(godot_dictionary_clear, godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_has, godot_bool, const godot_dictionary *p_self, const godot_variant *p_key) \
- GDAPI_FUNC(godot_dictionary_has_all, godot_bool, const godot_dictionary *p_self, const godot_array *p_keys) \
- GDAPI_FUNC_VOID(godot_dictionary_erase, godot_dictionary *p_self, const godot_variant *p_key) \
- GDAPI_FUNC(godot_dictionary_hash, godot_int, const godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_keys, godot_array, const godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_values, godot_array, const godot_dictionary *p_self) \
- GDAPI_FUNC(godot_dictionary_get, godot_variant, const godot_dictionary *p_self, const godot_variant *p_key) \
- GDAPI_FUNC_VOID(godot_dictionary_set, godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value) \
- GDAPI_FUNC(godot_dictionary_operator_index, godot_variant *, godot_dictionary *p_self, const godot_variant *p_key) \
- GDAPI_FUNC(godot_dictionary_next, godot_variant *, const godot_dictionary *p_self, const godot_variant *p_key) \
- GDAPI_FUNC(godot_dictionary_operator_equal, godot_bool, const godot_dictionary *p_self, const godot_dictionary *p_b) \
- GDAPI_FUNC(godot_dictionary_to_json, godot_string, const godot_dictionary *p_self) \
- GDAPI_FUNC_VOID(godot_node_path_new, godot_node_path *r_dest, const godot_string *p_from) \
- GDAPI_FUNC_VOID(godot_node_path_new_copy, godot_node_path *r_dest, const godot_node_path *p_src) \
- GDAPI_FUNC_VOID(godot_node_path_destroy, godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_as_string, godot_string, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_is_absolute, godot_bool, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_get_name_count, godot_int, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_get_name, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_node_path_get_subname_count, godot_int, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_get_subname, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_node_path_get_property, godot_string, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_is_empty, godot_bool, const godot_node_path *p_self) \
- GDAPI_FUNC(godot_node_path_operator_equal, godot_bool, const godot_node_path *p_self, const godot_node_path *p_b) \
- GDAPI_FUNC_VOID(godot_plane_new_with_reals, godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) \
- GDAPI_FUNC_VOID(godot_plane_new_with_vectors, godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) \
- GDAPI_FUNC_VOID(godot_plane_new_with_normal, godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d) \
- GDAPI_FUNC(godot_plane_as_string, godot_string, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_normalized, godot_plane, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_center, godot_vector3, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_get_any_point, godot_vector3, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_is_point_over, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point) \
- GDAPI_FUNC(godot_plane_distance_to, godot_real, const godot_plane *p_self, const godot_vector3 *p_point) \
- GDAPI_FUNC(godot_plane_has_point, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon) \
- GDAPI_FUNC(godot_plane_project, godot_vector3, const godot_plane *p_self, const godot_vector3 *p_point) \
- GDAPI_FUNC(godot_plane_intersect_3, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c) \
- GDAPI_FUNC(godot_plane_intersects_ray, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir) \
- GDAPI_FUNC(godot_plane_intersects_segment, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end) \
- GDAPI_FUNC(godot_plane_operator_neg, godot_plane, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_operator_equal, godot_bool, const godot_plane *p_self, const godot_plane *p_b) \
- GDAPI_FUNC_VOID(godot_plane_set_normal, godot_plane *p_self, const godot_vector3 *p_normal) \
- GDAPI_FUNC(godot_plane_get_normal, godot_vector3, const godot_plane *p_self) \
- GDAPI_FUNC(godot_plane_get_d, godot_real, const godot_plane *p_self) \
- GDAPI_FUNC_VOID(godot_plane_set_d, godot_plane *p_self, const godot_real p_d) \
- GDAPI_FUNC_VOID(godot_rect2_new_with_position_and_size, godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) \
- GDAPI_FUNC_VOID(godot_rect2_new, godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) \
- GDAPI_FUNC(godot_rect2_as_string, godot_string, const godot_rect2 *p_self) \
- GDAPI_FUNC(godot_rect2_get_area, godot_real, const godot_rect2 *p_self) \
- GDAPI_FUNC(godot_rect2_intersects, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
- GDAPI_FUNC(godot_rect2_encloses, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
- GDAPI_FUNC(godot_rect2_has_no_area, godot_bool, const godot_rect2 *p_self) \
- GDAPI_FUNC(godot_rect2_clip, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
- GDAPI_FUNC(godot_rect2_merge, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
- GDAPI_FUNC(godot_rect2_has_point, godot_bool, const godot_rect2 *p_self, const godot_vector2 *p_point) \
- GDAPI_FUNC(godot_rect2_grow, godot_rect2, const godot_rect2 *p_self, const godot_real p_by) \
- GDAPI_FUNC(godot_rect2_expand, godot_rect2, const godot_rect2 *p_self, const godot_vector2 *p_to) \
- GDAPI_FUNC(godot_rect2_operator_equal, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
- GDAPI_FUNC(godot_rect2_get_position, godot_vector2, const godot_rect2 *p_self) \
- GDAPI_FUNC(godot_rect2_get_size, godot_vector2, const godot_rect2 *p_self) \
- GDAPI_FUNC_VOID(godot_rect2_set_position, godot_rect2 *p_self, const godot_vector2 *p_pos) \
- GDAPI_FUNC_VOID(godot_rect2_set_size, godot_rect2 *p_self, const godot_vector2 *p_size) \
- GDAPI_FUNC_VOID(godot_rect3_new, godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) \
- GDAPI_FUNC(godot_rect3_get_position, godot_vector3, const godot_rect3 *p_self) \
- GDAPI_FUNC_VOID(godot_rect3_set_position, const godot_rect3 *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_rect3_get_size, godot_vector3, const godot_rect3 *p_self) \
- GDAPI_FUNC_VOID(godot_rect3_set_size, const godot_rect3 *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_rect3_as_string, godot_string, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_area, godot_real, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_has_no_area, godot_bool, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_has_no_surface, godot_bool, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_intersects, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
- GDAPI_FUNC(godot_rect3_encloses, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
- GDAPI_FUNC(godot_rect3_merge, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
- GDAPI_FUNC(godot_rect3_intersection, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
- GDAPI_FUNC(godot_rect3_intersects_plane, godot_bool, const godot_rect3 *p_self, const godot_plane *p_plane) \
- GDAPI_FUNC(godot_rect3_intersects_segment, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to) \
- GDAPI_FUNC(godot_rect3_has_point, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_point) \
- GDAPI_FUNC(godot_rect3_get_support, godot_vector3, const godot_rect3 *p_self, const godot_vector3 *p_dir) \
- GDAPI_FUNC(godot_rect3_get_longest_axis, godot_vector3, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_longest_axis_index, godot_int, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_longest_axis_size, godot_real, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_shortest_axis, godot_vector3, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_shortest_axis_index, godot_int, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_get_shortest_axis_size, godot_real, const godot_rect3 *p_self) \
- GDAPI_FUNC(godot_rect3_expand, godot_rect3, const godot_rect3 *p_self, const godot_vector3 *p_to_point) \
- GDAPI_FUNC(godot_rect3_grow, godot_rect3, const godot_rect3 *p_self, const godot_real p_by) \
- GDAPI_FUNC(godot_rect3_get_endpoint, godot_vector3, const godot_rect3 *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_rect3_operator_equal, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_b) \
- GDAPI_FUNC_VOID(godot_rid_new, godot_rid *r_dest) \
- GDAPI_FUNC(godot_rid_get_id, godot_int, const godot_rid *p_self) \
- GDAPI_FUNC_VOID(godot_rid_new_with_resource, godot_rid *r_dest, const godot_object *p_from) \
- GDAPI_FUNC(godot_rid_operator_equal, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
- GDAPI_FUNC(godot_rid_operator_less, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
- GDAPI_FUNC_VOID(godot_transform_new_with_axis_origin, godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) \
- GDAPI_FUNC_VOID(godot_transform_new, godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin) \
- GDAPI_FUNC(godot_transform_get_basis, godot_basis, const godot_transform *p_self) \
- GDAPI_FUNC_VOID(godot_transform_set_basis, godot_transform *p_self, godot_basis *p_v) \
- GDAPI_FUNC(godot_transform_get_origin, godot_vector3, const godot_transform *p_self) \
- GDAPI_FUNC_VOID(godot_transform_set_origin, godot_transform *p_self, godot_vector3 *p_v) \
- GDAPI_FUNC(godot_transform_as_string, godot_string, const godot_transform *p_self) \
- GDAPI_FUNC(godot_transform_inverse, godot_transform, const godot_transform *p_self) \
- GDAPI_FUNC(godot_transform_affine_inverse, godot_transform, const godot_transform *p_self) \
- GDAPI_FUNC(godot_transform_orthonormalized, godot_transform, const godot_transform *p_self) \
- GDAPI_FUNC(godot_transform_rotated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
- GDAPI_FUNC(godot_transform_scaled, godot_transform, const godot_transform *p_self, const godot_vector3 *p_scale) \
- GDAPI_FUNC(godot_transform_translated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_ofs) \
- GDAPI_FUNC(godot_transform_looking_at, godot_transform, const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up) \
- GDAPI_FUNC(godot_transform_xform_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
- GDAPI_FUNC(godot_transform_xform_inv_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
- GDAPI_FUNC_VOID(godot_transform_new_identity, godot_transform *r_dest) \
- GDAPI_FUNC(godot_transform_operator_equal, godot_bool, const godot_transform *p_self, const godot_transform *p_b) \
- GDAPI_FUNC(godot_transform_operator_multiply, godot_transform, const godot_transform *p_self, const godot_transform *p_b) \
- GDAPI_FUNC(godot_transform_xform_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_transform_xform_inv_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
- GDAPI_FUNC(godot_transform_xform_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
- GDAPI_FUNC(godot_transform_xform_inv_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
- GDAPI_FUNC_VOID(godot_transform2d_new, godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) \
- GDAPI_FUNC_VOID(godot_transform2d_new_axis_origin, godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin) \
- GDAPI_FUNC(godot_transform2d_as_string, godot_string, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_inverse, godot_transform2d, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_affine_inverse, godot_transform2d, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_get_rotation, godot_real, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_get_origin, godot_vector2, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_get_scale, godot_vector2, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_orthonormalized, godot_transform2d, const godot_transform2d *p_self) \
- GDAPI_FUNC(godot_transform2d_rotated, godot_transform2d, const godot_transform2d *p_self, const godot_real p_phi) \
- GDAPI_FUNC(godot_transform2d_scaled, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_scale) \
- GDAPI_FUNC(godot_transform2d_translated, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_offset) \
- GDAPI_FUNC(godot_transform2d_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
- GDAPI_FUNC(godot_transform2d_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
- GDAPI_FUNC(godot_transform2d_basis_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
- GDAPI_FUNC(godot_transform2d_basis_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
- GDAPI_FUNC(godot_transform2d_interpolate_with, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c) \
- GDAPI_FUNC(godot_transform2d_operator_equal, godot_bool, const godot_transform2d *p_self, const godot_transform2d *p_b) \
- GDAPI_FUNC(godot_transform2d_operator_multiply, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_b) \
- GDAPI_FUNC_VOID(godot_transform2d_new_identity, godot_transform2d *r_dest) \
- GDAPI_FUNC(godot_transform2d_xform_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
- GDAPI_FUNC(godot_transform2d_xform_inv_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
- GDAPI_FUNC(godot_variant_get_type, godot_variant_type, const godot_variant *p_v) \
- GDAPI_FUNC_VOID(godot_variant_new_copy, godot_variant *r_dest, const godot_variant *p_src) \
- GDAPI_FUNC_VOID(godot_variant_new_nil, godot_variant *r_dest) \
- GDAPI_FUNC_VOID(godot_variant_new_bool, godot_variant *p_v, const godot_bool p_b) \
- GDAPI_FUNC_VOID(godot_variant_new_uint, godot_variant *r_dest, const uint64_t p_i) \
- GDAPI_FUNC_VOID(godot_variant_new_int, godot_variant *r_dest, const int64_t p_i) \
- GDAPI_FUNC_VOID(godot_variant_new_real, godot_variant *r_dest, const double p_r) \
- GDAPI_FUNC_VOID(godot_variant_new_string, godot_variant *r_dest, const godot_string *p_s) \
- GDAPI_FUNC_VOID(godot_variant_new_vector2, godot_variant *r_dest, const godot_vector2 *p_v2) \
- GDAPI_FUNC_VOID(godot_variant_new_rect2, godot_variant *r_dest, const godot_rect2 *p_rect2) \
- GDAPI_FUNC_VOID(godot_variant_new_vector3, godot_variant *r_dest, const godot_vector3 *p_v3) \
- GDAPI_FUNC_VOID(godot_variant_new_transform2d, godot_variant *r_dest, const godot_transform2d *p_t2d) \
- GDAPI_FUNC_VOID(godot_variant_new_plane, godot_variant *r_dest, const godot_plane *p_plane) \
- GDAPI_FUNC_VOID(godot_variant_new_quat, godot_variant *r_dest, const godot_quat *p_quat) \
- GDAPI_FUNC_VOID(godot_variant_new_rect3, godot_variant *r_dest, const godot_rect3 *p_rect3) \
- GDAPI_FUNC_VOID(godot_variant_new_basis, godot_variant *r_dest, const godot_basis *p_basis) \
- GDAPI_FUNC_VOID(godot_variant_new_transform, godot_variant *r_dest, const godot_transform *p_trans) \
- GDAPI_FUNC_VOID(godot_variant_new_color, godot_variant *r_dest, const godot_color *p_color) \
- GDAPI_FUNC_VOID(godot_variant_new_node_path, godot_variant *r_dest, const godot_node_path *p_np) \
- GDAPI_FUNC_VOID(godot_variant_new_rid, godot_variant *r_dest, const godot_rid *p_rid) \
- GDAPI_FUNC_VOID(godot_variant_new_object, godot_variant *r_dest, const godot_object *p_obj) \
- GDAPI_FUNC_VOID(godot_variant_new_dictionary, godot_variant *r_dest, const godot_dictionary *p_dict) \
- GDAPI_FUNC_VOID(godot_variant_new_array, godot_variant *r_dest, const godot_array *p_arr) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_byte_array, godot_variant *r_dest, const godot_pool_byte_array *p_pba) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_int_array, godot_variant *r_dest, const godot_pool_int_array *p_pia) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_real_array, godot_variant *r_dest, const godot_pool_real_array *p_pra) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_string_array, godot_variant *r_dest, const godot_pool_string_array *p_psa) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_vector2_array, godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_vector3_array, godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) \
- GDAPI_FUNC_VOID(godot_variant_new_pool_color_array, godot_variant *r_dest, const godot_pool_color_array *p_pca) \
- GDAPI_FUNC(godot_variant_as_bool, godot_bool, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_uint, uint64_t, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_int, int64_t, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_real, double, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_string, godot_string, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_vector2, godot_vector2, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_rect2, godot_rect2, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_vector3, godot_vector3, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_transform2d, godot_transform2d, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_plane, godot_plane, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_quat, godot_quat, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_rect3, godot_rect3, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_basis, godot_basis, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_transform, godot_transform, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_color, godot_color, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_node_path, godot_node_path, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_rid, godot_rid, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_object, godot_object *, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_dictionary, godot_dictionary, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_array, godot_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_byte_array, godot_pool_byte_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_int_array, godot_pool_int_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_real_array, godot_pool_real_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_string_array, godot_pool_string_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_vector2_array, godot_pool_vector2_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_vector3_array, godot_pool_vector3_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_as_pool_color_array, godot_pool_color_array, const godot_variant *p_self) \
- GDAPI_FUNC(godot_variant_call, godot_variant, godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error) \
- GDAPI_FUNC(godot_variant_has_method, godot_bool, const godot_variant *p_self, const godot_string *p_method) \
- GDAPI_FUNC(godot_variant_operator_equal, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
- GDAPI_FUNC(godot_variant_operator_less, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
- GDAPI_FUNC(godot_variant_hash_compare, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
- GDAPI_FUNC(godot_variant_booleanize, godot_bool, const godot_variant *p_self) \
- GDAPI_FUNC_VOID(godot_variant_destroy, godot_variant *p_self) \
- GDAPI_FUNC_VOID(godot_string_new, godot_string *r_dest) \
- GDAPI_FUNC_VOID(godot_string_new_copy, godot_string *r_dest, const godot_string *p_src) \
- GDAPI_FUNC_VOID(godot_string_new_data, godot_string *r_dest, const char *p_contents, const int p_size) \
- GDAPI_FUNC_VOID(godot_string_new_unicode_data, godot_string *r_dest, const wchar_t *p_contents, const int p_size) \
- GDAPI_FUNC_VOID(godot_string_get_data, const godot_string *p_self, char *p_dest, int *p_size) \
- GDAPI_FUNC(godot_string_operator_index, wchar_t *, godot_string *p_self, const godot_int p_idx) \
- GDAPI_FUNC(godot_string_c_str, const char *, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_unicode_str, const wchar_t *, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_operator_equal, godot_bool, const godot_string *p_self, const godot_string *p_b) \
- GDAPI_FUNC(godot_string_operator_less, godot_bool, const godot_string *p_self, const godot_string *p_b) \
- GDAPI_FUNC(godot_string_operator_plus, godot_string, const godot_string *p_self, const godot_string *p_b) \
- GDAPI_FUNC(godot_string_length, godot_int, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_begins_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
- GDAPI_FUNC(godot_string_begins_with_char_array, godot_bool, const godot_string *p_self, const char *p_char_array) \
- GDAPI_FUNC(godot_string_bigrams, godot_array, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_chr, godot_string, wchar_t p_character) \
- GDAPI_FUNC(godot_string_ends_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
- GDAPI_FUNC(godot_string_find, godot_int, const godot_string *p_self, godot_string p_what) \
- GDAPI_FUNC(godot_string_find_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
- GDAPI_FUNC(godot_string_findmk, godot_int, const godot_string *p_self, const godot_array *p_keys) \
- GDAPI_FUNC(godot_string_findmk_from, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from) \
- GDAPI_FUNC(godot_string_findmk_from_in_place, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from, godot_int *r_key) \
- GDAPI_FUNC(godot_string_findn, godot_int, const godot_string *p_self, godot_string p_what) \
- GDAPI_FUNC(godot_string_findn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
- GDAPI_FUNC(godot_string_find_last, godot_int, const godot_string *p_self, godot_string p_what) \
- GDAPI_FUNC(godot_string_format, godot_string, const godot_string *p_self, const godot_variant *p_values) \
- GDAPI_FUNC(godot_string_format_with_custom_placeholder, godot_string, const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder) \
- GDAPI_FUNC(godot_string_hex_encode_buffer, godot_string, const uint8_t *p_buffer, godot_int p_len) \
- GDAPI_FUNC(godot_string_hex_to_int, godot_int, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_hex_to_int_without_prefix, godot_int, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_insert, godot_string, const godot_string *p_self, godot_int p_at_pos, godot_string p_string) \
- GDAPI_FUNC(godot_string_is_numeric, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_subsequence_of, godot_bool, const godot_string *p_self, const godot_string *p_string) \
- GDAPI_FUNC(godot_string_is_subsequence_ofi, godot_bool, const godot_string *p_self, const godot_string *p_string) \
- GDAPI_FUNC(godot_string_lpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
- GDAPI_FUNC(godot_string_lpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
- GDAPI_FUNC(godot_string_match, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
- GDAPI_FUNC(godot_string_matchn, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
- GDAPI_FUNC(godot_string_md5, godot_string, const uint8_t *p_md5) \
- GDAPI_FUNC(godot_string_num, godot_string, double p_num) \
- GDAPI_FUNC(godot_string_num_int64, godot_string, int64_t p_num, godot_int p_base) \
- GDAPI_FUNC(godot_string_num_int64_capitalized, godot_string, int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex) \
- GDAPI_FUNC(godot_string_num_real, godot_string, double p_num) \
- GDAPI_FUNC(godot_string_num_scientific, godot_string, double p_num) \
- GDAPI_FUNC(godot_string_num_with_decimals, godot_string, double p_num, godot_int p_decimals) \
- GDAPI_FUNC(godot_string_pad_decimals, godot_string, const godot_string *p_self, godot_int p_digits) \
- GDAPI_FUNC(godot_string_pad_zeros, godot_string, const godot_string *p_self, godot_int p_digits) \
- GDAPI_FUNC(godot_string_replace_first, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
- GDAPI_FUNC(godot_string_replace, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
- GDAPI_FUNC(godot_string_replacen, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
- GDAPI_FUNC(godot_string_rfind, godot_int, const godot_string *p_self, godot_string p_what) \
- GDAPI_FUNC(godot_string_rfindn, godot_int, const godot_string *p_self, godot_string p_what) \
- GDAPI_FUNC(godot_string_rfind_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
- GDAPI_FUNC(godot_string_rfindn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
- GDAPI_FUNC(godot_string_rpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
- GDAPI_FUNC(godot_string_rpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
- GDAPI_FUNC(godot_string_similarity, godot_real, const godot_string *p_self, const godot_string *p_string) \
- GDAPI_FUNC(godot_string_sprintf, godot_string, const godot_string *p_self, const godot_array *p_values, godot_bool *p_error) \
- GDAPI_FUNC(godot_string_substr, godot_string, const godot_string *p_self, godot_int p_from, godot_int p_chars) \
- GDAPI_FUNC(godot_string_to_double, double, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_to_float, godot_real, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_to_int, godot_int, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_camelcase_to_underscore, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_camelcase_to_underscore_lowercased, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_capitalize, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_char_to_double, double, const char *p_what) \
- GDAPI_FUNC(godot_string_char_to_int, godot_int, const char *p_what) \
- GDAPI_FUNC(godot_string_wchar_to_int, int64_t, const wchar_t *p_str) \
- GDAPI_FUNC(godot_string_char_to_int_with_len, godot_int, const char *p_what, godot_int p_len) \
- GDAPI_FUNC(godot_string_char_to_int64_with_len, int64_t, const wchar_t *p_str, int p_len) \
- GDAPI_FUNC(godot_string_hex_to_int64, int64_t, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_hex_to_int64_with_prefix, int64_t, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_to_int64, int64_t, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_unicode_char_to_double, double, const wchar_t *p_str, const wchar_t **r_end) \
- GDAPI_FUNC(godot_string_get_slice_count, godot_int, const godot_string *p_self, godot_string p_splitter) \
- GDAPI_FUNC(godot_string_get_slice, godot_string, const godot_string *p_self, godot_string p_splitter, godot_int p_slice) \
- GDAPI_FUNC(godot_string_get_slicec, godot_string, const godot_string *p_self, wchar_t p_splitter, godot_int p_slice) \
- GDAPI_FUNC(godot_string_split, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_allow_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_floats, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_floats_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_floats_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
- GDAPI_FUNC(godot_string_split_floats_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
- GDAPI_FUNC(godot_string_split_ints, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_ints_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
- GDAPI_FUNC(godot_string_split_ints_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
- GDAPI_FUNC(godot_string_split_ints_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
- GDAPI_FUNC(godot_string_split_spaces, godot_array, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_char_lowercase, wchar_t, wchar_t p_char) \
- GDAPI_FUNC(godot_string_char_uppercase, wchar_t, wchar_t p_char) \
- GDAPI_FUNC(godot_string_to_lower, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_to_upper, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_get_basename, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_get_extension, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_left, godot_string, const godot_string *p_self, godot_int p_pos) \
- GDAPI_FUNC(godot_string_ord_at, wchar_t, const godot_string *p_self, godot_int p_idx) \
- GDAPI_FUNC(godot_string_plus_file, godot_string, const godot_string *p_self, const godot_string *p_file) \
- GDAPI_FUNC(godot_string_right, godot_string, const godot_string *p_self, godot_int p_pos) \
- GDAPI_FUNC(godot_string_strip_edges, godot_string, const godot_string *p_self, godot_bool p_left, godot_bool p_right) \
- GDAPI_FUNC(godot_string_strip_escapes, godot_string, const godot_string *p_self) \
- GDAPI_FUNC_VOID(godot_string_erase, godot_string *p_self, godot_int p_pos, godot_int p_chars) \
- GDAPI_FUNC_VOID(godot_string_ascii, godot_string *p_self, char *result) \
- GDAPI_FUNC_VOID(godot_string_ascii_extended, godot_string *p_self, char *result) \
- GDAPI_FUNC_VOID(godot_string_utf8, godot_string *p_self, char *result) \
- GDAPI_FUNC(godot_string_parse_utf8, godot_bool, godot_string *p_self, const char *p_utf8) \
- GDAPI_FUNC(godot_string_parse_utf8_with_len, godot_bool, godot_string *p_self, const char *p_utf8, godot_int p_len) \
- GDAPI_FUNC(godot_string_chars_to_utf8, godot_string, const char *p_utf8) \
- GDAPI_FUNC(godot_string_chars_to_utf8_with_len, godot_string, const char *p_utf8, godot_int p_len) \
- GDAPI_FUNC(godot_string_hash, uint32_t, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_hash64, uint64_t, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_hash_chars, uint32_t, const char *p_cstr) \
- GDAPI_FUNC(godot_string_hash_chars_with_len, uint32_t, const char *p_cstr, godot_int p_len) \
- GDAPI_FUNC(godot_string_hash_utf8_chars, uint32_t, const wchar_t *p_str) \
- GDAPI_FUNC(godot_string_hash_utf8_chars_with_len, uint32_t, const wchar_t *p_str, godot_int p_len) \
- GDAPI_FUNC(godot_string_md5_buffer, godot_pool_byte_array, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_md5_text, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_sha256_buffer, godot_pool_byte_array, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_sha256_text, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_empty, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_get_base_dir, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_get_file, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_humanize_size, godot_string, size_t p_size) \
- GDAPI_FUNC(godot_string_is_abs_path, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_rel_path, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_resource_file, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_path_to, godot_string, const godot_string *p_self, const godot_string *p_path) \
- GDAPI_FUNC(godot_string_path_to_file, godot_string, const godot_string *p_self, const godot_string *p_path) \
- GDAPI_FUNC(godot_string_simplify_path, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_c_escape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_c_escape_multiline, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_c_unescape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_http_escape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_http_unescape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_json_escape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_word_wrap, godot_string, const godot_string *p_self, godot_int p_chars_per_line) \
- GDAPI_FUNC(godot_string_xml_escape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_xml_escape_with_quotes, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_xml_unescape, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_percent_decode, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_percent_encode, godot_string, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_valid_float, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_valid_hex_number, godot_bool, const godot_string *p_self, godot_bool p_with_prefix) \
- GDAPI_FUNC(godot_string_is_valid_html_color, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_valid_identifier, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_valid_integer, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC(godot_string_is_valid_ip_address, godot_bool, const godot_string *p_self) \
- GDAPI_FUNC_VOID(godot_string_destroy, godot_string *p_self) \
- GDAPI_FUNC_VOID(godot_object_destroy, godot_object *p_o) \
- GDAPI_FUNC(godot_global_get_singleton, godot_object *, char *p_name) \
- GDAPI_FUNC(godot_get_stack_bottom, void *) \
- GDAPI_FUNC(godot_method_bind_get_method, godot_method_bind *, const char *p_classname, const char *p_methodname) \
- GDAPI_FUNC_VOID(godot_method_bind_ptrcall, godot_method_bind *p_method_bind, godot_object *p_instance, const void **p_args, void *p_ret) \
- GDAPI_FUNC(godot_method_bind_call, godot_variant, godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error) \
- GDAPI_FUNC(godot_get_class_constructor, godot_class_constructor, const char *p_classname) \
- GDAPI_FUNC(godot_get_global_constants, godot_dictionary) \
- GDAPI_FUNC(godot_alloc, void *, int p_bytes) \
- GDAPI_FUNC(godot_realloc, void *, void *p_ptr, int p_bytes) \
- GDAPI_FUNC_VOID(godot_free, void *p_ptr) \
- GDAPI_FUNC_VOID(godot_print_error, const char *p_description, const char *p_function, const char *p_file, int p_line) \
- GDAPI_FUNC_VOID(godot_print_warning, const char *p_description, const char *p_function, const char *p_file, int p_line) \
- GDAPI_FUNC_VOID(godot_print, const godot_string *p_message) \
- GDAPI_FUNC_VOID(godot_nativescript_register_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
- GDAPI_FUNC_VOID(godot_nativescript_register_tool_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
- GDAPI_FUNC_VOID(godot_nativescript_register_method, void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method) \
- GDAPI_FUNC_VOID(godot_nativescript_register_property, void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func) \
- GDAPI_FUNC_VOID(godot_nativescript_register_signal, void *p_gdnative_handle, const char *p_name, const godot_signal *p_signal) \
- GDAPI_FUNC(godot_nativescript_get_userdata, void *, godot_object *p_instance)
-
-#define GDAPI_FUNC(name, ret_type, ...) \
- ret_type (*name)(__VA_ARGS__);
-#define GDAPI_FUNC_VOID(name, ...) \
- void (*name)(__VA_ARGS__);
-
-typedef struct godot_gdnative_api_struct {
- GODOT_GDNATIVE_API_FUNCTIONS
-} godot_gdnative_api_struct;
-
-#undef GDAPI_FUNC
-#undef GDAPI_FUNC_VOID
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // GODOT_GDNATIVE_API_STRUCT_H
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h
index 5095b7a83e..8baff0fff9 100644
--- a/modules/gdnative/include/nativescript/godot_nativescript.h
+++ b/modules/gdnative/include/nativescript/godot_nativescript.h
@@ -36,42 +36,6 @@
extern "C" {
#endif
-#ifdef GDAPI_BUILT_IN
-#define GDAPI_EXPORT
-#endif
-
-#ifdef _WIN32
-#if defined(GDAPI_EXPORT)
-#define GDCALLINGCONV
-#define GDAPI __declspec(dllexport) GDCALLINGCONV
-#else
-#define GDCALLINGCONV
-#define GDAPI __declspec(dllimport) GDCALLINGCONV
-#endif
-#elif defined(__APPLE__)
-#include "TargetConditionals.h"
-#if TARGET_OS_IPHONE
-#define GDCALLINGCONV __attribute__((visibility("default")))
-#define GDAPI GDCALLINGCONV
-#elif TARGET_OS_MAC
-#define GDCALLINGCONV __attribute__((sysv_abi))
-#define GDAPI GDCALLINGCONV
-#endif
-#else
-#define GDCALLINGCONV __attribute__((sysv_abi, visibility("default")))
-#define GDAPI GDCALLINGCONV
-#endif
-
-// This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
-#ifdef _WIN32
-#define GDN_EXPORT __declspec(dllexport)
-#else
-#define GDN_EXPORT
-#endif
-
-#include <stdbool.h>
-#include <stdint.h>
-
typedef enum {
GODOT_METHOD_RPC_MODE_DISABLED,
GODOT_METHOD_RPC_MODE_REMOTE,
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index 9df2823c35..ce503b62f2 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -1578,7 +1578,7 @@ void GDFunctionState::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_valid", "extended_check"), &GDFunctionState::is_valid, DEFVAL(false));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "_signal_callback", &GDFunctionState::_signal_callback, MethodInfo("_signal_callback"));
- ADD_SIGNAL(MethodInfo("completed", PropertyInfo(Variant::NIL, "result")));
+ ADD_SIGNAL(MethodInfo("completed", PropertyInfo(Variant::NIL, "result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
}
GDFunctionState::GDFunctionState() {
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 4f7545a11d..4e8b67e4e8 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -769,6 +769,8 @@ void GridMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &GridMap::clear);
+ ClassDB::bind_method(D_METHOD("get_used_cells"), &GridMap::get_used_cells);
+
ClassDB::bind_method(D_METHOD("get_meshes"), &GridMap::get_meshes);
BIND_CONSTANT(INVALID_CELL_ITEM);
@@ -807,6 +809,19 @@ float GridMap::get_cell_scale() const {
return cell_scale;
}
+Array GridMap::get_used_cells() const {
+
+ Array a;
+ a.resize(cell_map.size());
+ int i = 0;
+ for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next()) {
+ Vector3 p(E->key().x, E->key().y, E->key().z);
+ a[i++] = p;
+ }
+
+ return a;
+}
+
Array GridMap::get_meshes() {
if (theme.is_null())
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index eb1b215696..296956ff5d 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -223,6 +223,8 @@ public:
void set_cell_scale(float p_scale);
float get_cell_scale() const;
+ Array get_used_cells() const;
+
Array get_meshes();
void clear();
diff --git a/modules/mobile_vr/config.py b/modules/mobile_vr/config.py
index d0156b1b77..cf96c66125 100644
--- a/modules/mobile_vr/config.py
+++ b/modules/mobile_vr/config.py
@@ -3,4 +3,10 @@ def can_build(platform):
return True
def configure(env):
- pass \ No newline at end of file
+ pass
+
+def get_doc_classes():
+ return ["MobileVRInterface"]
+
+def get_doc_path():
+ return "doc_classes"
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
new file mode 100644
index 0000000000..c945a99a9a
--- /dev/null
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generic mobile VR implementation
+ </brief_description>
+ <description>
+ This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect you do need a mobile phone with a gyroscope and accelerometer.
+ Note that even though there is no positional tracking the camera will assume the headset is at a height of 1.85 meters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_display_to_lens" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance between the display and the lens.
+ </description>
+ </method>
+ <method name="get_display_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the width of the LCD screen of the device.
+ </description>
+ </method>
+ <method name="get_iod" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the interocular distance.
+ </description>
+ </method>
+ <method name="get_k1" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the k1 lens constant.
+ </description>
+ </method>
+ <method name="get_k2" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Retuns the k2 lens constant
+ </description>
+ </method>
+ <method name="get_oversample" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the oversampling setting.
+ </description>
+ </method>
+ <method name="set_display_to_lens">
+ <return type="void">
+ </return>
+ <argument index="0" name="display_to_lens" type="float">
+ </argument>
+ <description>
+ Sets the distance between display and the lens.
+ </description>
+ </method>
+ <method name="set_display_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="display_width" type="float">
+ </argument>
+ <description>
+ Sets the width of the LCD screen of the device.
+ </description>
+ </method>
+ <method name="set_iod">
+ <return type="void">
+ </return>
+ <argument index="0" name="iod" type="float">
+ </argument>
+ <description>
+ Sets the interocular distance.
+ </description>
+ </method>
+ <method name="set_k1">
+ <return type="void">
+ </return>
+ <argument index="0" name="k" type="float">
+ </argument>
+ <description>
+ Sets the k1 lens constant.
+ </description>
+ </method>
+ <method name="set_k2">
+ <return type="void">
+ </return>
+ <argument index="0" name="k" type="float">
+ </argument>
+ <description>
+ Sets the k2 lens constant.
+ </description>
+ </method>
+ <method name="set_oversample">
+ <return type="void">
+ </return>
+ <argument index="0" name="oversample" type="float">
+ </argument>
+ <description>
+ Sets the oversampling setting.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="display_to_lens" type="float" setter="set_display_to_lens" getter="get_display_to_lens">
+ The distance between the display and the lenses inside of the device in centimeters.
+ </member>
+ <member name="display_width" type="float" setter="set_display_width" getter="get_display_width">
+ The width of the display in centimeters.
+ </member>
+ <member name="iod" type="float" setter="set_iod" getter="get_iod">
+ The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.
+ </member>
+ <member name="k1" type="float" setter="set_k1" getter="get_k1">
+ The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect.
+ </member>
+ <member name="k2" type="float" setter="set_k2" getter="get_k2">
+ The k2 lens factor, see k1.
+ </member>
+ <member name="oversample" type="float" setter="set_oversample" getter="get_oversample">
+ The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/modules/mobile_vr/mobile_interface.cpp b/modules/mobile_vr/mobile_interface.cpp
index f5c9bccaba..eb87bb2cf0 100644
--- a/modules/mobile_vr/mobile_interface.cpp
+++ b/modules/mobile_vr/mobile_interface.cpp
@@ -37,6 +37,10 @@ StringName MobileVRInterface::get_name() const {
return "Native mobile";
};
+int MobileVRInterface::get_capabilities() const {
+ return ARVRInterface::ARVR_STEREO;
+};
+
Vector3 MobileVRInterface::scale_magneto(const Vector3 &p_magnetometer) {
// Our magnetometer doesn't give us nice clean data.
// Well it may on Mac OS X because we're getting a calibrated value in the current implementation but Android we're getting raw data.
@@ -166,6 +170,8 @@ void MobileVRInterface::set_position_from_sensors() {
rotate.rotate(orientation.get_axis(1), gyro.y * delta_time);
rotate.rotate(orientation.get_axis(2), gyro.z * delta_time);
orientation = rotate * orientation;
+
+ tracking_state = ARVRInterface::ARVR_NORMAL_TRACKING;
};
///@TODO improve this, the magnetometer is very fidgity sometimes flipping the axis for no apparent reason (probably a bug on my part)
@@ -176,6 +182,8 @@ void MobileVRInterface::set_position_from_sensors() {
Quat acc_mag_quat(combine_acc_mag(grav, magneto));
transform_quat = transform_quat.slerp(acc_mag_quat, 0.1);
orientation = Basis(transform_quat);
+
+ tracking_state = ARVRInterface::ARVR_NORMAL_TRACKING;
} else if (has_grav) {
// use gravity vector to make sure down is down...
// transform gravity into our world space
@@ -273,21 +281,6 @@ real_t MobileVRInterface::get_k2() const {
return k2;
};
-bool MobileVRInterface::is_installed() {
- // we don't have any middle ware here, if we have our interface, we can use it
- return true;
-};
-
-bool MobileVRInterface::hmd_is_present() {
- // our device is our HMD
- return true;
-};
-
-bool MobileVRInterface::supports_hmd() {
- // our device is our HMD
- return true;
-};
-
bool MobileVRInterface::is_stereo() {
// needs stereo...
return true;
@@ -461,11 +454,11 @@ MobileVRInterface::MobileVRInterface() {
// Just set some defaults for these. At some point we need to look at adding a lookup table for common device + headset combos and/or support reading cardboard QR codes
eye_height = 1.85;
intraocular_dist = 6.0;
- display_width = 13.0;
+ display_width = 14.5;
display_to_lens = 4.0;
oversample = 1.5;
- k1 = 0.22;
- k2 = 0.23;
+ k1 = 0.215;
+ k2 = 0.215;
last_ticks = 0;
// create our shader stuff
diff --git a/modules/mobile_vr/mobile_interface.h b/modules/mobile_vr/mobile_interface.h
index dfe3cd200e..6a5e01c163 100644
--- a/modules/mobile_vr/mobile_interface.h
+++ b/modules/mobile_vr/mobile_interface.h
@@ -131,10 +131,7 @@ public:
real_t get_k2() const;
virtual StringName get_name() const;
-
- virtual bool is_installed();
- virtual bool hmd_is_present();
- virtual bool supports_hmd();
+ virtual int get_capabilities() const;
virtual bool is_initialized();
virtual bool initialize();
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 6f9e7f49df..7de90dfbc3 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1201,8 +1201,6 @@ bool CSharpScript::_update_exports() {
exported_members_cache.clear();
exported_members_defval_cache.clear();
- const Vector<GDMonoField *> &fields = script_class->get_all_fields();
-
// We are creating a temporary new instance of the class here to get the default value
// TODO Workaround. Should be replaced with IL opcodes analysis
@@ -1226,36 +1224,47 @@ bool CSharpScript::_update_exports() {
return false;
}
- for (int i = 0; i < fields.size(); i++) {
- GDMonoField *field = fields[i];
+ GDMonoClass *top = script_class;
- if (field->is_static() || field->get_visibility() != GDMono::PUBLIC)
- continue;
+ while (top && top != native) {
+ const Vector<GDMonoField *> &fields = top->get_all_fields();
+
+ for (int i = 0; i < fields.size(); i++) {
+ GDMonoField *field = fields[i];
+
+ if (field->is_static() || field->get_visibility() != GDMono::PUBLIC)
+ continue;
- String name = field->get_name();
- StringName cname = name;
+ String name = field->get_name();
+ StringName cname = name;
- Variant::Type type = GDMonoMarshal::managed_to_variant_type(field->get_type());
+ if (member_info.has(cname))
+ continue;
- if (field->has_attribute(CACHED_CLASS(ExportAttribute))) {
- MonoObject *attr = field->get_attribute(CACHED_CLASS(ExportAttribute));
+ Variant::Type type = GDMonoMarshal::managed_to_variant_type(field->get_type());
- // Field has Export attribute
- int hint = CACHED_FIELD(ExportAttribute, hint)->get_int_value(attr);
- String hint_string = CACHED_FIELD(ExportAttribute, hint_string)->get_string_value(attr);
- int usage = CACHED_FIELD(ExportAttribute, usage)->get_int_value(attr);
+ if (field->has_attribute(CACHED_CLASS(ExportAttribute))) {
+ MonoObject *attr = field->get_attribute(CACHED_CLASS(ExportAttribute));
- PropertyInfo prop_info = PropertyInfo(type, name, PropertyHint(hint), hint_string, PropertyUsageFlags(usage));
+ // Field has Export attribute
+ int hint = CACHED_FIELD(ExportAttribute, hint)->get_int_value(attr);
+ String hint_string = CACHED_FIELD(ExportAttribute, hint_string)->get_string_value(attr);
+ int usage = CACHED_FIELD(ExportAttribute, usage)->get_int_value(attr);
- member_info[cname] = prop_info;
- exported_members_cache.push_back(prop_info);
+ PropertyInfo prop_info = PropertyInfo(type, name, PropertyHint(hint), hint_string, PropertyUsageFlags(usage));
- if (tmp_object) {
- exported_members_defval_cache[cname] = GDMonoMarshal::mono_object_to_variant(field->get_value(tmp_object));
+ member_info[cname] = prop_info;
+ exported_members_cache.push_back(prop_info);
+
+ if (tmp_object) {
+ exported_members_defval_cache[cname] = GDMonoMarshal::mono_object_to_variant(field->get_value(tmp_object));
+ }
+ } else {
+ member_info[cname] = PropertyInfo(type, name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_SCRIPT_VARIABLE);
}
- } else {
- member_info[cname] = PropertyInfo(type, name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_SCRIPT_VARIABLE);
}
+
+ top = top->get_parent_class();
}
}
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp
index 1015c8658d..1bad8a3f85 100644
--- a/modules/mono/editor/godotsharp_builds.cpp
+++ b/modules/mono/editor/godotsharp_builds.cpp
@@ -352,8 +352,8 @@ GodotSharpBuilds::GodotSharpBuilds() {
// Build tool settings
EditorSettings *ed_settings = EditorSettings::get_singleton();
- if (!ed_settings->has("mono/builds/build_tool")) {
- ed_settings->set("mono/builds/build_tool", MSBUILD);
+ if (!ed_settings->has_setting("mono/builds/build_tool")) {
+ ed_settings->set_setting("mono/builds/build_tool", MSBUILD);
}
ed_settings->add_property_hint(PropertyInfo(Variant::INT, "mono/builds/build_tool", PROPERTY_HINT_ENUM, "MSBuild (System),MSBuild (Mono),xbuild"));
}
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index 5aaf029495..30e7653256 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -237,8 +237,8 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
// External editor settings
EditorSettings *ed_settings = EditorSettings::get_singleton();
- if (!ed_settings->has("mono/editor/external_editor")) {
- ed_settings->set("mono/editor/external_editor", EDITOR_NONE);
+ if (!ed_settings->has_setting("mono/editor/external_editor")) {
+ ed_settings->set_setting("mono/editor/external_editor", EDITOR_NONE);
}
ed_settings->add_property_hint(PropertyInfo(Variant::INT, "mono/editor/external_editor", PROPERTY_HINT_ENUM, "None,MonoDevelop,Visual Studio,Visual Studio Code"));
}
diff --git a/modules/mono/mono_reg_utils.py b/modules/mono/mono_reg_utils.py
index 6f1620ff49..e9988625f5 100644
--- a/modules/mono/mono_reg_utils.py
+++ b/modules/mono/mono_reg_utils.py
@@ -1,7 +1,11 @@
import os
if os.name == 'nt':
- import _winreg as winreg
+ import sys
+ if sys.version_info < (3,):
+ import _winreg as winreg
+ else:
+ import winreg
def _reg_open_key(key, subkey):
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 2a556b5a52..48145495e4 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -125,6 +125,7 @@ void VisualScriptNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_visual_script"), &VisualScriptNode::get_visual_script);
ClassDB::bind_method(D_METHOD("set_default_input_value", "port_idx", "value"), &VisualScriptNode::set_default_input_value);
ClassDB::bind_method(D_METHOD("get_default_input_value", "port_idx"), &VisualScriptNode::get_default_input_value);
+ ClassDB::bind_method(D_METHOD("ports_changed_notify"), &VisualScriptNode::ports_changed_notify);
ClassDB::bind_method(D_METHOD("_set_default_input_values", "values"), &VisualScriptNode::_set_default_input_values);
ClassDB::bind_method(D_METHOD("_get_default_input_values"), &VisualScriptNode::_get_default_input_values);
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 985f8a8d0e..47ef0182dc 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -331,44 +331,83 @@ public:
VisualScriptEditorVariableEdit() { undo_redo = NULL; }
};
-static Color _color_from_type(Variant::Type p_type) {
+static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
Color color;
- switch (p_type) {
- case Variant::NIL: color = Color::html("69ecbd"); break;
-
- case Variant::BOOL: color = Color::html("8da6f0"); break;
- case Variant::INT: color = Color::html("7dc6ef"); break;
- case Variant::REAL: color = Color::html("61daf4"); break;
- case Variant::STRING: color = Color::html("6ba7ec"); break;
-
- case Variant::VECTOR2: color = Color::html("bd91f1"); break;
- case Variant::RECT2: color = Color::html("f191a5"); break;
- case Variant::VECTOR3: color = Color::html("d67dee"); break;
- case Variant::TRANSFORM2D: color = Color::html("c4ec69"); break;
- case Variant::PLANE: color = Color::html("f77070"); break;
- case Variant::QUAT: color = Color::html("ec69a3"); break;
- case Variant::RECT3: color = Color::html("ee7991"); break;
- case Variant::BASIS: color = Color::html("e3ec69"); break;
- case Variant::TRANSFORM: color = Color::html("f6a86e"); break;
-
- case Variant::COLOR: color = Color::html("9dff70"); break;
- case Variant::NODE_PATH: color = Color::html("6993ec"); break;
- case Variant::_RID: color = Color::html("69ec9a"); break;
- case Variant::OBJECT: color = Color::html("79f3e8"); break;
- case Variant::DICTIONARY: color = Color::html("77edb1"); break;
-
- case Variant::ARRAY: color = Color::html("e0e0e0"); break;
- case Variant::POOL_BYTE_ARRAY: color = Color::html("aaf4c8"); break;
- case Variant::POOL_INT_ARRAY: color = Color::html("afdcf5"); break;
- case Variant::POOL_REAL_ARRAY: color = Color::html("97e7f8"); break;
- case Variant::POOL_STRING_ARRAY: color = Color::html("9dc4f2"); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color::html("d1b3f5"); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color::html("df9bf2"); break;
- case Variant::POOL_COLOR_ARRAY: color = Color::html("e9ff97"); break;
-
- default:
- color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
- }
+ if (dark_theme)
+ switch (p_type) {
+ case Variant::NIL: color = Color::html("#69ecbd"); break;
+
+ case Variant::BOOL: color = Color::html("#8da6f0"); break;
+ case Variant::INT: color = Color::html("#7dc6ef"); break;
+ case Variant::REAL: color = Color::html("#61daf4"); break;
+ case Variant::STRING: color = Color::html("#6ba7ec"); break;
+
+ case Variant::VECTOR2: color = Color::html("#bd91f1"); break;
+ case Variant::RECT2: color = Color::html("#f191a5"); break;
+ case Variant::VECTOR3: color = Color::html("#d67dee"); break;
+ case Variant::TRANSFORM2D: color = Color::html("#c4ec69"); break;
+ case Variant::PLANE: color = Color::html("#f77070"); break;
+ case Variant::QUAT: color = Color::html("#ec69a3"); break;
+ case Variant::RECT3: color = Color::html("#ee7991"); break;
+ case Variant::BASIS: color = Color::html("#e3ec69"); break;
+ case Variant::TRANSFORM: color = Color::html("#f6a86e"); break;
+
+ case Variant::COLOR: color = Color::html("#9dff70"); break;
+ case Variant::NODE_PATH: color = Color::html("#6993ec"); break;
+ case Variant::_RID: color = Color::html("#69ec9a"); break;
+ case Variant::OBJECT: color = Color::html("#79f3e8"); break;
+ case Variant::DICTIONARY: color = Color::html("#77edb1"); break;
+
+ case Variant::ARRAY: color = Color::html("#e0e0e0"); break;
+ case Variant::POOL_BYTE_ARRAY: color = Color::html("#aaf4c8"); break;
+ case Variant::POOL_INT_ARRAY: color = Color::html("#afdcf5"); break;
+ case Variant::POOL_REAL_ARRAY: color = Color::html("#97e7f8"); break;
+ case Variant::POOL_STRING_ARRAY: color = Color::html("#9dc4f2"); break;
+ case Variant::POOL_VECTOR2_ARRAY: color = Color::html("#d1b3f5"); break;
+ case Variant::POOL_VECTOR3_ARRAY: color = Color::html("#df9bf2"); break;
+ case Variant::POOL_COLOR_ARRAY: color = Color::html("#e9ff97"); break;
+
+ default:
+ color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
+ }
+ else
+ switch (p_type) {
+ case Variant::NIL: color = Color::html("#25e3a0"); break;
+
+ case Variant::BOOL: color = Color::html("#6d8eeb"); break;
+ case Variant::INT: color = Color::html("#4fb2e9"); break;
+ case Variant::REAL: color = Color::html("#27ccf0"); break;
+ case Variant::STRING: color = Color::html("#4690e7"); break;
+
+ case Variant::VECTOR2: color = Color::html("#ad76ee"); break;
+ case Variant::RECT2: color = Color::html("#ee758e"); break;
+ case Variant::VECTOR3: color = Color::html("#dc6aed"); break;
+ case Variant::TRANSFORM2D: color = Color::html("#96ce1a"); break;
+ case Variant::PLANE: color = Color::html("#f77070"); break;
+ case Variant::QUAT: color = Color::html("#ec69a3"); break;
+ case Variant::RECT3: color = Color::html("#ee7991"); break;
+ case Variant::BASIS: color = Color::html("#b2bb19"); break;
+ case Variant::TRANSFORM: color = Color::html("#f49047"); break;
+
+ case Variant::COLOR: color = Color::html("#3cbf00"); break;
+ case Variant::NODE_PATH: color = Color::html("#6993ec"); break;
+ case Variant::_RID: color = Color::html("#2ce573"); break;
+ case Variant::OBJECT: color = Color::html("#12d5c3"); break;
+ case Variant::DICTIONARY: color = Color::html("#57e99f"); break;
+
+ case Variant::ARRAY: color = Color::html("#737373"); break;
+ case Variant::POOL_BYTE_ARRAY: color = Color::html("#61ea98"); break;
+ case Variant::POOL_INT_ARRAY: color = Color::html("#61baeb"); break;
+ case Variant::POOL_REAL_ARRAY: color = Color::html("#40d3f2"); break;
+ case Variant::POOL_STRING_ARRAY: color = Color::html("#609fea"); break;
+ case Variant::POOL_VECTOR2_ARRAY: color = Color::html("#9d5dea"); break;
+ case Variant::POOL_VECTOR3_ARRAY: color = Color::html("#ca5aea"); break;
+ case Variant::POOL_COLOR_ARRAY: color = Color::html("#92ba00"); break;
+
+ default:
+ color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.3, 0.3);
+ }
+
return color;
}
@@ -531,7 +570,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Color c = sbf->get_border_color(MARGIN_TOP);
c.a = 1;
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.5 ? Color(1.0, 1.0, 1.0) : Color(0, 0, 0);
+ Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
mono_color.a = 0.85;
c = mono_color;
}
@@ -542,10 +581,12 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_style_override("frame", sbf);
}
+ const Color mono_color = get_color("mono_color", "Editor");
+
int slot_idx = 0;
bool single_seq_output = node->get_output_sequence_port_count() == 1 && node->get_output_sequence_port_text(0) == String();
- gnode->set_slot(0, node->has_input_sequence_port(), TYPE_SEQUENCE, Color(1, 1, 1, 1), single_seq_output, TYPE_SEQUENCE, Color(1, 1, 1, 1), seq_port, seq_port);
+ gnode->set_slot(0, node->has_input_sequence_port(), TYPE_SEQUENCE, mono_color, single_seq_output, TYPE_SEQUENCE, mono_color, seq_port, seq_port);
gnode->set_offset(pos * EDSCALE);
slot_idx++;
@@ -562,7 +603,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
text2->set_text(node->get_output_sequence_port_text(i));
text2->set_align(Label::ALIGN_RIGHT);
gnode->add_child(text2);
- gnode->set_slot(slot_idx, false, 0, Color(), true, TYPE_SEQUENCE, Color(1, 1, 1, 1), seq_port, seq_port);
+ gnode->set_slot(slot_idx, false, 0, Color(), true, TYPE_SEQUENCE, mono_color, seq_port, seq_port);
slot_idx++;
}
}
@@ -677,10 +718,11 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_child(hbc);
+ bool dark_theme = get_constant("dark_theme", "Editor");
if (i < mixed_seq_ports) {
- gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type), true, TYPE_SEQUENCE, Color(1, 1, 1, 1), Ref<Texture>(), seq_port);
+ gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type, dark_theme), true, TYPE_SEQUENCE, mono_color, Ref<Texture>(), seq_port);
} else {
- gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type), right_ok, right_type, _color_from_type(right_type));
+ gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type, dark_theme), right_ok, right_type, _color_from_type(right_type, dark_theme));
}
slot_idx++;
@@ -710,7 +752,7 @@ void VisualScriptEditor::_update_members() {
functions->set_text(0, TTR("Functions:"));
functions->add_button(0, Control::get_icon("Override", "EditorIcons"), 1);
functions->add_button(0, Control::get_icon("Add", "EditorIcons"), 0);
- functions->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ functions->set_custom_color(0, Control::get_color("mono_color", "Editor"));
List<StringName> func_names;
script->get_function_list(&func_names);
@@ -719,13 +761,7 @@ void VisualScriptEditor::_update_members() {
ti->set_text(0, E->get());
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0,Control::get_icon("Edit","EditorIcons"),0); function arguments are in the node now
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
- if (E->get() == edited_func) {
- ti->set_custom_bg_color(0, get_color("prop_category", "Editor"));
- ti->set_custom_color(0, Color(1, 1, 1, 1));
- }
if (selected == E->get())
ti->select(0);
}
@@ -734,7 +770,7 @@ void VisualScriptEditor::_update_members() {
variables->set_selectable(0, false);
variables->set_text(0, TTR("Variables:"));
variables->add_button(0, Control::get_icon("Add", "EditorIcons"));
- variables->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ variables->set_custom_color(0, Control::get_color("mono_color", "Editor"));
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("MiniVariant", "EditorIcons"),
@@ -778,8 +814,6 @@ void VisualScriptEditor::_update_members() {
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0, Control::get_icon("Edit", "EditorIcons"), 0);
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
if (selected == E->get())
ti->select(0);
@@ -789,7 +823,7 @@ void VisualScriptEditor::_update_members() {
_signals->set_selectable(0, false);
_signals->set_text(0, TTR("Signals:"));
_signals->add_button(0, Control::get_icon("Add", "EditorIcons"));
- _signals->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ _signals->set_custom_color(0, Control::get_color("mono_color", "Editor"));
List<StringName> signal_names;
script->get_custom_signal_list(&signal_names);
@@ -798,8 +832,6 @@ void VisualScriptEditor::_update_members() {
ti->set_text(0, E->get());
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0, Control::get_icon("Edit", "EditorIcons"), 0);
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
if (selected == E->get())
ti->select(0);
@@ -2767,18 +2799,30 @@ void VisualScriptEditor::_notification(int p_what) {
variable_editor->connect("changed", this, "_update_members");
signal_editor->connect("changed", this, "_update_members");
+ Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
+
+ bool dark_theme = tm->get_constant("dark_theme", "Editor");
+
List<Pair<String, Color> > colors;
- colors.push_back(Pair<String, Color>("flow_control", Color::html("#f4f4f4")));
- colors.push_back(Pair<String, Color>("functions", Color::html("#f58581")));
- colors.push_back(Pair<String, Color>("data", Color::html("#80f6cf")));
- colors.push_back(Pair<String, Color>("operators", Color::html("#ab97df")));
- colors.push_back(Pair<String, Color>("custom", Color::html("#80bbf6")));
- colors.push_back(Pair<String, Color>("constants", Color::html("#f680b0")));
+ if (dark_theme) {
+ colors.push_back(Pair<String, Color>("flow_control", Color::html("#f4f4f4")));
+ colors.push_back(Pair<String, Color>("functions", Color::html("#f58581")));
+ colors.push_back(Pair<String, Color>("data", Color::html("#80f6cf")));
+ colors.push_back(Pair<String, Color>("operators", Color::html("#ab97df")));
+ colors.push_back(Pair<String, Color>("custom", Color::html("#80bbf6")));
+ colors.push_back(Pair<String, Color>("constants", Color::html("#f680b0")));
+ } else {
+ colors.push_back(Pair<String, Color>("flow_control", Color::html("#424242")));
+ colors.push_back(Pair<String, Color>("functions", Color::html("#f26661")));
+ colors.push_back(Pair<String, Color>("data", Color::html("#13bb83")));
+ colors.push_back(Pair<String, Color>("operators", Color::html("#8265d0")));
+ colors.push_back(Pair<String, Color>("custom", Color::html("#4ea0f2")));
+ colors.push_back(Pair<String, Color>("constants", Color::html("#f02f7d")));
+ }
for (List<Pair<String, Color> >::Element *E = colors.front(); E; E = E->next()) {
- print_line(E->get().first);
- Ref<StyleBoxFlat> sb = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("frame", "GraphNode");
- if (sb != NULL) {
+ Ref<StyleBoxFlat> sb = tm->get_stylebox("frame", "GraphNode");
+ if (!sb.is_null()) {
Ref<StyleBoxFlat> frame_style = sb->duplicate();
Color c = sb->get_border_color(MARGIN_TOP);
Color cn = E->get().second;
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 16aec76e57..5a34fc3cd9 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1109,7 +1109,7 @@ void VisualScriptConstant::_bind_methods() {
}
ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt), "set_constant_type", "get_constant_type");
- ADD_PROPERTY(PropertyInfo(Variant::NIL, "value"), "set_constant_value", "get_constant_value");
+ ADD_PROPERTY(PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "set_constant_value", "get_constant_value");
}
class VisualScriptNodeInstanceConstant : public VisualScriptNodeInstance {
@@ -1598,7 +1598,7 @@ VisualScriptNodeInstance *VisualScriptClassConstant::instance(VisualScriptInstan
void VisualScriptClassConstant::_validate_property(PropertyInfo &property) const {
- if (property.name == "constant/constant") {
+ if (property.name == "constant") {
List<String> constants;
ClassDB::get_integer_constant_list(base_type, &constants, true);
@@ -1727,7 +1727,7 @@ VisualScriptNodeInstance *VisualScriptBasicTypeConstant::instance(VisualScriptIn
void VisualScriptBasicTypeConstant::_validate_property(PropertyInfo &property) const {
- if (property.name == "constant/constant") {
+ if (property.name == "constant") {
List<StringName> constants;
Variant::get_numeric_constants_for_type(type, &constants);
@@ -2689,7 +2689,7 @@ VisualScriptNodeInstance *VisualScriptCustomNode::instance(VisualScriptInstance
}
void VisualScriptCustomNode::_script_changed() {
- ports_changed_notify();
+ call_deferred("ports_changed_notify");
}
void VisualScriptCustomNode::_bind_methods() {
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index e3615e2298..9fe1f291d6 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -871,7 +871,7 @@ class EditorExportAndroid : public EditorExportPlatform {
String lang = str.substr(str.find_last("-") + 1, str.length()).replace("-", "_");
String prop = "application/config/name_" + lang;
- if (ProjectSettings::get_singleton()->has(prop)) {
+ if (ProjectSettings::get_singleton()->has_setting(prop)) {
str = ProjectSettings::get_singleton()->get(prop);
} else {
str = get_project_name(package_name);
diff --git a/platform/android/file_access_android.cpp b/platform/android/file_access_android.cpp
index c7b0d9afcd..0fdf9002d7 100644
--- a/platform/android/file_access_android.cpp
+++ b/platform/android/file_access_android.cpp
@@ -146,6 +146,11 @@ Error FileAccessAndroid::get_error() const {
return eof ? ERR_FILE_EOF : OK; //not sure what else it may happen
}
+void FileAccessAndroid::flush() {
+
+ ERR_FAIL();
+}
+
void FileAccessAndroid::store_8(uint8_t p_dest) {
ERR_FAIL();
diff --git a/platform/android/file_access_android.h b/platform/android/file_access_android.h
index beccf494dd..c8fedbe684 100644
--- a/platform/android/file_access_android.h
+++ b/platform/android/file_access_android.h
@@ -63,6 +63,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_path); ///< return true if a file exists
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index fe934c89fb..980afd8f46 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -157,6 +157,9 @@ Error FileAccessJAndroid::get_error() const {
return OK;
}
+void FileAccessJAndroid::flush() {
+}
+
void FileAccessJAndroid::store_8(uint8_t p_dest) {
}
diff --git a/platform/android/file_access_jandroid.h b/platform/android/file_access_jandroid.h
index 75a6a21335..368d2c98fa 100644
--- a/platform/android/file_access_jandroid.h
+++ b/platform/android/file_access_jandroid.h
@@ -67,6 +67,7 @@ public:
virtual Error get_error() const; ///< get last error
+ virtual void flush();
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String &p_path); ///< return true if a file exists
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index 53a90e4cfe..053dfa631a 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -277,6 +277,21 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
edittext.setView(mView);
io.setEdit(edittext);
+ final Godot godot = this;
+ mView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ Point fullSize = new Point();
+ godot.getWindowManager().getDefaultDisplay().getSize(fullSize);
+ Rect gameSize = new Rect();
+ godot.mView.getWindowVisibleDisplayFrame(gameSize);
+
+ final int keyboardHeight = fullSize.y - gameSize.bottom;
+ Log.d("GODOT", "setVirtualKeyboardHeight: " + keyboardHeight);
+ GodotLib.setVirtualKeyboardHeight(keyboardHeight);
+ }
+ });
+
// Ad layout
adLayout = new RelativeLayout(this);
adLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
diff --git a/platform/android/java/src/org/godotengine/godot/GodotLib.java b/platform/android/java/src/org/godotengine/godot/GodotLib.java
index 47a690140f..e0ed4cd38c 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotLib.java
@@ -69,4 +69,6 @@ public class GodotLib {
public static native void callobject(int p_ID, String p_method, Object[] p_params);
public static native void calldeferred(int p_ID, String p_method, Object[] p_params);
+ public static native void setVirtualKeyboardHeight(int p_height);
+
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 509d1bf123..6819a7e20f 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -754,6 +754,18 @@ static void _alert(const String &p_message, const String &p_title) {
env->CallVoidMethod(_godot_instance, _alertDialog, jStrMessage, jStrTitle);
}
+// volatile because it can be changed from non-main thread and we need to
+// ensure the change is immediately visible to other threads.
+static volatile int virtual_keyboard_height;
+
+static int _get_vk_height() {
+ return virtual_keyboard_height;
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jobject obj, jint p_height) {
+ virtual_keyboard_height = p_height;
+}
+
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion) {
__android_log_print(ANDROID_LOG_INFO, "godot", "**INIT EVENT! - %p\n", env);
@@ -824,7 +836,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
AudioDriverAndroid::setup(gob);
}
- os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, p_use_apk_expansion);
+ os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _get_vk_height, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, p_use_apk_expansion);
os_android->set_need_reload_hooks(p_need_reload_hook);
char wd[500];
@@ -841,7 +853,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
static void _initialize_java_modules() {
- if (!ProjectSettings::get_singleton()->has("android/modules")) {
+ if (!ProjectSettings::get_singleton()->has_setting("android/modules")) {
print_line("ANDROID MODULES: Nothing to load, aborting");
return;
}
diff --git a/platform/android/java_glue.h b/platform/android/java_glue.h
index ec8ae9a0a6..0aa2489813 100644
--- a/platform/android/java_glue.h
+++ b/platform/android/java_glue.h
@@ -59,6 +59,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, j
JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jobject obj, jstring path);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jobject obj, jint p_height);
}
#endif
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index dbea2d7531..473a093077 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -47,6 +47,15 @@
#include "file_access_jandroid.h"
#endif
+class AndroidLogger : public Logger {
+public:
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) {
+ __android_log_vprint(p_err ? ANDROID_LOG_ERROR : ANDROID_LOG_INFO, "godot", p_format, p_list);
+ }
+
+ virtual ~AndroidLogger() {}
+};
+
int OS_Android::get_video_driver_count() const {
return 1;
@@ -111,6 +120,13 @@ void OS_Android::initialize_core() {
#endif
}
+void OS_Android::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(AndroidLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
+}
+
void OS_Android::set_opengl_extensions(const char *p_gl_extensions) {
ERR_FAIL_COND(!p_gl_extensions);
@@ -162,23 +178,9 @@ void OS_Android::delete_main_loop() {
}
void OS_Android::finalize() {
-
memdelete(input);
}
-void OS_Android::vprint(const char *p_format, va_list p_list, bool p_stderr) {
-
- __android_log_vprint(p_stderr ? ANDROID_LOG_ERROR : ANDROID_LOG_INFO, "godot", p_format, p_list);
-}
-
-void OS_Android::print(const char *p_format, ...) {
-
- va_list argp;
- va_start(argp, p_format);
- __android_log_vprint(ANDROID_LOG_INFO, "godot", p_format, argp);
- va_end(argp);
-}
-
void OS_Android::alert(const String &p_alert, const String &p_title) {
//print("ALERT: %s\n", p_alert.utf8().get_data());
@@ -517,6 +519,15 @@ bool OS_Android::has_virtual_keyboard() const {
return true;
}
+int OS_Android::get_virtual_keyboard_height() const {
+ if (get_virtual_keyboard_height_func) {
+ return get_virtual_keyboard_height_func();
+ }
+
+ ERR_PRINT("Cannot obtain virtual keyboard height.");
+ return 0;
+}
+
void OS_Android::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
if (show_virtual_keyboard_func) {
@@ -702,7 +713,7 @@ bool OS_Android::_check_internal_feature_support(const String &p_feature) {
return p_feature == "mobile" || p_feature == "etc" || p_feature == "etc2"; //TODO support etc2 only if GLES3 driver is selected
}
-OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion) {
+OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion) {
use_apk_expansion = p_use_apk_expansion;
default_videomode.width = 800;
@@ -732,11 +743,14 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURI
show_virtual_keyboard_func = p_show_vk;
hide_virtual_keyboard_func = p_hide_vk;
+ get_virtual_keyboard_height_func = p_vk_height_func;
set_screen_orientation_func = p_screen_orient;
set_keep_screen_on_func = p_set_keep_screen_on_func;
alert_func = p_alert_func;
use_reload_hooks = false;
+
+ _set_logger(memnew(AndroidLogger));
}
OS_Android::~OS_Android() {
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 119c14bff3..0c78c198a8 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -67,6 +67,7 @@ typedef void (*VideoPauseFunc)();
typedef void (*VideoStopFunc)();
typedef void (*SetKeepScreenOnFunc)(bool p_enabled);
typedef void (*AlertFunc)(const String &, const String &);
+typedef int (*VirtualKeyboardHeightFunc)();
class OS_Android : public OS_Unix {
public:
@@ -126,6 +127,7 @@ private:
GetScreenDPIFunc get_screen_dpi_func;
ShowVirtualKeyboardFunc show_virtual_keyboard_func;
HideVirtualKeyboardFunc hide_virtual_keyboard_func;
+ VirtualKeyboardHeightFunc get_virtual_keyboard_height_func;
SetScreenOrientationFunc set_screen_orientation_func;
GetUniqueIDFunc get_unique_id_func;
GetSystemDirFunc get_system_dir_func;
@@ -149,6 +151,7 @@ public:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
@@ -161,8 +164,6 @@ public:
static OS *get_singleton();
- virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false);
- virtual void print(const char *p_format, ...);
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
virtual void set_mouse_show(bool p_show);
@@ -202,6 +203,7 @@ public:
virtual bool has_virtual_keyboard() const;
virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2());
virtual void hide_virtual_keyboard();
+ virtual int get_virtual_keyboard_height() const;
void set_opengl_extensions(const char *p_gl_extensions);
void set_display_size(Size2 p_size);
@@ -241,7 +243,7 @@ public:
void joy_connection_changed(int p_device, bool p_connected, String p_name);
virtual bool _check_internal_feature_support(const String &p_feature);
- OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion);
+ OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion);
~OS_Android();
};
diff --git a/platform/iphone/gl_view.h b/platform/iphone/gl_view.h
index a9fd8d5711..f7309396c6 100644
--- a/platform/iphone/gl_view.h
+++ b/platform/iphone/gl_view.h
@@ -100,6 +100,8 @@
- (void)destroyFramebuffer;
- (void)audioRouteChangeListenerCallback:(NSNotification *)notification;
+- (void)keyboardOnScreen:(NSNotification *)notification;
+- (void)keyboardHidden:(NSNotification *)notification;
@property NSTimeInterval animationInterval;
@property(nonatomic, assign) BOOL useCADisplayLink;
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index 3e206c3a2c..02da706cc5 100644
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -63,6 +63,7 @@ void _pause_video();
void _focus_out_video();
void _unpause_video();
void _stop_video();
+CGFloat _points_to_pixels(CGFloat);
void _show_keyboard(String p_existing) {
keyboard_text = p_existing;
@@ -174,6 +175,19 @@ void _stop_video() {
video_playing = false;
}
+CGFloat _points_to_pixels(CGFloat points) {
+ float pixelPerInch;
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+ pixelPerInch = 132;
+ } else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
+ pixelPerInch = 163;
+ } else {
+ pixelPerInch = 160;
+ }
+ CGFloat pointsPerInch = 72.0;
+ return (points / pointsPerInch * pixelPerInch);
+}
+
@implementation GLView
@synthesize animationInterval;
@@ -537,6 +551,20 @@ static void clear_touches() {
[self resignFirstResponder];
};
+- (void)keyboardOnScreen:(NSNotification *)notification {
+ NSDictionary *info = notification.userInfo;
+ NSValue *value = info[UIKeyboardFrameEndUserInfoKey];
+
+ CGRect rawFrame = [value CGRectValue];
+ CGRect keyboardFrame = [self convertRect:rawFrame fromView:nil];
+
+ OSIPhone::get_singleton()->set_virtual_keyboard_height(_points_to_pixels(keyboardFrame.size.height));
+}
+
+- (void)keyboardHidden:(NSNotification *)notification {
+ OSIPhone::get_singleton()->set_virtual_keyboard_height(0);
+}
+
- (void)deleteBackward {
if (keyboard_text.length())
keyboard_text.erase(keyboard_text.length() - 1, 1);
@@ -606,6 +634,18 @@ static void clear_touches() {
name:AVAudioSessionRouteChangeNotification
object:nil];
+ printf("******** adding observer for keyboard show/hide\n");
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(keyboardOnScreen:)
+ name:UIKeyboardDidShowNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(keyboardHidden:)
+ name:UIKeyboardDidHideNotification
+ object:nil];
+
//self.autoresizesSubviews = YES;
//[self setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth];
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 086cbe5010..219e93facf 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -41,6 +41,7 @@
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
#include "core/project_settings.h"
+#include "drivers/unix/syslog_logger.h"
#include "sem_iphone.h"
@@ -98,6 +99,13 @@ void OSIPhone::initialize_core() {
SemaphoreIphone::make_default();
};
+void OSIPhone::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(SyslogLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
+}
+
void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
supported_orientations = 0;
@@ -455,6 +463,14 @@ void OSIPhone::hide_virtual_keyboard() {
_hide_keyboard();
};
+void OSIPhone::set_virtual_keyboard_height(int p_height) {
+ virtual_keyboard_height = p_height;
+}
+
+int OSIPhone::get_virtual_keyboard_height() const {
+ return virtual_keyboard_height;
+}
+
Error OSIPhone::shell_open(String p_uri) {
return _shell_open(p_uri);
};
@@ -568,6 +584,9 @@ OSIPhone::OSIPhone(int width, int height) {
vm.resizable = false;
set_video_mode(vm);
event_count = 0;
+ virtual_keyboard_height = 0;
+
+ _set_logger(memnew(SyslogLogger));
};
OSIPhone::~OSIPhone() {
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index 3ebd5a74db..cf2396e87b 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -90,6 +90,7 @@ private:
virtual VideoMode get_default_video_mode() const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
@@ -123,6 +124,8 @@ private:
InputDefault *input;
+ int virtual_keyboard_height;
+
public:
bool iterate();
@@ -132,6 +135,7 @@ public:
void mouse_move(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y, bool p_use_as_mouse);
void touches_cancelled();
void key(uint32_t p_key, bool p_pressed);
+ void set_virtual_keyboard_height(int p_height);
int set_base_framebuffer(int p_fb);
@@ -167,6 +171,7 @@ public:
virtual bool has_virtual_keyboard() const;
virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2());
virtual void hide_virtual_keyboard();
+ virtual int get_virtual_keyboard_height() const;
virtual void set_cursor_shape(CursorShape p_shape);
diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp
index 4c948bf181..ed4f416cfd 100644
--- a/platform/javascript/javascript_main.cpp
+++ b/platform/javascript/javascript_main.cpp
@@ -39,8 +39,13 @@ static void main_loop() {
os->main_loop_iterate();
}
-extern "C" void main_after_fs_sync() {
+extern "C" void main_after_fs_sync(char *p_idbfs_err) {
+ String idbfs_err = String::utf8(p_idbfs_err);
+ if (!idbfs_err.empty()) {
+ print_line("IndexedDB not available: " + idbfs_err);
+ }
+ os->set_idbfs_available(idbfs_err.empty());
// Ease up compatibility
ResourceLoader::set_abort_on_missing_resources(false);
Main::start();
@@ -60,14 +65,7 @@ int main(int argc, char *argv[]) {
FS.mkdir('/userfs');
FS.mount(IDBFS, {}, '/userfs');
FS.syncfs(true, function(err) {
- if (err) {
- Module.setStatus('Failed to load persistent data\nPlease allow (third-party) cookies');
- Module.printErr('Failed to populate IDB file system: ' + err.message);
- Module.noExitRuntime = false;
- } else {
- Module.print('Successfully populated IDB file system');
- ccall('main_after_fs_sync', null);
- }
+ Module['ccall']('main_after_fs_sync', null, ['string'], [err ? err.message : ""])
});
);
/* clang-format on */
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index f103035b27..f6446e77da 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -85,6 +85,10 @@ void OS_JavaScript::initialize_core() {
FileAccess::make_default<FileAccessBufferedFA<FileAccessUnix> >(FileAccess::ACCESS_RESOURCES);
}
+void OS_JavaScript::initialize_logger() {
+ _set_logger(memnew(StdLogger));
+}
+
void OS_JavaScript::set_opengl_extensions(const char *p_gl_extensions) {
ERR_FAIL_COND(!p_gl_extensions);
@@ -821,7 +825,7 @@ bool OS_JavaScript::main_loop_iterate() {
if (!main_loop)
return false;
- if (time_to_save_sync >= 0) {
+ if (idbfs_available && time_to_save_sync >= 0) {
int64_t newtime = get_ticks_msec();
int64_t elapsed = newtime - last_sync_time;
last_sync_time = newtime;
@@ -911,10 +915,10 @@ String OS_JavaScript::get_executable_path() const {
void OS_JavaScript::_close_notification_funcs(const String &p_file, int p_flags) {
- print_line("close " + p_file + " flags " + itos(p_flags));
- if (p_file.begins_with("/userfs") && p_flags & FileAccess::WRITE) {
- static_cast<OS_JavaScript *>(get_singleton())->last_sync_time = OS::get_singleton()->get_ticks_msec();
- static_cast<OS_JavaScript *>(get_singleton())->time_to_save_sync = 5000; //five seconds since last save
+ OS_JavaScript *os = static_cast<OS_JavaScript *>(get_singleton());
+ if (os->idbfs_available && p_file.begins_with("/userfs") && p_flags & FileAccess::WRITE) {
+ os->last_sync_time = OS::get_singleton()->get_ticks_msec();
+ os->time_to_save_sync = 5000; //five seconds since last save
}
}
@@ -989,6 +993,16 @@ bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
return p_feature == "web" || p_feature == "s3tc"; // TODO check for these features really being available
}
+void OS_JavaScript::set_idbfs_available(bool p_idbfs_available) {
+
+ idbfs_available = p_idbfs_available;
+}
+
+bool OS_JavaScript::is_userfs_persistent() const {
+
+ return idbfs_available;
+}
+
OS_JavaScript::OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_dir_func) {
set_cmdline(p_execpath, get_cmdline_args());
main_loop = NULL;
@@ -1000,6 +1014,7 @@ OS_JavaScript::OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_d
get_data_dir_func = p_get_data_dir_func;
FileAccessUnix::close_notification_func = _close_notification_funcs;
+ idbfs_available = false;
time_to_save_sync = -1;
}
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index 4c6469cb58..1c939d3fd5 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -49,6 +49,7 @@ typedef String (*GetDataDirFunc)();
class OS_JavaScript : public OS_Unix {
+ bool idbfs_available;
int64_t time_to_save_sync;
int64_t last_sync_time;
@@ -92,6 +93,7 @@ public:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
@@ -104,11 +106,6 @@ public:
//static OS* get_singleton();
- virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
- OS::print_error(p_function, p_file, p_line, p_code, p_rationale, p_type);
- }
-
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
virtual void set_mouse_mode(MouseMode p_mode);
@@ -140,6 +137,8 @@ public:
virtual bool can_draw() const;
+ virtual bool is_userfs_persistent() const;
+
virtual void set_cursor_shape(CursorShape p_shape);
void main_loop_begin();
@@ -171,6 +170,8 @@ public:
virtual bool _check_internal_feature_support(const String &p_feature);
+ void set_idbfs_available(bool p_idbfs_available);
+
OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_dir_func);
~OS_JavaScript();
};
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index f66c3f00da..31032659b6 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -62,7 +62,7 @@ def configure(env):
## Compiler configuration
- if (not os.environ.has_key("OSXCROSS_ROOT")): # regular native build
+ if "OSXCROSS_ROOT" not in os.environ: # regular native build
if (env["bits"] == "fat"):
env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 2ec76fe0dd..0fd21d62ee 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -97,6 +97,16 @@ void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset>
if (p_preset->get("texture_format/etc2")) {
r_features->push_back("etc2");
}
+
+ int bits = p_preset->get("application/bits_mode");
+
+ if (bits == 0 || bits == 1) {
+ r_features->push_back("64");
+ }
+
+ if (bits == 0 || bits == 2) {
+ r_features->push_back("32");
+ }
}
void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) {
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 2662e40561..eb8c0566b4 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -127,6 +127,7 @@ protected:
virtual const char *get_video_driver_name(int p_driver) const;
virtual VideoMode get_default_video_mode() const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
virtual void finalize();
@@ -141,8 +142,6 @@ public:
virtual String get_name();
- virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
-
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
virtual void set_cursor_shape(CursorShape p_shape);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 6502001100..8323aa84a8 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1145,43 +1145,67 @@ String OS_OSX::get_name() {
return "OSX";
}
-void OS_OSX::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
- if (!_print_error_enabled)
- return;
-
- const char *err_details;
- if (p_rationale && p_rationale[0])
- err_details = p_rationale;
- else
- err_details = p_code;
+class OSXTerminalLogger : public StdLogger {
+public:
+ virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR) {
+ if (!should_log(true)) {
+ return;
+ }
- switch (p_type) {
- case ERR_ERROR:
- os_log_error(OS_LOG_DEFAULT, "ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", p_function, err_details, p_file, p_line);
- print("\E[1;31mERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;31m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_WARNING:
- os_log_info(OS_LOG_DEFAULT, "WARNING: %{public}s: %{public}s\nAt: %{public}s:%i.", p_function, err_details, p_file, p_line);
- print("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;33m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_SCRIPT:
- os_log_error(OS_LOG_DEFAULT, "SCRIPT ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", p_function, err_details, p_file, p_line);
- print("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;35m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
- case ERR_SHADER:
- os_log_error(OS_LOG_DEFAULT, "SHADER ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", p_function, err_details, p_file, p_line);
- print("\E[1;36mSHADER ERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
- print("\E[0;36m At: %s:%i.\E[0m\n", p_file, p_line);
- break;
+ const char *err_details;
+ if (p_rationale && p_rationale[0])
+ err_details = p_rationale;
+ else
+ err_details = p_code;
+
+ switch (p_type) {
+ case ERR_WARNING:
+ os_log_info(OS_LOG_DEFAULT,
+ "WARNING: %{public}s: %{public}s\nAt: %{public}s:%i.",
+ p_function, err_details, p_file, p_line);
+ logf_error("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n", p_function,
+ err_details);
+ logf_error("\E[0;33m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_SCRIPT:
+ os_log_error(OS_LOG_DEFAULT,
+ "SCRIPT ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.",
+ p_function, err_details, p_file, p_line);
+ logf_error("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n", p_function,
+ err_details);
+ logf_error("\E[0;35m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_SHADER:
+ os_log_error(OS_LOG_DEFAULT,
+ "SHADER ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.",
+ p_function, err_details, p_file, p_line);
+ logf_error("\E[1;36mSHADER ERROR: %s: \E[0m\E[1m%s\n", p_function,
+ err_details);
+ logf_error("\E[0;36m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ case ERR_ERROR:
+ default:
+ os_log_error(OS_LOG_DEFAULT,
+ "ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.",
+ p_function, err_details, p_file, p_line);
+ logf_error("\E[1;31mERROR: %s: \E[0m\E[1m%s\n", p_function, err_details);
+ logf_error("\E[0;31m At: %s:%i.\E[0m\n", p_file, p_line);
+ break;
+ }
}
+};
+
#else
- OS_Unix::print_error(p_function, p_file, p_line, p_code, p_rationale, p_type);
+
+typedef UnixTerminalLogger OSXTerminalLogger;
#endif
+
+void OS_OSX::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(OSXTerminalLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
}
void OS_OSX::alert(const String &p_alert, const String &p_title) {
@@ -2016,6 +2040,8 @@ OS_OSX::OS_OSX() {
window_size = Vector2(1024, 600);
zoomed = false;
display_scale = 1.0;
+
+ _set_logger(memnew(OSXTerminalLogger));
}
bool OS_OSX::_check_internal_feature_support(const String &p_feature) {
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index b909ccccd6..031c714514 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -40,6 +40,7 @@
#include "platform/windows/packet_peer_udp_winsock.h"
#include "platform/windows/stream_peer_winsock.h"
#include "platform/windows/tcp_server_winsock.h"
+#include "platform/windows/windows_terminal_logger.h"
#include "project_settings.h"
#include "servers/audio_server.h"
#include "servers/visual/visual_server_raster.h"
@@ -182,6 +183,13 @@ void OSUWP::initialize_core() {
cursor_shape = CURSOR_ARROW;
}
+void OSUWP::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(WindowsTerminalLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
+}
+
bool OSUWP::can_draw() const {
return !minimized;
@@ -371,32 +379,6 @@ void OSUWP::finalize() {
void OSUWP::finalize_core() {
}
-void OSUWP::vprint(const char *p_format, va_list p_list, bool p_stderr) {
-
- char buf[16384 + 1];
- int len = vsnprintf(buf, 16384, p_format, p_list);
- if (len <= 0)
- return;
- buf[len] = 0;
-
- int wlen = MultiByteToWideChar(CP_UTF8, 0, buf, len, NULL, 0);
- if (wlen < 0)
- return;
-
- wchar_t *wbuf = (wchar_t *)malloc((len + 1) * sizeof(wchar_t));
- MultiByteToWideChar(CP_UTF8, 0, buf, len, wbuf, wlen);
- wbuf[wlen] = 0;
-
- if (p_stderr)
- fwprintf(stderr, L"%s", wbuf);
- else
- wprintf(L"%s", wbuf);
-
- free(wbuf);
-
- fflush(stdout);
-};
-
void OSUWP::alert(const String &p_alert, const String &p_title) {
Platform::String ^ alert = ref new Platform::String(p_alert.c_str());
@@ -520,30 +502,6 @@ OS::VideoMode OSUWP::get_video_mode(int p_screen) const {
void OSUWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
-void OSUWP::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
- const char *err_details;
- if (p_rationale && p_rationale[0])
- err_details = p_rationale;
- else
- err_details = p_code;
-
- switch (p_type) {
- case ERR_ERROR:
- print("ERROR: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- case ERR_WARNING:
- print("WARNING: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- case ERR_SCRIPT:
- print("SCRIPT ERROR: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- }
-}
-
String OSUWP::get_name() {
return "UWP";
@@ -890,6 +848,8 @@ OSUWP::OSUWP() {
mouse_mode_changed = CreateEvent(NULL, TRUE, FALSE, L"os_mouse_mode_changed");
AudioDriverManager::add_driver(&audio_driver);
+
+ _set_logger(memnew(WindowsTerminalLogger));
}
OSUWP::~OSUWP() {
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index a7a5d32cb9..df38faa8e1 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -163,6 +163,7 @@ protected:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
@@ -180,9 +181,6 @@ public:
// Event to send to the app wrapper
HANDLE mouse_mode_changed;
- void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type);
-
- virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false);
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
String get_stdin_string(bool p_block);
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index d3c160f052..aa9eb3e69b 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -19,6 +19,7 @@ common_win = [
"stream_peer_winsock.cpp",
"joypad.cpp",
"power_windows.cpp",
+ "windows_terminal_logger.cpp"
]
restarget = "godot_res" + env["OBJSUFFIX"]
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index d715c51a71..bee8c90ad3 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -48,6 +48,7 @@
#include "servers/visual/visual_server_wrap_mt.h"
#include "stream_peer_winsock.h"
#include "tcp_server_winsock.h"
+#include "windows_terminal_logger.h"
#include <process.h>
#include <regstr.h>
@@ -205,6 +206,13 @@ void OS_Windows::initialize_core() {
cursor_shape = CURSOR_ARROW;
}
+void OS_Windows::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(WindowsTerminalLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
+}
+
bool OS_Windows::can_draw() const {
return !minimized;
@@ -1231,38 +1239,6 @@ void OS_Windows::finalize_core() {
StreamPeerWinsock::cleanup();
}
-void OS_Windows::vprint(const char *p_format, va_list p_list, bool p_stderr) {
-
- const unsigned int BUFFER_SIZE = 16384;
- char buf[BUFFER_SIZE + 1]; // +1 for the terminating character
- int len = vsnprintf(buf, BUFFER_SIZE, p_format, p_list);
- if (len <= 0)
- return;
- if (len >= BUFFER_SIZE)
- len = BUFFER_SIZE; // Output is too big, will be truncated
- buf[len] = 0;
-
- int wlen = MultiByteToWideChar(CP_UTF8, 0, buf, len, NULL, 0);
- if (wlen < 0)
- return;
-
- wchar_t *wbuf = (wchar_t *)malloc((len + 1) * sizeof(wchar_t));
- MultiByteToWideChar(CP_UTF8, 0, buf, len, wbuf, wlen);
- wbuf[wlen] = 0;
-
- if (p_stderr)
- fwprintf(stderr, L"%ls", wbuf);
- else
- wprintf(L"%ls", wbuf);
-
-#ifdef STDOUT_FILE
-//vwfprintf(stdo,p_format,p_list);
-#endif
- free(wbuf);
-
- fflush(stdout);
-};
-
void OS_Windows::alert(const String &p_alert, const String &p_title) {
if (!is_no_window_mode_enabled())
@@ -1676,107 +1652,6 @@ void OS_Windows::request_attention() {
FlashWindowEx(&info);
}
-void OS_Windows::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
-
- HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
- if (!hCon || hCon == INVALID_HANDLE_VALUE) {
-
- const char *err_details;
- if (p_rationale && p_rationale[0])
- err_details = p_rationale;
- else
- err_details = p_code;
-
- switch (p_type) {
- case ERR_ERROR:
- print("ERROR: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- case ERR_WARNING:
- print("WARNING: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- case ERR_SCRIPT:
- print("SCRIPT ERROR: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- case ERR_SHADER:
- print("SHADER ERROR: %s: %s\n", p_function, err_details);
- print(" At: %s:%i\n", p_file, p_line);
- break;
- }
-
- } else {
-
- CONSOLE_SCREEN_BUFFER_INFO sbi; //original
- GetConsoleScreenBufferInfo(hCon, &sbi);
-
- WORD current_fg = sbi.wAttributes & (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
- WORD current_bg = sbi.wAttributes & (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
-
- uint32_t basecol = 0;
- switch (p_type) {
- case ERR_ERROR: basecol = FOREGROUND_RED; break;
- case ERR_WARNING: basecol = FOREGROUND_RED | FOREGROUND_GREEN; break;
- case ERR_SCRIPT: basecol = FOREGROUND_RED | FOREGROUND_BLUE; break;
- case ERR_SHADER: basecol = FOREGROUND_GREEN | FOREGROUND_BLUE; break;
- }
-
- basecol |= current_bg;
-
- if (p_rationale && p_rationale[0]) {
-
- SetConsoleTextAttribute(hCon, basecol | FOREGROUND_INTENSITY);
- switch (p_type) {
- case ERR_ERROR: print("ERROR: "); break;
- case ERR_WARNING: print("WARNING: "); break;
- case ERR_SCRIPT: print("SCRIPT ERROR: "); break;
- case ERR_SHADER: print("SHADER ERROR: "); break;
- }
-
- SetConsoleTextAttribute(hCon, current_fg | current_bg | FOREGROUND_INTENSITY);
- print("%s\n", p_rationale);
-
- SetConsoleTextAttribute(hCon, basecol);
- switch (p_type) {
- case ERR_ERROR: print(" At: "); break;
- case ERR_WARNING: print(" At: "); break;
- case ERR_SCRIPT: print(" At: "); break;
- case ERR_SHADER: print(" At: "); break;
- }
-
- SetConsoleTextAttribute(hCon, current_fg | current_bg);
- print("%s:%i\n", p_file, p_line);
-
- } else {
-
- SetConsoleTextAttribute(hCon, basecol | FOREGROUND_INTENSITY);
- switch (p_type) {
- case ERR_ERROR: print("ERROR: %s: ", p_function); break;
- case ERR_WARNING: print("WARNING: %s: ", p_function); break;
- case ERR_SCRIPT: print("SCRIPT ERROR: %s: ", p_function); break;
- case ERR_SHADER: print("SCRIPT ERROR: %s: ", p_function); break;
- }
-
- SetConsoleTextAttribute(hCon, current_fg | current_bg | FOREGROUND_INTENSITY);
- print("%s\n", p_code);
-
- SetConsoleTextAttribute(hCon, basecol);
- switch (p_type) {
- case ERR_ERROR: print(" At: "); break;
- case ERR_WARNING: print(" At: "); break;
- case ERR_SCRIPT: print(" At: "); break;
- case ERR_SHADER: print(" At: "); break;
- }
-
- SetConsoleTextAttribute(hCon, current_fg | current_bg);
- print("%s:%i\n", p_file, p_line);
- }
-
- SetConsoleTextAttribute(hCon, sbi.wAttributes);
- }
-}
-
String OS_Windows::get_name() {
return "Windows";
@@ -2429,6 +2304,8 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) {
#ifdef XAUDIO2_ENABLED
AudioDriverManager::add_driver(&driver_xaudio2);
#endif
+
+ _set_logger(memnew(WindowsTerminalLogger));
}
OS_Windows::~OS_Windows() {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index bc1dc318cb..9560bc61ca 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -152,6 +152,7 @@ protected:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
@@ -180,9 +181,6 @@ protected:
public:
LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
- void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type);
-
- virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false);
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
String get_stdin_string(bool p_block);
diff --git a/platform/windows/windows_terminal_logger.cpp b/platform/windows/windows_terminal_logger.cpp
new file mode 100644
index 0000000000..ef8140ffa7
--- /dev/null
+++ b/platform/windows/windows_terminal_logger.cpp
@@ -0,0 +1,157 @@
+/*************************************************************************/
+/* windows_terminal_logger.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "windows_terminal_logger.h"
+
+#ifdef WINDOWS_ENABLED
+
+#include <stdio.h>
+#include <windows.h>
+
+void WindowsTerminalLogger::logv(const char *p_format, va_list p_list, bool p_err) {
+ if (!should_log(p_err)) {
+ return;
+ }
+
+ const unsigned int BUFFER_SIZE = 16384;
+ char buf[BUFFER_SIZE + 1]; // +1 for the terminating character
+ int len = vsnprintf(buf, BUFFER_SIZE, p_format, p_list);
+ if (len <= 0)
+ return;
+ if (len >= BUFFER_SIZE)
+ len = BUFFER_SIZE; // Output is too big, will be truncated
+ buf[len] = 0;
+
+ int wlen = MultiByteToWideChar(CP_UTF8, 0, buf, len, NULL, 0);
+ if (wlen < 0)
+ return;
+
+ wchar_t *wbuf = (wchar_t *)malloc((len + 1) * sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, buf, len, wbuf, wlen);
+ wbuf[wlen] = 0;
+
+ if (p_err)
+ fwprintf(stderr, L"%ls", wbuf);
+ else
+ wprintf(L"%ls", wbuf);
+
+ free(wbuf);
+
+#ifdef DEBUG_ENABLED
+ fflush(stdout);
+#endif
+}
+
+void WindowsTerminalLogger::log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
+ if (!should_log(true)) {
+ return;
+ }
+
+#ifndef UWP_ENABLED
+ HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
+ if (!hCon || hCon == INVALID_HANDLE_VALUE) {
+#endif
+ StdLogger::log_error(p_function, p_file, p_line, p_code, p_rationale, p_type);
+#ifndef UWP_ENABLED
+ } else {
+
+ CONSOLE_SCREEN_BUFFER_INFO sbi; //original
+ GetConsoleScreenBufferInfo(hCon, &sbi);
+
+ WORD current_fg = sbi.wAttributes & (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
+ WORD current_bg = sbi.wAttributes & (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
+
+ uint32_t basecol = 0;
+ switch (p_type) {
+ case ERR_ERROR: basecol = FOREGROUND_RED; break;
+ case ERR_WARNING: basecol = FOREGROUND_RED | FOREGROUND_GREEN; break;
+ case ERR_SCRIPT: basecol = FOREGROUND_RED | FOREGROUND_BLUE; break;
+ case ERR_SHADER: basecol = FOREGROUND_GREEN | FOREGROUND_BLUE; break;
+ }
+
+ basecol |= current_bg;
+
+ if (p_rationale && p_rationale[0]) {
+
+ SetConsoleTextAttribute(hCon, basecol | FOREGROUND_INTENSITY);
+ switch (p_type) {
+ case ERR_ERROR: logf("ERROR: "); break;
+ case ERR_WARNING: logf("WARNING: "); break;
+ case ERR_SCRIPT: logf("SCRIPT ERROR: "); break;
+ case ERR_SHADER: logf("SHADER ERROR: "); break;
+ }
+
+ SetConsoleTextAttribute(hCon, current_fg | current_bg | FOREGROUND_INTENSITY);
+ logf("%s\n", p_rationale);
+
+ SetConsoleTextAttribute(hCon, basecol);
+ switch (p_type) {
+ case ERR_ERROR: logf(" At: "); break;
+ case ERR_WARNING: logf(" At: "); break;
+ case ERR_SCRIPT: logf(" At: "); break;
+ case ERR_SHADER: logf(" At: "); break;
+ }
+
+ SetConsoleTextAttribute(hCon, current_fg | current_bg);
+ logf("%s:%i\n", p_file, p_line);
+
+ } else {
+
+ SetConsoleTextAttribute(hCon, basecol | FOREGROUND_INTENSITY);
+ switch (p_type) {
+ case ERR_ERROR: logf("ERROR: %s: ", p_function); break;
+ case ERR_WARNING: logf("WARNING: %s: ", p_function); break;
+ case ERR_SCRIPT: logf("SCRIPT ERROR: %s: ", p_function); break;
+ case ERR_SHADER: logf("SCRIPT ERROR: %s: ", p_function); break;
+ }
+
+ SetConsoleTextAttribute(hCon, current_fg | current_bg | FOREGROUND_INTENSITY);
+ logf("%s\n", p_code);
+
+ SetConsoleTextAttribute(hCon, basecol);
+ switch (p_type) {
+ case ERR_ERROR: logf(" At: "); break;
+ case ERR_WARNING: logf(" At: "); break;
+ case ERR_SCRIPT: logf(" At: "); break;
+ case ERR_SHADER: logf(" At: "); break;
+ }
+
+ SetConsoleTextAttribute(hCon, current_fg | current_bg);
+ logf("%s:%i\n", p_file, p_line);
+ }
+
+ SetConsoleTextAttribute(hCon, sbi.wAttributes);
+ }
+#endif
+}
+
+WindowsTerminalLogger::~WindowsTerminalLogger() {}
+
+#endif \ No newline at end of file
diff --git a/platform/windows/windows_terminal_logger.h b/platform/windows/windows_terminal_logger.h
new file mode 100644
index 0000000000..f6b1a68d18
--- /dev/null
+++ b/platform/windows/windows_terminal_logger.h
@@ -0,0 +1,47 @@
+/*************************************************************************/
+/* windows_terminal_logger.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef WINDOWS_TERMINAL_LOGGER_H
+#define WINDOWS_TERMINAL_LOGGER_H
+
+#ifdef WINDOWS_ENABLED
+
+#include "io/logger.h"
+
+class WindowsTerminalLogger : public StdLogger {
+public:
+ virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
+ virtual ~WindowsTerminalLogger();
+};
+
+#endif
+
+#endif \ No newline at end of file
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index 147d3bf115..c6b6c02129 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -67,6 +67,105 @@ String ARVRCamera::get_configuration_warning() const {
return String();
};
+Vector3 ARVRCamera::project_local_ray_normal(const Point2 &p_pos) const {
+ // get our ARVRServer
+ ARVRServer *arvr_server = ARVRServer::get_singleton();
+ ERR_FAIL_NULL_V(arvr_server, Vector3());
+
+ Ref<ARVRInterface> arvr_interface = arvr_server->get_primary_interface();
+ ERR_FAIL_COND_V(arvr_interface.is_null(), Vector3());
+
+ if (!is_inside_tree()) {
+ ERR_EXPLAIN("Camera is not inside scene.");
+ ERR_FAIL_COND_V(!is_inside_tree(), Vector3());
+ };
+
+ Size2 viewport_size = get_viewport()->get_camera_rect_size();
+ Vector2 cpos = get_viewport()->get_camera_coords(p_pos);
+ Vector3 ray;
+
+ CameraMatrix cm = arvr_interface->get_projection_for_eye(ARVRInterface::EYE_MONO, viewport_size.aspect(), get_znear(), get_zfar());
+ float screen_w, screen_h;
+ cm.get_viewport_size(screen_w, screen_h);
+ ray = Vector3(((cpos.x / viewport_size.width) * 2.0 - 1.0) * screen_w, ((1.0 - (cpos.y / viewport_size.height)) * 2.0 - 1.0) * screen_h, -get_znear()).normalized();
+
+ return ray;
+};
+
+Point2 ARVRCamera::unproject_position(const Vector3 &p_pos) const {
+ // get our ARVRServer
+ ARVRServer *arvr_server = ARVRServer::get_singleton();
+ ERR_FAIL_NULL_V(arvr_server, Vector2());
+
+ Ref<ARVRInterface> arvr_interface = arvr_server->get_primary_interface();
+ ERR_FAIL_COND_V(arvr_interface.is_null(), Vector2());
+
+ if (!is_inside_tree()) {
+ ERR_EXPLAIN("Camera is not inside scene.");
+ ERR_FAIL_COND_V(!is_inside_tree(), Vector2());
+ };
+
+ Size2 viewport_size = get_viewport()->get_visible_rect().size;
+
+ CameraMatrix cm = arvr_interface->get_projection_for_eye(ARVRInterface::EYE_MONO, viewport_size.aspect(), get_znear(), get_zfar());
+
+ Plane p(get_camera_transform().xform_inv(p_pos), 1.0);
+
+ p = cm.xform4(p);
+ p.normal /= p.d;
+
+ Point2 res;
+ res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x;
+ res.y = (-p.normal.y * 0.5 + 0.5) * viewport_size.y;
+
+ return res;
+};
+
+Vector3 ARVRCamera::project_position(const Point2 &p_point) const {
+ // get our ARVRServer
+ ARVRServer *arvr_server = ARVRServer::get_singleton();
+ ERR_FAIL_NULL_V(arvr_server, Vector3());
+
+ Ref<ARVRInterface> arvr_interface = arvr_server->get_primary_interface();
+ ERR_FAIL_COND_V(arvr_interface.is_null(), Vector3());
+
+ if (!is_inside_tree()) {
+ ERR_EXPLAIN("Camera is not inside scene.");
+ ERR_FAIL_COND_V(!is_inside_tree(), Vector3());
+ };
+
+ Size2 viewport_size = get_viewport()->get_visible_rect().size;
+
+ CameraMatrix cm = arvr_interface->get_projection_for_eye(ARVRInterface::EYE_MONO, viewport_size.aspect(), get_znear(), get_zfar());
+
+ Size2 vp_size;
+ cm.get_viewport_size(vp_size.x, vp_size.y);
+
+ Vector2 point;
+ point.x = (p_point.x / viewport_size.x) * 2.0 - 1.0;
+ point.y = (1.0 - (p_point.y / viewport_size.y)) * 2.0 - 1.0;
+ point *= vp_size;
+
+ Vector3 p(point.x, point.y, -get_znear());
+
+ return get_camera_transform().xform(p);
+};
+
+Vector<Plane> ARVRCamera::get_frustum() const {
+ // get our ARVRServer
+ ARVRServer *arvr_server = ARVRServer::get_singleton();
+ ERR_FAIL_NULL_V(arvr_server, Vector<Plane>());
+
+ Ref<ARVRInterface> arvr_interface = arvr_server->get_primary_interface();
+ ERR_FAIL_COND_V(arvr_interface.is_null(), Vector<Plane>());
+
+ ERR_FAIL_COND_V(!is_inside_world(), Vector<Plane>());
+
+ Size2 viewport_size = get_viewport()->get_visible_rect().size;
+ CameraMatrix cm = arvr_interface->get_projection_for_eye(ARVRInterface::EYE_MONO, viewport_size.aspect(), get_znear(), get_zfar());
+ return cm.get_projection_planes(get_camera_transform());
+};
+
ARVRCamera::ARVRCamera(){
// nothing to do here yet for now..
};
@@ -297,6 +396,8 @@ void ARVRAnchor::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_is_active"), &ARVRAnchor::get_is_active);
ClassDB::bind_method(D_METHOD("get_size"), &ARVRAnchor::get_size);
+
+ ClassDB::bind_method(D_METHOD("get_plane"), &ARVRAnchor::get_plane);
};
void ARVRAnchor::set_anchor_id(int p_anchor_id) {
@@ -346,6 +447,15 @@ String ARVRAnchor::get_configuration_warning() const {
return String();
};
+Plane ARVRAnchor::get_plane() const {
+ Vector3 location = get_translation();
+ Basis orientation = get_transform().basis;
+
+ Plane plane(location, orientation.get_axis(1).normalized());
+
+ return plane;
+};
+
ARVRAnchor::ARVRAnchor() {
anchor_id = 0;
is_active = true;
diff --git a/scene/3d/arvr_nodes.h b/scene/3d/arvr_nodes.h
index 5269ec0248..e0ccfab58b 100644
--- a/scene/3d/arvr_nodes.h
+++ b/scene/3d/arvr_nodes.h
@@ -52,6 +52,11 @@ protected:
public:
String get_configuration_warning() const;
+ virtual Vector3 project_local_ray_normal(const Point2 &p_pos) const;
+ virtual Point2 unproject_position(const Vector3 &p_pos) const;
+ virtual Vector3 project_position(const Point2 &p_point) const;
+ virtual Vector<Plane> get_frustum() const;
+
ARVRCamera();
~ARVRCamera();
};
@@ -118,6 +123,8 @@ public:
bool get_is_active() const;
Vector3 get_size() const;
+ Plane get_plane() const;
+
String get_configuration_warning() const;
ARVRAnchor();
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 3a725eaf66..73c6844c1a 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -127,16 +127,16 @@ public:
virtual Transform get_camera_transform() const;
Vector3 project_ray_normal(const Point2 &p_pos) const;
- Vector3 project_ray_origin(const Point2 &p_pos) const;
+ virtual Vector3 project_ray_origin(const Point2 &p_pos) const;
Vector3 project_local_ray_normal(const Point2 &p_pos) const;
- Point2 unproject_position(const Vector3 &p_pos) const;
+ virtual Point2 unproject_position(const Vector3 &p_pos) const;
bool is_position_behind(const Vector3 &p_pos) const;
- Vector3 project_position(const Point2 &p_point) const;
+ virtual Vector3 project_position(const Point2 &p_point) const;
void set_cull_mask(uint32_t p_layers);
uint32_t get_cull_mask() const;
- Vector<Plane> get_frustum() const;
+ virtual Vector<Plane> get_frustum() const;
void set_environment(const Ref<Environment> &p_environment);
Ref<Environment> get_environment() const;
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 66364d40f9..9d55a82824 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -1486,8 +1486,8 @@ GIProbe::GIProbe() {
subdiv = SUBDIV_128;
dynamic_range = 4;
energy = 1.0;
- bias = 0.0;
- normal_bias = 0.8;
+ bias = 1.5;
+ normal_bias = 0.0;
propagation = 1.0;
extents = Vector3(10, 10, 10);
color_scan_cell_width = 4;
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index d8c7a78648..b226cca02b 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -35,8 +35,6 @@ void Navigation::_navmesh_link(int p_id) {
NavMesh &nm = navmesh_map[p_id];
ERR_FAIL_COND(nm.linked);
- print_line("LINK");
-
PoolVector<Vector3> vertices = nm.navmesh->get_vertices();
int len = vertices.size();
if (len == 0)
@@ -144,8 +142,6 @@ void Navigation::_navmesh_unlink(int p_id) {
NavMesh &nm = navmesh_map[p_id];
ERR_FAIL_COND(!nm.linked);
- print_line("UNLINK");
-
for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) {
Polygon &p = E->get();
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 87a232e766..320dad9301 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -115,6 +115,7 @@ Vector<String> FileDialog::get_selected_files() const {
void FileDialog::update_dir() {
dir->set_text(dir_access->get_current_dir());
+ drives->select(dir_access->get_current_drive());
}
void FileDialog::_dir_entered(String p_dir) {
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index d9287e6f63..c2ce2a633e 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1949,7 +1949,7 @@ void RichTextLabel::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
- ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta")));
+ ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
BIND_ENUM_CONSTANT(ALIGN_LEFT);
BIND_ENUM_CONSTANT(ALIGN_CENTER);
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 816556af30..190ccd50d5 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -285,6 +285,12 @@ float VideoPlayer::get_stream_position() const {
return playback->get_playback_position();
};
+void VideoPlayer::set_stream_position(float p_position) {
+
+ if (playback.is_valid())
+ playback->seek(p_position);
+}
+
Ref<Texture> VideoPlayer::get_video_texture() {
if (playback.is_valid())
@@ -327,6 +333,7 @@ void VideoPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_stream_name"), &VideoPlayer::get_stream_name);
+ ClassDB::bind_method(D_METHOD("set_stream_position", "position"), &VideoPlayer::set_stream_position);
ClassDB::bind_method(D_METHOD("get_stream_position"), &VideoPlayer::get_stream_position);
ClassDB::bind_method(D_METHOD("set_autoplay", "enabled"), &VideoPlayer::set_autoplay);
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index bea10907bb..f04e90365f 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -93,6 +93,7 @@ public:
String get_stream_name() const;
float get_stream_position() const;
+ void set_stream_position(float p_position);
void set_autoplay(bool p_enable);
bool has_autoplay() const;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index b9dfbd6bb0..a85a0fb9f7 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -222,13 +222,18 @@ void register_scene_types() {
String font_path = GLOBAL_DEF("gui/theme/custom_font", "");
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
+ bool has_theme = false;
if (theme_path != String()) {
Ref<Theme> theme = ResourceLoader::load(theme_path);
if (theme.is_valid()) {
Theme::set_default(theme);
+ has_theme = true;
+ } else {
+ ERR_PRINTS("Error loading custom theme '" + theme_path + "'");
}
- } else {
+ }
+ if (!has_theme) {
Ref<Font> font;
if (font_path != String()) {
font = ResourceLoader::load(font_path);
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index daa8fc1874..79cc94c911 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -485,17 +485,17 @@ void Curve::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_points"), &Curve::clear_points);
ClassDB::bind_method(D_METHOD("get_point_position", "index"), &Curve::get_point_position);
ClassDB::bind_method(D_METHOD("set_point_value", "index", "y"), &Curve::set_point_value);
- ClassDB::bind_method(D_METHOD("set_point_offset", "index", "offset"), &Curve::set_point_value);
+ ClassDB::bind_method(D_METHOD("set_point_offset", "index", "offset"), &Curve::set_point_offset);
ClassDB::bind_method(D_METHOD("interpolate", "offset"), &Curve::interpolate);
ClassDB::bind_method(D_METHOD("interpolate_baked", "offset"), &Curve::interpolate_baked);
ClassDB::bind_method(D_METHOD("get_point_left_tangent", "index"), &Curve::get_point_left_tangent);
- ClassDB::bind_method(D_METHOD("get_point_right_tangent", "index"), &Curve::get_point_left_tangent);
+ ClassDB::bind_method(D_METHOD("get_point_right_tangent", "index"), &Curve::get_point_right_tangent);
ClassDB::bind_method(D_METHOD("get_point_left_mode", "index"), &Curve::get_point_left_mode);
- ClassDB::bind_method(D_METHOD("get_point_right_mode", "index"), &Curve::get_point_left_mode);
+ ClassDB::bind_method(D_METHOD("get_point_right_mode", "index"), &Curve::get_point_right_mode);
ClassDB::bind_method(D_METHOD("set_point_left_tangent", "index", "tangent"), &Curve::set_point_left_tangent);
- ClassDB::bind_method(D_METHOD("set_point_right_tangent", "index", "tangent"), &Curve::set_point_left_tangent);
+ ClassDB::bind_method(D_METHOD("set_point_right_tangent", "index", "tangent"), &Curve::set_point_right_tangent);
ClassDB::bind_method(D_METHOD("set_point_left_mode", "index", "mode"), &Curve::set_point_left_mode);
- ClassDB::bind_method(D_METHOD("set_point_right_mode", "index", "mode"), &Curve::set_point_left_mode);
+ ClassDB::bind_method(D_METHOD("set_point_right_mode", "index", "mode"), &Curve::set_point_right_mode);
ClassDB::bind_method(D_METHOD("get_min_value"), &Curve::get_min_value);
ClassDB::bind_method(D_METHOD("set_min_value", "min"), &Curve::set_min_value);
ClassDB::bind_method(D_METHOD("get_max_value"), &Curve::get_max_value);
diff --git a/servers/arvr/arvr_interface.cpp b/servers/arvr/arvr_interface.cpp
index 0705df17b1..55707def7c 100644
--- a/servers/arvr/arvr_interface.cpp
+++ b/servers/arvr/arvr_interface.cpp
@@ -31,29 +31,49 @@
void ARVRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_name"), &ARVRInterface::get_name);
+ ClassDB::bind_method(D_METHOD("get_capabilities"), &ARVRInterface::get_capabilities);
ClassDB::bind_method(D_METHOD("is_primary"), &ARVRInterface::is_primary);
ClassDB::bind_method(D_METHOD("set_is_primary", "enable"), &ARVRInterface::set_is_primary);
- ClassDB::bind_method(D_METHOD("is_installed"), &ARVRInterface::is_installed);
- ClassDB::bind_method(D_METHOD("hmd_is_present"), &ARVRInterface::hmd_is_present);
- ClassDB::bind_method(D_METHOD("supports_hmd"), &ARVRInterface::supports_hmd);
ClassDB::bind_method(D_METHOD("is_initialized"), &ARVRInterface::is_initialized);
+ ClassDB::bind_method(D_METHOD("set_is_initialized", "initialized"), &ARVRInterface::set_is_initialized);
ClassDB::bind_method(D_METHOD("initialize"), &ARVRInterface::initialize);
ClassDB::bind_method(D_METHOD("uninitialize"), &ARVRInterface::uninitialize);
+ ClassDB::bind_method(D_METHOD("get_tracking_status"), &ARVRInterface::get_tracking_status);
+
ClassDB::bind_method(D_METHOD("get_recommended_render_targetsize"), &ARVRInterface::get_recommended_render_targetsize);
+ ClassDB::bind_method(D_METHOD("is_stereo"), &ARVRInterface::is_stereo);
+
+ ADD_GROUP("Interface", "interface_");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_primary"), "set_is_primary", "is_primary");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_initialized"), "set_is_initialized", "is_initialized");
+
+ // we don't have any properties specific to VR yet....
- // These are now purely used internally, we may expose them again if we expose CameraMatrix through Variant but reduz is not a fan for good reasons :)
- // ClassDB::bind_method(D_METHOD("get_transform_for_eye", "eye", "cam_transform"), &ARVRInterface::get_transform_for_eye);
- // ClassDB::bind_method(D_METHOD("get_projection_for_eye", "eye"), &ARVRInterface::get_projection_for_eye);
- // ClassDB::bind_method(D_METHOD("commit_for_eye", "node:viewport"), &ARVRInterface::commit_for_eye);
+ // but we do have properties specific to AR....
+ ClassDB::bind_method(D_METHOD("get_anchor_detection_is_enabled"), &ARVRInterface::get_anchor_detection_is_enabled);
+ ClassDB::bind_method(D_METHOD("set_anchor_detection_is_enabled", "enable"), &ARVRInterface::set_anchor_detection_is_enabled);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "primary"), "set_is_primary", "is_primary");
+ ADD_GROUP("AR", "ar_");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ar_is_anchor_detection_enabled"), "set_anchor_detection_is_enabled", "get_anchor_detection_is_enabled");
+
+ BIND_ENUM_CONSTANT(ARVR_NONE);
+ BIND_ENUM_CONSTANT(ARVR_MONO);
+ BIND_ENUM_CONSTANT(ARVR_STEREO);
+ BIND_ENUM_CONSTANT(ARVR_AR);
+ BIND_ENUM_CONSTANT(ARVR_EXTERNAL);
BIND_ENUM_CONSTANT(EYE_MONO);
BIND_ENUM_CONSTANT(EYE_LEFT);
BIND_ENUM_CONSTANT(EYE_RIGHT);
+
+ BIND_ENUM_CONSTANT(ARVR_NORMAL_TRACKING);
+ BIND_ENUM_CONSTANT(ARVR_EXCESSIVE_MOTION);
+ BIND_ENUM_CONSTANT(ARVR_INSUFFICIENT_FEATURES);
+ BIND_ENUM_CONSTANT(ARVR_UNKNOWN_TRACKING);
+ BIND_ENUM_CONSTANT(ARVR_NOT_TRACKING);
};
StringName ARVRInterface::get_name() const {
@@ -73,10 +93,40 @@ void ARVRInterface::set_is_primary(bool p_is_primary) {
if (p_is_primary) {
ERR_FAIL_COND(!is_initialized());
- ERR_FAIL_COND(!supports_hmd());
arvr_server->set_primary_interface(this);
} else {
arvr_server->clear_primary_interface_if(this);
};
};
+
+void ARVRInterface::set_is_initialized(bool p_initialized) {
+ if (p_initialized) {
+ if (!is_initialized()) {
+ initialize();
+ };
+ } else {
+ if (is_initialized()) {
+ uninitialize();
+ };
+ };
+};
+
+ARVRInterface::Tracking_status ARVRInterface::get_tracking_status() const {
+ return tracking_state;
+};
+
+ARVRInterface::ARVRInterface() {
+ tracking_state = ARVR_UNKNOWN_TRACKING;
+};
+
+ARVRInterface::~ARVRInterface(){};
+
+/** these will only be implemented on AR interfaces, so we want dummies for VR **/
+bool ARVRInterface::get_anchor_detection_is_enabled() const {
+ return false;
+};
+
+void ARVRInterface::set_anchor_detection_is_enabled(bool p_enable){
+ // don't do anything here, this needs to be implemented on AR interface to enable/disable things like plane detection etc.
+};
diff --git a/servers/arvr/arvr_interface.h b/servers/arvr/arvr_interface.h
index d4fb383bbc..880f6e4595 100644
--- a/servers/arvr/arvr_interface.h
+++ b/servers/arvr/arvr_interface.h
@@ -50,31 +50,59 @@
class ARVRInterface : public Reference {
GDCLASS(ARVRInterface, Reference);
-protected:
- _THREAD_SAFE_CLASS_
-
- static void _bind_methods();
-
public:
+ enum Capabilities { /* purely meta data, provides some info about what this interface supports */
+ ARVR_NONE = 0, /* no capabilities */
+ ARVR_MONO = 1, /* can be used with mono output */
+ ARVR_STEREO = 2, /* can be used with stereo output */
+ ARVR_AR = 4, /* offers a camera feed for AR */
+ ARVR_EXTERNAL = 8 /* renders to external device */
+ };
+
enum Eyes {
EYE_MONO, /* my son says we should call this EYE_CYCLOPS */
EYE_LEFT,
EYE_RIGHT
};
+ enum Tracking_status { /* tracking status currently based on AR but we can start doing more with this for VR as well */
+ ARVR_NORMAL_TRACKING,
+ ARVR_EXCESSIVE_MOTION,
+ ARVR_INSUFFICIENT_FEATURES,
+ ARVR_UNKNOWN_TRACKING,
+ ARVR_NOT_TRACKING
+ };
+
+protected:
+ _THREAD_SAFE_CLASS_
+
+ Tracking_status tracking_state;
+ static void _bind_methods();
+
+public:
+ /** general interface information **/
virtual StringName get_name() const;
+ virtual int get_capabilities() const = 0;
bool is_primary();
void set_is_primary(bool p_is_primary);
- virtual bool is_installed() = 0; /* returns true if the middle ware related to this interface has been installed */
- virtual bool hmd_is_present() = 0; /* returns true if our HMD is connected */
- virtual bool supports_hmd() = 0; /* returns true is this interface handles output to an HMD or only handles positioning */
-
virtual bool is_initialized() = 0; /* returns true if we've initialized this interface */
+ void set_is_initialized(bool p_initialized); /* helper function, will call initialize or uninitialize */
virtual bool initialize() = 0; /* initialize this interface, if this has an HMD it becomes the primary interface */
virtual void uninitialize() = 0; /* deinitialize this interface */
+ Tracking_status get_tracking_status() const; /* get the status of our current tracking */
+
+ /** specific to VR **/
+ // nothing yet
+
+ /** specific to AR **/
+ virtual bool get_anchor_detection_is_enabled() const;
+ virtual void set_anchor_detection_is_enabled(bool p_enable);
+
+ /** rendering and internal **/
+
virtual Size2 get_recommended_render_targetsize() = 0; /* returns the recommended render target size per eye for this device */
virtual bool is_stereo() = 0; /* returns true if this interface requires stereo rendering (for VR HMDs) or mono rendering (for mobile AR) */
virtual Transform get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform) = 0; /* get each eyes camera transform, also implement EYE_MONO */
@@ -82,8 +110,13 @@ public:
virtual void commit_for_eye(ARVRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) = 0; /* output the left or right eye */
virtual void process() = 0;
+
+ ARVRInterface();
+ ~ARVRInterface();
};
+VARIANT_ENUM_CAST(ARVRInterface::Capabilities);
VARIANT_ENUM_CAST(ARVRInterface::Eyes);
+VARIANT_ENUM_CAST(ARVRInterface::Tracking_status);
#endif
diff --git a/servers/arvr/arvr_script_interface.cpp b/servers/arvr/arvr_script_interface.cpp
index 16e607920e..2755605a14 100644
--- a/servers/arvr/arvr_script_interface.cpp
+++ b/servers/arvr/arvr_script_interface.cpp
@@ -23,20 +23,26 @@ StringName ARVRScriptInterface::get_name() const {
}
}
-bool ARVRScriptInterface::is_installed() {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("is_installed")), false);
- return get_script_instance()->call("is_installed");
-}
+int ARVRScriptInterface::get_capabilities() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_capabilities")), ARVRInterface::ARVR_NONE);
+ return get_script_instance()->call("get_capabilities");
+};
-bool ARVRScriptInterface::hmd_is_present() {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("hmd_is_present")), false);
- return get_script_instance()->call("hmd_is_present");
+ARVRInterface::Tracking_status ARVRScriptInterface::get_tracking_status() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_tracking_status")), ARVRInterface::ARVR_NOT_TRACKING);
+ int status = get_script_instance()->call("get_tracking_status");
+ return (ARVRInterface::Tracking_status)status;
}
-bool ARVRScriptInterface::supports_hmd() {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("supports_hmd")), false);
- return get_script_instance()->call("supports_hmd");
-}
+bool ARVRScriptInterface::get_anchor_detection_is_enabled() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_anchor_detection_is_enabled")), false);
+ return get_script_instance()->call("get_anchor_detection_is_enabled");
+};
+
+void ARVRScriptInterface::set_anchor_detection_is_enabled(bool p_enable) {
+ ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("set_anchor_detection_is_enabled")));
+ get_script_instance()->call("set_anchor_detection_is_enabled");
+};
bool ARVRScriptInterface::is_stereo() {
ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("is_stereo")), false);
@@ -110,14 +116,17 @@ void ARVRScriptInterface::process() {
}
void ARVRScriptInterface::_bind_methods() {
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "is_installed"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "hmd_is_present"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "supports_hmd"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_capabilities"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "is_initialized"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "initialize"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("uninitialize"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_tracking_status"));
+
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_anchor_detection_is_enabled"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_anchor_detection_is_enabled", PropertyInfo(Variant::BOOL, "enabled")));
+
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "is_stereo"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::VECTOR2, "get_recommended_render_targetsize"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::TRANSFORM, "get_transform_for_eye", PropertyInfo(Variant::INT, "eye"), PropertyInfo(Variant::TRANSFORM, "cam_transform")));
diff --git a/servers/arvr/arvr_script_interface.h b/servers/arvr/arvr_script_interface.h
index 04ca33901a..b1393b4fdb 100644
--- a/servers/arvr/arvr_script_interface.h
+++ b/servers/arvr/arvr_script_interface.h
@@ -16,19 +16,24 @@ protected:
static void _bind_methods();
public:
+ /** general interface information **/
ARVRScriptInterface();
~ARVRScriptInterface();
virtual StringName get_name() const;
-
- virtual bool is_installed();
- virtual bool hmd_is_present();
- virtual bool supports_hmd();
+ virtual int get_capabilities() const;
virtual bool is_initialized();
virtual bool initialize();
virtual void uninitialize();
+ ARVRInterface::Tracking_status get_tracking_status() const; /* get the status of our current tracking */
+
+ /** specific to AR **/
+ virtual bool get_anchor_detection_is_enabled() const;
+ virtual void set_anchor_detection_is_enabled(bool p_enable);
+
+ /** rendering and internal **/
virtual Size2 get_recommended_render_targetsize();
virtual bool is_stereo();
virtual Transform get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform);
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index 5d8cf20c92..aa879f8aed 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -43,7 +43,7 @@ void ARVRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_world_scale"), &ARVRServer::get_world_scale);
ClassDB::bind_method(D_METHOD("set_world_scale"), &ARVRServer::set_world_scale);
ClassDB::bind_method(D_METHOD("get_reference_frame"), &ARVRServer::get_reference_frame);
- ClassDB::bind_method(D_METHOD("request_reference_frame", "ignore_tilt", "keep_height"), &ARVRServer::request_reference_frame);
+ ClassDB::bind_method(D_METHOD("center_on_hmd", "ignore_tilt", "keep_height"), &ARVRServer::center_on_hmd);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale");
@@ -98,7 +98,7 @@ Transform ARVRServer::get_reference_frame() const {
return reference_frame;
};
-void ARVRServer::request_reference_frame(bool p_ignore_tilt, bool p_keep_height) {
+void ARVRServer::center_on_hmd(bool p_ignore_tilt, bool p_keep_height) {
if (primary_interface != NULL) {
// clear our current reference frame or we'll end up double adjusting it
reference_frame = Transform();
diff --git a/servers/arvr_server.h b/servers/arvr_server.h
index 2645637ad5..948895cb27 100644
--- a/servers/arvr_server.h
+++ b/servers/arvr_server.h
@@ -117,14 +117,17 @@ public:
void set_world_origin(const Transform p_world_origin);
/*
- Requesting a reference frame results in a matrix being calculated that ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction)
+ center_on_hmd calculates a new reference frame. This ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction)
in the virtual world.
+ You can ignore the tilt of the device ensuring you're looking straight forward even if the player is looking down or sideways.
+ You can chose to keep the height the tracking provides which is important for room scale capable tracking.
+
Note: this should not be used in AR and should be ignored by an AR based interface as it would throw what you're looking at in the real world
and in the virtual world out of sync
*/
Transform get_reference_frame() const;
- void request_reference_frame(bool p_ignore_tilt, bool p_keep_height);
+ void center_on_hmd(bool p_ignore_tilt, bool p_keep_height);
/*
Interfaces are objects that 'glue' Godot to an AR or VR SDK such as the Oculus SDK, OpenVR, OpenHMD, etc.
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 9fb4dc524d..e49baf0763 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -2348,7 +2348,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
RID rid = E->key();
const InstanceGIProbeData::LightCache &lc = E->get();
- if (!probe_data->dynamic.light_cache_changes.has(rid) || !(probe_data->dynamic.light_cache_changes[rid] == lc)) {
+ if ((!probe_data->dynamic.light_cache_changes.has(rid) || !(probe_data->dynamic.light_cache_changes[rid] == lc)) && lc.visible) {
//erase light data
_bake_gi_probe_light(header, cells, local_data, leaves, leaf_count, lc, -1);
@@ -2361,7 +2361,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
RID rid = E->key();
const InstanceGIProbeData::LightCache &lc = E->get();
- if (!probe_data->dynamic.light_cache.has(rid) || !(probe_data->dynamic.light_cache[rid] == lc)) {
+ if ((!probe_data->dynamic.light_cache.has(rid) || !(probe_data->dynamic.light_cache[rid] == lc)) && lc.visible) {
//add light data
_bake_gi_probe_light(header, cells, local_data, leaves, leaf_count, lc, 1);
@@ -2568,6 +2568,7 @@ bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) {
lc.spot_angle = VSG::storage->light_get_param(E->get()->base, VS::LIGHT_PARAM_SPOT_ANGLE);
lc.spot_attenuation = VSG::storage->light_get_param(E->get()->base, VS::LIGHT_PARAM_SPOT_ATTENUATION);
lc.transform = probe_data->dynamic.light_to_cell_xform * E->get()->transform;
+ lc.visible = E->get()->visible;
if (!probe_data->dynamic.light_cache.has(E->get()->self) || !(probe_data->dynamic.light_cache[E->get()->self] == lc)) {
all_equal = false;
@@ -2587,6 +2588,7 @@ bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) {
lc.spot_angle = VSG::storage->light_get_param(E->get()->base, VS::LIGHT_PARAM_SPOT_ANGLE);
lc.spot_attenuation = VSG::storage->light_get_param(E->get()->base, VS::LIGHT_PARAM_SPOT_ATTENUATION);
lc.transform = probe_data->dynamic.light_to_cell_xform * E->get()->transform;
+ lc.visible = E->get()->visible;
if (!probe_data->dynamic.light_cache.has(E->get()->self) || !(probe_data->dynamic.light_cache[E->get()->self] == lc)) {
all_equal = false;
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index ac771030cf..d30a2108a5 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -359,6 +359,7 @@ public:
float attenuation;
float spot_angle;
float spot_attenuation;
+ bool visible;
bool operator==(const LightCache &p_cache) {
@@ -369,7 +370,8 @@ public:
radius == p_cache.radius &&
attenuation == p_cache.attenuation &&
spot_angle == p_cache.spot_angle &&
- spot_attenuation == p_cache.spot_attenuation);
+ spot_attenuation == p_cache.spot_attenuation &&
+ visible == p_cache.visible);
}
LightCache() {
@@ -380,6 +382,7 @@ public:
attenuation = 1.0;
spot_angle = 1.0;
spot_attenuation = 1.0;
+ visible = true;
}
};