summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.py29
-rw-r--r--core/io/logger.cpp5
-rw-r--r--core/io/marshalls.cpp3
-rw-r--r--core/os/os.h2
-rw-r--r--core/project_settings.cpp4
-rw-r--r--core/string_db.h3
-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/AnimatedSprite.xml10
-rw-r--r--doc/classes/AnimatedSprite3D.xml8
-rw-r--r--doc/classes/BackBufferCopy.xml10
-rw-r--r--doc/classes/Camera.xml31
-rw-r--r--doc/classes/Camera2D.xml14
-rw-r--r--doc/classes/File.xml28
-rw-r--r--doc/classes/KinematicBody.xml18
-rw-r--r--doc/classes/KinematicBody2D.xml22
-rw-r--r--doc/classes/Line2D.xml26
-rw-r--r--doc/classes/Particles.xml16
-rw-r--r--doc/classes/Particles2D.xml20
-rw-r--r--doc/classes/ParticlesMaterial.xml68
-rw-r--r--doc/classes/Performance.xml39
-rw-r--r--doc/classes/Sprite.xml18
-rw-r--r--doc/classes/Sprite3D.xml9
-rw-r--r--doc/classes/SpriteBase3D.xml17
-rw-r--r--doc/classes/TextureButton.xml21
-rw-r--r--doc/classes/TextureProgress.xml34
-rw-r--r--drivers/gles3/shaders/subsurf_scattering.glsl25
-rw-r--r--drivers/unix/os_unix.cpp8
-rw-r--r--drivers/unix/os_unix.h2
-rw-r--r--editor/SCsub14
-rw-r--r--editor/editor_node.cpp3
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp279
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h74
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp48
-rw-r--r--editor/project_manager.cpp3
-rw-r--r--modules/gdnative/SCsub22
-rw-r--r--modules/gdnative/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative/string_name.cpp91
-rw-r--r--modules/gdnative/gdnative_api.json2050
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/include/gdnative/string_name.h68
-rw-r--r--modules/gdnative/register_types.cpp1
-rw-r--r--modules/gdscript/gd_function.cpp2
-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/SCsub5
-rw-r--r--modules/mono/csharp_script.cpp80
-rw-r--r--modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs2
-rw-r--r--modules/mono/editor/godotsharp_builds.cpp10
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp34
-rw-r--r--modules/mono/mono_gd/gd_mono.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp97
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.h8
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp55
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h19
-rw-r--r--modules/mono/mono_reg_utils.py6
-rw-r--r--modules/visual_script/visual_script_nodes.cpp2
-rw-r--r--platform/android/build.gradle.template5
-rw-r--r--platform/iphone/app_delegate.mm17
-rw-r--r--platform/iphone/game_center.mm2
-rw-r--r--platform/iphone/godot_iphone.cpp7
-rw-r--r--platform/iphone/os_iphone.cpp8
-rw-r--r--platform/iphone/os_iphone.h2
-rw-r--r--platform/osx/detect.py2
-rw-r--r--platform/osx/export/export.cpp456
-rw-r--r--platform/osx/os_osx.h7
-rw-r--r--platform/osx/os_osx.mm106
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--platform/uwp/os_uwp.h2
-rw-r--r--platform/windows/os_windows.cpp2
-rw-r--r--platform/windows/os_windows.h2
-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/navigation.cpp4
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/register_scene_types.cpp7
-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/physics/physics_server_sw.cpp15
-rw-r--r--servers/physics/physics_server_sw.h3
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp15
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h3
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h7
-rw-r--r--servers/physics_2d_server.cpp2
-rw-r--r--servers/physics_2d_server.h3
-rw-r--r--servers/physics_server.cpp2
-rw-r--r--servers/physics_server.h3
99 files changed, 3282 insertions, 1536 deletions
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/io/logger.cpp b/core/io/logger.cpp
index 7ea5f06d7e..b94007d316 100644
--- a/core/io/logger.cpp
+++ b/core/io/logger.cpp
@@ -177,11 +177,14 @@ void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) {
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, p_list);
+ 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);
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 0834d6c321..d388a622de 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -1140,8 +1140,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
if (buf) {
encode_uint32(0, buf);
buf += 4;
- r_len += 4;
}
+ r_len += 4;
+
} else {
_encode_string(obj->get_class(), buf, r_len);
diff --git a/core/os/os.h b/core/os/os.h
index 6fcfd71332..48effe99da 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -204,7 +204,7 @@ public:
virtual String get_installed_templates_path() const { return ""; }
virtual String get_executable_path() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL) = 0;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false) = 0;
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index ff2be87b07..3994011c06 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -667,8 +667,8 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
file->store_line("; Engine configuration file.");
file->store_line("; It's best edited using the editor UI and not directly,");
file->store_line("; since the parameters that go here are not all obvious.");
- file->store_line("; ");
- file->store_line("; Format: ");
+ file->store_line(";");
+ file->store_line("; Format:");
file->store_line("; [section] ; section goes between []");
file->store_line("; param=value ; assign values to parameters");
file->store_line("");
diff --git a/core/string_db.h b/core/string_db.h
index 2bef29fab8..de91e2abd8 100644
--- a/core/string_db.h
+++ b/core/string_db.h
@@ -113,6 +113,9 @@ public:
else
return 0;
}
+ _FORCE_INLINE_ const void *data_unique_pointer() const {
+ return (void *)_data;
+ }
bool operator!=(const StringName &p_name) const;
_FORCE_INLINE_ operator String() const {
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/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml
index 809890bea1..dce7bf283a 100644
--- a/doc/classes/AnimatedSprite.xml
+++ b/doc/classes/AnimatedSprite.xml
@@ -4,7 +4,7 @@
Sprite node that can use multiple textures for animation.
</brief_description>
<description>
- Sprite node that can use multiple textures for animation. Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
+ Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
</tutorials>
@@ -149,7 +149,7 @@
</methods>
<members>
<member name="animation" type="String" setter="set_animation" getter="get_animation">
- The current animation from the [code]frames[/code] resource. If this value is changed, the [code]frame[/code] counter is reset.
+ The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
If [code]true[/code] texture will be centered. Default value: [code]true[/code].
@@ -161,7 +161,7 @@
If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code].
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame">
- The current frame index.
+ The displayed animation frame's index.
</member>
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
The [SpriteFrames] resource containing the animation(s).
@@ -170,7 +170,7 @@
The texture's drawing offset.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing">
- If [code]true[/code] the [code]animation[/code] is currently playing.
+ If [code]true[/code] the [member animation] is currently playing.
</member>
</members>
<signals>
@@ -181,7 +181,7 @@
</signal>
<signal name="frame_changed">
<description>
- Emitted when [code]frame[/code] changes.
+ Emitted when [member frame] changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 4e28f7de8d..b0bb7bb6ab 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ 2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
<description>
+ Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
</tutorials>
@@ -83,18 +85,22 @@
</methods>
<members>
<member name="animation" type="String" setter="set_animation" getter="get_animation">
+ The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame">
+ The displayed animation frame's index.
</member>
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
+ The [SpriteFrames] resource containing the animation(s).
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing">
+ If [code]true[/code] the [member animation] is currently playing.
</member>
</members>
<signals>
<signal name="frame_changed">
<description>
- Emitted when frame is changed.
+ Emitted when [member frame] changed.
</description>
</signal>
</signals>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 091bd3fa73..6c44430949 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -15,7 +15,7 @@
<return type="int" enum="BackBufferCopy.CopyMode">
</return>
<description>
- Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
+ Return the copy mode currently applied to the BackBufferCopy. See [code]COPY_MODE_*[/code] constants.
</description>
</method>
<method name="get_rect" qualifiers="const">
@@ -31,7 +31,7 @@
<argument index="0" name="copy_mode" type="int" enum="BackBufferCopy.CopyMode">
</argument>
<description>
- Set the copy mode of the BackBufferCopy (refer to constants section).
+ Set the copy mode of the BackBufferCopy. See [code]COPY_MODE_*[/code] constants.
</description>
</method>
<method name="set_rect">
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode">
+ Buffer mode. See [code]COPY_MODE_*[/code] constants.
</member>
<member name="rect" type="Rect2" setter="set_rect" getter="get_rect">
+ The area covered by the BackBufferCopy. Only used if [code]copy_mode[/code] is [code]COPY_MODE_RECT[/code].
</member>
</members>
<constants>
@@ -55,10 +57,10 @@
Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
</constant>
<constant name="COPY_MODE_RECT" value="1">
- Sets the copy mode to a region.
+ BackBufferCopy buffers a rectangular region.
</constant>
<constant name="COPY_MODE_VIEWPORT" value="2">
- Sets the copy mode to the entire screen.
+ BackBufferCopy buffers the entire screen.
</constant>
</constants>
</class>
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index 2302c39e35..068b91204c 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -15,6 +15,7 @@
<return type="void">
</return>
<description>
+ If this is the current Camera, remove it from being current. If it is inside the node tree, request to make the next Camera current, if any.
</description>
</method>
<method name="get_camera_transform" qualifiers="const">
@@ -28,6 +29,7 @@
<return type="int">
</return>
<description>
+ Returns the culling mask, describing which 3D render layers are rendered by this Camera.
</description>
</method>
<method name="get_doppler_tracking" qualifiers="const">
@@ -40,30 +42,35 @@
<return type="Environment">
</return>
<description>
+ Returns the [Environment] used by this Camera.
</description>
</method>
<method name="get_fov" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the [i]FOV[/i] Y angle in degrees (FOV means Field of View).
</description>
</method>
<method name="get_h_offset" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the horizontal (X) offset of the Camera viewport.
</description>
</method>
<method name="get_keep_aspect_mode" qualifiers="const">
<return type="int" enum="Camera.KeepAspect">
</return>
<description>
+ Returns the current mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants.
</description>
</method>
<method name="get_projection" qualifiers="const">
<return type="int" enum="Camera.Projection">
</return>
<description>
+ Returns the Camera's projection. See PROJECTION_* constants.
</description>
</method>
<method name="get_size" qualifiers="const">
@@ -76,25 +83,28 @@
<return type="float">
</return>
<description>
+ Returns the vertical (Y) offset of the Camera viewport.
</description>
</method>
<method name="get_zfar" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the far clip plane in world space units.
</description>
</method>
<method name="get_znear" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the near clip plane in world space units.
</description>
</method>
<method name="is_current" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
+ Returns [code]true[/code] if the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
</description>
</method>
<method name="is_position_behind" qualifiers="const">
@@ -103,6 +113,7 @@
<argument index="0" name="world_point" type="Vector3">
</argument>
<description>
+ Returns [code]true[/code] if the given position is behind the Camera.
</description>
</method>
<method name="make_current">
@@ -126,6 +137,7 @@
<argument index="0" name="screen_point" type="Vector2">
</argument>
<description>
+ Returns how a 2D coordinate in the Viewport rectangle maps to a 3D point in worldspace.
</description>
</method>
<method name="project_ray_normal" qualifiers="const">
@@ -134,7 +146,7 @@
<argument index="0" name="screen_point" type="Vector2">
</argument>
<description>
- Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="project_ray_origin" qualifiers="const">
@@ -143,7 +155,7 @@
<argument index="0" name="screen_point" type="Vector2">
</argument>
<description>
- Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="set_cull_mask">
@@ -152,6 +164,7 @@
<argument index="0" name="mask" type="int">
</argument>
<description>
+ Sets the cull mask, describing which 3D render layers are rendered by this Camera.
</description>
</method>
<method name="set_doppler_tracking">
@@ -160,6 +173,7 @@
<argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
</argument>
<description>
+ Changes Doppler effect tracking. See [code]DOPPLER_*[/code] constants.
</description>
</method>
<method name="set_environment">
@@ -168,6 +182,7 @@
<argument index="0" name="env" type="Environment">
</argument>
<description>
+ Sets the [Environment] to use for this Camera.
</description>
</method>
<method name="set_h_offset">
@@ -176,6 +191,7 @@
<argument index="0" name="ofs" type="float">
</argument>
<description>
+ Sets the horizontal (X) offset of the Camera viewport.
</description>
</method>
<method name="set_keep_aspect_mode">
@@ -184,6 +200,7 @@
<argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
</argument>
<description>
+ Sets the mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants.
</description>
</method>
<method name="set_orthogonal">
@@ -218,6 +235,7 @@
<argument index="0" name="ofs" type="float">
</argument>
<description>
+ Sets the vertical (Y) offset of the Camera viewport.
</description>
</method>
<method name="unproject_position" qualifiers="const">
@@ -226,7 +244,7 @@
<argument index="0" name="world_point" type="Vector3">
</argument>
<description>
- Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
+ Returns how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
</description>
</method>
</methods>
@@ -238,14 +256,19 @@
Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
</constant>
<constant name="KEEP_WIDTH" value="0">
+ Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's width by changing the height. Height is [code]sizey[/code] for orthographic projection, [code]fovy[/code] for perspective projection.
</constant>
<constant name="KEEP_HEIGHT" value="1">
+ Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's height by changing the width. Width is [code]sizex[/code] for orthographic projection, [code]fovx[/code] for perspective projection.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0">
+ Disable Doppler effect simulation (default).
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
+ Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
<constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
+ Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant>
</constants>
</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index b6b699612e..c627112af5 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes.
- This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
+ This node is intended to be a simple helper to get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
</description>
<tutorials>
</tutorials>
@@ -324,18 +324,24 @@
</methods>
<members>
<member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode">
+ The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants.
</member>
<member name="current" type="bool" setter="_set_current" getter="is_current">
+ If [code]true[/code] this camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
</member>
<member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled">
</member>
<member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled">
</member>
@@ -346,16 +352,21 @@
<member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled">
</member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit">
+ Bottom scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_left" type="int" setter="set_limit" getter="get_limit">
+ Left scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_right" type="int" setter="set_limit" getter="get_limit">
+ Right scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled">
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit">
+ Top scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ The camera's offset, useful for looking around or camera shake animations.
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating">
</member>
@@ -364,6 +375,7 @@
<member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing">
</member>
<member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom">
+ The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2x zoom in, and [code]Vector2(4, 4)[/code] for a 4x zoom out.
</member>
</members>
<constants>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index e1a024270e..fd71f42a04 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -37,7 +37,7 @@
<return type="bool">
</return>
<description>
- Return whether the file cursor reached the end of the file.
+ Returns [code]true[/code] if the file cursor reached the end of the file.
</description>
</method>
<method name="file_exists" qualifiers="const">
@@ -46,7 +46,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Get whether or not the file in the specified path exists.
+ Returns [code]true[/code] if the file in the specified path exists.
</description>
</method>
<method name="get_16" qualifiers="const">
@@ -113,7 +113,7 @@
<return type="bool">
</return>
<description>
- Get whether endian swap is enabled for this file.
+ Returns [code]true[/code] if endian swap is enabled for this file.
</description>
</method>
<method name="get_error" qualifiers="const">
@@ -134,7 +134,7 @@
<return type="int">
</return>
<description>
- Return the size of the file in bytes.
+ Returns the size of the file in bytes.
</description>
</method>
<method name="get_line" qualifiers="const">
@@ -150,7 +150,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Return a md5 String representing the file at the given path or an empty [String] on failure.
+ Returns a MD5 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_modified_time" qualifiers="const">
@@ -159,6 +159,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
+ Returns the modified time in unix timestamp of the [code]file[/code] or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time].
</description>
</method>
<method name="get_pascal_string">
@@ -172,7 +173,7 @@
<return type="int">
</return>
<description>
- Return the file cursor position.
+ Returns the file cursor position.
</description>
</method>
<method name="get_real" qualifiers="const">
@@ -188,7 +189,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Return a sha256 String representing the file at the given path or an empty [String] on failure.
+ Returns a SHA-256 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_var" qualifiers="const">
@@ -202,7 +203,7 @@
<return type="bool">
</return>
<description>
- Return whether the file is currently opened.
+ Returns [code]true[/code] if the file is currently opened.
</description>
</method>
<method name="open">
@@ -279,7 +280,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines.
+ If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines.
Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
</description>
</method>
@@ -394,16 +395,16 @@
</methods>
<constants>
<constant name="READ" value="1">
- Open the file for reading.
+ Open the file for read operations.
</constant>
<constant name="WRITE" value="2">
- Open the file for writing. Create it if the file not exists and truncate if it exists.
+ Open the file for write operations. Create it if the file does not exist and truncate if it exists.
</constant>
<constant name="READ_WRITE" value="3">
- Open the file for reading and writing, without truncating the file.
+ Open the file for read and write operations. Does not truncate the file.
</constant>
<constant name="WRITE_READ" value="7">
- Open the file for reading and writing. Create it if the file not exists and truncate if it exists.
+ Open the file for read and write operations. Create it if the file does not exist and truncate if it exists.
</constant>
<constant name="COMPRESSION_FASTLZ" value="0">
Use the FastLZ compression method.
@@ -415,6 +416,7 @@
Use the Zstd compression method.
</constant>
<constant name="COMPRESSION_GZIP" value="3">
+ Use the GZip compression method.
</constant>
</constants>
</class>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 8f242c5187..86354548cd 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -6,7 +6,7 @@
<description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ Kinematic Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<tutorials>
</tutorials>
@@ -17,6 +17,7 @@
<return type="Vector3">
</return>
<description>
+ Returns the velocity of the floor. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="get_safe_margin" qualifiers="const">
@@ -31,30 +32,35 @@
<argument index="0" name="slide_idx" type="int">
</argument>
<description>
+ Returns a [KinematicCollision], which contains information about a collision that occured during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count]()-1).
</description>
</method>
<method name="get_slide_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="move_and_collide">
@@ -63,6 +69,7 @@
<argument index="0" name="rel_vec" type="Vector3">
</argument>
<description>
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.
</description>
</method>
<method name="move_and_slide">
@@ -79,6 +86,13 @@
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method.
+ [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops.
+ [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
+ Returns the movement that remained when the body stopped. To get more detailed information about collisions that occured, use [method get_slide_collision].
</description>
</method>
<method name="set_safe_margin">
@@ -97,11 +111,13 @@
<argument index="1" name="rel_vec" type="Vector3">
</argument>
<description>
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
</description>
</method>
</methods>
<members>
<member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin">
+ If the body is at least this close to another body, this body will consider them to be colliding.
</member>
</members>
<constants>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index dddae2c0fc..e7c58fdb3a 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -6,7 +6,7 @@
<description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ Kinematic Characters: KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<tutorials>
</tutorials>
@@ -17,6 +17,7 @@
<return type="Vector2">
</return>
<description>
+ Returns the velocity of the floor. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="get_safe_margin" qualifiers="const">
@@ -31,30 +32,35 @@
<argument index="0" name="slide_idx" type="int">
</argument>
<description>
+ Returns a [KinematicCollision2D], which contains information about a collision that occured during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count]()-1).
</description>
</method>
<method name="get_slide_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide].
</description>
</method>
<method name="move_and_collide">
@@ -63,7 +69,7 @@
<argument index="0" name="rel_vec" type="Vector2">
</argument>
<description>
- Moves the body along the given vector. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the colliding body.
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
</description>
</method>
<method name="move_and_slide">
@@ -80,6 +86,13 @@
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method.
+ [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops.
+ [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
+ Returns the movement that remained when the body stopped. To get more detailed information about collisions that occured, use [method get_slide_collision].
</description>
</method>
<method name="set_safe_margin">
@@ -98,14 +111,15 @@
<argument index="1" name="rel_vec" type="Vector2">
</argument>
<description>
- Returns true if there would be a collision if the body moved from the given point in the given direction.
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
</description>
</method>
</methods>
<members>
<member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin">
+ If the body is at least this close to another body, this body will consider them to be colliding.
</member>
</members>
<constants>
</constants>
-</class>
+</class> \ No newline at end of file
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index e6e615ccf1..3cca256a5d 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -17,7 +17,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Add a point at the x/y position in the supplied [Vector2]
+ Add a point at the [code]position[/code]. Appends the point at the end of the line.
</description>
</method>
<method name="get_begin_cap_mode" qualifiers="const">
@@ -54,6 +54,7 @@
<return type="int">
</return>
<description>
+ Returns the Line2D's amount of points.
</description>
</method>
<method name="get_point_position" qualifiers="const">
@@ -62,6 +63,7 @@
<argument index="0" name="i" type="int">
</argument>
<description>
+ Returns point [code]i[code]'s position.
</description>
</method>
<method name="get_points" qualifiers="const">
@@ -106,7 +108,7 @@
<argument index="0" name="i" type="int">
</argument>
<description>
- Remove the point at index 'i' from the line.
+ Remove the point at index [code]i[/code] from the line.
</description>
</method>
<method name="set_begin_cap_mode">
@@ -157,6 +159,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
+ Overwites the position in point [code]i[/code] with the supplied [code]position[/code].
</description>
</method>
<method name="set_points">
@@ -210,44 +213,63 @@
</methods>
<members>
<member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode">
+ Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code].
</member>
<member name="default_color" type="Color" setter="set_default_color" getter="get_default_color">
+ The line's color. Will not be used if a gradient is set.
</member>
<member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode">
+ Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code].
</member>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
+ The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set.
</member>
<member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode">
+ The style for the points inbetween the start and the end.
</member>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
+ The points that form the lines. The line is drawn between every point set in this array.
</member>
<member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision">
+ The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.
</member>
<member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit">
+ The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [code]LINE_JOINT_SHARP[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode">
+ The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. Default value: [code]LINE_TEXTURE_NONE[/code].
</member>
<member name="width" type="float" setter="set_width" getter="get_width">
+ The line's width.
</member>
</members>
<constants>
<constant name="LINE_JOINT_SHARP" value="0">
+ The line's joints will be pointy. If [code]sharp_limit[/code] is greater than the rotation of a joint, it becomes a bevel joint instead.
</constant>
<constant name="LINE_JOINT_BEVEL" value="1">
+ The line's joints will be bevelled/chamfered.
</constant>
<constant name="LINE_JOINT_ROUND" value="2">
+ The line's joints will be rounded.
</constant>
<constant name="LINE_CAP_NONE" value="0">
+ Don't have a line cap.
</constant>
<constant name="LINE_CAP_BOX" value="1">
+ Draws the line cap as a box.
</constant>
<constant name="LINE_CAP_ROUND" value="2">
+ Draws the line cap as a circle.
</constant>
<constant name="LINE_TEXTURE_NONE" value="0">
+ Takes the left pixels of the texture and renders it over the whole line.
</constant>
<constant name="LINE_TEXTURE_TILE" value="1">
+ Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly.
</constant>
</constants>
</class>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
index e17e60f2bc..1e89d2194c 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/Particles.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Particles" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ 3D particle emitter.
</brief_description>
<description>
+ 3D particle node used to create a variety of particle systems and effects. [code]Particles[/code] features an emitter that generates some number of particles at a given rate.
+ Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
</tutorials>
@@ -252,8 +255,10 @@
</methods>
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount">
+ Number of particles to emit.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder">
+ Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code].
</member>
<member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
</member>
@@ -266,36 +271,47 @@
<member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes">
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting">
+ If [code]true[/code] particles are being emitted. Default value: [code]true[/code].
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio">
+ Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code].
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps">
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta">
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime">
+ Amount of time each particle will exist. Default value: [code]1[/code].
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates">
+ If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code].
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot">
+ If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code].
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time">
</member>
<member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
+ [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio">
+ Emission randomness ratio. Default value: [code]0[/code].
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
+ Speed scaling ratio. Default value: [code]1[/code].
</member>
<member name="visibility_aabb" type="Rect3" setter="set_visibility_aabb" getter="get_visibility_aabb">
</member>
</members>
<constants>
<constant name="DRAW_ORDER_INDEX" value="0">
+ Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1">
+ Particles are drawn in order of remaining lifetime.
</constant>
<constant name="DRAW_ORDER_VIEW_DEPTH" value="2">
+ Particles are drawn in order of depth.
</constant>
<constant name="MAX_DRAW_PASSES" value="4" enum="">
</constant>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
index d837d6eb62..b2c63ea0c3 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/Particles2D.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Particles2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- 2D Particle emitter
+ 2D particle emitter.
</brief_description>
<description>
- Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist).
+ 2D particle node used to create a variety of particle systems and effects. [code]Particles2D[/code] features an emitter that generates some number of particles at a given rate.
+ Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
</tutorials>
@@ -285,46 +286,61 @@
</methods>
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount">
+ Number of particles to emit.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder">
+ Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code].
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting">
+ If [code]true[/code] particles are being emitted. Default value: [code]true[/code].
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio">
+ Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code].
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps">
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta">
</member>
<member name="h_frames" type="int" setter="set_h_frames" getter="get_h_frames">
+ Number of horizontal frames in [code]texture[/code].
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime">
+ Amount of time each particle will exist. Default value: [code]1[/code].
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates">
+ If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code].
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot">
+ If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code].
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time">
</member>
<member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
+ [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio">
+ Emission randomness ratio. Default value: [code]0[/code].
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
+ Speed scaling ratio. Default value: [code]1[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ Particle texture. If [code]null[/code] particles will be squares.
</member>
<member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames">
+ Number of vertical frames in [code]texture[/code].
</member>
<member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect">
</member>
</members>
<constants>
<constant name="DRAW_ORDER_INDEX" value="0">
+ Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1">
+ Particles are drawn in order of remaining lifetime.
</constant>
</constants>
</class>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 1767a19a9f..bebdc44b69 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Particle properties for [Particles] and [Particles2D] nodes.
</brief_description>
<description>
+ ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [Particles] and [Particles2D] emitter nodes.
+ Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle.
</description>
<tutorials>
</tutorials>
@@ -294,152 +297,217 @@
</methods>
<members>
<member name="angle" type="float" setter="set_param" getter="get_param">
+ Initial rotation applied to each particle.
</member>
<member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's rotation will be animated along this [CurveTexture].
</member>
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Rotation randomness ratio. Default value: [code]0[/code].
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param">
+ Initial angular velocity applied to each particle.
</member>
<member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's angular velocity will vary along this [CurveTexture].
</member>
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Angular velocity randomness ratio. Default value: [code]0[/code].
</member>
<member name="anim_loop" type="bool" setter="set_flag" getter="get_flag">
+ If [code]true[/code] animation will loop. Default value: [code]false[/code].
</member>
<member name="anim_offset" type="float" setter="set_param" getter="get_param">
+ Particle animation offset.
</member>
<member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's animation offset will vary along this [CurveTexture].
</member>
<member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Animation offset randomness ratio. Default value: [code]0[/code].
</member>
<member name="anim_speed" type="float" setter="set_param" getter="get_param">
+ Particle animation speed.
</member>
<member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's animation speed will vary along this [CurveTexture].
</member>
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Animation speed randomness ratio. Default value: [code]0[/code].
</member>
<member name="color" type="Color" setter="set_color" getter="get_color">
+ Each particle's initial color. If the [Particle2D]'s [code]texture[/code] is defined, it will be multiplied by this color.
</member>
<member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp">
+ Each particle's color will vary along this [GradientTexture].
</member>
<member name="damping" type="float" setter="set_param" getter="get_param">
+ The rate at which particles lose velocity.
</member>
<member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Damping will vary along this [CurveTexture].
</member>
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Damping randomness ratio. Default value: [code]0[/code].
</member>
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
+ The box's extents if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_BOX[/code].
</member>
<member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture">
</member>
<member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
</member>
<member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count">
+ The number of emission points if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_POINTS[/code] or [code]EMISSION_SHAPE_DIRECTED_POINTS[/code].
</member>
<member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture">
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape">
+ Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [code]EMISSION_SHAPE_POINT[/code].
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
+ The sphere's radius if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_SPHERE[/code].
</member>
<member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag">
</member>
<member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag">
+ If [code]true[/code] particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles].
</member>
<member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag">
</member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness">
</member>
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity">
+ Gravity applied to every particle. Default value: [code](0, 98, 0)[/code].
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param">
+ Initial hue variation applied to each particle.
</member>
<member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's hue will vary along this [CurveTexture].
</member>
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Hue variation randomness ratio. Default value: [code]0[/code].
</member>
<member name="initial_velocity" type="float" setter="set_param" getter="get_param">
+ Initial velocity for each particle.
</member>
<member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Initial velocity randomness ratio. Default value: [code]0[/code].
</member>
<member name="linear_accel" type="float" setter="set_param" getter="get_param">
+ Linear acceleration applied to each particle.
</member>
<member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's linear acceleration will vary along this [CurveTexture].
</member>
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Linear acceleration randomness ratio. Default value: [code]0[/code].
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
+ Orbital velocity applied to each particle.
</member>
<member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's orbital velocity will vary along this [CurveTexture].
</member>
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Orbital velocity randomness ratio. Default value: [code]0[/code].
</member>
<member name="radial_accel" type="float" setter="set_param" getter="get_param">
+ Linear acceleration applied to each particle.
</member>
<member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's radial acceleration will vary along this [CurveTexture].
</member>
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Radial acceleration randomness ratio. Default value: [code]0[/code].
</member>
<member name="scale" type="float" setter="set_param" getter="get_param">
+ Initial scale applied to each particle.
</member>
<member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's scale will vary along this [CurveTexture].
</member>
<member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Scale randomness ratio. Default value: [code]0[/code].
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread">
+ Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code].
</member>
<member name="tangential_accel" type="float" setter="set_param" getter="get_param">
+ Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity.
</member>
<member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ Each particle's tangential acceleration will vary along this [CurveTexture].
</member>
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ Tangential acceleration randomness ratio. Default value: [code]0[/code].
</member>
<member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier">
+ Trail particles' color will vary along this [GradientTexture].
</member>
<member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor">
+ Emitter will emit [code]amount[/code] divided by [code]trail_divisor[/code] particles. The remaining particles will be used as trail(s).
</member>
<member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier">
+ Trail particles' size will vary along this [CurveTexture].
</member>
</members>
<constants>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital_velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue_variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11">
+ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12">
</constant>
<constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0">
+ Use with [method set_flag] to set [member flag_align_y].
</constant>
<constant name="FLAG_ROTATE_Y" value="1">
+ Use with [method set_flag] to set [member flag_rotate_y]
</constant>
<constant name="FLAG_MAX" value="4">
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0">
+ All particles will be emitted from a single point.
</constant>
<constant name="EMISSION_SHAPE_SPHERE" value="1">
+ Particles will be emitted in the volume of a sphere.
</constant>
<constant name="EMISSION_SHAPE_BOX" value="2">
+ Particles will be emitted in the volume of a box.
</constant>
<constant name="EMISSION_SHAPE_POINTS" value="3">
</constant>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 71987ace9e..82ee3531f1 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Performance" inherits="Object" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Exposes performance related data.
</brief_description>
<description>
+ This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [i]Monitor[/i] tab in the editor's [i]Debugger[/i] panel. By using the [method get_monitor] method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build.
+ Many of these monitors are not updated in real-time, so there may be a short delay between changes.
</description>
<tutorials>
</tutorials>
@@ -15,63 +18,93 @@
<argument index="0" name="monitor" type="int" enum="Performance.Monitor">
</argument>
<description>
+ Returns the value of one of the available monitors. You should provide one of this class's constants as the argument, like this:
+ [codeblock]
+ print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console
+ [/codeblock]
</description>
</method>
</methods>
<constants>
<constant name="TIME_FPS" value="0">
+ Frames per second.
</constant>
<constant name="TIME_PROCESS" value="1">
+ Time it took to complete one frame.
</constant>
- <constant name="TIME_FIXED_PROCESS" value="2">
+ <constant name="TIME_PHYSICS_PROCESS" value="2">
+ Time it took to complete one physics frame.
</constant>
<constant name="MEMORY_STATIC" value="3">
+ Static memory currently used, in bytes. Not available in release builds.
</constant>
<constant name="MEMORY_DYNAMIC" value="4">
+ Dynamic memory currently used, in bytes. Not available in release builds.
</constant>
<constant name="MEMORY_STATIC_MAX" value="5">
+ Available static memory. Not available in release builds.
</constant>
<constant name="MEMORY_DYNAMIC_MAX" value="6">
+ Available dynamic memory. Not available in release builds.
</constant>
<constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7">
+ Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
</constant>
<constant name="OBJECT_COUNT" value="8">
+ Number of objects currently instanced (including nodes).
</constant>
<constant name="OBJECT_RESOURCE_COUNT" value="9">
+ Number of resources currently used.
</constant>
<constant name="OBJECT_NODE_COUNT" value="10">
+ Number of nodes currently instanced. This also includes the root node, as well as any nodes not in the scene tree.
</constant>
<constant name="RENDER_OBJECTS_IN_FRAME" value="11">
+ 3D objects drawn per frame.
</constant>
<constant name="RENDER_VERTICES_IN_FRAME" value="12">
+ Vertices drawn per frame. 3D only.
</constant>
<constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="13">
+ Material changes per frame. 3D only
</constant>
<constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="14">
+ Shader changes per frame. 3D only.
</constant>
<constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="15">
+ Render surface changes per frame. 3D only.
</constant>
<constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16">
- </constant>
- <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
+ Draw calls per frame. 3D only.
</constant>
<constant name="RENDER_VIDEO_MEM_USED" value="17">
+ Video memory used. Includes both texture and vertex memory.
</constant>
<constant name="RENDER_TEXTURE_MEM_USED" value="18">
+ Texture memory used.
</constant>
<constant name="RENDER_VERTEX_MEM_USED" value="19">
+ Vertex memory used.
+ </constant>
+ <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
</constant>
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21">
+ Number of active [RigidBody2D] nodes in the game.
</constant>
<constant name="PHYSICS_2D_COLLISION_PAIRS" value="22">
+ Number of collision pairs in the 2D physics engine.
</constant>
<constant name="PHYSICS_2D_ISLAND_COUNT" value="23">
+ Number of islands in the 2D physics engine.
</constant>
<constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24">
+ Number of active [RigidBody] and [VehicleBody] nodes in the game.
</constant>
<constant name="PHYSICS_3D_COLLISION_PAIRS" value="25">
+ Number of collision pairs in the 3D physics engine.
</constant>
<constant name="PHYSICS_3D_ISLAND_COUNT" value="26">
+ Number of islands in the 3D physics engine.
</constant>
<constant name="MONITOR_MAX" value="27">
</constant>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index c0c491140f..0cdc8f7099 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -202,7 +202,7 @@
</methods>
<members>
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
- If [code]true[/code] texture will be centered. Default value: [code]true[/code].
+ If [code]true[/code] texture is centered. Default value: [code]true[/code].
</member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code].
@@ -211,40 +211,42 @@
If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code].
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame">
- Current frame to display from sprite sheet. [code]vframes[/code] or [code]hframes[/code] must be greater than 1.
+ Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1.
</member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
- The number of horizontal frames in the sprite sheet.
+ The number of collumns in the sprite sheet.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ The normal map gives depth to the Sprite.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
The texture's drawing offset.
</member>
<member name="region_enabled" type="bool" setter="set_region" getter="is_region">
- If [code]true[/code] texture will be cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code].
+ If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code].
</member>
<member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled">
+ If [code]true[/code] the outermost pixels get blurred out.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
- The region of the atlas texture to display. [code]region_enabled[/code] must be [code]true[/code].
+ The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
[Texture] object to draw.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes">
- The number of vertical frames in the sprite sheet.
+ The number of rows in the sprite sheet.
</member>
</members>
<signals>
<signal name="frame_changed">
<description>
- Emitted when the [code]frame[/code] changes.
+ Emitted when the [member frame] changes.
</description>
</signal>
<signal name="texture_changed">
<description>
- Emitted when the [code]texture[/code] changes.
+ Emitted when the [member texture] changes.
</description>
</signal>
</signals>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index f6f2f8f00c..e51616a071 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ 2D Sprite node in 3D world.
</brief_description>
<description>
+ A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
</description>
<tutorials>
</tutorials>
@@ -96,21 +98,28 @@
</methods>
<members>
<member name="frame" type="int" setter="set_frame" getter="get_frame">
+ Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1.
</member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
+ The number of columns in the sprite sheet.
</member>
<member name="region_enabled" type="bool" setter="set_region" getter="is_region">
+ If [code]true[/code] texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code].
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ [Texture] object to draw.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes">
+ The number of rows in the sprite sheet.
</member>
</members>
<signals>
<signal name="frame_changed">
<description>
+ Emitted when the [member frame] changes.
</description>
</signal>
</signals>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 1640e5dc9f..7ed681ea12 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ 2D Sprite node in 3D environment.
</brief_description>
<description>
+ A node that displays 2D texture information in a 3D environment.
</description>
<tutorials>
</tutorials>
@@ -164,36 +166,51 @@
<member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode">
</member>
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis">
+ The direction in which the front of the texture faces.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
+ If [code]true[/code] texture will be centered. Default value: [code]true[/code].
</member>
<member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ If [code]true[/code] texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code].
</member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
+ If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code].
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
+ If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate">
+ A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ The texture's drawing offset.
</member>
<member name="opacity" type="float" setter="set_opacity" getter="get_opacity">
+ The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible.
</member>
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size">
+ The size of one pixel's width on the Sprite to scale it in 3D.
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ If [code]true[/code] the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code].
</member>
<member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ If [code]true[/code] the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code].
</member>
</members>
<constants>
<constant name="FLAG_TRANSPARENT" value="0">
+ If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible.
</constant>
<constant name="FLAG_SHADED" value="1">
+ If set, the Light in the Environment has effects on the Sprite.
</constant>
<constant name="FLAG_DOUBLE_SIDED" value="2">
+ If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
</constant>
<constant name="FLAG_MAX" value="3">
+ Used internally to mark the end of the Flags section.
</constant>
<constant name="ALPHA_CUT_DISABLED" value="0">
</constant>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index e4f00555b3..8e51548c10 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureButton" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Button that can be themed with textures.
+ Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
</brief_description>
<description>
- Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.
- Only the normal texture is required, the others are optional.
+ [code]TextureButton[/code] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex Controls.
+ The Normal state's texture is required. Others are optional.
</description>
<tutorials>
</tutorials>
@@ -127,36 +127,51 @@
</methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="get_expand">
+ If [code]true[/code] the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code] the texture will not scale with the node. Default value: [code]false[/code].
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode">
+ Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more.
</member>
<member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask">
+ Pure black and white [Bitmap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes.
</member>
<member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture">
+ Texture to display when the node is disabled. See [member BaseButton.disabled].
</member>
<member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture">
+ Texture to display when the node has mouse or keyboard focus.
</member>
<member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture">
+ Texture to display when the mouse hovers the node.
</member>
<member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture">
+ Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state.
</member>
<member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture">
+ Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the enter key or if the player presses the [member BaseButton.shortcut] key.
</member>
</members>
<constants>
<constant name="STRETCH_SCALE" value="0">
+ Scale to fit the node's bounding rectangle.
</constant>
<constant name="STRETCH_TILE" value="1">
+ Tile inside the node's bounding rectangle.
</constant>
<constant name="STRETCH_KEEP" value="2">
+ The texture keeps its original size and stays in the bounding rectangle's top-left corner.
</constant>
<constant name="STRETCH_KEEP_CENTERED" value="3">
+ The texture keeps its original size and stays centered in the node's bounding rectangle.
</constant>
<constant name="STRETCH_KEEP_ASPECT" value="4">
+ Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
</constant>
<constant name="STRETCH_KEEP_ASPECT_CENTERED" value="5">
+ Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio.
</constant>
<constant name="STRETCH_KEEP_ASPECT_COVERED" value="6">
+ Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
</constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
index 0a6ffcdeb8..f8165753c6 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgress.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureProgress" inherits="Range" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Textured progress bar.
+ Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
<description>
- A [ProgressBar] that uses textures to display fill percentage. Can be set to linear or radial mode.
+ TextureProgress works like [ProgressBar] but it uses up to 3 textures instead of Godot's [Theme] resource. Works horizontally, vertically, and radially.
</description>
<tutorials>
</tutorials>
@@ -151,51 +151,59 @@
The fill direction. Uses FILL_* constants.
</member>
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch">
- If [code]true[/code] textures will be stretched as [NinePatchRect]. Uses [code]stretch_margin[/code] properties (see below). Default value: [code]false[/code]
+ If [code]true[/code] Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code].
</member>
<member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset">
- The offset amount for radial mode.
+ Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code].
</member>
<member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees">
- The amount of the texture to use for radial mode.
+ Upper limit for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]max_value[/code], the texture fills up to this angle.
+ See [member Range.value], [member Range.max_value].
</member>
<member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle">
- Start angle for radial mode.
+ Starting angle for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees].
</member>
<member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
- Nine-patch texture offset for bottom margin.
+ The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
<member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
- Nine-patch texture offset for left margin.
+ The width of the 9-patch's left column.
</member>
<member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
- Nine-patch texture offset for right margin.
+ The width of the 9-patch's right column.
</member>
<member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
- Nine-patch texture offset for top margin.
+ The height of the 9-patch's top row.
</member>
<member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture">
- The [Texture] that will be drawn over the progress bar.
+ [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress].
</member>
<member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture">
- The [Texture] used to display [code]value[/code].
+ [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
+ The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
</member>
<member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture">
- The [Texture] that will be drawn under the progress bar.
+ [Texture] that draws under the progress bar. The bar's background.
</member>
</members>
<constants>
<constant name="FILL_LEFT_TO_RIGHT" value="0">
+ The [member texture_progress] fills from left to right.
</constant>
<constant name="FILL_RIGHT_TO_LEFT" value="1">
+ The [member texture_progress] fills from right to left.
</constant>
<constant name="FILL_TOP_TO_BOTTOM" value="2">
+ The [member texture_progress] fills from top to bototm.
</constant>
<constant name="FILL_BOTTOM_TO_TOP" value="3">
+ The [member texture_progress] fills from bottom to top.
</constant>
<constant name="FILL_CLOCKWISE" value="4">
+ Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to refine its behavior.
</constant>
<constant name="FILL_COUNTER_CLOCKWISE" value="5">
+ Turns the node into a radial bar. The [member texture_progress] fills counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to refine its behavior.
</constant>
</constants>
</class>
diff --git a/drivers/gles3/shaders/subsurf_scattering.glsl b/drivers/gles3/shaders/subsurf_scattering.glsl
index 20c3b7473f..fc66d66198 100644
--- a/drivers/gles3/shaders/subsurf_scattering.glsl
+++ b/drivers/gles3/shaders/subsurf_scattering.glsl
@@ -82,18 +82,18 @@ QUALIFIER vec2 kernel[17] = vec2[](
const int kernel_size=11;
-QUALIFIER vec4 kernel[11] = vec4[](
- vec4(0.560479, 0.0),
- vec4(0.00471691, -2.0),
- vec4(0.0192831, -1.28),
- vec4(0.03639, -0.72),
- vec4(0.0821904, -0.32),
- vec4(0.0771802, -0.08),
- vec4(0.0771802, 0.08),
- vec4(0.0821904, 0.32),
- vec4(0.03639, 0.72),
- vec4(0.0192831, 1.28),
- vec4(0.00471691,2.0)
+QUALIFIER vec2 kernel[11] = vec2[](
+ vec2(0.560479, 0.0),
+ vec2(0.00471691, -2.0),
+ vec2(0.0192831, -1.28),
+ vec2(0.03639, -0.72),
+ vec2(0.0821904, -0.32),
+ vec2(0.0771802, -0.08),
+ vec2(0.0771802, 0.08),
+ vec2(0.0821904, 0.32),
+ vec2(0.03639, 0.72),
+ vec2(0.0192831, 1.28),
+ vec2(0.00471691,2.0)
);
#endif //USE_11_SAMPLES
@@ -190,4 +190,3 @@ void main() {
frag_color = base_color;
}
}
-
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 29fe73f170..e0a62b316d 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -285,7 +285,7 @@ uint64_t OS_Unix::get_ticks_usec() const {
return longtime;
}
-Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode) {
+Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
if (p_blocking && r_pipe) {
@@ -297,7 +297,11 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
argss += String(" \"") + p_arguments[i] + "\"";
}
- argss += " 2>/dev/null"; //silence stderr
+ if (read_stderr) {
+ argss += " 2>&1"; // Read stderr too
+ } else {
+ argss += " 2>/dev/null"; //silence stderr
+ }
FILE *f = popen(argss.utf8().get_data(), "r");
ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 1cc44c0ffd..87e73534c4 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -97,7 +97,7 @@ public:
virtual void delay_usec(uint32_t p_usec) const;
virtual uint64_t get_ticks_usec() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL);
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false);
virtual Error kill(const ProcessID &p_pid);
virtual int get_process_id() const;
diff --git a/editor/SCsub b/editor/SCsub
index 11cdb471a8..e44b4e4bb2 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -4,18 +4,8 @@ Import('env')
env.editor_sources = []
import os
-from compat import encode_utf8, byte_to_str, open_utf8
-
-def escape_string(s, encoding='ascii'):
- if isinstance(s, unicode):
- s = s.encode(encoding)
- result = ''
- for c in s:
- if not (32 <= ord(c) < 127) or c in ('\\', '"'):
- result += '\\%03o' % ord(c)
- else:
- result += c
- return result
+from compat import encode_utf8, byte_to_str, open_utf8, escape_string
+
def make_certs_header(target, source, env):
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 4e0ad38320..ff415c83f1 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -4588,7 +4588,8 @@ EditorNode::EditorNode() {
{
int dpi_mode = EditorSettings::get_singleton()->get("interface/editor/hidpi_mode");
if (dpi_mode == 0) {
- editor_set_scale(OS::get_singleton()->get_screen_dpi(0) >= 192 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x > 2000 ? 2.0 : 1.0);
+ const int screen = OS::get_singleton()->get_current_screen();
+ editor_set_scale(OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).x > 2000 ? 2.0 : 1.0);
} else if (dpi_mode == 1) {
editor_set_scale(0.75);
} else if (dpi_mode == 2) {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 84b0917c78..b532bb793a 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -1225,8 +1225,6 @@ void EditorSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &EditorSettings::set_initial_value);
- ClassDB::bind_method(D_METHOD("set_favorite_dirs", "dirs"), &EditorSettings::set_favorite_dirs);
-
ADD_SIGNAL(MethodInfo("settings_changed"));
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1aa24c8172..4b216d63f5 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -990,9 +990,10 @@ 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])) {
+ if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0]) && bone_ik_list.size() == 0) {
drag = DRAG_NODE_2D;
drag_point_from = Object::cast_to<Node2D>(selection[0])->get_global_position();
} else {
@@ -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++) {
@@ -2744,9 +2748,9 @@ void CanvasItemEditor::_notification(int p_what) {
}
if (all_control && has_control)
- anchor_menu->show();
+ presets_menu->show();
else
- anchor_menu->hide();
+ presets_menu->hide();
for (Map<ObjectID, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
@@ -2778,57 +2782,15 @@ void CanvasItemEditor::_notification(int p_what) {
select_sb->set_default_margin(Margin(i), 4);
}
- select_button->set_icon(get_icon("ToolSelect", "EditorIcons"));
- list_select_button->set_icon(get_icon("ListSelect", "EditorIcons"));
- move_button->set_icon(get_icon("ToolMove", "EditorIcons"));
- rotate_button->set_icon(get_icon("ToolRotate", "EditorIcons"));
- snap_button->set_icon(get_icon("Snap", "EditorIcons"));
- snap_config_menu->set_icon(get_icon("GuiMiniTabMenu", "EditorIcons"));
- skeleton_menu->set_icon(get_icon("Bone", "EditorIcons"));
- pan_button->set_icon(get_icon("ToolPan", "EditorIcons"));
- pivot_button->set_icon(get_icon("EditPivot", "EditorIcons"));
- select_handle = get_icon("EditorHandle", "EditorIcons");
- anchor_handle = get_icon("EditorControlAnchor", "EditorIcons");
- lock_button->set_icon(get_icon("Lock", "EditorIcons"));
- unlock_button->set_icon(get_icon("Unlock", "EditorIcons"));
- group_button->set_icon(get_icon("Group", "EditorIcons"));
- ungroup_button->set_icon(get_icon("Ungroup", "EditorIcons"));
- key_insert_button->set_icon(get_icon("Key", "EditorIcons"));
-
- zoom_minus->set_icon(get_icon("ZoomLess", "EditorIcons"));
- zoom_reset->set_icon(get_icon("ZoomReset", "EditorIcons"));
- zoom_plus->set_icon(get_icon("ZoomMore", "EditorIcons"));
-
- anchor_menu->set_icon(get_icon("Anchor", "EditorIcons"));
- PopupMenu *p = anchor_menu->get_popup();
-
- p->add_icon_item(get_icon("ControlAlignTopLeft", "EditorIcons"), "Top Left", ANCHOR_ALIGN_TOP_LEFT);
- p->add_icon_item(get_icon("ControlAlignTopRight", "EditorIcons"), "Top Right", ANCHOR_ALIGN_TOP_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomRight", "EditorIcons"), "Bottom Right", ANCHOR_ALIGN_BOTTOM_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomLeft", "EditorIcons"), "Bottom Left", ANCHOR_ALIGN_BOTTOM_LEFT);
- p->add_separator();
- p->add_icon_item(get_icon("ControlAlignLeftCenter", "EditorIcons"), "Center Left", ANCHOR_ALIGN_CENTER_LEFT);
- p->add_icon_item(get_icon("ControlAlignTopCenter", "EditorIcons"), "Center Top", ANCHOR_ALIGN_CENTER_TOP);
- p->add_icon_item(get_icon("ControlAlignRightCenter", "EditorIcons"), "Center Right", ANCHOR_ALIGN_CENTER_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomCenter", "EditorIcons"), "Center Bottom", ANCHOR_ALIGN_CENTER_BOTTOM);
- p->add_icon_item(get_icon("ControlAlignCenter", "EditorIcons"), "Center", ANCHOR_ALIGN_CENTER);
- p->add_separator();
- p->add_icon_item(get_icon("ControlAlignLeftWide", "EditorIcons"), "Left Wide", ANCHOR_ALIGN_LEFT_WIDE);
- p->add_icon_item(get_icon("ControlAlignTopWide", "EditorIcons"), "Top Wide", ANCHOR_ALIGN_TOP_WIDE);
- p->add_icon_item(get_icon("ControlAlignRightWide", "EditorIcons"), "Right Wide", ANCHOR_ALIGN_RIGHT_WIDE);
- p->add_icon_item(get_icon("ControlAlignBottomWide", "EditorIcons"), "Bottom Wide", ANCHOR_ALIGN_BOTTOM_WIDE);
- p->add_icon_item(get_icon("ControlVcenterWide", "EditorIcons"), "VCenter Wide ", ANCHOR_ALIGN_VCENTER_WIDE);
- p->add_icon_item(get_icon("ControlHcenterWide", "EditorIcons"), "HCenter Wide ", ANCHOR_ALIGN_HCENTER_WIDE);
- p->add_separator();
- p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect", ANCHOR_ALIGN_WIDE);
- p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect and Fit Parent", ANCHOR_ALIGN_WIDE_FIT);
-
AnimationPlayerEditor::singleton->get_key_editor()->connect("visibility_changed", this, "_keying_changed");
_keying_changed();
+
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
select_sb->set_texture(get_icon("EditorRect2D", "EditorIcons"));
+ }
+ if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
select_button->set_icon(get_icon("ToolSelect", "EditorIcons"));
list_select_button->set_icon(get_icon("ListSelect", "EditorIcons"));
move_button->set_icon(get_icon("ToolMove", "EditorIcons"));
@@ -2846,30 +2808,56 @@ void CanvasItemEditor::_notification(int p_what) {
ungroup_button->set_icon(get_icon("Ungroup", "EditorIcons"));
key_insert_button->set_icon(get_icon("Key", "EditorIcons"));
- anchor_menu->set_icon(get_icon("Anchor", "EditorIcons"));
- PopupMenu *p = anchor_menu->get_popup();
- p->clear();
+ zoom_minus->set_icon(get_icon("ZoomLess", "EditorIcons"));
+ zoom_reset->set_icon(get_icon("ZoomReset", "EditorIcons"));
+ zoom_plus->set_icon(get_icon("ZoomMore", "EditorIcons"));
- p->add_icon_item(get_icon("ControlAlignTopLeft", "EditorIcons"), "Top Left", ANCHOR_ALIGN_TOP_LEFT);
- p->add_icon_item(get_icon("ControlAlignTopRight", "EditorIcons"), "Top Right", ANCHOR_ALIGN_TOP_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomRight", "EditorIcons"), "Bottom Right", ANCHOR_ALIGN_BOTTOM_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomLeft", "EditorIcons"), "Bottom Left", ANCHOR_ALIGN_BOTTOM_LEFT);
+ PopupMenu *p = presets_menu->get_popup();
+
+ p->clear();
+ p->add_icon_item(get_icon("ControlAlignTopLeft", "EditorIcons"), "Top Left", ANCHORS_AND_MARGINS_PRESET_TOP_LEFT);
+ p->add_icon_item(get_icon("ControlAlignTopRight", "EditorIcons"), "Top Right", ANCHORS_AND_MARGINS_PRESET_TOP_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomRight", "EditorIcons"), "Bottom Right", ANCHORS_AND_MARGINS_PRESET_BOTTOM_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomLeft", "EditorIcons"), "Bottom Left", ANCHORS_AND_MARGINS_PRESET_BOTTOM_LEFT);
p->add_separator();
- p->add_icon_item(get_icon("ControlAlignLeftCenter", "EditorIcons"), "Center Left", ANCHOR_ALIGN_CENTER_LEFT);
- p->add_icon_item(get_icon("ControlAlignTopCenter", "EditorIcons"), "Center Top", ANCHOR_ALIGN_CENTER_TOP);
- p->add_icon_item(get_icon("ControlAlignRightCenter", "EditorIcons"), "Center Right", ANCHOR_ALIGN_CENTER_RIGHT);
- p->add_icon_item(get_icon("ControlAlignBottomCenter", "EditorIcons"), "Center Bottom", ANCHOR_ALIGN_CENTER_BOTTOM);
- p->add_icon_item(get_icon("ControlAlignCenter", "EditorIcons"), "Center", ANCHOR_ALIGN_CENTER);
+ p->add_icon_item(get_icon("ControlAlignLeftCenter", "EditorIcons"), "Center Left", ANCHORS_AND_MARGINS_PRESET_CENTER_LEFT);
+ p->add_icon_item(get_icon("ControlAlignTopCenter", "EditorIcons"), "Center Top", ANCHORS_AND_MARGINS_PRESET_CENTER_TOP);
+ p->add_icon_item(get_icon("ControlAlignRightCenter", "EditorIcons"), "Center Right", ANCHORS_AND_MARGINS_PRESET_CENTER_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomCenter", "EditorIcons"), "Center Bottom", ANCHORS_AND_MARGINS_PRESET_CENTER_BOTTOM);
+ p->add_icon_item(get_icon("ControlAlignCenter", "EditorIcons"), "Center", ANCHORS_AND_MARGINS_PRESET_CENTER);
p->add_separator();
- p->add_icon_item(get_icon("ControlAlignLeftWide", "EditorIcons"), "Left Wide", ANCHOR_ALIGN_LEFT_WIDE);
- p->add_icon_item(get_icon("ControlAlignTopWide", "EditorIcons"), "Top Wide", ANCHOR_ALIGN_TOP_WIDE);
- p->add_icon_item(get_icon("ControlAlignRightWide", "EditorIcons"), "Right Wide", ANCHOR_ALIGN_RIGHT_WIDE);
- p->add_icon_item(get_icon("ControlAlignBottomWide", "EditorIcons"), "Bottom Wide", ANCHOR_ALIGN_BOTTOM_WIDE);
- p->add_icon_item(get_icon("ControlVcenterWide", "EditorIcons"), "VCenter Wide ", ANCHOR_ALIGN_VCENTER_WIDE);
- p->add_icon_item(get_icon("ControlHcenterWide", "EditorIcons"), "HCenter Wide ", ANCHOR_ALIGN_HCENTER_WIDE);
+ p->add_icon_item(get_icon("ControlAlignLeftWide", "EditorIcons"), "Left Wide", ANCHORS_AND_MARGINS_PRESET_LEFT_WIDE);
+ p->add_icon_item(get_icon("ControlAlignTopWide", "EditorIcons"), "Top Wide", ANCHORS_AND_MARGINS_PRESET_TOP_WIDE);
+ p->add_icon_item(get_icon("ControlAlignRightWide", "EditorIcons"), "Right Wide", ANCHORS_AND_MARGINS_PRESET_RIGHT_WIDE);
+ p->add_icon_item(get_icon("ControlAlignBottomWide", "EditorIcons"), "Bottom Wide", ANCHORS_AND_MARGINS_PRESET_BOTTOM_WIDE);
+ p->add_icon_item(get_icon("ControlVcenterWide", "EditorIcons"), "VCenter Wide ", ANCHORS_AND_MARGINS_PRESET_VCENTER_WIDE);
+ p->add_icon_item(get_icon("ControlHcenterWide", "EditorIcons"), "HCenter Wide ", ANCHORS_AND_MARGINS_PRESET_HCENTER_WIDE);
p->add_separator();
- p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect", ANCHOR_ALIGN_WIDE);
- p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect and Fit Parent", ANCHOR_ALIGN_WIDE_FIT);
+ p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect", ANCHORS_AND_MARGINS_PRESET_WIDE);
+ p->add_separator();
+ p->add_submenu_item(TTR("Anchors only"), "Anchors");
+ p->set_item_icon(20, get_icon("Anchor", "EditorIcons"));
+
+ anchors_popup->clear();
+ anchors_popup->add_icon_item(get_icon("ControlAlignTopLeft", "EditorIcons"), "Top Left", ANCHORS_PRESET_TOP_LEFT);
+ anchors_popup->add_icon_item(get_icon("ControlAlignTopRight", "EditorIcons"), "Top Right", ANCHORS_PRESET_TOP_RIGHT);
+ anchors_popup->add_icon_item(get_icon("ControlAlignBottomRight", "EditorIcons"), "Bottom Right", ANCHORS_PRESET_BOTTOM_RIGHT);
+ anchors_popup->add_icon_item(get_icon("ControlAlignBottomLeft", "EditorIcons"), "Bottom Left", ANCHORS_PRESET_BOTTOM_LEFT);
+ anchors_popup->add_separator();
+ anchors_popup->add_icon_item(get_icon("ControlAlignLeftCenter", "EditorIcons"), "Center Left", ANCHORS_PRESET_CENTER_LEFT);
+ anchors_popup->add_icon_item(get_icon("ControlAlignTopCenter", "EditorIcons"), "Center Top", ANCHORS_PRESET_CENTER_TOP);
+ anchors_popup->add_icon_item(get_icon("ControlAlignRightCenter", "EditorIcons"), "Center Right", ANCHORS_PRESET_CENTER_RIGHT);
+ anchors_popup->add_icon_item(get_icon("ControlAlignBottomCenter", "EditorIcons"), "Center Bottom", ANCHORS_PRESET_CENTER_BOTTOM);
+ anchors_popup->add_icon_item(get_icon("ControlAlignCenter", "EditorIcons"), "Center", ANCHORS_PRESET_CENTER);
+ anchors_popup->add_separator();
+ anchors_popup->add_icon_item(get_icon("ControlAlignLeftWide", "EditorIcons"), "Left Wide", ANCHORS_PRESET_LEFT_WIDE);
+ anchors_popup->add_icon_item(get_icon("ControlAlignTopWide", "EditorIcons"), "Top Wide", ANCHORS_PRESET_TOP_WIDE);
+ anchors_popup->add_icon_item(get_icon("ControlAlignRightWide", "EditorIcons"), "Right Wide", ANCHORS_PRESET_RIGHT_WIDE);
+ anchors_popup->add_icon_item(get_icon("ControlAlignBottomWide", "EditorIcons"), "Bottom Wide", ANCHORS_PRESET_BOTTOM_WIDE);
+ anchors_popup->add_icon_item(get_icon("ControlVcenterWide", "EditorIcons"), "VCenter Wide ", ANCHORS_PRESET_VCENTER_WIDE);
+ anchors_popup->add_icon_item(get_icon("ControlHcenterWide", "EditorIcons"), "HCenter Wide ", ANCHORS_PRESET_HCENTER_WIDE);
+ anchors_popup->add_separator();
+ anchors_popup->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect", ANCHORS_PRESET_WIDE);
}
}
@@ -3001,25 +2989,51 @@ void CanvasItemEditor::_update_scroll(float) {
viewport_base->update();
}
-void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
+void CanvasItemEditor::_set_anchors_and_margins_preset(Control::LayoutPreset p_preset) {
List<Node *> &selection = editor_selection->get_selected_node_list();
- undo_redo->create_action(TTR("Change Anchors"));
+ undo_redo->create_action(TTR("Change Anchors and Margins"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Control *c = Object::cast_to<Control>(E->get());
undo_redo->add_do_method(c, "set_anchors_preset", p_preset);
+ switch (p_preset) {
+ case PRESET_TOP_LEFT:
+ case PRESET_TOP_RIGHT:
+ case PRESET_BOTTOM_LEFT:
+ case PRESET_BOTTOM_RIGHT:
+ case PRESET_CENTER_LEFT:
+ case PRESET_CENTER_TOP:
+ case PRESET_CENTER_RIGHT:
+ case PRESET_CENTER_BOTTOM:
+ case PRESET_CENTER:
+ undo_redo->add_do_method(c, "set_margins_preset", p_preset, Control::PRESET_MODE_KEEP_SIZE);
+ break;
+ case PRESET_LEFT_WIDE:
+ case PRESET_TOP_WIDE:
+ case PRESET_RIGHT_WIDE:
+ case PRESET_BOTTOM_WIDE:
+ case PRESET_VCENTER_WIDE:
+ case PRESET_HCENTER_WIDE:
+ case PRESET_WIDE:
+ undo_redo->add_do_method(c, "set_margins_preset", p_preset, Control::PRESET_MODE_MINSIZE);
+ break;
+ }
undo_redo->add_undo_method(c, "set_anchor", MARGIN_LEFT, c->get_anchor(MARGIN_LEFT));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_TOP, c->get_anchor(MARGIN_TOP));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_RIGHT, c->get_anchor(MARGIN_RIGHT));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_BOTTOM, c->get_anchor(MARGIN_BOTTOM));
+ undo_redo->add_undo_method(c, "set_margin", MARGIN_LEFT, c->get_margin(MARGIN_LEFT));
+ undo_redo->add_undo_method(c, "set_margin", MARGIN_TOP, c->get_margin(MARGIN_TOP));
+ undo_redo->add_undo_method(c, "set_margin", MARGIN_RIGHT, c->get_margin(MARGIN_RIGHT));
+ undo_redo->add_undo_method(c, "set_margin", MARGIN_BOTTOM, c->get_margin(MARGIN_BOTTOM));
}
undo_redo->commit_action();
}
-void CanvasItemEditor::_set_full_rect() {
+void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
List<Node *> &selection = editor_selection->get_selected_node_list();
undo_redo->create_action(TTR("Change Anchors"));
@@ -3027,19 +3041,11 @@ void CanvasItemEditor::_set_full_rect() {
Control *c = Object::cast_to<Control>(E->get());
- undo_redo->add_do_method(c, "set_anchors_preset", Control::PRESET_WIDE);
- undo_redo->add_do_method(c, "set_margin", MARGIN_LEFT, 0);
- undo_redo->add_do_method(c, "set_margin", MARGIN_TOP, 0);
- undo_redo->add_do_method(c, "set_margin", MARGIN_RIGHT, 0);
- undo_redo->add_do_method(c, "set_margin", MARGIN_BOTTOM, 0);
+ undo_redo->add_do_method(c, "set_anchors_preset", p_preset);
undo_redo->add_undo_method(c, "set_anchor", MARGIN_LEFT, c->get_anchor(MARGIN_LEFT));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_TOP, c->get_anchor(MARGIN_TOP));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_RIGHT, c->get_anchor(MARGIN_RIGHT));
undo_redo->add_undo_method(c, "set_anchor", MARGIN_BOTTOM, c->get_anchor(MARGIN_BOTTOM));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_LEFT, c->get_margin(MARGIN_LEFT));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_TOP, c->get_margin(MARGIN_TOP));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_RIGHT, c->get_margin(MARGIN_RIGHT));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_BOTTOM, c->get_margin(MARGIN_BOTTOM));
}
undo_redo->commit_action();
@@ -3233,57 +3239,104 @@ void CanvasItemEditor::_popup_callback(int p_op) {
viewport->update();
} break;
- case ANCHOR_ALIGN_TOP_LEFT: {
+
+ case ANCHORS_AND_MARGINS_PRESET_TOP_LEFT: {
+ _set_anchors_and_margins_preset(PRESET_TOP_LEFT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_TOP_RIGHT: {
+ _set_anchors_and_margins_preset(PRESET_TOP_RIGHT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_BOTTOM_LEFT: {
+ _set_anchors_and_margins_preset(PRESET_BOTTOM_LEFT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_BOTTOM_RIGHT: {
+ _set_anchors_and_margins_preset(PRESET_BOTTOM_RIGHT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_CENTER_LEFT: {
+ _set_anchors_and_margins_preset(PRESET_CENTER_LEFT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_CENTER_RIGHT: {
+ _set_anchors_and_margins_preset(PRESET_CENTER_RIGHT);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_CENTER_TOP: {
+ _set_anchors_and_margins_preset(PRESET_CENTER_TOP);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_CENTER_BOTTOM: {
+ _set_anchors_and_margins_preset(PRESET_CENTER_BOTTOM);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_CENTER: {
+ _set_anchors_and_margins_preset(PRESET_CENTER);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_TOP_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_TOP_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_LEFT_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_LEFT_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_RIGHT_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_RIGHT_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_BOTTOM_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_VCENTER_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_VCENTER_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_HCENTER_WIDE: {
+ _set_anchors_and_margins_preset(PRESET_HCENTER_WIDE);
+ } break;
+ case ANCHORS_AND_MARGINS_PRESET_WIDE: {
+ _set_anchors_and_margins_preset(Control::PRESET_WIDE);
+ } break;
+
+ case ANCHORS_PRESET_TOP_LEFT: {
_set_anchors_preset(PRESET_TOP_LEFT);
} break;
- case ANCHOR_ALIGN_TOP_RIGHT: {
+ case ANCHORS_PRESET_TOP_RIGHT: {
_set_anchors_preset(PRESET_TOP_RIGHT);
} break;
- case ANCHOR_ALIGN_BOTTOM_LEFT: {
+ case ANCHORS_PRESET_BOTTOM_LEFT: {
_set_anchors_preset(PRESET_BOTTOM_LEFT);
} break;
- case ANCHOR_ALIGN_BOTTOM_RIGHT: {
+ case ANCHORS_PRESET_BOTTOM_RIGHT: {
_set_anchors_preset(PRESET_BOTTOM_RIGHT);
} break;
- case ANCHOR_ALIGN_CENTER_LEFT: {
+ case ANCHORS_PRESET_CENTER_LEFT: {
_set_anchors_preset(PRESET_CENTER_LEFT);
} break;
- case ANCHOR_ALIGN_CENTER_RIGHT: {
+ case ANCHORS_PRESET_CENTER_RIGHT: {
_set_anchors_preset(PRESET_CENTER_RIGHT);
} break;
- case ANCHOR_ALIGN_CENTER_TOP: {
+ case ANCHORS_PRESET_CENTER_TOP: {
_set_anchors_preset(PRESET_CENTER_TOP);
} break;
- case ANCHOR_ALIGN_CENTER_BOTTOM: {
+ case ANCHORS_PRESET_CENTER_BOTTOM: {
_set_anchors_preset(PRESET_CENTER_BOTTOM);
} break;
- case ANCHOR_ALIGN_CENTER: {
+ case ANCHORS_PRESET_CENTER: {
_set_anchors_preset(PRESET_CENTER);
} break;
- case ANCHOR_ALIGN_TOP_WIDE: {
+ case ANCHORS_PRESET_TOP_WIDE: {
_set_anchors_preset(PRESET_TOP_WIDE);
} break;
- case ANCHOR_ALIGN_LEFT_WIDE: {
+ case ANCHORS_PRESET_LEFT_WIDE: {
_set_anchors_preset(PRESET_LEFT_WIDE);
} break;
- case ANCHOR_ALIGN_RIGHT_WIDE: {
+ case ANCHORS_PRESET_RIGHT_WIDE: {
_set_anchors_preset(PRESET_RIGHT_WIDE);
} break;
- case ANCHOR_ALIGN_BOTTOM_WIDE: {
+ case ANCHORS_PRESET_BOTTOM_WIDE: {
_set_anchors_preset(PRESET_BOTTOM_WIDE);
} break;
- case ANCHOR_ALIGN_VCENTER_WIDE: {
+ case ANCHORS_PRESET_VCENTER_WIDE: {
_set_anchors_preset(PRESET_VCENTER_WIDE);
} break;
- case ANCHOR_ALIGN_HCENTER_WIDE: {
+ case ANCHORS_PRESET_HCENTER_WIDE: {
_set_anchors_preset(PRESET_HCENTER_WIDE);
} break;
- case ANCHOR_ALIGN_WIDE: {
+ case ANCHORS_PRESET_WIDE: {
_set_anchors_preset(Control::PRESET_WIDE);
} break;
- case ANCHOR_ALIGN_WIDE_FIT: {
- _set_full_rect();
- } break;
case ANIM_INSERT_KEY:
case ANIM_INSERT_KEY_EXISTING: {
@@ -3861,7 +3914,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN);
- p->set_hide_on_checkable_item_selection(false);
p->connect("id_pressed", this, "_popup_callback");
hb->add_child(memnew(VSeparator));
@@ -3879,13 +3931,18 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/center_selection", TTR("Center Selection"), KEY_F), VIEW_CENTER_TO_SELECTION);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KEY_MASK_SHIFT | KEY_F), VIEW_FRAME_TO_SELECTION);
- anchor_menu = memnew(MenuButton);
- anchor_menu->set_text(TTR("Anchor"));
- hb->add_child(anchor_menu);
- anchor_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
- anchor_menu->hide();
+ presets_menu = memnew(MenuButton);
+ presets_menu->set_text(TTR("Layout"));
+ hb->add_child(presets_menu);
+ presets_menu->hide();
+
+ p = presets_menu->get_popup();
+ p->connect("id_pressed", this, "_popup_callback");
- //p = anchor_menu->get_popup();
+ anchors_popup = memnew(PopupMenu);
+ p->add_child(anchors_popup);
+ anchors_popup->set_name("Anchors");
+ anchors_popup->connect("id_pressed", this, "_popup_callback");
animation_hb = memnew(HBoxContainer);
hb->add_child(animation_hb);
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index bb4e584f2a..69dc25d180 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; }
};
@@ -97,23 +98,54 @@ class CanvasItemEditor : public VBoxContainer {
UNLOCK_SELECTED,
GROUP_SELECTED,
UNGROUP_SELECTED,
- ANCHOR_ALIGN_TOP_LEFT,
- ANCHOR_ALIGN_TOP_RIGHT,
- ANCHOR_ALIGN_BOTTOM_LEFT,
- ANCHOR_ALIGN_BOTTOM_RIGHT,
- ANCHOR_ALIGN_CENTER_LEFT,
- ANCHOR_ALIGN_CENTER_RIGHT,
- ANCHOR_ALIGN_CENTER_TOP,
- ANCHOR_ALIGN_CENTER_BOTTOM,
- ANCHOR_ALIGN_CENTER,
- ANCHOR_ALIGN_TOP_WIDE,
- ANCHOR_ALIGN_LEFT_WIDE,
- ANCHOR_ALIGN_RIGHT_WIDE,
- ANCHOR_ALIGN_BOTTOM_WIDE,
- ANCHOR_ALIGN_VCENTER_WIDE,
- ANCHOR_ALIGN_HCENTER_WIDE,
- ANCHOR_ALIGN_WIDE,
- ANCHOR_ALIGN_WIDE_FIT,
+ ANCHORS_AND_MARGINS_PRESET_TOP_LEFT,
+ ANCHORS_AND_MARGINS_PRESET_TOP_RIGHT,
+ ANCHORS_AND_MARGINS_PRESET_BOTTOM_LEFT,
+ ANCHORS_AND_MARGINS_PRESET_BOTTOM_RIGHT,
+ ANCHORS_AND_MARGINS_PRESET_CENTER_LEFT,
+ ANCHORS_AND_MARGINS_PRESET_CENTER_RIGHT,
+ ANCHORS_AND_MARGINS_PRESET_CENTER_TOP,
+ ANCHORS_AND_MARGINS_PRESET_CENTER_BOTTOM,
+ ANCHORS_AND_MARGINS_PRESET_CENTER,
+ ANCHORS_AND_MARGINS_PRESET_TOP_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_LEFT_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_RIGHT_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_BOTTOM_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_VCENTER_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_HCENTER_WIDE,
+ ANCHORS_AND_MARGINS_PRESET_WIDE,
+ ANCHORS_PRESET_TOP_LEFT,
+ ANCHORS_PRESET_TOP_RIGHT,
+ ANCHORS_PRESET_BOTTOM_LEFT,
+ ANCHORS_PRESET_BOTTOM_RIGHT,
+ ANCHORS_PRESET_CENTER_LEFT,
+ ANCHORS_PRESET_CENTER_RIGHT,
+ ANCHORS_PRESET_CENTER_TOP,
+ ANCHORS_PRESET_CENTER_BOTTOM,
+ ANCHORS_PRESET_CENTER,
+ ANCHORS_PRESET_TOP_WIDE,
+ ANCHORS_PRESET_LEFT_WIDE,
+ ANCHORS_PRESET_RIGHT_WIDE,
+ ANCHORS_PRESET_BOTTOM_WIDE,
+ ANCHORS_PRESET_VCENTER_WIDE,
+ ANCHORS_PRESET_HCENTER_WIDE,
+ ANCHORS_PRESET_WIDE,
+ MARGINS_PRESET_TOP_LEFT,
+ MARGINS_PRESET_TOP_RIGHT,
+ MARGINS_PRESET_BOTTOM_LEFT,
+ MARGINS_PRESET_BOTTOM_RIGHT,
+ MARGINS_PRESET_CENTER_LEFT,
+ MARGINS_PRESET_CENTER_RIGHT,
+ MARGINS_PRESET_CENTER_TOP,
+ MARGINS_PRESET_CENTER_BOTTOM,
+ MARGINS_PRESET_CENTER,
+ MARGINS_PRESET_TOP_WIDE,
+ MARGINS_PRESET_LEFT_WIDE,
+ MARGINS_PRESET_RIGHT_WIDE,
+ MARGINS_PRESET_BOTTOM_WIDE,
+ MARGINS_PRESET_VCENTER_WIDE,
+ MARGINS_PRESET_HCENTER_WIDE,
+ MARGINS_PRESET_WIDE,
ANIM_INSERT_KEY,
ANIM_INSERT_KEY_EXISTING,
ANIM_INSERT_POS,
@@ -278,7 +310,10 @@ class CanvasItemEditor : public VBoxContainer {
MenuButton *view_menu;
HBoxContainer *animation_hb;
MenuButton *animation_menu;
- MenuButton *anchor_menu;
+
+ MenuButton *presets_menu;
+ PopupMenu *anchors_and_margins_popup;
+ PopupMenu *anchors_popup;
Button *key_loc_button;
Button *key_rot_button;
@@ -385,7 +420,8 @@ class CanvasItemEditor : public VBoxContainer {
void _snap_other_nodes(Point2 p_value, Point2 &r_current_snap, bool (&r_snapped)[2], const Node *p_current, const CanvasItem *p_to_snap);
void _set_anchors_preset(Control::LayoutPreset p_preset);
- void _set_full_rect();
+ void _set_margins_preset(Control::LayoutPreset p_preset);
+ void _set_anchors_and_margins_preset(Control::LayoutPreset p_preset);
void _zoom_on_position(float p_zoom, Point2 p_position = Point2());
void _zoom_minus();
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 425390723c..32973db6ec 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -1442,6 +1442,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
case TRANSFORM_ROTATE: {
Plane plane;
+ Vector3 axis;
switch (_edit.plane) {
case TRANSFORM_VIEW:
@@ -1449,12 +1450,15 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
break;
case TRANSFORM_X_AXIS:
plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0));
+ axis = Vector3(1, 0, 0);
break;
case TRANSFORM_Y_AXIS:
plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1));
+ axis = Vector3(0, 1, 0);
break;
case TRANSFORM_Z_AXIS:
plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2));
+ axis = Vector3(0, 0, 1);
break;
}
@@ -1470,6 +1474,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 x_axis = plane.normal.cross(y_axis).normalized();
float angle = Math::atan2(x_axis.dot(intersection - _edit.center), y_axis.dot(intersection - _edit.center));
+
if (_edit.snap || spatial_editor->is_snap_enabled()) {
float snap = spatial_editor->get_rotate_snap();
@@ -1486,11 +1491,10 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
set_message(vformat(TTR("Rotating %s degrees."), rtos(Math::rad2deg(angle))));
}
- Transform r;
- r.basis.rotate(plane.normal, angle);
-
List<Node *> &selection = editor_selection->get_selected_node_list();
+ bool local_coords = spatial_editor->are_local_coords_enabled();
+
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Spatial *sp = Object::cast_to<Spatial>(E->get());
@@ -1501,27 +1505,33 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (!se)
continue;
- Transform original = se->original;
+ Transform t;
- Transform base = Transform(Basis(), _edit.center);
- Transform t = base * r * base.inverse() * original;
+ if (local_coords) {
- sp->set_global_transform(t);
+ Transform original_local = se->original_local;
+ Basis rot = Basis(axis, angle);
+
+ t.basis = original_local.get_basis() * rot;
+ t.origin = original_local.origin;
+
+ sp->set_transform(t);
+
+ } else {
+
+ Transform original = se->original;
+ Transform r;
+ Transform base = Transform(Basis(), _edit.center);
+
+ r.basis.rotate(plane.normal, angle);
+ t = base * r * base.inverse() * original;
+
+ sp->set_global_transform(t);
+ }
}
surface->update();
- /*
- VisualServer::get_singleton()->poly_clear(indicators);
-
- Vector<Vector3> points;
- Vector<Vector3> empty;
- Vector<Color> colors;
- points.push_back(intersection);
- points.push_back(_edit.original.origin);
- colors.push_back( Color(255,155,100) );
- colors.push_back( Color(255,155,100) );
- VisualServer::get_singleton()->poly_add_primitive(indicators,points,empty,colors,empty);
- */
+
} break;
default: {}
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 1fb3fb2ed1..9f23df5c03 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1420,7 +1420,8 @@ ProjectManager::ProjectManager() {
{
int dpi_mode = EditorSettings::get_singleton()->get("interface/editor/hidpi_mode");
if (dpi_mode == 0) {
- editor_set_scale(OS::get_singleton()->get_screen_dpi(0) >= 192 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x > 2000 ? 2.0 : 1.0);
+ const int screen = OS::get_singleton()->get_current_screen();
+ editor_set_scale(OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).x > 2000 ? 2.0 : 1.0);
} else if (dpi_mode == 1) {
editor_set_scale(0.75);
} else if (dpi_mode == 2) {
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index be0975b53c..6592d0ae1d 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -35,9 +35,9 @@ def _build_gdnative_api_struct_header(api):
'\tconst char *version;',
]
- for funcname, funcdef in api['api'].items():
+ for funcdef in api['api']:
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.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcdef['name'], args))
out += [
'} godot_gdnative_api_struct;',
@@ -63,8 +63,8 @@ def _build_gdnative_api_struct_source(api):
'\t_gdnative_api_version,',
]
- for funcname in api['api'].keys():
- out.append('\t%s,' % funcname)
+ for funcdef in api['api']:
+ out.append('\t%s,' % funcdef['name'])
out.append('};\n')
return '\n'.join(out)
@@ -74,8 +74,7 @@ def build_gdnative_api_struct(target, source, env):
from collections import OrderedDict
with open(source[0].path, 'r') as fd:
- # Keep the json ordered
- api = json.load(fd, object_pairs_hook=OrderedDict)
+ api = json.load(fd)
header, source = target
with open(header.path, 'w') as fd:
@@ -107,14 +106,14 @@ def _build_gdnative_wrapper_code(api):
''
]
- for funcname, funcdef in api['api'].items():
+ for funcdef in api['api']:
args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s %s(%s) {' % (_spaced(funcdef['return_type']), funcname, args))
+ out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], 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 + ');'
+ return_line += '_gdnative_wrapper_api_struct->' + funcdef['name'] + '(' + args + ');'
out.append(return_line)
out.append('}')
@@ -132,7 +131,6 @@ def _build_gdnative_wrapper_code(api):
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]
@@ -143,7 +141,7 @@ def build_gdnative_wrapper_code(target, source, env):
if ARGUMENTS.get('gdnative_wrapper', False):
#build wrapper code
- gdn_env.Command('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code)
+ gensource, = 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/'])
@@ -151,4 +149,4 @@ if ARGUMENTS.get('gdnative_wrapper', False):
# 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"])
+ gd_wrapper_env.Library("#bin/gdnative_wrapper_code", [gensource])
diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp
index cf1f6a4f16..64a7c33cf8 100644
--- a/modules/gdnative/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative/gdnative.cpp
@@ -41,6 +41,7 @@ extern "C" {
#endif
extern "C" void _string_api_anchor();
+extern "C" void _string_name_api_anchor();
extern "C" void _vector2_api_anchor();
extern "C" void _rect2_api_anchor();
extern "C" void _vector3_api_anchor();
@@ -61,6 +62,7 @@ extern "C" void _variant_api_anchor();
void _api_anchor() {
_string_api_anchor();
+ _string_name_api_anchor();
_vector2_api_anchor();
_rect2_api_anchor();
_vector3_api_anchor();
diff --git a/modules/gdnative/gdnative/string_name.cpp b/modules/gdnative/gdnative/string_name.cpp
new file mode 100644
index 0000000000..5c00fdfc2f
--- /dev/null
+++ b/modules/gdnative/gdnative/string_name.cpp
@@ -0,0 +1,91 @@
+/*************************************************************************/
+/* string_name.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.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 "gdnative/string_name.h"
+
+#include "core/string_db.h"
+#include "core/ustring.h"
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void _string_name_api_anchor() {
+}
+
+void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name) {
+ StringName *dest = (StringName *)r_dest;
+ const String *name = (const String *)p_name;
+ memnew_placement(dest, StringName(*name));
+}
+
+void GDAPI godot_string_name_new_data(godot_string_name *r_dest, const char *p_name) {
+ StringName *dest = (StringName *)r_dest;
+ memnew_placement(dest, StringName(p_name));
+}
+
+godot_string GDAPI godot_string_name_get_name(const godot_string_name *p_self) {
+ godot_string ret;
+ const StringName *self = (const StringName *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
+}
+
+uint32_t GDAPI godot_string_name_get_hash(const godot_string_name *p_self) {
+ const StringName *self = (const StringName *)p_self;
+ return self->hash();
+}
+
+const void GDAPI *godot_string_name_get_data_unique_pointer(const godot_string_name *p_self) {
+ const StringName *self = (const StringName *)p_self;
+ return self->data_unique_pointer();
+}
+
+godot_bool GDAPI godot_string_name_operator_equal(const godot_string_name *p_self, const godot_string_name *p_other) {
+ const StringName *self = (const StringName *)p_self;
+ const StringName *other = (const StringName *)p_other;
+ return self == other;
+}
+
+godot_bool GDAPI godot_string_name_operator_less(const godot_string_name *p_self, const godot_string_name *p_other) {
+ const StringName *self = (const StringName *)p_self;
+ const StringName *other = (const StringName *)p_other;
+ return self < other;
+}
+
+void GDAPI godot_string_name_destroy(godot_string_name *p_self) {
+ StringName *self = (StringName *)p_self;
+ self->~StringName();
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 8b6593c9c3..4d3c024a8f 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -1,7 +1,8 @@
{
"version": "1.0.0",
- "api": {
- "godot_color_new_rgba": {
+ "api": [
+ {
+ "name": "godot_color_new_rgba",
"return_type": "void",
"arguments": [
["godot_color *", "r_dest"],
@@ -11,7 +12,8 @@
["const godot_real", "p_a"]
]
},
- "godot_color_new_rgb": {
+ {
+ "name": "godot_color_new_rgb",
"return_type": "void",
"arguments": [
["godot_color *", "r_dest"],
@@ -20,113 +22,131 @@
["const godot_real", "p_b"]
]
},
- "godot_color_get_r": {
+ {
+ "name": "godot_color_get_r",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_set_r": {
+ {
+ "name": "godot_color_set_r",
"return_type": "void",
"arguments": [
["godot_color *", "p_self"],
["const godot_real", "r"]
]
},
- "godot_color_get_g": {
+ {
+ "name": "godot_color_get_g",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_set_g": {
+ {
+ "name": "godot_color_set_g",
"return_type": "void",
"arguments": [
["godot_color *", "p_self"],
["const godot_real", "g"]
]
},
- "godot_color_get_b": {
+ {
+ "name": "godot_color_get_b",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_set_b": {
+ {
+ "name": "godot_color_set_b",
"return_type": "void",
"arguments": [
["godot_color *", "p_self"],
["const godot_real", "b"]
]
},
- "godot_color_get_a": {
+ {
+ "name": "godot_color_get_a",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_set_a": {
+ {
+ "name": "godot_color_set_a",
"return_type": "void",
"arguments": [
["godot_color *", "p_self"],
["const godot_real", "a"]
]
},
- "godot_color_get_h": {
+ {
+ "name": "godot_color_get_h",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_get_s": {
+ {
+ "name": "godot_color_get_s",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_get_v": {
+ {
+ "name": "godot_color_get_v",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_as_string": {
+ {
+ "name": "godot_color_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_to_rgba32": {
+ {
+ "name": "godot_color_to_rgba32",
"return_type": "godot_int",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_to_argb32": {
+ {
+ "name": "godot_color_to_argb32",
"return_type": "godot_int",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_gray": {
+ {
+ "name": "godot_color_gray",
"return_type": "godot_real",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_inverted": {
+ {
+ "name": "godot_color_inverted",
"return_type": "godot_color",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_contrasted": {
+ {
+ "name": "godot_color_contrasted",
"return_type": "godot_color",
"arguments": [
["const godot_color *", "p_self"]
]
},
- "godot_color_linear_interpolate": {
+ {
+ "name": "godot_color_linear_interpolate",
"return_type": "godot_color",
"arguments": [
["const godot_color *", "p_self"],
@@ -134,35 +154,40 @@
["const godot_real", "p_t"]
]
},
- "godot_color_blend": {
+ {
+ "name": "godot_color_blend",
"return_type": "godot_color",
"arguments": [
["const godot_color *", "p_self"],
["const godot_color *", "p_over"]
]
},
- "godot_color_to_html": {
+ {
+ "name": "godot_color_to_html",
"return_type": "godot_string",
"arguments": [
["const godot_color *", "p_self"],
["const godot_bool", "p_with_alpha"]
]
},
- "godot_color_operator_equal": {
+ {
+ "name": "godot_color_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_color *", "p_self"],
["const godot_color *", "p_b"]
]
},
- "godot_color_operator_less": {
+ {
+ "name": "godot_color_operator_less",
"return_type": "godot_bool",
"arguments": [
["const godot_color *", "p_self"],
["const godot_color *", "p_b"]
]
},
- "godot_vector2_new": {
+ {
+ "name": "godot_vector2_new",
"return_type": "void",
"arguments": [
["godot_vector2 *", "r_dest"],
@@ -170,71 +195,82 @@
["const godot_real", "p_y"]
]
},
- "godot_vector2_as_string": {
+ {
+ "name": "godot_vector2_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_normalized": {
+ {
+ "name": "godot_vector2_normalized",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_length": {
+ {
+ "name": "godot_vector2_length",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_angle": {
+ {
+ "name": "godot_vector2_angle",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_length_squared": {
+ {
+ "name": "godot_vector2_length_squared",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_is_normalized": {
+ {
+ "name": "godot_vector2_is_normalized",
"return_type": "godot_bool",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_distance_to": {
+ {
+ "name": "godot_vector2_distance_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_to"]
]
},
- "godot_vector2_distance_squared_to": {
+ {
+ "name": "godot_vector2_distance_squared_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_to"]
]
},
- "godot_vector2_angle_to": {
+ {
+ "name": "godot_vector2_angle_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_to"]
]
},
- "godot_vector2_angle_to_point": {
+ {
+ "name": "godot_vector2_angle_to_point",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_to"]
]
},
- "godot_vector2_linear_interpolate": {
+ {
+ "name": "godot_vector2_linear_interpolate",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
@@ -242,7 +278,8 @@
["const godot_real", "p_t"]
]
},
- "godot_vector2_cubic_interpolate": {
+ {
+ "name": "godot_vector2_cubic_interpolate",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
@@ -252,168 +289,193 @@
["const godot_real", "p_t"]
]
},
- "godot_vector2_rotated": {
+ {
+ "name": "godot_vector2_rotated",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_real", "p_phi"]
]
},
- "godot_vector2_tangent": {
+ {
+ "name": "godot_vector2_tangent",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_floor": {
+ {
+ "name": "godot_vector2_floor",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_snapped": {
+ {
+ "name": "godot_vector2_snapped",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_by"]
]
},
- "godot_vector2_aspect": {
+ {
+ "name": "godot_vector2_aspect",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_dot": {
+ {
+ "name": "godot_vector2_dot",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_with"]
]
},
- "godot_vector2_slide": {
+ {
+ "name": "godot_vector2_slide",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_n"]
]
},
- "godot_vector2_bounce": {
+ {
+ "name": "godot_vector2_bounce",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_n"]
]
},
- "godot_vector2_reflect": {
+ {
+ "name": "godot_vector2_reflect",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_n"]
]
},
- "godot_vector2_abs": {
+ {
+ "name": "godot_vector2_abs",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_clamped": {
+ {
+ "name": "godot_vector2_clamped",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_real", "p_length"]
]
},
- "godot_vector2_operator_add": {
+ {
+ "name": "godot_vector2_operator_add",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_b"]
]
},
- "godot_vector2_operator_substract": {
+ {
+ "name": "godot_vector2_operator_substract",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_b"]
]
},
- "godot_vector2_operator_multiply_vector": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_vector2_operator_divide_scalar",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_real", "p_b"]
]
},
- "godot_vector2_operator_equal": {
+ {
+ "name": "godot_vector2_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_b"]
]
},
- "godot_vector2_operator_less": {
+ {
+ "name": "godot_vector2_operator_less",
"return_type": "godot_bool",
"arguments": [
["const godot_vector2 *", "p_self"],
["const godot_vector2 *", "p_b"]
]
},
- "godot_vector2_operator_neg": {
+ {
+ "name": "godot_vector2_operator_neg",
"return_type": "godot_vector2",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_set_x": {
+ {
+ "name": "godot_vector2_set_x",
"return_type": "void",
"arguments": [
["godot_vector2 *", "p_self"],
["const godot_real", "p_x"]
]
},
- "godot_vector2_set_y": {
+ {
+ "name": "godot_vector2_set_y",
"return_type": "void",
"arguments": [
["godot_vector2 *", "p_self"],
["const godot_real", "p_y"]
]
},
- "godot_vector2_get_x": {
+ {
+ "name": "godot_vector2_get_x",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_vector2_get_y": {
+ {
+ "name": "godot_vector2_get_y",
"return_type": "godot_real",
"arguments": [
["const godot_vector2 *", "p_self"]
]
},
- "godot_quat_new": {
+ {
+ "name": "godot_quat_new",
"return_type": "void",
"arguments": [
["godot_quat *", "r_dest"],
@@ -423,7 +485,8 @@
["const godot_real", "p_w"]
]
},
- "godot_quat_new_with_axis_angle": {
+ {
+ "name": "godot_quat_new_with_axis_angle",
"return_type": "void",
"arguments": [
["godot_quat *", "r_dest"],
@@ -431,109 +494,126 @@
["const godot_real", "p_angle"]
]
},
- "godot_quat_get_x": {
+ {
+ "name": "godot_quat_get_x",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_set_x": {
+ {
+ "name": "godot_quat_set_x",
"return_type": "void",
"arguments": [
["godot_quat *", "p_self"],
["const godot_real", "val"]
]
},
- "godot_quat_get_y": {
+ {
+ "name": "godot_quat_get_y",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_set_y": {
+ {
+ "name": "godot_quat_set_y",
"return_type": "void",
"arguments": [
["godot_quat *", "p_self"],
["const godot_real", "val"]
]
},
- "godot_quat_get_z": {
+ {
+ "name": "godot_quat_get_z",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_set_z": {
+ {
+ "name": "godot_quat_set_z",
"return_type": "void",
"arguments": [
["godot_quat *", "p_self"],
["const godot_real", "val"]
]
},
- "godot_quat_get_w": {
+ {
+ "name": "godot_quat_get_w",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_set_w": {
+ {
+ "name": "godot_quat_set_w",
"return_type": "void",
"arguments": [
["godot_quat *", "p_self"],
["const godot_real", "val"]
]
},
- "godot_quat_as_string": {
+ {
+ "name": "godot_quat_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_length": {
+ {
+ "name": "godot_quat_length",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_length_squared": {
+ {
+ "name": "godot_quat_length_squared",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_normalized": {
+ {
+ "name": "godot_quat_normalized",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_is_normalized": {
+ {
+ "name": "godot_quat_is_normalized",
"return_type": "godot_bool",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_inverse": {
+ {
+ "name": "godot_quat_inverse",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_quat_dot": {
+ {
+ "name": "godot_quat_dot",
"return_type": "godot_real",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_quat *", "p_b"]
]
},
- "godot_quat_xform": {
+ {
+ "name": "godot_quat_xform",
"return_type": "godot_vector3",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_quat_slerp": {
+ {
+ "name": "godot_quat_slerp",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
@@ -541,7 +621,8 @@
["const godot_real", "p_t"]
]
},
- "godot_quat_slerpni": {
+ {
+ "name": "godot_quat_slerpni",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
@@ -549,7 +630,8 @@
["const godot_real", "p_t"]
]
},
- "godot_quat_cubic_slerp": {
+ {
+ "name": "godot_quat_cubic_slerp",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
@@ -559,48 +641,55 @@
["const godot_real", "p_t"]
]
},
- "godot_quat_operator_multiply": {
+ {
+ "name": "godot_quat_operator_multiply",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_real", "p_b"]
]
},
- "godot_quat_operator_add": {
+ {
+ "name": "godot_quat_operator_add",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_quat *", "p_b"]
]
},
- "godot_quat_operator_substract": {
+ {
+ "name": "godot_quat_operator_substract",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_quat *", "p_b"]
]
},
- "godot_quat_operator_divide": {
+ {
+ "name": "godot_quat_operator_divide",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_real", "p_b"]
]
},
- "godot_quat_operator_equal": {
+ {
+ "name": "godot_quat_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_quat *", "p_self"],
["const godot_quat *", "p_b"]
]
},
- "godot_quat_operator_neg": {
+ {
+ "name": "godot_quat_operator_neg",
"return_type": "godot_quat",
"arguments": [
["const godot_quat *", "p_self"]
]
},
- "godot_basis_new_with_rows": {
+ {
+ "name": "godot_basis_new_with_rows",
"return_type": "void",
"arguments": [
["godot_basis *", "r_dest"],
@@ -609,7 +698,8 @@
["const godot_vector3 *", "p_z_axis"]
]
},
- "godot_basis_new_with_axis_and_angle": {
+ {
+ "name": "godot_basis_new_with_axis_and_angle",
"return_type": "void",
"arguments": [
["godot_basis *", "r_dest"],
@@ -617,44 +707,51 @@
["const godot_real", "p_phi"]
]
},
- "godot_basis_new_with_euler": {
+ {
+ "name": "godot_basis_new_with_euler",
"return_type": "void",
"arguments": [
["godot_basis *", "r_dest"],
["const godot_vector3 *", "p_euler"]
]
},
- "godot_basis_as_string": {
+ {
+ "name": "godot_basis_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_inverse": {
+ {
+ "name": "godot_basis_inverse",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_transposed": {
+ {
+ "name": "godot_basis_transposed",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_orthonormalized": {
+ {
+ "name": "godot_basis_orthonormalized",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_determinant": {
+ {
+ "name": "godot_basis_determinant",
"return_type": "godot_real",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_rotated": {
+ {
+ "name": "godot_basis_rotated",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
@@ -662,94 +759,108 @@
["const godot_real", "p_phi"]
]
},
- "godot_basis_scaled": {
+ {
+ "name": "godot_basis_scaled",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_scale"]
]
},
- "godot_basis_get_scale": {
+ {
+ "name": "godot_basis_get_scale",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_get_euler": {
+ {
+ "name": "godot_basis_get_euler",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_tdotx": {
+ {
+ "name": "godot_basis_tdotx",
"return_type": "godot_real",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_with"]
]
},
- "godot_basis_tdoty": {
+ {
+ "name": "godot_basis_tdoty",
"return_type": "godot_real",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_with"]
]
},
- "godot_basis_tdotz": {
+ {
+ "name": "godot_basis_tdotz",
"return_type": "godot_real",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_with"]
]
},
- "godot_basis_xform": {
+ {
+ "name": "godot_basis_xform",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_basis_xform_inv": {
+ {
+ "name": "godot_basis_xform_inv",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_basis_get_orthogonal_index": {
+ {
+ "name": "godot_basis_get_orthogonal_index",
"return_type": "godot_int",
"arguments": [
["const godot_basis *", "p_self"]
]
},
- "godot_basis_new": {
+ {
+ "name": "godot_basis_new",
"return_type": "void",
"arguments": [
["godot_basis *", "r_dest"]
]
},
- "godot_basis_new_with_euler_quat": {
+ {
+ "name": "godot_basis_new_with_euler_quat",
"return_type": "void",
"arguments": [
["godot_basis *", "r_dest"],
["const godot_quat *", "p_euler"]
]
},
- "godot_basis_get_elements": {
+ {
+ "name": "godot_basis_get_elements",
"return_type": "void",
"arguments": [
["godot_basis *", "p_self"],
["godot_vector3 *", "p_elements"]
]
},
- "godot_basis_get_axis": {
+ {
+ "name": "godot_basis_get_axis",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_int", "p_axis"]
]
},
- "godot_basis_set_axis": {
+ {
+ "name": "godot_basis_set_axis",
"return_type": "void",
"arguments": [
["godot_basis *", "p_self"],
@@ -757,14 +868,16 @@
["const godot_vector3 *", "p_value"]
]
},
- "godot_basis_get_row": {
+ {
+ "name": "godot_basis_get_row",
"return_type": "godot_vector3",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_int", "p_row"]
]
},
- "godot_basis_set_row": {
+ {
+ "name": "godot_basis_set_row",
"return_type": "void",
"arguments": [
["godot_basis *", "p_self"],
@@ -772,42 +885,48 @@
["const godot_vector3 *", "p_value"]
]
},
- "godot_basis_operator_equal": {
+ {
+ "name": "godot_basis_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_basis *", "p_b"]
]
},
- "godot_basis_operator_add": {
+ {
+ "name": "godot_basis_operator_add",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_basis *", "p_b"]
]
},
- "godot_basis_operator_substract": {
+ {
+ "name": "godot_basis_operator_substract",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_basis *", "p_b"]
]
},
- "godot_basis_operator_multiply_vector": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_basis_operator_multiply_scalar",
"return_type": "godot_basis",
"arguments": [
["const godot_basis *", "p_self"],
["const godot_real", "p_b"]
]
},
- "godot_vector3_new": {
+ {
+ "name": "godot_vector3_new",
"return_type": "void",
"arguments": [
["godot_vector3 *", "r_dest"],
@@ -816,62 +935,72 @@
["const godot_real", "p_z"]
]
},
- "godot_vector3_as_string": {
+ {
+ "name": "godot_vector3_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_min_axis": {
+ {
+ "name": "godot_vector3_min_axis",
"return_type": "godot_int",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_max_axis": {
+ {
+ "name": "godot_vector3_max_axis",
"return_type": "godot_int",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_length": {
+ {
+ "name": "godot_vector3_length",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_length_squared": {
+ {
+ "name": "godot_vector3_length_squared",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_is_normalized": {
+ {
+ "name": "godot_vector3_is_normalized",
"return_type": "godot_bool",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_normalized": {
+ {
+ "name": "godot_vector3_normalized",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_inverse": {
+ {
+ "name": "godot_vector3_inverse",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_snapped": {
+ {
+ "name": "godot_vector3_snapped",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_by"]
]
},
- "godot_vector3_rotated": {
+ {
+ "name": "godot_vector3_rotated",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
@@ -879,7 +1008,8 @@
["const godot_real", "p_phi"]
]
},
- "godot_vector3_linear_interpolate": {
+ {
+ "name": "godot_vector3_linear_interpolate",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
@@ -887,7 +1017,8 @@
["const godot_real", "p_t"]
]
},
- "godot_vector3_cubic_interpolate": {
+ {
+ "name": "godot_vector3_cubic_interpolate",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
@@ -897,156 +1028,179 @@
["const godot_real", "p_t"]
]
},
- "godot_vector3_dot": {
+ {
+ "name": "godot_vector3_dot",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_cross": {
+ {
+ "name": "godot_vector3_cross",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_outer": {
+ {
+ "name": "godot_vector3_outer",
"return_type": "godot_basis",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_to_diagonal_matrix": {
+ {
+ "name": "godot_vector3_to_diagonal_matrix",
"return_type": "godot_basis",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_abs": {
+ {
+ "name": "godot_vector3_abs",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_floor": {
+ {
+ "name": "godot_vector3_floor",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_ceil": {
+ {
+ "name": "godot_vector3_ceil",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_distance_to": {
+ {
+ "name": "godot_vector3_distance_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_distance_squared_to": {
+ {
+ "name": "godot_vector3_distance_squared_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_angle_to": {
+ {
+ "name": "godot_vector3_angle_to",
"return_type": "godot_real",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_to"]
]
},
- "godot_vector3_slide": {
+ {
+ "name": "godot_vector3_slide",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_n"]
]
},
- "godot_vector3_bounce": {
+ {
+ "name": "godot_vector3_bounce",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_n"]
]
},
- "godot_vector3_reflect": {
+ {
+ "name": "godot_vector3_reflect",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_n"]
]
},
- "godot_vector3_operator_add": {
+ {
+ "name": "godot_vector3_operator_add",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_operator_substract": {
+ {
+ "name": "godot_vector3_operator_substract",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_operator_multiply_vector": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_vector3_operator_divide_scalar",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_real", "p_b"]
]
},
- "godot_vector3_operator_equal": {
+ {
+ "name": "godot_vector3_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_operator_less": {
+ {
+ "name": "godot_vector3_operator_less",
"return_type": "godot_bool",
"arguments": [
["const godot_vector3 *", "p_self"],
["const godot_vector3 *", "p_b"]
]
},
- "godot_vector3_operator_neg": {
+ {
+ "name": "godot_vector3_operator_neg",
"return_type": "godot_vector3",
"arguments": [
["const godot_vector3 *", "p_self"]
]
},
- "godot_vector3_set_axis": {
+ {
+ "name": "godot_vector3_set_axis",
"return_type": "void",
"arguments": [
["godot_vector3 *", "p_self"],
@@ -1054,48 +1208,55 @@
["const godot_real", "p_val"]
]
},
- "godot_vector3_get_axis": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_byte_array_new",
"return_type": "void",
"arguments": [
["godot_pool_byte_array *", "r_dest"]
]
},
- "godot_pool_byte_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_byte_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_byte_array *", "p_self"],
@@ -1103,34 +1264,39 @@
["const uint8_t", "p_data"]
]
},
- "godot_pool_byte_array_invert": {
+ {
+ "name": "godot_pool_byte_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_byte_array *", "p_self"]
]
},
- "godot_pool_byte_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_byte_array_set",
"return_type": "void",
"arguments": [
["godot_pool_byte_array *", "p_self"],
@@ -1138,60 +1304,69 @@
["const uint8_t", "p_data"]
]
},
- "godot_pool_byte_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_byte_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_byte_array *", "p_self"]
]
},
- "godot_pool_byte_array_destroy": {
+ {
+ "name": "godot_pool_byte_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_byte_array *", "p_self"]
]
},
- "godot_pool_int_array_new": {
+ {
+ "name": "godot_pool_int_array_new",
"return_type": "void",
"arguments": [
["godot_pool_int_array *", "r_dest"]
]
},
- "godot_pool_int_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_int_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_int_array *", "p_self"],
@@ -1199,34 +1374,39 @@
["const godot_int", "p_data"]
]
},
- "godot_pool_int_array_invert": {
+ {
+ "name": "godot_pool_int_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_int_array *", "p_self"]
]
},
- "godot_pool_int_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_int_array_set",
"return_type": "void",
"arguments": [
["godot_pool_int_array *", "p_self"],
@@ -1234,60 +1414,69 @@
["const godot_int", "p_data"]
]
},
- "godot_pool_int_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_int_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_int_array *", "p_self"]
]
},
- "godot_pool_int_array_destroy": {
+ {
+ "name": "godot_pool_int_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_int_array *", "p_self"]
]
},
- "godot_pool_real_array_new": {
+ {
+ "name": "godot_pool_real_array_new",
"return_type": "void",
"arguments": [
["godot_pool_real_array *", "r_dest"]
]
},
- "godot_pool_real_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_real_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_real_array *", "p_self"],
@@ -1295,34 +1484,39 @@
["const godot_real", "p_data"]
]
},
- "godot_pool_real_array_invert": {
+ {
+ "name": "godot_pool_real_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_real_array *", "p_self"]
]
},
- "godot_pool_real_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_real_array_set",
"return_type": "void",
"arguments": [
["godot_pool_real_array *", "p_self"],
@@ -1330,60 +1524,69 @@
["const godot_real", "p_data"]
]
},
- "godot_pool_real_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_real_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_real_array *", "p_self"]
]
},
- "godot_pool_real_array_destroy": {
+ {
+ "name": "godot_pool_real_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_real_array *", "p_self"]
]
},
- "godot_pool_string_array_new": {
+ {
+ "name": "godot_pool_string_array_new",
"return_type": "void",
"arguments": [
["godot_pool_string_array *", "r_dest"]
]
},
- "godot_pool_string_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_string_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_string_array *", "p_self"],
@@ -1391,34 +1594,39 @@
["const godot_string *", "p_data"]
]
},
- "godot_pool_string_array_invert": {
+ {
+ "name": "godot_pool_string_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_string_array *", "p_self"]
]
},
- "godot_pool_string_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_string_array_set",
"return_type": "void",
"arguments": [
["godot_pool_string_array *", "p_self"],
@@ -1426,60 +1634,69 @@
["const godot_string *", "p_data"]
]
},
- "godot_pool_string_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_string_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_string_array *", "p_self"]
]
},
- "godot_pool_string_array_destroy": {
+ {
+ "name": "godot_pool_string_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_string_array *", "p_self"]
]
},
- "godot_pool_vector2_array_new": {
+ {
+ "name": "godot_pool_vector2_array_new",
"return_type": "void",
"arguments": [
["godot_pool_vector2_array *", "r_dest"]
]
},
- "godot_pool_vector2_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector2_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_vector2_array *", "p_self"],
@@ -1487,34 +1704,39 @@
["const godot_vector2 *", "p_data"]
]
},
- "godot_pool_vector2_array_invert": {
+ {
+ "name": "godot_pool_vector2_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_vector2_array *", "p_self"]
]
},
- "godot_pool_vector2_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector2_array_set",
"return_type": "void",
"arguments": [
["godot_pool_vector2_array *", "p_self"],
@@ -1522,60 +1744,69 @@
["const godot_vector2 *", "p_data"]
]
},
- "godot_pool_vector2_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector2_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_vector2_array *", "p_self"]
]
},
- "godot_pool_vector2_array_destroy": {
+ {
+ "name": "godot_pool_vector2_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_vector2_array *", "p_self"]
]
},
- "godot_pool_vector3_array_new": {
+ {
+ "name": "godot_pool_vector3_array_new",
"return_type": "void",
"arguments": [
["godot_pool_vector3_array *", "r_dest"]
]
},
- "godot_pool_vector3_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector3_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_vector3_array *", "p_self"],
@@ -1583,34 +1814,39 @@
["const godot_vector3 *", "p_data"]
]
},
- "godot_pool_vector3_array_invert": {
+ {
+ "name": "godot_pool_vector3_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_vector3_array *", "p_self"]
]
},
- "godot_pool_vector3_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector3_array_set",
"return_type": "void",
"arguments": [
["godot_pool_vector3_array *", "p_self"],
@@ -1618,60 +1854,69 @@
["const godot_vector3 *", "p_data"]
]
},
- "godot_pool_vector3_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_vector3_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_vector3_array *", "p_self"]
]
},
- "godot_pool_vector3_array_destroy": {
+ {
+ "name": "godot_pool_vector3_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_vector3_array *", "p_self"]
]
},
- "godot_pool_color_array_new": {
+ {
+ "name": "godot_pool_color_array_new",
"return_type": "void",
"arguments": [
["godot_pool_color_array *", "r_dest"]
]
},
- "godot_pool_color_array_new_copy": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_color_array_insert",
"return_type": "godot_error",
"arguments": [
["godot_pool_color_array *", "p_self"],
@@ -1679,34 +1924,39 @@
["const godot_color *", "p_data"]
]
},
- "godot_pool_color_array_invert": {
+ {
+ "name": "godot_pool_color_array_invert",
"return_type": "void",
"arguments": [
["godot_pool_color_array *", "p_self"]
]
},
- "godot_pool_color_array_push_back": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_color_array_set",
"return_type": "void",
"arguments": [
["godot_pool_color_array *", "p_self"],
@@ -1714,88 +1964,101 @@
["const godot_color *", "p_data"]
]
},
- "godot_pool_color_array_get": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_pool_color_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_pool_color_array *", "p_self"]
]
},
- "godot_pool_color_array_destroy": {
+ {
+ "name": "godot_pool_color_array_destroy",
"return_type": "void",
"arguments": [
["godot_pool_color_array *", "p_self"]
]
},
- "godot_array_new": {
+ {
+ "name": "godot_array_new",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"]
]
},
- "godot_array_new_copy": {
+ {
+ "name": "godot_array_new_copy",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
["const godot_array *", "p_src"]
]
},
- "godot_array_new_pool_color_array": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_array_new_pool_byte_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
["const godot_pool_byte_array *", "p_pba"]
]
},
- "godot_array_set": {
+ {
+ "name": "godot_array_set",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
@@ -1803,66 +2066,76 @@
["const godot_variant *", "p_value"]
]
},
- "godot_array_get": {
+ {
+ "name": "godot_array_get",
"return_type": "godot_variant",
"arguments": [
["const godot_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
- "godot_array_operator_index": {
+ {
+ "name": "godot_array_operator_index",
"return_type": "godot_variant *",
"arguments": [
["godot_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
- "godot_array_append": {
+ {
+ "name": "godot_array_append",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_clear": {
+ {
+ "name": "godot_array_clear",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_array_count": {
+ {
+ "name": "godot_array_count",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_empty": {
+ {
+ "name": "godot_array_empty",
"return_type": "godot_bool",
"arguments": [
["const godot_array *", "p_self"]
]
},
- "godot_array_erase": {
+ {
+ "name": "godot_array_erase",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_front": {
+ {
+ "name": "godot_array_front",
"return_type": "godot_variant",
"arguments": [
["const godot_array *", "p_self"]
]
},
- "godot_array_back": {
+ {
+ "name": "godot_array_back",
"return_type": "godot_variant",
"arguments": [
["const godot_array *", "p_self"]
]
},
- "godot_array_find": {
+ {
+ "name": "godot_array_find",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"],
@@ -1870,27 +2143,31 @@
["const godot_int", "p_from"]
]
},
- "godot_array_find_last": {
+ {
+ "name": "godot_array_find_last",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"],
["const godot_variant *", "p_what"]
]
},
- "godot_array_has": {
+ {
+ "name": "godot_array_has",
"return_type": "godot_bool",
"arguments": [
["const godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_hash": {
+ {
+ "name": "godot_array_hash",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"]
]
},
- "godot_array_insert": {
+ {
+ "name": "godot_array_insert",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
@@ -1898,53 +2175,61 @@
["const godot_variant *", "p_value"]
]
},
- "godot_array_invert": {
+ {
+ "name": "godot_array_invert",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_array_pop_back": {
+ {
+ "name": "godot_array_pop_back",
"return_type": "godot_variant",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_array_pop_front": {
+ {
+ "name": "godot_array_pop_front",
"return_type": "godot_variant",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_array_push_back": {
+ {
+ "name": "godot_array_push_back",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_push_front": {
+ {
+ "name": "godot_array_push_front",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_variant *", "p_value"]
]
},
- "godot_array_remove": {
+ {
+ "name": "godot_array_remove",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
- "godot_array_resize": {
+ {
+ "name": "godot_array_resize",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
["const godot_int", "p_size"]
]
},
- "godot_array_rfind": {
+ {
+ "name": "godot_array_rfind",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"],
@@ -1952,19 +2237,22 @@
["const godot_int", "p_from"]
]
},
- "godot_array_size": {
+ {
+ "name": "godot_array_size",
"return_type": "godot_int",
"arguments": [
["const godot_array *", "p_self"]
]
},
- "godot_array_sort": {
+ {
+ "name": "godot_array_sort",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_array_sort_custom": {
+ {
+ "name": "godot_array_sort_custom",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"],
@@ -1972,96 +2260,111 @@
["const godot_string *", "p_func"]
]
},
- "godot_array_destroy": {
+ {
+ "name": "godot_array_destroy",
"return_type": "void",
"arguments": [
["godot_array *", "p_self"]
]
},
- "godot_dictionary_new": {
+ {
+ "name": "godot_dictionary_new",
"return_type": "void",
"arguments": [
["godot_dictionary *", "r_dest"]
]
},
- "godot_dictionary_new_copy": {
+ {
+ "name": "godot_dictionary_new_copy",
"return_type": "void",
"arguments": [
["godot_dictionary *", "r_dest"],
["const godot_dictionary *", "p_src"]
]
},
- "godot_dictionary_destroy": {
+ {
+ "name": "godot_dictionary_destroy",
"return_type": "void",
"arguments": [
["godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_size": {
+ {
+ "name": "godot_dictionary_size",
"return_type": "godot_int",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_empty": {
+ {
+ "name": "godot_dictionary_empty",
"return_type": "godot_bool",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_clear": {
+ {
+ "name": "godot_dictionary_clear",
"return_type": "void",
"arguments": [
["godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_has": {
+ {
+ "name": "godot_dictionary_has",
"return_type": "godot_bool",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
- "godot_dictionary_has_all": {
+ {
+ "name": "godot_dictionary_has_all",
"return_type": "godot_bool",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_array *", "p_keys"]
]
},
- "godot_dictionary_erase": {
+ {
+ "name": "godot_dictionary_erase",
"return_type": "void",
"arguments": [
["godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
- "godot_dictionary_hash": {
+ {
+ "name": "godot_dictionary_hash",
"return_type": "godot_int",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_keys": {
+ {
+ "name": "godot_dictionary_keys",
"return_type": "godot_array",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_values": {
+ {
+ "name": "godot_dictionary_values",
"return_type": "godot_array",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_dictionary_get": {
+ {
+ "name": "godot_dictionary_get",
"return_type": "godot_variant",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
- "godot_dictionary_set": {
+ {
+ "name": "godot_dictionary_set",
"return_type": "void",
"arguments": [
["godot_dictionary *", "p_self"],
@@ -2069,111 +2372,128 @@
["const godot_variant *", "p_value"]
]
},
- "godot_dictionary_operator_index": {
+ {
+ "name": "godot_dictionary_operator_index",
"return_type": "godot_variant *",
"arguments": [
["godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
- "godot_dictionary_next": {
+ {
+ "name": "godot_dictionary_next",
"return_type": "godot_variant *",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_variant *", "p_key"]
]
},
- "godot_dictionary_operator_equal": {
+ {
+ "name": "godot_dictionary_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_dictionary *", "p_self"],
["const godot_dictionary *", "p_b"]
]
},
- "godot_dictionary_to_json": {
+ {
+ "name": "godot_dictionary_to_json",
"return_type": "godot_string",
"arguments": [
["const godot_dictionary *", "p_self"]
]
},
- "godot_node_path_new": {
+ {
+ "name": "godot_node_path_new",
"return_type": "void",
"arguments": [
["godot_node_path *", "r_dest"],
["const godot_string *", "p_from"]
]
},
- "godot_node_path_new_copy": {
+ {
+ "name": "godot_node_path_new_copy",
"return_type": "void",
"arguments": [
["godot_node_path *", "r_dest"],
["const godot_node_path *", "p_src"]
]
},
- "godot_node_path_destroy": {
+ {
+ "name": "godot_node_path_destroy",
"return_type": "void",
"arguments": [
["godot_node_path *", "p_self"]
]
},
- "godot_node_path_as_string": {
+ {
+ "name": "godot_node_path_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_is_absolute": {
+ {
+ "name": "godot_node_path_is_absolute",
"return_type": "godot_bool",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_get_name_count": {
+ {
+ "name": "godot_node_path_get_name_count",
"return_type": "godot_int",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_get_name": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_node_path_get_subname_count",
"return_type": "godot_int",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_get_subname": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_node_path_get_property",
"return_type": "godot_string",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_is_empty": {
+ {
+ "name": "godot_node_path_is_empty",
"return_type": "godot_bool",
"arguments": [
["const godot_node_path *", "p_self"]
]
},
- "godot_node_path_operator_equal": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_plane_new_with_reals",
"return_type": "void",
"arguments": [
["godot_plane *", "r_dest"],
@@ -2183,7 +2503,8 @@
["const godot_real", "p_d"]
]
},
- "godot_plane_new_with_vectors": {
+ {
+ "name": "godot_plane_new_with_vectors",
"return_type": "void",
"arguments": [
["godot_plane *", "r_dest"],
@@ -2192,7 +2513,8 @@
["const godot_vector3 *", "p_v3"]
]
},
- "godot_plane_new_with_normal": {
+ {
+ "name": "godot_plane_new_with_normal",
"return_type": "void",
"arguments": [
["godot_plane *", "r_dest"],
@@ -2200,45 +2522,52 @@
["const godot_real", "p_d"]
]
},
- "godot_plane_as_string": {
+ {
+ "name": "godot_plane_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_normalized": {
+ {
+ "name": "godot_plane_normalized",
"return_type": "godot_plane",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_center": {
+ {
+ "name": "godot_plane_center",
"return_type": "godot_vector3",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_get_any_point": {
+ {
+ "name": "godot_plane_get_any_point",
"return_type": "godot_vector3",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_is_point_over": {
+ {
+ "name": "godot_plane_is_point_over",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
["const godot_vector3 *", "p_point"]
]
},
- "godot_plane_distance_to": {
+ {
+ "name": "godot_plane_distance_to",
"return_type": "godot_real",
"arguments": [
["const godot_plane *", "p_self"],
["const godot_vector3 *", "p_point"]
]
},
- "godot_plane_has_point": {
+ {
+ "name": "godot_plane_has_point",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
@@ -2246,14 +2575,16 @@
["const godot_real", "p_epsilon"]
]
},
- "godot_plane_project": {
+ {
+ "name": "godot_plane_project",
"return_type": "godot_vector3",
"arguments": [
["const godot_plane *", "p_self"],
["const godot_vector3 *", "p_point"]
]
},
- "godot_plane_intersect_3": {
+ {
+ "name": "godot_plane_intersect_3",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
@@ -2262,7 +2593,8 @@
["const godot_plane *", "p_c"]
]
},
- "godot_plane_intersects_ray": {
+ {
+ "name": "godot_plane_intersects_ray",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
@@ -2271,7 +2603,8 @@
["const godot_vector3 *", "p_dir"]
]
},
- "godot_plane_intersects_segment": {
+ {
+ "name": "godot_plane_intersects_segment",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
@@ -2280,46 +2613,53 @@
["const godot_vector3 *", "p_end"]
]
},
- "godot_plane_operator_neg": {
+ {
+ "name": "godot_plane_operator_neg",
"return_type": "godot_plane",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_operator_equal": {
+ {
+ "name": "godot_plane_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_plane *", "p_self"],
["const godot_plane *", "p_b"]
]
},
- "godot_plane_set_normal": {
+ {
+ "name": "godot_plane_set_normal",
"return_type": "void",
"arguments": [
["godot_plane *", "p_self"],
["const godot_vector3 *", "p_normal"]
]
},
- "godot_plane_get_normal": {
+ {
+ "name": "godot_plane_get_normal",
"return_type": "godot_vector3",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_get_d": {
+ {
+ "name": "godot_plane_get_d",
"return_type": "godot_real",
"arguments": [
["const godot_plane *", "p_self"]
]
},
- "godot_plane_set_d": {
+ {
+ "name": "godot_plane_set_d",
"return_type": "void",
"arguments": [
["godot_plane *", "p_self"],
["const godot_real", "p_d"]
]
},
- "godot_rect2_new_with_position_and_size": {
+ {
+ "name": "godot_rect2_new_with_position_and_size",
"return_type": "void",
"arguments": [
["godot_rect2 *", "r_dest"],
@@ -2327,7 +2667,8 @@
["const godot_vector2 *", "p_size"]
]
},
- "godot_rect2_new": {
+ {
+ "name": "godot_rect2_new",
"return_type": "void",
"arguments": [
["godot_rect2 *", "r_dest"],
@@ -2337,107 +2678,123 @@
["const godot_real", "p_height"]
]
},
- "godot_rect2_as_string": {
+ {
+ "name": "godot_rect2_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_rect2 *", "p_self"]
]
},
- "godot_rect2_get_area": {
+ {
+ "name": "godot_rect2_get_area",
"return_type": "godot_real",
"arguments": [
["const godot_rect2 *", "p_self"]
]
},
- "godot_rect2_intersects": {
+ {
+ "name": "godot_rect2_intersects",
"return_type": "godot_bool",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_rect2 *", "p_b"]
]
},
- "godot_rect2_encloses": {
+ {
+ "name": "godot_rect2_encloses",
"return_type": "godot_bool",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_rect2 *", "p_b"]
]
},
- "godot_rect2_has_no_area": {
+ {
+ "name": "godot_rect2_has_no_area",
"return_type": "godot_bool",
"arguments": [
["const godot_rect2 *", "p_self"]
]
},
- "godot_rect2_clip": {
+ {
+ "name": "godot_rect2_clip",
"return_type": "godot_rect2",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_rect2 *", "p_b"]
]
},
- "godot_rect2_merge": {
+ {
+ "name": "godot_rect2_merge",
"return_type": "godot_rect2",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_rect2 *", "p_b"]
]
},
- "godot_rect2_has_point": {
+ {
+ "name": "godot_rect2_has_point",
"return_type": "godot_bool",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_vector2 *", "p_point"]
]
},
- "godot_rect2_grow": {
+ {
+ "name": "godot_rect2_grow",
"return_type": "godot_rect2",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_real", "p_by"]
]
},
- "godot_rect2_expand": {
+ {
+ "name": "godot_rect2_expand",
"return_type": "godot_rect2",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_vector2 *", "p_to"]
]
},
- "godot_rect2_operator_equal": {
+ {
+ "name": "godot_rect2_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_rect2 *", "p_self"],
["const godot_rect2 *", "p_b"]
]
},
- "godot_rect2_get_position": {
+ {
+ "name": "godot_rect2_get_position",
"return_type": "godot_vector2",
"arguments": [
["const godot_rect2 *", "p_self"]
]
},
- "godot_rect2_get_size": {
+ {
+ "name": "godot_rect2_get_size",
"return_type": "godot_vector2",
"arguments": [
["const godot_rect2 *", "p_self"]
]
},
- "godot_rect2_set_position": {
+ {
+ "name": "godot_rect2_set_position",
"return_type": "void",
"arguments": [
["godot_rect2 *", "p_self"],
["const godot_vector2 *", "p_pos"]
]
},
- "godot_rect2_set_size": {
+ {
+ "name": "godot_rect2_set_size",
"return_type": "void",
"arguments": [
["godot_rect2 *", "p_self"],
["const godot_vector2 *", "p_size"]
]
},
- "godot_rect3_new": {
+ {
+ "name": "godot_rect3_new",
"return_type": "void",
"arguments": [
["godot_rect3 *", "r_dest"],
@@ -2445,92 +2802,106 @@
["const godot_vector3 *", "p_size"]
]
},
- "godot_rect3_get_position": {
+ {
+ "name": "godot_rect3_get_position",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_set_position": {
+ {
+ "name": "godot_rect3_set_position",
"return_type": "void",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_rect3_get_size": {
+ {
+ "name": "godot_rect3_get_size",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_set_size": {
+ {
+ "name": "godot_rect3_set_size",
"return_type": "void",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_rect3_as_string": {
+ {
+ "name": "godot_rect3_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_area": {
+ {
+ "name": "godot_rect3_get_area",
"return_type": "godot_real",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_has_no_area": {
+ {
+ "name": "godot_rect3_has_no_area",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_has_no_surface": {
+ {
+ "name": "godot_rect3_has_no_surface",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_intersects": {
+ {
+ "name": "godot_rect3_intersects",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_rect3 *", "p_with"]
]
},
- "godot_rect3_encloses": {
+ {
+ "name": "godot_rect3_encloses",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_rect3 *", "p_with"]
]
},
- "godot_rect3_merge": {
+ {
+ "name": "godot_rect3_merge",
"return_type": "godot_rect3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_rect3 *", "p_with"]
]
},
- "godot_rect3_intersection": {
+ {
+ "name": "godot_rect3_intersection",
"return_type": "godot_rect3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_rect3 *", "p_with"]
]
},
- "godot_rect3_intersects_plane": {
+ {
+ "name": "godot_rect3_intersects_plane",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_plane *", "p_plane"]
]
},
- "godot_rect3_intersects_segment": {
+ {
+ "name": "godot_rect3_intersects_segment",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
@@ -2538,118 +2909,136 @@
["const godot_vector3 *", "p_to"]
]
},
- "godot_rect3_has_point": {
+ {
+ "name": "godot_rect3_has_point",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_vector3 *", "p_point"]
]
},
- "godot_rect3_get_support": {
+ {
+ "name": "godot_rect3_get_support",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_vector3 *", "p_dir"]
]
},
- "godot_rect3_get_longest_axis": {
+ {
+ "name": "godot_rect3_get_longest_axis",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_longest_axis_index": {
+ {
+ "name": "godot_rect3_get_longest_axis_index",
"return_type": "godot_int",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_longest_axis_size": {
+ {
+ "name": "godot_rect3_get_longest_axis_size",
"return_type": "godot_real",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_shortest_axis": {
+ {
+ "name": "godot_rect3_get_shortest_axis",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_shortest_axis_index": {
+ {
+ "name": "godot_rect3_get_shortest_axis_index",
"return_type": "godot_int",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_get_shortest_axis_size": {
+ {
+ "name": "godot_rect3_get_shortest_axis_size",
"return_type": "godot_real",
"arguments": [
["const godot_rect3 *", "p_self"]
]
},
- "godot_rect3_expand": {
+ {
+ "name": "godot_rect3_expand",
"return_type": "godot_rect3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_vector3 *", "p_to_point"]
]
},
- "godot_rect3_grow": {
+ {
+ "name": "godot_rect3_grow",
"return_type": "godot_rect3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_real", "p_by"]
]
},
- "godot_rect3_get_endpoint": {
+ {
+ "name": "godot_rect3_get_endpoint",
"return_type": "godot_vector3",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_int", "p_idx"]
]
},
- "godot_rect3_operator_equal": {
+ {
+ "name": "godot_rect3_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_rect3 *", "p_self"],
["const godot_rect3 *", "p_b"]
]
},
- "godot_rid_new": {
+ {
+ "name": "godot_rid_new",
"return_type": "void",
"arguments": [
["godot_rid *", "r_dest"]
]
},
- "godot_rid_get_id": {
+ {
+ "name": "godot_rid_get_id",
"return_type": "godot_int",
"arguments": [
["const godot_rid *", "p_self"]
]
},
- "godot_rid_new_with_resource": {
+ {
+ "name": "godot_rid_new_with_resource",
"return_type": "void",
"arguments": [
["godot_rid *", "r_dest"],
["const godot_object *", "p_from"]
]
},
- "godot_rid_operator_equal": {
+ {
+ "name": "godot_rid_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_rid *", "p_self"],
["const godot_rid *", "p_b"]
]
},
- "godot_rid_operator_less": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_transform_new_with_axis_origin",
"return_type": "void",
"arguments": [
["godot_transform *", "r_dest"],
@@ -2659,7 +3048,8 @@
["const godot_vector3 *", "p_origin"]
]
},
- "godot_transform_new": {
+ {
+ "name": "godot_transform_new",
"return_type": "void",
"arguments": [
["godot_transform *", "r_dest"],
@@ -2667,57 +3057,66 @@
["const godot_vector3 *", "p_origin"]
]
},
- "godot_transform_get_basis": {
+ {
+ "name": "godot_transform_get_basis",
"return_type": "godot_basis",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_set_basis": {
+ {
+ "name": "godot_transform_set_basis",
"return_type": "void",
"arguments": [
["godot_transform *", "p_self"],
["godot_basis *", "p_v"]
]
},
- "godot_transform_get_origin": {
+ {
+ "name": "godot_transform_get_origin",
"return_type": "godot_vector3",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_set_origin": {
+ {
+ "name": "godot_transform_set_origin",
"return_type": "void",
"arguments": [
["godot_transform *", "p_self"],
["godot_vector3 *", "p_v"]
]
},
- "godot_transform_as_string": {
+ {
+ "name": "godot_transform_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_inverse": {
+ {
+ "name": "godot_transform_inverse",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_affine_inverse": {
+ {
+ "name": "godot_transform_affine_inverse",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_orthonormalized": {
+ {
+ "name": "godot_transform_orthonormalized",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"]
]
},
- "godot_transform_rotated": {
+ {
+ "name": "godot_transform_rotated",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"],
@@ -2725,21 +3124,24 @@
["const godot_real", "p_phi"]
]
},
- "godot_transform_scaled": {
+ {
+ "name": "godot_transform_scaled",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_vector3 *", "p_scale"]
]
},
- "godot_transform_translated": {
+ {
+ "name": "godot_transform_translated",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_vector3 *", "p_ofs"]
]
},
- "godot_transform_looking_at": {
+ {
+ "name": "godot_transform_looking_at",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"],
@@ -2747,69 +3149,79 @@
["const godot_vector3 *", "p_up"]
]
},
- "godot_transform_xform_plane": {
+ {
+ "name": "godot_transform_xform_plane",
"return_type": "godot_plane",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_plane *", "p_v"]
]
},
- "godot_transform_xform_inv_plane": {
+ {
+ "name": "godot_transform_xform_inv_plane",
"return_type": "godot_plane",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_plane *", "p_v"]
]
},
- "godot_transform_new_identity": {
+ {
+ "name": "godot_transform_new_identity",
"return_type": "void",
"arguments": [
["godot_transform *", "r_dest"]
]
},
- "godot_transform_operator_equal": {
+ {
+ "name": "godot_transform_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_transform *", "p_b"]
]
},
- "godot_transform_operator_multiply": {
+ {
+ "name": "godot_transform_operator_multiply",
"return_type": "godot_transform",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_transform *", "p_b"]
]
},
- "godot_transform_xform_vector3": {
+ {
+ "name": "godot_transform_xform_vector3",
"return_type": "godot_vector3",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_transform_xform_inv_vector3": {
+ {
+ "name": "godot_transform_xform_inv_vector3",
"return_type": "godot_vector3",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_vector3 *", "p_v"]
]
},
- "godot_transform_xform_rect3": {
+ {
+ "name": "godot_transform_xform_rect3",
"return_type": "godot_rect3",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_rect3 *", "p_v"]
]
},
- "godot_transform_xform_inv_rect3": {
+ {
+ "name": "godot_transform_xform_inv_rect3",
"return_type": "godot_rect3",
"arguments": [
["const godot_transform *", "p_self"],
["const godot_rect3 *", "p_v"]
]
},
- "godot_transform2d_new": {
+ {
+ "name": "godot_transform2d_new",
"return_type": "void",
"arguments": [
["godot_transform2d *", "r_dest"],
@@ -2817,7 +3229,8 @@
["const godot_vector2 *", "p_pos"]
]
},
- "godot_transform2d_new_axis_origin": {
+ {
+ "name": "godot_transform2d_new_axis_origin",
"return_type": "void",
"arguments": [
["godot_transform2d *", "r_dest"],
@@ -2826,98 +3239,113 @@
["const godot_vector2 *", "p_origin"]
]
},
- "godot_transform2d_as_string": {
+ {
+ "name": "godot_transform2d_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_inverse": {
+ {
+ "name": "godot_transform2d_inverse",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_affine_inverse": {
+ {
+ "name": "godot_transform2d_affine_inverse",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_get_rotation": {
+ {
+ "name": "godot_transform2d_get_rotation",
"return_type": "godot_real",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_get_origin": {
+ {
+ "name": "godot_transform2d_get_origin",
"return_type": "godot_vector2",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_get_scale": {
+ {
+ "name": "godot_transform2d_get_scale",
"return_type": "godot_vector2",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_orthonormalized": {
+ {
+ "name": "godot_transform2d_orthonormalized",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"]
]
},
- "godot_transform2d_rotated": {
+ {
+ "name": "godot_transform2d_rotated",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_real", "p_phi"]
]
},
- "godot_transform2d_scaled": {
+ {
+ "name": "godot_transform2d_scaled",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_vector2 *", "p_scale"]
]
},
- "godot_transform2d_translated": {
+ {
+ "name": "godot_transform2d_translated",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_vector2 *", "p_offset"]
]
},
- "godot_transform2d_xform_vector2": {
+ {
+ "name": "godot_transform2d_xform_vector2",
"return_type": "godot_vector2",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_vector2 *", "p_v"]
]
},
- "godot_transform2d_xform_inv_vector2": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_transform2d_interpolate_with",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"],
@@ -2925,411 +3353,474 @@
["const godot_real", "p_c"]
]
},
- "godot_transform2d_operator_equal": {
+ {
+ "name": "godot_transform2d_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_transform2d *", "p_b"]
]
},
- "godot_transform2d_operator_multiply": {
+ {
+ "name": "godot_transform2d_operator_multiply",
"return_type": "godot_transform2d",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_transform2d *", "p_b"]
]
},
- "godot_transform2d_new_identity": {
+ {
+ "name": "godot_transform2d_new_identity",
"return_type": "void",
"arguments": [
["godot_transform2d *", "r_dest"]
]
},
- "godot_transform2d_xform_rect2": {
+ {
+ "name": "godot_transform2d_xform_rect2",
"return_type": "godot_rect2",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_rect2 *", "p_v"]
]
},
- "godot_transform2d_xform_inv_rect2": {
+ {
+ "name": "godot_transform2d_xform_inv_rect2",
"return_type": "godot_rect2",
"arguments": [
["const godot_transform2d *", "p_self"],
["const godot_rect2 *", "p_v"]
]
},
- "godot_variant_get_type": {
+ {
+ "name": "godot_variant_get_type",
"return_type": "godot_variant_type",
"arguments": [
["const godot_variant *", "p_v"]
]
},
- "godot_variant_new_copy": {
+ {
+ "name": "godot_variant_new_copy",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_variant *", "p_src"]
]
},
- "godot_variant_new_nil": {
+ {
+ "name": "godot_variant_new_nil",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"]
]
},
- "godot_variant_new_bool": {
+ {
+ "name": "godot_variant_new_bool",
"return_type": "void",
"arguments": [
["godot_variant *", "p_v"],
["const godot_bool", "p_b"]
]
},
- "godot_variant_new_uint": {
+ {
+ "name": "godot_variant_new_uint",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const uint64_t", "p_i"]
]
},
- "godot_variant_new_int": {
+ {
+ "name": "godot_variant_new_int",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const int64_t", "p_i"]
]
},
- "godot_variant_new_real": {
+ {
+ "name": "godot_variant_new_real",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const double", "p_r"]
]
},
- "godot_variant_new_string": {
+ {
+ "name": "godot_variant_new_string",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_string *", "p_s"]
]
},
- "godot_variant_new_vector2": {
+ {
+ "name": "godot_variant_new_vector2",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_vector2 *", "p_v2"]
]
},
- "godot_variant_new_rect2": {
+ {
+ "name": "godot_variant_new_rect2",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_rect2 *", "p_rect2"]
]
},
- "godot_variant_new_vector3": {
+ {
+ "name": "godot_variant_new_vector3",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_vector3 *", "p_v3"]
]
},
- "godot_variant_new_transform2d": {
+ {
+ "name": "godot_variant_new_transform2d",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_transform2d *", "p_t2d"]
]
},
- "godot_variant_new_plane": {
+ {
+ "name": "godot_variant_new_plane",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_plane *", "p_plane"]
]
},
- "godot_variant_new_quat": {
+ {
+ "name": "godot_variant_new_quat",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_quat *", "p_quat"]
]
},
- "godot_variant_new_rect3": {
+ {
+ "name": "godot_variant_new_rect3",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_rect3 *", "p_rect3"]
]
},
- "godot_variant_new_basis": {
+ {
+ "name": "godot_variant_new_basis",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_basis *", "p_basis"]
]
},
- "godot_variant_new_transform": {
+ {
+ "name": "godot_variant_new_transform",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_transform *", "p_trans"]
]
},
- "godot_variant_new_color": {
+ {
+ "name": "godot_variant_new_color",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_color *", "p_color"]
]
},
- "godot_variant_new_node_path": {
+ {
+ "name": "godot_variant_new_node_path",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_node_path *", "p_np"]
]
},
- "godot_variant_new_rid": {
+ {
+ "name": "godot_variant_new_rid",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_rid *", "p_rid"]
]
},
- "godot_variant_new_object": {
+ {
+ "name": "godot_variant_new_object",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_object *", "p_obj"]
]
},
- "godot_variant_new_dictionary": {
+ {
+ "name": "godot_variant_new_dictionary",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_dictionary *", "p_dict"]
]
},
- "godot_variant_new_array": {
+ {
+ "name": "godot_variant_new_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
["const godot_array *", "p_arr"]
]
},
- "godot_variant_new_pool_byte_array": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_variant_as_bool",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_uint": {
+ {
+ "name": "godot_variant_as_uint",
"return_type": "uint64_t",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_int": {
+ {
+ "name": "godot_variant_as_int",
"return_type": "int64_t",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_real": {
+ {
+ "name": "godot_variant_as_real",
"return_type": "double",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_string": {
+ {
+ "name": "godot_variant_as_string",
"return_type": "godot_string",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_vector2": {
+ {
+ "name": "godot_variant_as_vector2",
"return_type": "godot_vector2",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_rect2": {
+ {
+ "name": "godot_variant_as_rect2",
"return_type": "godot_rect2",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_vector3": {
+ {
+ "name": "godot_variant_as_vector3",
"return_type": "godot_vector3",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_transform2d": {
+ {
+ "name": "godot_variant_as_transform2d",
"return_type": "godot_transform2d",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_plane": {
+ {
+ "name": "godot_variant_as_plane",
"return_type": "godot_plane",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_quat": {
+ {
+ "name": "godot_variant_as_quat",
"return_type": "godot_quat",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_rect3": {
+ {
+ "name": "godot_variant_as_rect3",
"return_type": "godot_rect3",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_basis": {
+ {
+ "name": "godot_variant_as_basis",
"return_type": "godot_basis",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_transform": {
+ {
+ "name": "godot_variant_as_transform",
"return_type": "godot_transform",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_color": {
+ {
+ "name": "godot_variant_as_color",
"return_type": "godot_color",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_node_path": {
+ {
+ "name": "godot_variant_as_node_path",
"return_type": "godot_node_path",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_rid": {
+ {
+ "name": "godot_variant_as_rid",
"return_type": "godot_rid",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_object": {
+ {
+ "name": "godot_variant_as_object",
"return_type": "godot_object *",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_dictionary": {
+ {
+ "name": "godot_variant_as_dictionary",
"return_type": "godot_dictionary",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_array": {
+ {
+ "name": "godot_variant_as_array",
"return_type": "godot_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_byte_array": {
+ {
+ "name": "godot_variant_as_pool_byte_array",
"return_type": "godot_pool_byte_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_int_array": {
+ {
+ "name": "godot_variant_as_pool_int_array",
"return_type": "godot_pool_int_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_real_array": {
+ {
+ "name": "godot_variant_as_pool_real_array",
"return_type": "godot_pool_real_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_string_array": {
+ {
+ "name": "godot_variant_as_pool_string_array",
"return_type": "godot_pool_string_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_vector2_array": {
+ {
+ "name": "godot_variant_as_pool_vector2_array",
"return_type": "godot_pool_vector2_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_vector3_array": {
+ {
+ "name": "godot_variant_as_pool_vector3_array",
"return_type": "godot_pool_vector3_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_as_pool_color_array": {
+ {
+ "name": "godot_variant_as_pool_color_array",
"return_type": "godot_pool_color_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_call": {
+ {
+ "name": "godot_variant_call",
"return_type": "godot_variant",
"arguments": [
["godot_variant *", "p_self"],
@@ -3339,60 +3830,69 @@
["godot_variant_call_error *", "r_error"]
]
},
- "godot_variant_has_method": {
+ {
+ "name": "godot_variant_has_method",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"],
["const godot_string *", "p_method"]
]
},
- "godot_variant_operator_equal": {
+ {
+ "name": "godot_variant_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"],
["const godot_variant *", "p_other"]
]
},
- "godot_variant_operator_less": {
+ {
+ "name": "godot_variant_operator_less",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"],
["const godot_variant *", "p_other"]
]
},
- "godot_variant_hash_compare": {
+ {
+ "name": "godot_variant_hash_compare",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"],
["const godot_variant *", "p_other"]
]
},
- "godot_variant_booleanize": {
+ {
+ "name": "godot_variant_booleanize",
"return_type": "godot_bool",
"arguments": [
["const godot_variant *", "p_self"]
]
},
- "godot_variant_destroy": {
+ {
+ "name": "godot_variant_destroy",
"return_type": "void",
"arguments": [
["godot_variant *", "p_self"]
]
},
- "godot_string_new": {
+ {
+ "name": "godot_string_new",
"return_type": "void",
"arguments": [
["godot_string *", "r_dest"]
]
},
- "godot_string_new_copy": {
+ {
+ "name": "godot_string_new_copy",
"return_type": "void",
"arguments": [
["godot_string *", "r_dest"],
["const godot_string *", "p_src"]
]
},
- "godot_string_new_data": {
+ {
+ "name": "godot_string_new_data",
"return_type": "void",
"arguments": [
["godot_string *", "r_dest"],
@@ -3400,7 +3900,8 @@
["const int", "p_size"]
]
},
- "godot_string_new_unicode_data": {
+ {
+ "name": "godot_string_new_unicode_data",
"return_type": "void",
"arguments": [
["godot_string *", "r_dest"],
@@ -3408,7 +3909,8 @@
["const int", "p_size"]
]
},
- "godot_string_get_data": {
+ {
+ "name": "godot_string_get_data",
"return_type": "void",
"arguments": [
["const godot_string *", "p_self"],
@@ -3416,93 +3918,107 @@
["int *", "p_size"]
]
},
- "godot_string_operator_index": {
+ {
+ "name": "godot_string_operator_index",
"return_type": "wchar_t *",
"arguments": [
["godot_string *", "p_self"],
["const godot_int", "p_idx"]
]
},
- "godot_string_c_str": {
+ {
+ "name": "godot_string_c_str",
"return_type": "const char *",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_unicode_str": {
+ {
+ "name": "godot_string_unicode_str",
"return_type": "const wchar_t *",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_operator_equal": {
+ {
+ "name": "godot_string_operator_equal",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_b"]
]
},
- "godot_string_operator_less": {
+ {
+ "name": "godot_string_operator_less",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_b"]
]
},
- "godot_string_operator_plus": {
+ {
+ "name": "godot_string_operator_plus",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_b"]
]
},
- "godot_string_length": {
+ {
+ "name": "godot_string_length",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_begins_with": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_begins_with_char_array",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const char *", "p_char_array"]
]
},
- "godot_string_bigrams": {
+ {
+ "name": "godot_string_bigrams",
"return_type": "godot_array",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_chr": {
+ {
+ "name": "godot_string_chr",
"return_type": "godot_string",
"arguments": [
["wchar_t", "p_character"]
]
},
- "godot_string_ends_with": {
+ {
+ "name": "godot_string_ends_with",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_string"]
]
},
- "godot_string_find": {
+ {
+ "name": "godot_string_find",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_what"]
]
},
- "godot_string_find_from": {
+ {
+ "name": "godot_string_find_from",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3510,14 +4026,16 @@
["godot_int", "p_from"]
]
},
- "godot_string_findmk": {
+ {
+ "name": "godot_string_findmk",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["const godot_array *", "p_keys"]
]
},
- "godot_string_findmk_from": {
+ {
+ "name": "godot_string_findmk_from",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3525,7 +4043,8 @@
["godot_int", "p_from"]
]
},
- "godot_string_findmk_from_in_place": {
+ {
+ "name": "godot_string_findmk_from_in_place",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3534,14 +4053,16 @@
["godot_int *", "r_key"]
]
},
- "godot_string_findn": {
+ {
+ "name": "godot_string_findn",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_what"]
]
},
- "godot_string_findn_from": {
+ {
+ "name": "godot_string_findn_from",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3549,21 +4070,24 @@
["godot_int", "p_from"]
]
},
- "godot_string_find_last": {
+ {
+ "name": "godot_string_find_last",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_what"]
]
},
- "godot_string_format": {
+ {
+ "name": "godot_string_format",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["const godot_variant *", "p_values"]
]
},
- "godot_string_format_with_custom_placeholder": {
+ {
+ "name": "godot_string_format_with_custom_placeholder",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3571,26 +4095,30 @@
["const char *", "p_placeholder"]
]
},
- "godot_string_hex_encode_buffer": {
+ {
+ "name": "godot_string_hex_encode_buffer",
"return_type": "godot_string",
"arguments": [
["const uint8_t *", "p_buffer"],
["godot_int", "p_len"]
]
},
- "godot_string_hex_to_int": {
+ {
+ "name": "godot_string_hex_to_int",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_hex_to_int_without_prefix": {
+ {
+ "name": "godot_string_hex_to_int_without_prefix",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_insert": {
+ {
+ "name": "godot_string_insert",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3598,34 +4126,39 @@
["godot_string", "p_string"]
]
},
- "godot_string_is_numeric": {
+ {
+ "name": "godot_string_is_numeric",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_subsequence_of": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_is_subsequence_ofi",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_string"]
]
},
- "godot_string_lpad": {
+ {
+ "name": "godot_string_lpad",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_min_length"]
]
},
- "godot_string_lpad_with_custom_character": {
+ {
+ "name": "godot_string_lpad_with_custom_character",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3633,40 +4166,46 @@
["const godot_string *", "p_character"]
]
},
- "godot_string_match": {
+ {
+ "name": "godot_string_match",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_wildcard"]
]
},
- "godot_string_matchn": {
+ {
+ "name": "godot_string_matchn",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_wildcard"]
]
},
- "godot_string_md5": {
+ {
+ "name": "godot_string_md5",
"return_type": "godot_string",
"arguments": [
["const uint8_t *", "p_md5"]
]
},
- "godot_string_num": {
+ {
+ "name": "godot_string_num",
"return_type": "godot_string",
"arguments": [
["double", "p_num"]
]
},
- "godot_string_num_int64": {
+ {
+ "name": "godot_string_num_int64",
"return_type": "godot_string",
"arguments": [
["int64_t", "p_num"],
["godot_int", "p_base"]
]
},
- "godot_string_num_int64_capitalized": {
+ {
+ "name": "godot_string_num_int64_capitalized",
"return_type": "godot_string",
"arguments": [
["int64_t", "p_num"],
@@ -3674,40 +4213,46 @@
["godot_bool", "p_capitalize_hex"]
]
},
- "godot_string_num_real": {
+ {
+ "name": "godot_string_num_real",
"return_type": "godot_string",
"arguments": [
["double", "p_num"]
]
},
- "godot_string_num_scientific": {
+ {
+ "name": "godot_string_num_scientific",
"return_type": "godot_string",
"arguments": [
["double", "p_num"]
]
},
- "godot_string_num_with_decimals": {
+ {
+ "name": "godot_string_num_with_decimals",
"return_type": "godot_string",
"arguments": [
["double", "p_num"],
["godot_int", "p_decimals"]
]
},
- "godot_string_pad_decimals": {
+ {
+ "name": "godot_string_pad_decimals",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_digits"]
]
},
- "godot_string_pad_zeros": {
+ {
+ "name": "godot_string_pad_zeros",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_digits"]
]
},
- "godot_string_replace_first": {
+ {
+ "name": "godot_string_replace_first",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3715,7 +4260,8 @@
["godot_string", "p_with"]
]
},
- "godot_string_replace": {
+ {
+ "name": "godot_string_replace",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3723,7 +4269,8 @@
["godot_string", "p_with"]
]
},
- "godot_string_replacen": {
+ {
+ "name": "godot_string_replacen",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3731,21 +4278,24 @@
["godot_string", "p_with"]
]
},
- "godot_string_rfind": {
+ {
+ "name": "godot_string_rfind",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_what"]
]
},
- "godot_string_rfindn": {
+ {
+ "name": "godot_string_rfindn",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_what"]
]
},
- "godot_string_rfind_from": {
+ {
+ "name": "godot_string_rfind_from",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3753,7 +4303,8 @@
["godot_int", "p_from"]
]
},
- "godot_string_rfindn_from": {
+ {
+ "name": "godot_string_rfindn_from",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
@@ -3761,14 +4312,16 @@
["godot_int", "p_from"]
]
},
- "godot_string_rpad": {
+ {
+ "name": "godot_string_rpad",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_min_length"]
]
},
- "godot_string_rpad_with_custom_character": {
+ {
+ "name": "godot_string_rpad_with_custom_character",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3776,14 +4329,16 @@
["const godot_string *", "p_character"]
]
},
- "godot_string_similarity": {
+ {
+ "name": "godot_string_similarity",
"return_type": "godot_real",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_string"]
]
},
- "godot_string_sprintf": {
+ {
+ "name": "godot_string_sprintf",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3791,7 +4346,8 @@
["godot_bool *", "p_error"]
]
},
- "godot_string_substr": {
+ {
+ "name": "godot_string_substr",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3799,107 +4355,124 @@
["godot_int", "p_chars"]
]
},
- "godot_string_to_double": {
+ {
+ "name": "godot_string_to_double",
"return_type": "double",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_to_float": {
+ {
+ "name": "godot_string_to_float",
"return_type": "godot_real",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_to_int": {
+ {
+ "name": "godot_string_to_int",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_camelcase_to_underscore": {
+ {
+ "name": "godot_string_camelcase_to_underscore",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_camelcase_to_underscore_lowercased": {
+ {
+ "name": "godot_string_camelcase_to_underscore_lowercased",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_capitalize": {
+ {
+ "name": "godot_string_capitalize",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_char_to_double": {
+ {
+ "name": "godot_string_char_to_double",
"return_type": "double",
"arguments": [
["const char *", "p_what"]
]
},
- "godot_string_char_to_int": {
+ {
+ "name": "godot_string_char_to_int",
"return_type": "godot_int",
"arguments": [
["const char *", "p_what"]
]
},
- "godot_string_wchar_to_int": {
+ {
+ "name": "godot_string_wchar_to_int",
"return_type": "int64_t",
"arguments": [
["const wchar_t *", "p_str"]
]
},
- "godot_string_char_to_int_with_len": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_hex_to_int64",
"return_type": "int64_t",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_hex_to_int64_with_prefix": {
+ {
+ "name": "godot_string_hex_to_int64_with_prefix",
"return_type": "int64_t",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_to_int64": {
+ {
+ "name": "godot_string_to_int64",
"return_type": "int64_t",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_unicode_char_to_double": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_get_slice_count",
"return_type": "godot_int",
"arguments": [
["const godot_string *", "p_self"],
["godot_string", "p_splitter"]
]
},
- "godot_string_get_slice": {
+ {
+ "name": "godot_string_get_slice",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3907,7 +4480,8 @@
["godot_int", "p_slice"]
]
},
- "godot_string_get_slicec": {
+ {
+ "name": "godot_string_get_slicec",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -3915,147 +4489,169 @@
["godot_int", "p_slice"]
]
},
- "godot_string_split": {
+ {
+ "name": "godot_string_split",
"return_type": "godot_array",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_splitter"]
]
},
- "godot_string_split_allow_empty": {
+ {
+ "name": "godot_string_split_allow_empty",
"return_type": "godot_array",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_splitter"]
]
},
- "godot_string_split_floats": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_split_spaces",
"return_type": "godot_array",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_char_lowercase": {
+ {
+ "name": "godot_string_char_lowercase",
"return_type": "wchar_t",
"arguments": [
["wchar_t", "p_char"]
]
},
- "godot_string_char_uppercase": {
+ {
+ "name": "godot_string_char_uppercase",
"return_type": "wchar_t",
"arguments": [
["wchar_t", "p_char"]
]
},
- "godot_string_to_lower": {
+ {
+ "name": "godot_string_to_lower",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_to_upper": {
+ {
+ "name": "godot_string_to_upper",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_get_basename": {
+ {
+ "name": "godot_string_get_basename",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_get_extension": {
+ {
+ "name": "godot_string_get_extension",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_left": {
+ {
+ "name": "godot_string_left",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_pos"]
]
},
- "godot_string_ord_at": {
+ {
+ "name": "godot_string_ord_at",
"return_type": "wchar_t",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_idx"]
]
},
- "godot_string_plus_file": {
+ {
+ "name": "godot_string_plus_file",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_file"]
]
},
- "godot_string_right": {
+ {
+ "name": "godot_string_right",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_pos"]
]
},
- "godot_string_strip_edges": {
+ {
+ "name": "godot_string_strip_edges",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
@@ -4063,13 +4659,15 @@
["godot_bool", "p_right"]
]
},
- "godot_string_strip_escapes": {
+ {
+ "name": "godot_string_strip_escapes",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_erase": {
+ {
+ "name": "godot_string_erase",
"return_type": "void",
"arguments": [
["godot_string *", "p_self"],
@@ -4077,35 +4675,40 @@
["godot_int", "p_chars"]
]
},
- "godot_string_ascii": {
+ {
+ "name": "godot_string_ascii",
"return_type": "void",
"arguments": [
["godot_string *", "p_self"],
["char *", "result"]
]
},
- "godot_string_ascii_extended": {
+ {
+ "name": "godot_string_ascii_extended",
"return_type": "void",
"arguments": [
["godot_string *", "p_self"],
["char *", "result"]
]
},
- "godot_string_utf8": {
+ {
+ "name": "godot_string_utf8",
"return_type": "void",
"arguments": [
["godot_string *", "p_self"],
["char *", "result"]
]
},
- "godot_string_parse_utf8": {
+ {
+ "name": "godot_string_parse_utf8",
"return_type": "godot_bool",
"arguments": [
["godot_string *", "p_self"],
["const char *", "p_utf8"]
]
},
- "godot_string_parse_utf8_with_len": {
+ {
+ "name": "godot_string_parse_utf8_with_len",
"return_type": "godot_bool",
"arguments": [
["godot_string *", "p_self"],
@@ -4113,279 +4716,384 @@
["godot_int", "p_len"]
]
},
- "godot_string_chars_to_utf8": {
+ {
+ "name": "godot_string_chars_to_utf8",
"return_type": "godot_string",
"arguments": [
["const char *", "p_utf8"]
]
},
- "godot_string_chars_to_utf8_with_len": {
+ {
+ "name": "godot_string_chars_to_utf8_with_len",
"return_type": "godot_string",
"arguments": [
["const char *", "p_utf8"],
["godot_int", "p_len"]
]
},
- "godot_string_hash": {
+ {
+ "name": "godot_string_hash",
"return_type": "uint32_t",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_hash64": {
+ {
+ "name": "godot_string_hash64",
"return_type": "uint64_t",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_hash_chars": {
+ {
+ "name": "godot_string_hash_chars",
"return_type": "uint32_t",
"arguments": [
["const char *", "p_cstr"]
]
},
- "godot_string_hash_chars_with_len": {
+ {
+ "name": "godot_string_hash_chars_with_len",
"return_type": "uint32_t",
"arguments": [
["const char *", "p_cstr"],
["godot_int", "p_len"]
]
},
- "godot_string_hash_utf8_chars": {
+ {
+ "name": "godot_string_hash_utf8_chars",
"return_type": "uint32_t",
"arguments": [
["const wchar_t *", "p_str"]
]
},
- "godot_string_hash_utf8_chars_with_len": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_md5_buffer",
"return_type": "godot_pool_byte_array",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_md5_text": {
+ {
+ "name": "godot_string_md5_text",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_sha256_buffer": {
+ {
+ "name": "godot_string_sha256_buffer",
"return_type": "godot_pool_byte_array",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_sha256_text": {
+ {
+ "name": "godot_string_sha256_text",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_empty": {
+ {
+ "name": "godot_string_empty",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_get_base_dir": {
+ {
+ "name": "godot_string_get_base_dir",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_get_file": {
+ {
+ "name": "godot_string_get_file",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_humanize_size": {
+ {
+ "name": "godot_string_humanize_size",
"return_type": "godot_string",
"arguments": [
["size_t", "p_size"]
]
},
- "godot_string_is_abs_path": {
+ {
+ "name": "godot_string_is_abs_path",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_rel_path": {
+ {
+ "name": "godot_string_is_rel_path",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_resource_file": {
+ {
+ "name": "godot_string_is_resource_file",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_path_to": {
+ {
+ "name": "godot_string_path_to",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_path"]
]
},
- "godot_string_path_to_file": {
+ {
+ "name": "godot_string_path_to_file",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_path"]
]
},
- "godot_string_simplify_path": {
+ {
+ "name": "godot_string_simplify_path",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_c_escape": {
+ {
+ "name": "godot_string_c_escape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_c_escape_multiline": {
+ {
+ "name": "godot_string_c_escape_multiline",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_c_unescape": {
+ {
+ "name": "godot_string_c_unescape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_http_escape": {
+ {
+ "name": "godot_string_http_escape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_http_unescape": {
+ {
+ "name": "godot_string_http_unescape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_json_escape": {
+ {
+ "name": "godot_string_json_escape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_word_wrap": {
+ {
+ "name": "godot_string_word_wrap",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"],
["godot_int", "p_chars_per_line"]
]
},
- "godot_string_xml_escape": {
+ {
+ "name": "godot_string_xml_escape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_xml_escape_with_quotes": {
+ {
+ "name": "godot_string_xml_escape_with_quotes",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_xml_unescape": {
+ {
+ "name": "godot_string_xml_unescape",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_percent_decode": {
+ {
+ "name": "godot_string_percent_decode",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_percent_encode": {
+ {
+ "name": "godot_string_percent_encode",
"return_type": "godot_string",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_valid_float": {
+ {
+ "name": "godot_string_is_valid_float",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_valid_hex_number": {
+ {
+ "name": "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": {
+ {
+ "name": "godot_string_is_valid_html_color",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_valid_identifier": {
+ {
+ "name": "godot_string_is_valid_identifier",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_valid_integer": {
+ {
+ "name": "godot_string_is_valid_integer",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_is_valid_ip_address": {
+ {
+ "name": "godot_string_is_valid_ip_address",
"return_type": "godot_bool",
"arguments": [
["const godot_string *", "p_self"]
]
},
- "godot_string_destroy": {
+ {
+ "name": "godot_string_destroy",
"return_type": "void",
"arguments": [
["godot_string *", "p_self"]
]
},
- "godot_object_destroy": {
+ {
+ "name": "godot_string_name_new",
+ "return_type": "void",
+ "arguments": [
+ ["godot_string_name *", "r_dest"],
+ ["const godot_string *", "p_name"]
+ ]
+ },
+ {
+ "name": "godot_string_name_new_data",
+ "return_type": "void",
+ "arguments": [
+ ["godot_string_name *", "r_dest"],
+ ["const char *", "p_name"]
+ ]
+ },
+ {
+ "name": "godot_string_name_get_name",
+ "return_type": "godot_string",
+ "arguments": [
+ ["const godot_string_name *", "p_self"]
+ ]
+ },
+ {
+ "name": "godot_string_name_get_hash",
+ "return_type": "uint32_t",
+ "arguments": [
+ ["const godot_string_name *", "p_self"]
+ ]
+ },
+ {
+ "name": "godot_string_name_get_data_unique_pointer",
+ "return_type": "const void *",
+ "arguments": [
+ ["const godot_string_name *", "p_self"]
+ ]
+ },
+ {
+ "name": "godot_string_name_operator_equal",
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string_name *", "p_self"],
+ ["const godot_string_name *", "p_other"]
+ ]
+ },
+ {
+ "name": "godot_string_name_operator_less",
+ "return_type": "godot_bool",
+ "arguments": [
+ ["const godot_string_name *", "p_self"],
+ ["const godot_string_name *", "p_other"]
+ ]
+ },
+ {
+ "name": "godot_string_name_destroy",
+ "return_type": "void",
+ "arguments": [
+ ["godot_string_name *", "p_self"]
+ ]
+ },
+ {
+ "name": "godot_object_destroy",
"return_type": "void",
"arguments": [
["godot_object *", "p_o"]
]
},
- "godot_global_get_singleton": {
+ {
+ "name": "godot_global_get_singleton",
"return_type": "godot_object *",
"arguments": [
["char *", "p_name"]
]
},
- "godot_method_bind_get_method": {
+ {
+ "name": "godot_method_bind_get_method",
"return_type": "godot_method_bind *",
"arguments": [
["const char *", "p_classname"],
["const char *", "p_methodname"]
]
},
- "godot_method_bind_ptrcall": {
+ {
+ "name": "godot_method_bind_ptrcall",
"return_type": "void",
"arguments": [
["godot_method_bind *", "p_method_bind"],
@@ -4394,7 +5102,8 @@
["void *", "p_ret"]
]
},
- "godot_method_bind_call": {
+ {
+ "name": "godot_method_bind_call",
"return_type": "godot_variant",
"arguments": [
["godot_method_bind *", "p_method_bind"],
@@ -4404,32 +5113,37 @@
["godot_variant_call_error *", "p_call_error"]
]
},
- "godot_get_class_constructor": {
+ {
+ "name": "godot_get_class_constructor",
"return_type": "godot_class_constructor",
"arguments": [
["const char *", "p_classname"]
]
},
- "godot_alloc": {
+ {
+ "name": "godot_alloc",
"return_type": "void *",
"arguments": [
["int", "p_bytes"]
]
},
- "godot_realloc": {
+ {
+ "name": "godot_realloc",
"return_type": "void *",
"arguments": [
["void *", "p_ptr"],
["int", "p_bytes"]
]
},
- "godot_free": {
+ {
+ "name": "godot_free",
"return_type": "void",
"arguments": [
["void *", "p_ptr"]
]
},
- "godot_print_error": {
+ {
+ "name": "godot_print_error",
"return_type": "void",
"arguments": [
["const char *", "p_description"],
@@ -4438,7 +5152,8 @@
["int", "p_line"]
]
},
- "godot_print_warning": {
+ {
+ "name": "godot_print_warning",
"return_type": "void",
"arguments": [
["const char *", "p_description"],
@@ -4447,13 +5162,15 @@
["int", "p_line"]
]
},
- "godot_print": {
+ {
+ "name": "godot_print",
"return_type": "void",
"arguments": [
["const godot_string *", "p_message"]
]
},
- "godot_nativescript_register_class": {
+ {
+ "name": "godot_nativescript_register_class",
"return_type": "void",
"arguments": [
["void *", "p_gdnative_handle"],
@@ -4463,7 +5180,8 @@
["godot_instance_destroy_func", "p_destroy_func"]
]
},
- "godot_nativescript_register_tool_class": {
+ {
+ "name": "godot_nativescript_register_tool_class",
"return_type": "void",
"arguments": [
["void *", "p_gdnative_handle"],
@@ -4473,7 +5191,8 @@
["godot_instance_destroy_func", "p_destroy_func"]
]
},
- "godot_nativescript_register_method": {
+ {
+ "name": "godot_nativescript_register_method",
"return_type": "void",
"arguments": [
["void *", "p_gdnative_handle"],
@@ -4483,7 +5202,8 @@
["godot_instance_method", "p_method"]
]
},
- "godot_nativescript_register_property": {
+ {
+ "name": "godot_nativescript_register_property",
"return_type": "void",
"arguments": [
["void *", "p_gdnative_handle"],
@@ -4494,7 +5214,8 @@
["godot_property_get_func", "p_get_func"]
]
},
- "godot_nativescript_register_signal": {
+ {
+ "name": "godot_nativescript_register_signal",
"return_type": "void",
"arguments": [
["void *", "p_gdnative_handle"],
@@ -4502,11 +5223,12 @@
["const godot_signal *", "p_signal"]
]
},
- "godot_nativescript_get_userdata": {
+ {
+ "name": "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 008968a5e5..2d8726e5db 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -141,6 +141,10 @@ typedef void godot_object;
#include <gdnative/string.h>
+/////// String name
+
+#include <gdnative/string_name.h>
+
////// Vector2
#include <gdnative/vector2.h>
diff --git a/modules/gdnative/include/gdnative/string_name.h b/modules/gdnative/include/gdnative/string_name.h
new file mode 100644
index 0000000000..e217487250
--- /dev/null
+++ b/modules/gdnative/include/gdnative/string_name.h
@@ -0,0 +1,68 @@
+/*************************************************************************/
+/* string_name.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.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_STRING_NAME_H
+#define GODOT_STRING_NAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <wchar.h>
+
+#define GODOT_STRING_NAME_SIZE sizeof(void *)
+
+#ifndef GODOT_CORE_API_GODOT_STRING_NAME_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_STRING_NAME_TYPE_DEFINED
+typedef struct {
+ uint8_t _dont_touch_that[GODOT_STRING_NAME_SIZE];
+} godot_string_name;
+#endif
+
+#include <gdnative/gdnative.h>
+
+void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name);
+void GDAPI godot_string_name_new_data(godot_string_name *r_dest, const char *p_name);
+
+godot_string GDAPI godot_string_name_get_name(const godot_string_name *p_self);
+
+uint32_t GDAPI godot_string_name_get_hash(const godot_string_name *p_self);
+const void GDAPI *godot_string_name_get_data_unique_pointer(const godot_string_name *p_self);
+
+godot_bool GDAPI godot_string_name_operator_equal(const godot_string_name *p_self, const godot_string_name *p_other);
+godot_bool GDAPI godot_string_name_operator_less(const godot_string_name *p_self, const godot_string_name *p_other);
+
+void GDAPI godot_string_name_destroy(godot_string_name *p_self);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GODOT_STRING_NAME_H
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index 997c342045..059cd197d1 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -247,6 +247,7 @@ void unregister_gdnative_types() {
singleton_gdnatives[i]->terminate();
}
+ singleton_gdnatives.clear();
unregister_nativescript_types();
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/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/SCsub b/modules/mono/SCsub
index 0af2056c5c..caf4fdb3ca 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -2,9 +2,10 @@
Import('env')
+from compat import byte_to_str
def make_cs_files_header(src, dst):
- with open(dst, 'wb') as header:
+ with open(dst, 'w') as header:
header.write('/* This is an automatically generated file; DO NOT EDIT! OK THX */\n')
header.write('#ifndef _CS_FILES_DATA_H\n')
header.write('#define _CS_FILES_DATA_H\n\n')
@@ -26,7 +27,7 @@ def make_cs_files_header(src, dst):
for i, buf_idx in enumerate(range(len(buf))):
if i > 0:
header.write(', ')
- header.write(str(ord(buf[buf_idx])))
+ header.write(byte_to_str(buf[buf_idx]))
inserted_files += '\tr_files.insert(\"' + file + '\", ' \
'CompressedFile(_cs_' + name + '_compressed_size, ' \
'_cs_' + name + '_uncompressed_size, ' \
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 5301ea72b4..fe78ce423c 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -782,7 +782,7 @@ bool CSharpInstance::set(const StringName &p_name, const Variant &p_value) {
if (method) {
MonoObject *ret = method->invoke(mono_object, args);
- if (ret && UNBOX_BOOLEAN(ret))
+ if (ret && GDMonoMarshal::unbox<MonoBoolean>(ret) == true)
return true;
}
@@ -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;
+ if (member_info.has(cname))
+ continue;
- Variant::Type type = GDMonoMarshal::managed_to_variant_type(field->get_type());
+ Variant::Type type = GDMonoMarshal::managed_to_variant_type(field->get_type());
- if (field->has_attribute(CACHED_CLASS(ExportAttribute))) {
- MonoObject *attr = field->get_attribute(CACHED_CLASS(ExportAttribute));
+ if (field->has_attribute(CACHED_CLASS(ExportAttribute))) {
+ MonoObject *attr = field->get_attribute(CACHED_CLASS(ExportAttribute));
- // 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);
+ // 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);
- PropertyInfo prop_info = PropertyInfo(type, name, PropertyHint(hint), hint_string, PropertyUsageFlags(usage));
+ PropertyInfo prop_info = PropertyInfo(type, name, PropertyHint(hint), hint_string, PropertyUsageFlags(usage));
- member_info[cname] = prop_info;
- exported_members_cache.push_back(prop_info);
+ 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));
+ 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();
}
}
@@ -1795,6 +1804,31 @@ RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p
#endif
script->set_path(p_original_path);
+
+#ifndef TOOLS_ENABLED
+
+#ifdef DEBUG_ENABLED
+ // User is responsible for thread attach/detach
+ ERR_EXPLAIN("Thread is not attached");
+ CRASH_COND(mono_domain_get() == NULL);
+#endif
+
+#else
+ if (Engine::get_singleton()->is_editor_hint() && mono_domain_get() == NULL) {
+
+ CRASH_COND(Thread::get_caller_id() == Thread::get_main_id());
+
+ // Thread is not attached, but we will make an exception in this case
+ // because this may be called by one of the editor's worker threads.
+ // Attach this thread temporarily to reload the script.
+
+ MonoThread *mono_thread = mono_thread_attach(SCRIPTS_DOMAIN);
+ CRASH_COND(mono_thread == NULL);
+ script->reload();
+ mono_thread_detach(mono_thread);
+
+ } else // just reload it normally
+#endif
script->reload();
if (r_error)
diff --git a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
index 329b6d2008..5544233eb7 100644
--- a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
+++ b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
@@ -106,7 +106,7 @@ namespace GodotSharpTools.Build
private string BuildArguments(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties)
{
- string arguments = string.Format("{0} /v:normal /t:Build /p:{1} /l:{2},{3};{4}",
+ string arguments = string.Format(@"""{0}"" /v:normal /t:Build ""/p:{1}"" ""/l:{2},{3};{4}""",
solution,
"Configuration=" + config,
typeof(GodotBuildLogger).FullName,
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp
index bb4756e490..1bad8a3f85 100644
--- a/modules/mono/editor/godotsharp_builds.cpp
+++ b/modules/mono/editor/godotsharp_builds.cpp
@@ -59,7 +59,7 @@ String _find_build_engine_on_unix(const String &p_name) {
"/opt/novell/mono/bin/"
};
- for (int i = 0; i < sizeof(locations) / sizeof(char); i++) {
+ for (int i = 0; i < sizeof(locations) / sizeof(const char *); i++) {
String location = locations[i];
if (FileAccess::exists(location + p_name)) {
@@ -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"));
}
@@ -461,6 +461,10 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
if (p_blocking) {
exited = true;
exit_code = klass->get_field("exitCode")->get_int_value(mono_object);
+
+ if (exit_code != 0 && OS::get_singleton()->is_stdout_verbose())
+ OS::get_singleton()->print(String("MSBuild finished with exit code " + itos(exit_code) + "\n").utf8());
+
build_tab->on_build_exit(exit_code == 0 ? MonoBuildTab::RESULT_SUCCESS : MonoBuildTab::RESULT_ERROR);
} else {
build_instance = MonoGCHandle::create_strong(mono_object);
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_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index d0b5b12d4b..2c88832998 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -266,6 +266,13 @@ void GDMono::add_assembly(uint32_t p_domain_id, GDMonoAssembly *p_assembly) {
assemblies[p_domain_id][p_assembly->get_name()] = p_assembly;
}
+GDMonoAssembly **GDMono::get_loaded_assembly(const String &p_name) {
+
+ MonoDomain *domain = mono_domain_get();
+ uint32_t domain_id = domain ? mono_domain_get_id(domain) : 0;
+ return assemblies[domain_id].getptr(p_name);
+}
+
bool GDMono::_load_assembly(const String &p_name, GDMonoAssembly **r_assembly) {
CRASH_COND(!r_assembly);
@@ -278,34 +285,17 @@ bool GDMono::_load_assembly(const String &p_name, GDMonoAssembly **r_assembly) {
MonoAssembly *assembly = mono_assembly_load_full(aname, NULL, &status, false);
mono_assembly_name_free(aname);
- if (!assembly)
- return false;
+ ERR_FAIL_NULL_V(assembly, false);
uint32_t domain_id = mono_domain_get_id(mono_domain_get());
GDMonoAssembly **stored_assembly = assemblies[domain_id].getptr(p_name);
- if (stored_assembly) {
- // Loaded by our preload hook (status is not initialized when returning from a preload hook)
- ERR_FAIL_COND_V((*stored_assembly)->get_assembly() != assembly, false);
- *r_assembly = *stored_assembly;
- } else {
- ERR_FAIL_COND_V(status != MONO_IMAGE_OK, false);
-
- MonoImage *assembly_image = mono_assembly_get_image(assembly);
- ERR_FAIL_NULL_V(assembly_image, false);
-
- const char *path = mono_image_get_filename(assembly_image);
-
- *r_assembly = memnew(GDMonoAssembly(p_name, path));
- Error error = (*r_assembly)->wrapper_for_image(assembly_image);
+ ERR_FAIL_COND_V(status != MONO_IMAGE_OK, false);
+ ERR_FAIL_COND_V(stored_assembly == NULL, false);
- if (error != OK) {
- memdelete(*r_assembly);
- *r_assembly = NULL;
- ERR_FAIL_V(false);
- }
- }
+ ERR_FAIL_COND_V((*stored_assembly)->get_assembly() != assembly, false);
+ *r_assembly = *stored_assembly;
if (OS::get_singleton()->is_stdout_verbose())
OS::get_singleton()->print(String("Mono: Assembly " + p_name + " loaded from path: " + (*r_assembly)->get_path() + "\n").utf8());
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index ab96d575e6..b188c0730a 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -122,7 +122,9 @@ public:
static GDMono *get_singleton() { return singleton; }
+ // Do not use these, unless you know what you're doing
void add_assembly(uint32_t p_domain_id, GDMonoAssembly *p_assembly);
+ GDMonoAssembly **get_loaded_assembly(const String &p_name);
_FORCE_INLINE_ bool is_runtime_initialized() const { return runtime_initialized; }
_FORCE_INLINE_ bool is_finalizing_scripts_domain() const { return finalizing_scripts_domain; }
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index a98537b9e1..4b370295f3 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -39,28 +39,60 @@
#include "../godotsharp_dirs.h"
#include "gd_mono_class.h"
-MonoAssembly *gdmono_load_assembly_from(const String &p_name, const String &p_path) {
+bool GDMonoAssembly::no_search = false;
+Vector<String> GDMonoAssembly::search_dirs;
- MonoDomain *domain = mono_domain_get();
+MonoAssembly *GDMonoAssembly::_search_hook(MonoAssemblyName *aname, void *user_data) {
- GDMonoAssembly *assembly = memnew(GDMonoAssembly(p_name, p_path));
- Error err = assembly->load(domain);
- ERR_FAIL_COND_V(err != OK, NULL);
+ (void)user_data; // UNUSED
- GDMono::get_singleton()->add_assembly(mono_domain_get_id(domain), assembly);
+ String name = mono_assembly_name_get_name(aname);
+ bool has_extension = name.ends_with(".dll") || name.ends_with(".exe");
- return assembly->get_assembly();
-}
+ if (no_search)
+ return NULL;
-MonoAssembly *gdmono_MonoAssemblyPreLoad(MonoAssemblyName *aname, char **assemblies_path, void *user_data) {
+ GDMonoAssembly **loaded_asm = GDMono::get_singleton()->get_loaded_assembly(has_extension ? name.get_basename() : name);
+ if (loaded_asm)
+ return (*loaded_asm)->get_assembly();
- (void)user_data; // UNUSED
+ no_search = true; // Avoid the recursion madness
+
+ String path;
+ MonoAssembly *res = NULL;
+
+ for (int i = 0; i < search_dirs.size(); i++) {
+ const String &search_dir = search_dirs[i];
- MonoAssembly *assembly_loaded = mono_assembly_loaded(aname);
- if (assembly_loaded) // Already loaded
- return assembly_loaded;
+ if (has_extension) {
+ path = search_dir.plus_file(name);
+ if (FileAccess::exists(path)) {
+ res = _load_assembly_from(name.get_basename(), path);
+ break;
+ }
+ } else {
+ path = search_dir.plus_file(name + ".dll");
+ if (FileAccess::exists(path)) {
+ res = _load_assembly_from(name, path);
+ break;
+ }
+
+ path = search_dir.plus_file(name + ".exe");
+ if (FileAccess::exists(path)) {
+ res = _load_assembly_from(name, path);
+ break;
+ }
+ }
+ }
- static Vector<String> search_dirs;
+ no_search = false;
+
+ return res;
+}
+
+MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **assemblies_path, void *user_data) {
+
+ (void)user_data; // UNUSED
if (search_dirs.empty()) {
search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir());
@@ -80,35 +112,32 @@ MonoAssembly *gdmono_MonoAssemblyPreLoad(MonoAssemblyName *aname, char **assembl
}
}
- String name = mono_assembly_name_get_name(aname);
- bool has_extension = name.ends_with(".dll") || name.ends_with(".exe");
+ return NULL;
+}
- String path;
+MonoAssembly *GDMonoAssembly::_load_assembly_from(const String &p_name, const String &p_path) {
- for (int i = 0; i < search_dirs.size(); i++) {
- const String &search_dir = search_dirs[i];
+ GDMonoAssembly *assembly = memnew(GDMonoAssembly(p_name, p_path));
- if (has_extension) {
- path = search_dir.plus_file(name);
- if (FileAccess::exists(path))
- return gdmono_load_assembly_from(name.get_basename(), path);
- } else {
- path = search_dir.plus_file(name + ".dll");
- if (FileAccess::exists(path))
- return gdmono_load_assembly_from(name, path);
+ MonoDomain *domain = mono_domain_get();
- path = search_dir.plus_file(name + ".exe");
- if (FileAccess::exists(path))
- return gdmono_load_assembly_from(name, path);
- }
+ Error err = assembly->load(domain);
+
+ if (err != OK) {
+ memdelete(assembly);
+ ERR_FAIL_V(NULL);
}
- return NULL;
+ GDMono::get_singleton()->add_assembly(domain ? mono_domain_get_id(domain) : 0, assembly);
+
+ return assembly->get_assembly();
}
void GDMonoAssembly::initialize() {
- mono_install_assembly_preload_hook(&gdmono_MonoAssemblyPreLoad, NULL);
+ // TODO refonly as well?
+ mono_install_assembly_preload_hook(&GDMonoAssembly::_preload_hook, NULL);
+ mono_install_assembly_search_hook(&GDMonoAssembly::_search_hook, NULL);
}
Error GDMonoAssembly::load(MonoDomain *p_domain) {
@@ -153,7 +182,7 @@ no_pdb:
ERR_FAIL_COND_V(status != MONO_IMAGE_OK || assembly == NULL, ERR_FILE_CANT_OPEN);
- if (mono_image_get_entry_point(image)) {
+ if (p_domain && mono_image_get_entry_point(image)) {
// TODO should this be removed? do we want to call main? what other effects does this have?
mono_jit_exec(p_domain, assembly, 0, NULL);
}
diff --git a/modules/mono/mono_gd/gd_mono_assembly.h b/modules/mono/mono_gd/gd_mono_assembly.h
index 89e091549c..710b674622 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.h
+++ b/modules/mono/mono_gd/gd_mono_assembly.h
@@ -86,6 +86,14 @@ class GDMonoAssembly {
Vector<uint8_t> pdb_data;
#endif
+ static bool no_search;
+ static Vector<String> search_dirs;
+
+ static MonoAssembly *_search_hook(MonoAssemblyName *aname, void *user_data);
+ static MonoAssembly *_preload_hook(MonoAssemblyName *aname, char **assemblies_path, void *user_data);
+
+ static MonoAssembly *_load_assembly_from(const String &p_name, const String &p_path);
+
friend class GDMono;
static void initialize();
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 0c64380e31..c2d8eeaa32 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -279,11 +279,11 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
}
bool GDMonoField::get_bool_value(MonoObject *p_object) {
- return UNBOX_BOOLEAN(get_value(p_object));
+ return (bool)GDMonoMarshal::unbox<MonoBoolean>(get_value(p_object));
}
int GDMonoField::get_int_value(MonoObject *p_object) {
- return UNBOX_INT32(get_value(p_object));
+ return GDMonoMarshal::unbox<int32_t>(get_value(p_object));
}
String GDMonoField::get_string_value(MonoObject *p_object) {
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index b5419952de..b64915109f 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -41,11 +41,11 @@ namespace GDMonoMarshal {
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(m_t), raw); \
}
-#define RETURN_UNBOXED_STRUCT(m_t, m_var_in) \
- { \
- float *raw = UNBOX_FLOAT_PTR(m_var_in); \
- MARSHALLED_IN(m_t, raw, ret); \
- return ret; \
+#define RETURN_UNBOXED_STRUCT(m_t, m_var_in) \
+ { \
+ float *raw = (float *)mono_object_unbox(m_var_in); \
+ MARSHALLED_IN(m_t, raw, ret); \
+ return ret; \
}
Variant::Type managed_to_variant_type(const ManagedType &p_type) {
@@ -453,30 +453,30 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
switch (p_type.type_encoding) {
case MONO_TYPE_BOOLEAN:
- return (bool)UNBOX_BOOLEAN(p_obj);
+ return (bool)unbox<MonoBoolean>(p_obj);
case MONO_TYPE_I1:
- return UNBOX_INT8(p_obj);
+ return unbox<int8_t>(p_obj);
case MONO_TYPE_I2:
- return UNBOX_INT16(p_obj);
+ return unbox<int16_t>(p_obj);
case MONO_TYPE_I4:
- return UNBOX_INT32(p_obj);
+ return unbox<int32_t>(p_obj);
case MONO_TYPE_I8:
- return UNBOX_INT64(p_obj);
+ return unbox<int64_t>(p_obj);
case MONO_TYPE_U1:
- return UNBOX_UINT8(p_obj);
+ return unbox<uint8_t>(p_obj);
case MONO_TYPE_U2:
- return UNBOX_UINT16(p_obj);
+ return unbox<uint16_t>(p_obj);
case MONO_TYPE_U4:
- return UNBOX_UINT32(p_obj);
+ return unbox<uint32_t>(p_obj);
case MONO_TYPE_U8:
- return UNBOX_UINT64(p_obj);
+ return unbox<uint64_t>(p_obj);
case MONO_TYPE_R4:
- return UNBOX_FLOAT(p_obj);
+ return unbox<float>(p_obj);
case MONO_TYPE_R8:
- return UNBOX_DOUBLE(p_obj);
+ return unbox<double>(p_obj);
case MONO_TYPE_STRING: {
String str = mono_string_to_godot((MonoString *)p_obj);
@@ -554,29 +554,18 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
// GodotObject
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
- GDMonoField *ptr_field = CACHED_FIELD(GodotObject, ptr);
-
- ERR_FAIL_NULL_V(ptr_field, Variant());
-
- void *ptr_to_unmanaged = UNBOX_PTR(ptr_field->get_value(p_obj));
-
- if (!ptr_to_unmanaged) // IntPtr.Zero
- return Variant();
-
- Object *object_ptr = static_cast<Object *>(ptr_to_unmanaged);
-
- if (!object_ptr)
- return Variant();
-
- return object_ptr;
+ Object *ptr = unbox<Object *>(CACHED_FIELD(GodotObject, ptr)->get_value(p_obj));
+ return ptr ? Variant(ptr) : Variant();
}
if (CACHED_CLASS(NodePath) == type_class) {
- return UNBOX_PTR(CACHED_FIELD(NodePath, ptr)->get_value(p_obj));
+ NodePath *ptr = unbox<NodePath *>(CACHED_FIELD(NodePath, ptr)->get_value(p_obj));
+ return ptr ? Variant(*ptr) : Variant();
}
if (CACHED_CLASS(RID) == type_class) {
- return UNBOX_PTR(CACHED_FIELD(RID, ptr)->get_value(p_obj));
+ RID *ptr = unbox<RID *>(CACHED_FIELD(RID, ptr)->get_value(p_obj));
+ return ptr ? Variant(*ptr) : Variant();
}
} break;
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 5fbafa0acb..38dd22357d 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -36,21 +36,10 @@
namespace GDMonoMarshal {
-#define UNBOX_CHAR_PTR(x) (char *)mono_object_unbox(x)
-#define UNBOX_FLOAT_PTR(x) (float *)mono_object_unbox(x)
-
-#define UNBOX_DOUBLE(x) *(double *)mono_object_unbox(x)
-#define UNBOX_FLOAT(x) *(float *)mono_object_unbox(x)
-#define UNBOX_INT64(x) *(int64_t *)mono_object_unbox(x)
-#define UNBOX_INT32(x) *(int32_t *)mono_object_unbox(x)
-#define UNBOX_INT16(x) *(int16_t *)mono_object_unbox(x)
-#define UNBOX_INT8(x) *(int8_t *)mono_object_unbox(x)
-#define UNBOX_UINT64(x) *(uint64_t *)mono_object_unbox(x)
-#define UNBOX_UINT32(x) *(uint32_t *)mono_object_unbox(x)
-#define UNBOX_UINT16(x) *(uint16_t *)mono_object_unbox(x)
-#define UNBOX_UINT8(x) *(uint8_t *)mono_object_unbox(x)
-#define UNBOX_BOOLEAN(x) *(MonoBoolean *)mono_object_unbox(x)
-#define UNBOX_PTR(x) mono_object_unbox(x)
+template <typename T>
+T unbox(MonoObject *p_obj) {
+ return *(T *)mono_object_unbox(p_obj);
+}
#define BOX_DOUBLE(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(double), &x)
#define BOX_FLOAT(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(float), &x)
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_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index d96dfebe6c..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 {
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index 1df56ce621..7cb6cf860a 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -1,6 +1,7 @@
buildscript {
repositories {
jcenter()
+ $$GRADLE_REPOSITORY_URLS$$
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
@@ -54,11 +55,11 @@ android {
]
res.srcDirs = [
'res'
- $$GRADLE_RES_DIRS$$
+ $$GRADLE_RES_DIRS$$
]
aidl.srcDirs = [
'aidl'
- $$GRADLE_AIDL_DIRS$$
+ $$GRADLE_AIDL_DIRS$$
]
assets.srcDirs = [
'assets'
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index da6ceacdac..65cafbd6d4 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -81,7 +81,7 @@ void _set_keep_screen_on(bool p_enabled) {
extern int gargc;
extern char **gargv;
-extern int iphone_main(int, int, int, char **);
+extern int iphone_main(int, int, int, char **, String);
extern void iphone_finish();
CMMotionManager *motionManager;
@@ -393,15 +393,6 @@ static int frame_count = 0;
};
++frame_count;
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
- NSUserDomainMask, YES);
- NSString *documentsDirectory = [paths objectAtIndex:0];
- // NSString *documentsDirectory = [[[NSFileManager defaultManager]
- // URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]
- // lastObject];
- OSIPhone::get_singleton()->set_data_dir(
- String::utf8([documentsDirectory UTF8String]));
-
NSString *locale_code = [[NSLocale currentLocale] localeIdentifier];
OSIPhone::get_singleton()->set_locale(
String::utf8([locale_code UTF8String]));
@@ -604,7 +595,11 @@ static int frame_count = 0;
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
- int err = iphone_main(backingWidth, backingHeight, gargc, gargv);
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
+ NSUserDomainMask, YES);
+ NSString *documentsDirectory = [paths objectAtIndex:0];
+
+ int err = iphone_main(backingWidth, backingHeight, gargc, gargv, String::utf8([documentsDirectory UTF8String]));
if (err != 0) {
// bail, things did not go very well for us, should probably output a message on screen with our error code...
exit(0);
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index 821ef2a3ab..3955b9f0aa 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -89,7 +89,7 @@ Error GameCenter::connect() {
ret["type"] = "authentication";
if (player.isAuthenticated) {
ret["result"] = "ok";
- ret["player_id"] = player.playerID;
+ ret["player_id"] = [player.playerID UTF8String];
GameCenter::get_singleton()->connected = true;
} else {
ret["result"] = "error";
diff --git a/platform/iphone/godot_iphone.cpp b/platform/iphone/godot_iphone.cpp
index 8c6d6d8da4..7d21d35e18 100644
--- a/platform/iphone/godot_iphone.cpp
+++ b/platform/iphone/godot_iphone.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "main/main.h"
#include "os_iphone.h"
+#include "ustring.h"
#include <stdio.h>
#include <string.h>
@@ -41,9 +42,9 @@ int add_path(int p_argc, char **p_args);
int add_cmdline(int p_argc, char **p_args);
};
-int iphone_main(int, int, int, char **);
+int iphone_main(int, int, int, char **, String);
-int iphone_main(int width, int height, int argc, char **argv) {
+int iphone_main(int width, int height, int argc, char **argv, String data_dir) {
int len = strlen(argv[0]);
@@ -63,7 +64,7 @@ int iphone_main(int width, int height, int argc, char **argv) {
char cwd[512];
getcwd(cwd, sizeof(cwd));
printf("cwd %s\n", cwd);
- os = new OSIPhone(width, height);
+ os = new OSIPhone(width, height, data_dir);
char *fargv[64];
for (int i = 0; i < argc; i++) {
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 219e93facf..08792b8631 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -97,6 +97,8 @@ void OSIPhone::initialize_core() {
OS_Unix::initialize_core();
SemaphoreIphone::make_default();
+
+ set_data_dir(data_dir);
};
void OSIPhone::initialize_logger() {
@@ -572,7 +574,7 @@ bool OSIPhone::_check_internal_feature_support(const String &p_feature) {
return p_feature == "mobile" || p_feature == "etc" || p_feature == "pvrtc" || p_feature == "etc2";
}
-OSIPhone::OSIPhone(int width, int height) {
+OSIPhone::OSIPhone(int width, int height, String p_data_dir) {
main_loop = NULL;
visual_server = NULL;
@@ -586,6 +588,10 @@ OSIPhone::OSIPhone(int width, int height) {
event_count = 0;
virtual_keyboard_height = 0;
+ // can't call set_data_dir from here, since it requires DirAccess
+ // which is initialized in initialize_core
+ data_dir = p_data_dir;
+
_set_logger(memnew(SyslogLogger));
};
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index cf2396e87b..e70ac9ba98 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -201,7 +201,7 @@ public:
virtual void native_video_stop();
virtual bool _check_internal_feature_support(const String &p_feature);
- OSIPhone(int width, int height);
+ OSIPhone(int width, int height, String p_data_dir);
~OSIPhone();
};
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 0fd21d62ee..0ba0ddec7d 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -53,9 +53,16 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
void _fix_plist(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist, const String &p_binary);
void _make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data);
-#ifdef OSX_ENABLED
+
Error _code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path);
Error _create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name);
+
+#ifdef OSX_ENABLED
+ bool use_codesign() const { return true; }
+ bool use_dmg() const { return true; }
+#else
+ bool use_codesign() const { return false; }
+ bool use_dmg() const { return false; }
#endif
protected:
@@ -67,11 +74,7 @@ public:
virtual String get_os_name() const { return "OSX"; }
virtual Ref<Texture> get_logo() const { return logo; }
-#ifdef OSX_ENABLED
- virtual String get_binary_extension() const { return "dmg"; }
-#else
- virtual String get_binary_extension() const { return "zip"; }
-#endif
+ virtual String get_binary_extension() const { return use_dmg() ? "dmg" : "zip"; }
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
@@ -220,7 +223,6 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset
}
}
-#ifdef OSX_ENABLED
/**
If we're running the OSX version of the Godot editor we'll:
- export our application bundle to a temporary folder
@@ -230,6 +232,7 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset
Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
List<String> args;
+
if (p_preset->get("codesign/entitlements") != "") {
/* this should point to our entitlements.plist file that sandboxes our application, I don't know if this should also be placed in our app bundle */
args.push_back("-entitlements");
@@ -239,14 +242,25 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese
args.push_back(p_preset->get("codesign/identity"));
args.push_back("-v"); /* provide some more feedback */
args.push_back(p_path);
- Error err = OS::get_singleton()->execute("/usr/bin/codesign", args, true);
- ERR_FAIL_COND_V(err, err);
+
+ String str;
+ Error err = OS::get_singleton()->execute("/usr/bin/codesign", args, true, NULL, &str, NULL, true);
+ ERR_FAIL_COND_V(err != OK, err);
+
+ print_line("codesign: " + str);
+ if (str.find("no identity found") != -1) {
+ EditorNode::add_io_error("codesign: no identity found");
+ return FAILED;
+ }
return OK;
}
Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name) {
List<String> args;
+
+ OS::get_singleton()->move_to_trash(p_dmg_path);
+
args.push_back("create");
args.push_back(p_dmg_path);
args.push_back("-volname");
@@ -255,8 +269,20 @@ Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const Strin
args.push_back("HFS+");
args.push_back("-srcfolder");
args.push_back(p_app_path_name);
- Error err = OS::get_singleton()->execute("/usr/bin/hdiutil", args, true);
- ERR_FAIL_COND_V(err, err);
+
+ String str;
+ Error err = OS::get_singleton()->execute("/usr/bin/hdiutil", args, true, NULL, &str, NULL, true);
+ ERR_FAIL_COND_V(err != OK, err);
+
+ print_line("hdiutil returned: " + str);
+ if (str.find("create failed") != -1) {
+ if (str.find("File exists") != -1) {
+ EditorNode::add_io_error("hdiutil: create failed - file exists");
+ } else {
+ EditorNode::add_io_error("hdiutil: create failed");
+ }
+ return FAILED;
+ }
return OK;
}
@@ -309,28 +335,45 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
else
pkg_name = "Unnamed";
- // We're on OSX so we can export to DMG, but first we create our application bundle
- String tmp_app_path_name = p_path.get_base_dir() + "/" + pkg_name + ".app";
- print_line("Exporting to " + tmp_app_path_name);
- DirAccess *tmp_app_path = DirAccess::create_for_path(tmp_app_path_name);
- ERR_FAIL_COND_V(!tmp_app_path, ERR_CANT_CREATE)
+ Error err = OK;
+ String tmp_app_path_name = "";
+ zlib_filefunc_def io2 = io;
+ FileAccess *dst_f = NULL;
+ io2.opaque = &dst_f;
+ zipFile dst_pkg_zip = NULL;
+
+ if (use_dmg()) {
+ // We're on OSX so we can export to DMG, but first we create our application bundle
+ tmp_app_path_name = EditorSettings::get_singleton()->get_settings_path() + "/tmp/" + pkg_name + ".app";
+ print_line("Exporting to " + tmp_app_path_name);
+ DirAccess *tmp_app_path = DirAccess::create_for_path(tmp_app_path_name);
+ if (!tmp_app_path) {
+ err = ERR_CANT_CREATE;
+ }
- ///@TODO We should delete the existing application bundle especially if we attempt to code sign it, but what is a safe way to do this? Maybe call system function so it moves to trash?
- // tmp_app_path->erase_contents_recursive();
+ // Create our folder structure or rely on unzip?
+ if (err == OK) {
+ print_line("Creating " + tmp_app_path_name + "/Contents/MacOS");
+ err = tmp_app_path->make_dir_recursive(tmp_app_path_name + "/Contents/MacOS");
+ }
- // Create our folder structure or rely on unzip?
- print_line("Creating " + tmp_app_path_name + "/Contents/MacOS");
- Error dir_err = tmp_app_path->make_dir_recursive(tmp_app_path_name + "/Contents/MacOS");
- ERR_FAIL_COND_V(dir_err, ERR_CANT_CREATE)
- print_line("Creating " + tmp_app_path_name + "/Contents/Resources");
- dir_err = tmp_app_path->make_dir_recursive(tmp_app_path_name + "/Contents/Resources");
- ERR_FAIL_COND_V(dir_err, ERR_CANT_CREATE)
+ if (err == OK) {
+ print_line("Creating " + tmp_app_path_name + "/Contents/Resources");
+ err = tmp_app_path->make_dir_recursive(tmp_app_path_name + "/Contents/Resources");
+ }
+ } else {
+ // Open our destination zip file
+ dst_pkg_zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, NULL, &io2);
+ if (!dst_pkg_zip) {
+ err = ERR_CANT_CREATE;
+ }
+ }
- /* Now process our template */
+ // Now process our template
bool found_binary = false;
int total_size = 0;
- while (ret == UNZ_OK) {
+ while (ret == UNZ_OK && err == OK) {
bool is_execute = false;
//get filename
@@ -392,287 +435,152 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
print_line("ADDING: " + file + " size: " + itos(data.size()));
total_size += data.size();
- /* write it into our application bundle */
- file = tmp_app_path_name + "/" + file;
-
- /* write the file, need to add chmod */
- FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
- ERR_FAIL_COND_V(!f, ERR_CANT_CREATE)
- f->store_buffer(data.ptr(), data.size());
- f->close();
- memdelete(f);
-
- if (is_execute) {
- // we need execute rights on this file
- chmod(file.utf8().get_data(), 0755);
+ if (use_dmg()) {
+ // write it into our application bundle
+ file = tmp_app_path_name + "/" + file;
+
+ // write the file, need to add chmod
+ FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
+ if (f) {
+ f->store_buffer(data.ptr(), data.size());
+ f->close();
+ if (is_execute) {
+ // Chmod with 0755 if the file is executable
+ f->_chmod(file, 0755);
+ }
+ memdelete(f);
+ } else {
+ err = ERR_CANT_CREATE;
+ }
} else {
- // seems to already be set correctly
- // chmod(file.utf8().get_data(), 0644);
+ // add it to our zip file
+ file = pkg_name + ".app/" + file;
+
+ zip_fileinfo fi;
+ fi.tmz_date.tm_hour = info.tmu_date.tm_hour;
+ fi.tmz_date.tm_min = info.tmu_date.tm_min;
+ fi.tmz_date.tm_sec = info.tmu_date.tm_sec;
+ fi.tmz_date.tm_mon = info.tmu_date.tm_mon;
+ fi.tmz_date.tm_mday = info.tmu_date.tm_mday;
+ fi.tmz_date.tm_year = info.tmu_date.tm_year;
+ fi.dosDate = info.dosDate;
+ fi.internal_fa = info.internal_fa;
+ fi.external_fa = info.external_fa;
+
+ int zerr = zipOpenNewFileInZip(dst_pkg_zip,
+ file.utf8().get_data(),
+ &fi,
+ NULL,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION);
+
+ print_line("OPEN ERR: " + itos(zerr));
+ zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
+ print_line("WRITE ERR: " + itos(zerr));
+ zipCloseFileInZip(dst_pkg_zip);
}
}
ret = unzGoToNextFile(src_pkg_zip);
}
- /* we're done with our source zip */
+ // we're done with our source zip
unzClose(src_pkg_zip);
if (!found_binary) {
ERR_PRINTS("Requested template binary '" + binary_to_use + "' not found. It might be missing from your template archive.");
- unzClose(src_pkg_zip);
- return ERR_FILE_NOT_FOUND;
- }
-
- ep.step("Making PKG", 1);
-
- String pack_path = tmp_app_path_name + "/Contents/Resources/" + pkg_name + ".pck";
- Error err = save_pack(p_preset, pack_path);
- // chmod(pack_path.utf8().get_data(), 0644);
-
- if (err) {
- return err;
+ err = ERR_FILE_NOT_FOUND;
}
- /* see if we can code sign our new package */
- if (p_preset->get("codesign/identity") != "") {
- ep.step("Code signing bundle", 2);
+ if (err == OK) {
+ ep.step("Making PKG", 1);
- /* the order in which we code sign is important, this is a bit of a shame or we could do this in our loop that extracts the files from our ZIP */
+ if (use_dmg()) {
+ String pack_path = tmp_app_path_name + "/Contents/Resources/" + pkg_name + ".pck";
+ err = save_pack(p_preset, pack_path);
- // start with our application
- err = _code_sign(p_preset, tmp_app_path_name + "/Contents/MacOS/" + pkg_name);
- ERR_FAIL_COND_V(err, err);
+ // see if we can code sign our new package
+ String identity = p_preset->get("codesign/identity");
+ if (err == OK && identity != "") {
+ ep.step("Code signing bundle", 2);
- ///@TODO we should check the contents of /Contents/Frameworks for frameworks to sign
+ // the order in which we code sign is important, this is a bit of a shame or we could do this in our loop that extracts the files from our ZIP
- // we should probably loop through all resources and sign them?
- err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Resources/icon.icns");
- ERR_FAIL_COND_V(err, err);
- err = _code_sign(p_preset, pack_path);
- ERR_FAIL_COND_V(err, err);
- err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Info.plist");
- ERR_FAIL_COND_V(err, err);
- }
+ // start with our application
+ err = _code_sign(p_preset, tmp_app_path_name + "/Contents/MacOS/" + pkg_name);
- /* and finally create a DMG */
- ep.step("Making DMG", 3);
- err = _create_dmg(p_path, pkg_name, tmp_app_path_name);
- ERR_FAIL_COND_V(err, err);
-
- return OK;
-}
-
-#else
-
-/**
- When exporting for OSX from any other platform we don't have access to code signing or creating DMGs so we'll wrap the bundle into a zip file.
-
- Should probably find a nicer way to have just one export method instead of duplicating the method like this but I would the code got very
- messy with switches inside of it.
-**/
-Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
-
- String src_pkg_name;
-
- EditorProgress ep("export", "Exporting for OSX", 104);
-
- if (p_debug)
- src_pkg_name = p_preset->get("custom_package/debug");
- else
- src_pkg_name = p_preset->get("custom_package/release");
-
- if (src_pkg_name == "") {
- String err;
- src_pkg_name = find_export_template("osx.zip", &err);
- if (src_pkg_name == "") {
- EditorNode::add_io_error(err);
- return ERR_FILE_NOT_FOUND;
- }
- }
-
- FileAccess *src_f = NULL;
- zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
-
- ep.step("Creating app", 0);
-
- unzFile src_pkg_zip = unzOpen2(src_pkg_name.utf8().get_data(), &io);
- if (!src_pkg_zip) {
-
- EditorNode::add_io_error("Could not find template app to export:\n" + src_pkg_name);
- return ERR_FILE_NOT_FOUND;
- }
-
- ERR_FAIL_COND_V(!src_pkg_zip, ERR_CANT_OPEN);
- int ret = unzGoToFirstFile(src_pkg_zip);
-
- String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".";
- int bits_mode = p_preset->get("application/bits_mode");
- binary_to_use += String(bits_mode == 0 ? "fat" : bits_mode == 1 ? "64" : "32");
-
- print_line("binary: " + binary_to_use);
- String pkg_name;
- if (p_preset->get("application/name") != "")
- pkg_name = p_preset->get("application/name"); // app_name
- else if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "")
- pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
- else
- pkg_name = "Unnamed";
-
- /* Open our destination zip file */
- zlib_filefunc_def io2 = io;
- FileAccess *dst_f = NULL;
- io2.opaque = &dst_f;
- zipFile dst_pkg_zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, NULL, &io2);
-
- bool found_binary = false;
-
- while (ret == UNZ_OK) {
-
- //get filename
- unz_file_info info;
- char fname[16384];
- ret = unzGetCurrentFileInfo(src_pkg_zip, &info, fname, 16384, NULL, 0, NULL, 0);
-
- String file = fname;
-
- print_line("READ: " + file);
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
-
- //read
- unzOpenCurrentFile(src_pkg_zip);
- unzReadCurrentFile(src_pkg_zip, data.ptr(), data.size());
- unzCloseCurrentFile(src_pkg_zip);
-
- //write
+ ///@TODO we should check the contents of /Contents/Frameworks for frameworks to sign
+ }
- file = file.replace_first("osx_template.app/", "");
+ if (err == OK && identity != "") {
+ // we should probably loop through all resources and sign them?
+ err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Resources/icon.icns");
+ }
- if (file == "Contents/Info.plist") {
- print_line("parse plist");
- _fix_plist(p_preset, data, pkg_name);
- }
+ if (err == OK && identity != "") {
+ err = _code_sign(p_preset, pack_path);
+ }
- if (file.begins_with("Contents/MacOS/godot_")) {
- if (file != "Contents/MacOS/" + binary_to_use) {
- ret = unzGoToNextFile(src_pkg_zip);
- continue; //ignore!
+ if (err == OK && identity != "") {
+ err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Info.plist");
}
- found_binary = true;
- file = "Contents/MacOS/" + pkg_name;
- }
- if (file == "Contents/Resources/icon.icns") {
- //see if there is an icon
- String iconpath;
- if (p_preset->get("application/icon") != "")
- iconpath = p_preset->get("application/icon");
- else
- iconpath = ProjectSettings::get_singleton()->get("application/config/icon");
- print_line("icon? " + iconpath);
- if (iconpath != "") {
- Ref<Image> icon;
- icon.instance();
- icon->load(iconpath);
- if (!icon->empty()) {
- print_line("loaded?");
- _make_icon(icon, data);
- }
+ // and finally create a DMG
+ if (err == OK) {
+ ep.step("Making DMG", 3);
+ err = _create_dmg(p_path, pkg_name, tmp_app_path_name);
}
- //bleh?
- }
- if (data.size() > 0) {
- print_line("ADDING: " + file + " size: " + itos(data.size()));
+ // Clean up temporary .app dir
+ OS::get_singleton()->move_to_trash(tmp_app_path_name);
+ } else {
- /* add it to our zip file */
- file = pkg_name + ".app/" + file;
-
- zip_fileinfo fi;
- fi.tmz_date.tm_hour = info.tmu_date.tm_hour;
- fi.tmz_date.tm_min = info.tmu_date.tm_min;
- fi.tmz_date.tm_sec = info.tmu_date.tm_sec;
- fi.tmz_date.tm_mon = info.tmu_date.tm_mon;
- fi.tmz_date.tm_mday = info.tmu_date.tm_mday;
- fi.tmz_date.tm_year = info.tmu_date.tm_year;
- fi.dosDate = info.dosDate;
- fi.internal_fa = info.internal_fa;
- fi.external_fa = info.external_fa;
-
- int err = zipOpenNewFileInZip(dst_pkg_zip,
- file.utf8().get_data(),
- &fi,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- Z_DEFLATED,
- Z_DEFAULT_COMPRESSION);
-
- print_line("OPEN ERR: " + itos(err));
- err = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
- print_line("WRITE ERR: " + itos(err));
- zipCloseFileInZip(dst_pkg_zip);
+ String pack_path = EditorSettings::get_singleton()->get_settings_path() + "/tmp/" + pkg_name + ".pck";
+ Error err = save_pack(p_preset, pack_path);
+
+ if (err == OK) {
+ zipOpenNewFileInZip(dst_pkg_zip,
+ (pkg_name + ".app/Contents/Resources/" + pkg_name + ".pck").utf8().get_data(),
+ NULL,
+ NULL,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION);
+
+ FileAccess *pf = FileAccess::open(pack_path, FileAccess::READ);
+ if (pf) {
+ const int BSIZE = 16384;
+ uint8_t buf[BSIZE];
+
+ while (true) {
+
+ int r = pf->get_buffer(buf, BSIZE);
+ if (r <= 0)
+ break;
+ zipWriteInFileInZip(dst_pkg_zip, buf, r);
+ }
+ zipCloseFileInZip(dst_pkg_zip);
+ memdelete(pf);
+ } else {
+ err = ERR_CANT_OPEN;
+ }
+ }
}
-
- ret = unzGoToNextFile(src_pkg_zip);
}
- if (!found_binary) {
- ERR_PRINTS("Requested template binary '" + binary_to_use + "' not found. It might be missing from your template archive.");
+ if (dst_pkg_zip) {
zipClose(dst_pkg_zip, NULL);
- unzClose(src_pkg_zip);
- return ERR_FILE_NOT_FOUND;
}
- ep.step("Making PKG", 1);
-
- String pack_path = EditorSettings::get_singleton()->get_settings_path() + "/tmp/" + pkg_name + ".pck";
- Error err = save_pack(p_preset, pack_path);
-
- if (err) {
- zipClose(dst_pkg_zip, NULL);
- unzClose(src_pkg_zip);
- return err;
- }
-
- {
- //write datapack
-
- zipOpenNewFileInZip(dst_pkg_zip,
- (pkg_name + ".app/Contents/Resources/" + pkg_name + ".pck").utf8().get_data(),
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- Z_DEFLATED,
- Z_DEFAULT_COMPRESSION);
-
- FileAccess *pf = FileAccess::open(pack_path, FileAccess::READ);
- ERR_FAIL_COND_V(!pf, ERR_CANT_OPEN);
- const int BSIZE = 16384;
- uint8_t buf[BSIZE];
-
- while (true) {
-
- int r = pf->get_buffer(buf, BSIZE);
- if (r <= 0)
- break;
- zipWriteInFileInZip(dst_pkg_zip, buf, r);
- }
- zipCloseFileInZip(dst_pkg_zip);
- memdelete(pf);
- }
-
- zipClose(dst_pkg_zip, NULL);
- unzClose(src_pkg_zip);
-
return OK;
}
-#endif
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index eb8c0566b4..05adfeb0f5 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -112,15 +112,16 @@ public:
CrashHandler crash_handler;
float _mouse_scale(float p_scale) {
- if (display_scale > 1.0)
+ if (_display_scale() > 1.0)
return p_scale;
else
return 1.0;
}
- void _update_window();
+ float _display_scale() const;
+ float _display_scale(id screen) const;
- float display_scale;
+ void _update_window();
protected:
virtual int get_video_driver_count() const;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 8323aa84a8..2c81a02014 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -180,13 +180,13 @@ static bool mouse_down_control = false;
if (newBackingScaleFactor != oldBackingScaleFactor) {
//Set new display scale and window size
- OS_OSX::singleton->display_scale = newBackingScaleFactor;
+ float newDisplayScale = OS_OSX::singleton->is_hidpi_allowed() ? newBackingScaleFactor : 1.0;
const NSRect contentRect = [OS_OSX::singleton->window_view frame];
const NSRect fbRect = contentRect; //convertRectToBacking(contentRect);
- OS_OSX::singleton->window_size.width = fbRect.size.width * OS_OSX::singleton->display_scale;
- OS_OSX::singleton->window_size.height = fbRect.size.height * OS_OSX::singleton->display_scale;
+ OS_OSX::singleton->window_size.width = fbRect.size.width * newDisplayScale;
+ OS_OSX::singleton->window_size.height = fbRect.size.height * newDisplayScale;
//Update context
if (OS_OSX::singleton->main_loop) {
@@ -206,8 +206,9 @@ static bool mouse_down_control = false;
const NSRect contentRect = [OS_OSX::singleton->window_view frame];
const NSRect fbRect = contentRect; //convertRectToBacking(contentRect);
- OS_OSX::singleton->window_size.width = fbRect.size.width * OS_OSX::singleton->display_scale;
- OS_OSX::singleton->window_size.height = fbRect.size.height * OS_OSX::singleton->display_scale;
+ float displayScale = OS_OSX::singleton->_display_scale();
+ OS_OSX::singleton->window_size.width = fbRect.size.width * displayScale;
+ OS_OSX::singleton->window_size.height = fbRect.size.height * displayScale;
if (OS_OSX::singleton->main_loop) {
Main::force_redraw();
@@ -352,7 +353,8 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
const NSRect contentRect = [OS_OSX::singleton->window_view frame];
- NSRect pointInWindowRect = NSMakeRect(OS_OSX::singleton->im_position.x / OS_OSX::singleton->display_scale, contentRect.size.height - (OS_OSX::singleton->im_position.y / OS_OSX::singleton->display_scale) - 1, 0, 0);
+ float displayScale = OS_OSX::singleton->_display_scale();
+ NSRect pointInWindowRect = NSMakeRect(OS_OSX::singleton->im_position.x / displayScale, contentRect.size.height - (OS_OSX::singleton->im_position.y / displayScale) - 1, 0, 0);
NSPoint pointOnScreen = [[OS_OSX::singleton->window_view window] convertRectToScreen:pointInWindowRect].origin;
return NSMakeRect(pointOnScreen.x, pointOnScreen.y, 0, 0);
@@ -940,15 +942,6 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
kTISNotifySelectedKeyboardInputSourceChanged, NULL,
CFNotificationSuspensionBehaviorDeliverImmediately);
- if (is_hidpi_allowed() && [[NSScreen mainScreen] respondsToSelector:@selector(backingScaleFactor)]) {
- for (NSScreen *screen in [NSScreen screens]) {
- float s = [screen backingScaleFactor];
- if (s > display_scale) {
- display_scale = s;
- }
- }
- }
-
window_delegate = [[GodotWindowDelegate alloc] init];
// Don't use accumulation buffer support; it's not accelerated
@@ -972,10 +965,19 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
window_view = [[GodotContentView alloc] init];
- window_size.width = p_desired.width * display_scale;
- window_size.height = p_desired.height * display_scale;
+ float displayScale = 1.0;
+ if (is_hidpi_allowed()) {
+ // note that mainScreen is not screen #0 but the one with the keyboard focus.
+ NSScreen *screen = [NSScreen mainScreen];
+ if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
+ displayScale = fmax(displayScale, [screen backingScaleFactor]);
+ }
+ }
+
+ window_size.width = p_desired.width * displayScale;
+ window_size.height = p_desired.height * displayScale;
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale > 1) {
+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && displayScale > 1.0) {
[window_view setWantsBestResolutionOpenGLSurface:YES];
//if (current_videomode.resizable)
[window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
@@ -1274,7 +1276,8 @@ void OS_OSX::warp_mouse_position(const Point2 &p_to) {
//local point in window coords
const NSRect contentRect = [window_view frame];
- NSRect pointInWindowRect = NSMakeRect(p_to.x / display_scale, contentRect.size.height - (p_to.y / display_scale) - 1, 0, 0);
+ float displayScale = _display_scale();
+ NSRect pointInWindowRect = NSMakeRect(p_to.x / displayScale, contentRect.size.height - (p_to.y / displayScale) - 1, 0, 0);
NSPoint pointOnScreen = [[window_view window] convertRectToScreen:pointInWindowRect].origin;
//point in scren coords
@@ -1475,17 +1478,17 @@ int OS_OSX::get_screen_count() const {
return [screenArray count];
};
+static int get_screen_index(NSScreen *screen) {
+ const NSUInteger index = [[NSScreen screens] indexOfObject:screen];
+ return index == NSNotFound ? 0 : index;
+}
+
int OS_OSX::get_current_screen() const {
- Vector2 wpos = get_window_position();
-
- int count = get_screen_count();
- for (int i = 0; i < count; i++) {
- Point2 pos = get_screen_position(i);
- Size2 size = get_screen_size(i);
- if ((wpos.x >= pos.x && wpos.x < pos.x + size.width) && (wpos.y >= pos.y && wpos.y < pos.y + size.height))
- return i;
+ if (window_object) {
+ return get_screen_index([window_object screen]);
+ } else {
+ return get_screen_index([NSScreen mainScreen]);
}
- return 0;
};
void OS_OSX::set_current_screen(int p_screen) {
@@ -1500,12 +1503,7 @@ Point2 OS_OSX::get_screen_position(int p_screen) const {
NSArray *screenArray = [NSScreen screens];
if (p_screen < [screenArray count]) {
- float displayScale = 1.0;
-
- if (display_scale > 1.0 && [[screenArray objectAtIndex:p_screen] respondsToSelector:@selector(backingScaleFactor)]) {
- displayScale = [[screenArray objectAtIndex:p_screen] backingScaleFactor];
- }
-
+ float displayScale = _display_scale([screenArray objectAtIndex:p_screen]);
NSRect nsrect = [[screenArray objectAtIndex:p_screen] frame];
return Point2(nsrect.origin.x, nsrect.origin.y) * displayScale;
}
@@ -1520,12 +1518,7 @@ int OS_OSX::get_screen_dpi(int p_screen) const {
NSArray *screenArray = [NSScreen screens];
if (p_screen < [screenArray count]) {
- float displayScale = 1.0;
-
- if (display_scale > 1.0 && [[screenArray objectAtIndex:p_screen] respondsToSelector:@selector(backingScaleFactor)]) {
- displayScale = [[screenArray objectAtIndex:p_screen] backingScaleFactor];
- }
-
+ float displayScale = _display_scale([screenArray objectAtIndex:p_screen]);
NSDictionary *description = [[screenArray objectAtIndex:p_screen] deviceDescription];
NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];
CGSize displayPhysicalSize = CGDisplayScreenSize(
@@ -1544,12 +1537,7 @@ Size2 OS_OSX::get_screen_size(int p_screen) const {
NSArray *screenArray = [NSScreen screens];
if (p_screen < [screenArray count]) {
- float displayScale = 1.0;
-
- if (display_scale > 1.0 && [[screenArray objectAtIndex:p_screen] respondsToSelector:@selector(backingScaleFactor)]) {
- displayScale = [[screenArray objectAtIndex:p_screen] backingScaleFactor];
- }
-
+ float displayScale = _display_scale([screenArray objectAtIndex:p_screen]);
// Note: Use frame to get the whole screen size
NSRect nsrect = [[screenArray objectAtIndex:p_screen] frame];
return Size2(nsrect.size.width, nsrect.size.height) * displayScale;
@@ -1583,10 +1571,28 @@ void OS_OSX::_update_window() {
}
}
+float OS_OSX::_display_scale() const {
+ if (window_object) {
+ return _display_scale([window_object screen]);
+ } else {
+ return _display_scale([NSScreen mainScreen]);
+ }
+}
+
+float OS_OSX::_display_scale(id screen) const {
+ if (is_hidpi_allowed()) {
+ if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
+ return fmax(1.0, [screen backingScaleFactor]);
+ }
+ } else {
+ return 1.0;
+ }
+}
+
Point2 OS_OSX::get_window_position() const {
Size2 wp([window_object frame].origin.x, [window_object frame].origin.y);
- wp *= display_scale;
+ wp *= _display_scale();
return wp;
};
@@ -1594,10 +1600,11 @@ void OS_OSX::set_window_position(const Point2 &p_position) {
Size2 scr = get_screen_size();
NSPoint pos;
+ float displayScale = _display_scale();
- pos.x = p_position.x / display_scale;
+ pos.x = p_position.x / displayScale;
// For OS X the y starts at the bottom
- pos.y = (scr.height - p_position.y) / display_scale;
+ pos.y = (scr.height - p_position.y) / displayScale;
[window_object setFrameTopLeftPoint:pos];
@@ -2039,7 +2046,6 @@ OS_OSX::OS_OSX() {
minimized = false;
window_size = Vector2(1024, 600);
zoomed = false;
- display_scale = 1.0;
_set_logger(memnew(OSXTerminalLogger));
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 031c714514..ff5a935229 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -674,7 +674,7 @@ void OSUWP::set_cursor_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
-Error OSUWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode) {
+Error OSUWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
return FAILED;
};
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index df38faa8e1..22f8938049 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -215,7 +215,7 @@ public:
virtual void delay_usec(uint32_t p_usec) const;
virtual uint64_t get_ticks_usec() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL);
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false);
virtual Error kill(const ProcessID &p_pid);
virtual bool has_environment(const String &p_var) const;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index bee8c90ad3..c27e7c0d2b 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1812,7 +1812,7 @@ void OS_Windows::set_cursor_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
-Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode) {
+Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
if (p_blocking && r_pipe) {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 9560bc61ca..c0b8dfc691 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -240,7 +240,7 @@ public:
virtual void delay_usec(uint32_t p_usec) const;
virtual uint64_t get_ticks_usec() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL);
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false);
virtual Error kill(const ProcessID &p_pid);
virtual int get_process_id() const;
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/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/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/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/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/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 1553c3c8e6..a7c31cf16c 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -914,6 +914,21 @@ bool PhysicsServerSW::body_test_motion(RID p_body, const Transform &p_from, cons
return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result);
}
+PhysicsDirectBodyState *PhysicsServerSW::body_get_direct_state(RID p_body) {
+
+ BodySW *body = body_owner.get(p_body);
+ ERR_FAIL_COND_V(!body, NULL);
+
+ if (!doing_sync || body->get_space()->is_locked()) {
+
+ ERR_EXPLAIN("Body state is inaccessible right now, wait for iteration or physics process notification.");
+ ERR_FAIL_V(NULL);
+ }
+
+ direct_state->body = body;
+ return direct_state;
+}
+
/* JOINT API */
RID PhysicsServerSW::joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) {
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index aea3e150b0..f9eb8fa454 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -223,6 +223,9 @@ public:
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, float p_margin = 0.001, MotionResult *r_result = NULL);
+ // this function only works on physics process, errors and returns null otherwise
+ virtual PhysicsDirectBodyState *body_get_direct_state(RID p_body);
+
/* JOINT API */
virtual RID joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B);
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index 2b7505169a..df3bf72a31 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -954,6 +954,21 @@ bool Physics2DServerSW::body_test_motion(RID p_body, const Transform2D &p_from,
return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result);
}
+Physics2DDirectBodyState *Physics2DServerSW::body_get_direct_state(RID p_body) {
+
+ Body2DSW *body = body_owner.get(p_body);
+ ERR_FAIL_COND_V(!body, NULL);
+
+ if ((using_threads && !doing_sync) || body->get_space()->is_locked()) {
+
+ ERR_EXPLAIN("Body state is inaccessible right now, wait for iteration or physics process notification.");
+ ERR_FAIL_V(NULL);
+ }
+
+ direct_state->body = body;
+ return direct_state;
+}
+
/* JOINT API */
void Physics2DServerSW::joint_set_param(RID p_joint, JointParam p_param, real_t p_value) {
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index 0ebd43be53..c40cf0e3e0 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -222,6 +222,9 @@ public:
virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = NULL);
+ // this function only works on physics process, errors and returns null otherwise
+ virtual Physics2DDirectBodyState *body_get_direct_state(RID p_body);
+
/* JOINT API */
virtual void joint_set_param(RID p_joint, JointParam p_param, real_t p_value);
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index 5bec2f7cbd..50e9ab1005 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -253,6 +253,13 @@ public:
return physics_2d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result);
}
+ // this function only works on physics process, errors and returns null otherwise
+ Physics2DDirectBodyState *body_get_direct_state(RID p_body) {
+
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), NULL);
+ return physics_2d_server->body_get_direct_state(p_body);
+ }
+
/* JOINT API */
FUNC3(joint_set_param, RID, JointParam, real_t);
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index b42b85b1be..671c31e6a3 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -579,6 +579,8 @@ void Physics2DServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result"), &Physics2DServer::_body_test_motion, DEFVAL(0.08), DEFVAL(Variant()));
+ ClassDB::bind_method(D_METHOD("body_get_direct_state", "body"), &Physics2DServer::body_get_direct_state);
+
/* JOINT API */
ClassDB::bind_method(D_METHOD("joint_set_param", "joint", "param", "value"), &Physics2DServer::joint_set_param);
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index 34f885db1d..18f4f460b6 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -468,6 +468,9 @@ public:
virtual void body_set_pickable(RID p_body, bool p_pickable) = 0;
+ // this function only works on physics process, errors and returns null otherwise
+ virtual Physics2DDirectBodyState *body_get_direct_state(RID p_body) = 0;
+
struct MotionResult {
Vector2 motion;
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 0e54867ee1..6d192886a5 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -504,6 +504,8 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_ray_pickable", "body", "enable"), &PhysicsServer::body_set_ray_pickable);
ClassDB::bind_method(D_METHOD("body_is_ray_pickable", "body"), &PhysicsServer::body_is_ray_pickable);
+ ClassDB::bind_method(D_METHOD("body_get_direct_state", "body"), &PhysicsServer::body_get_direct_state);
+
/* JOINT API */
BIND_ENUM_CONSTANT(JOINT_PIN);
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 7012caeae6..8cec125646 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -464,6 +464,9 @@ public:
virtual void body_set_ray_pickable(RID p_body, bool p_enable) = 0;
virtual bool body_is_ray_pickable(RID p_body) const = 0;
+ // this function only works on physics process, errors and returns null otherwise
+ virtual PhysicsDirectBodyState *body_get_direct_state(RID p_body) = 0;
+
struct MotionResult {
Vector3 motion;