summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/array.cpp4
-rw-r--r--core/error_list.h2
-rw-r--r--core/error_macros.h21
-rw-r--r--core/global_constants.cpp2
-rw-r--r--core/image.cpp6
-rw-r--r--core/object.cpp2
-rw-r--r--core/object.h6
-rw-r--r--core/typedefs.h8
-rw-r--r--core/ustring.cpp12
-rw-r--r--core/variant.cpp4
-rw-r--r--doc/Makefile2
-rw-r--r--doc/classes/@Global Scope.xml2
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/Area2D.xml6
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml29
-rw-r--r--doc/classes/EditorSpatialGizmo.xml2
-rw-r--r--doc/classes/Environment.xml86
-rw-r--r--doc/classes/GraphEdit.xml6
-rw-r--r--doc/classes/RayShape.xml3
-rw-r--r--doc/classes/RichTextLabel.xml12
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml80
-rw-r--r--doc/classes/SphereShape.xml3
-rw-r--r--doc/classes/Transform2D.xml2
-rw-r--r--doc/tools/makerst.py54
-rw-r--r--drivers/gles3/shaders/scene.glsl20
-rw-r--r--editor/editor_node.cpp27
-rw-r--r--editor/editor_node.h6
-rw-r--r--editor/editor_settings.cpp8
-rw-r--r--editor/editor_themes.cpp10
-rw-r--r--editor/icons/icon_GUI_dropdown.svg6
-rw-r--r--editor/icons/icon_GUI_mini_tab_menu.svg6
-rw-r--r--editor/icons/icon_GUI_tab_menu.svg6
-rw-r--r--editor/icons/icon_audio_bus_bypass.svg2
-rw-r--r--editor/icons/icon_audio_bus_mute.svg2
-rw-r--r--editor/icons/icon_audio_bus_solo.svg2
-rw-r--r--editor/icons/icon_connect.svg4
-rw-r--r--editor/icons/icon_editor_3d_handle.svg1
-rw-r--r--editor/icons/icon_editor_control_anchor.svg4
-rw-r--r--editor/icons/icon_editor_handle.svg9
-rw-r--r--editor/icons/icon_editor_pivot.svg2
-rw-r--r--editor/icons/icon_gizmo_camera.svg1
-rw-r--r--editor/icons/icon_gizmo_directional_light.svg1
-rw-r--r--editor/icons/icon_gizmo_g_i_probe.svg3
-rw-r--r--editor/icons/icon_gizmo_light.svg1
-rw-r--r--editor/icons/icon_gizmo_listener.svg1
-rw-r--r--editor/icons/icon_gizmo_particles.svg1
-rw-r--r--editor/icons/icon_gizmo_reflection_probe.svg5
-rw-r--r--editor/icons/icon_gizmo_spatial_sample_player.svg5
-rw-r--r--editor/icons/icon_gizmo_spatial_stream_player.svg5
-rw-r--r--editor/icons/icon_gizmo_spot_light.svg1
-rw-r--r--editor/icons/icon_group_viewport.svg7
-rw-r--r--editor/icons/icon_key.svg6
-rw-r--r--editor/icons/icon_key_move_disabled.svg4
-rw-r--r--editor/icons/icon_key_move_enabled.svg7
-rw-r--r--editor/icons/icon_key_rotate_disabled.svg4
-rw-r--r--editor/icons/icon_key_rotate_enabled.svg7
-rw-r--r--editor/icons/icon_key_scale_disabled.svg4
-rw-r--r--editor/icons/icon_key_scale_enabled.svg7
-rw-r--r--editor/icons/icon_lock.svg7
-rw-r--r--editor/icons/icon_lock_viewport.svg6
-rw-r--r--editor/icons/icon_matrix.svg5
-rw-r--r--editor/icons/icon_snap.svg2
-rw-r--r--editor/icons/icon_snap_grid.svg2
-rw-r--r--editor/icons/icon_unlock.svg6
-rw-r--r--editor/icons/icon_zoom_less.svg5
-rw-r--r--editor/icons/icon_zoom_more.svg5
-rw-r--r--editor/icons/icon_zoom_reset.svg5
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp5
-rw-r--r--editor/plugins/material_editor_plugin.cpp42
-rw-r--r--editor/plugins/material_editor_plugin.h10
-rw-r--r--editor/property_editor.cpp78
-rw-r--r--editor/property_editor.h16
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h2
-rw-r--r--modules/gdscript/gd_function.cpp6
-rw-r--r--modules/opus/audio_stream_opus.cpp6
-rw-r--r--modules/opus/audio_stream_opus.h4
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp8
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/theora/video_stream_theora.cpp4
-rw-r--r--modules/theora/video_stream_theora.h4
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp6
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/webm/video_stream_webm.cpp4
-rw-r--r--modules/webm/video_stream_webm.h4
-rw-r--r--scene/2d/area_2d.cpp10
-rw-r--r--scene/2d/area_2d.h4
-rw-r--r--scene/2d/audio_stream_player_2d.cpp8
-rw-r--r--scene/2d/audio_stream_player_2d.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp6
-rw-r--r--scene/3d/audio_stream_player_3d.h2
-rw-r--r--scene/audio/audio_player.cpp6
-rw-r--r--scene/audio/audio_player.h2
-rw-r--r--scene/gui/base_button.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp66
-rw-r--r--scene/gui/rich_text_label.h4
-rw-r--r--scene/gui/video_player.cpp2
-rw-r--r--scene/resources/audio_stream_sample.cpp6
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/material.cpp14
-rw-r--r--scene/resources/material.h2
-rw-r--r--scene/resources/video_stream.h4
-rw-r--r--servers/audio/audio_stream.cpp8
-rw-r--r--servers/audio/audio_stream.h8
-rw-r--r--servers/visual/shader_language.cpp4
110 files changed, 717 insertions, 252 deletions
diff --git a/core/array.cpp b/core/array.cpp
index 2e3fbf858d..30184a002e 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -47,11 +47,11 @@ void Array::_ref(const Array &p_from) const {
ERR_FAIL_COND(!_fp); // should NOT happen.
if (_fp == _p)
- return; //wathever it is, nothing to do here move along
+ return; // whatever it is, nothing to do here move along
bool success = _fp->refcount.ref();
- ERR_FAIL_COND(!success); //should really not happen either
+ ERR_FAIL_COND(!success); // should really not happen either
_unref();
diff --git a/core/error_list.h b/core/error_list.h
index bc65ad0ee4..50d248b3d0 100644
--- a/core/error_list.h
+++ b/core/error_list.h
@@ -66,7 +66,7 @@ enum Error {
ERR_CANT_CONNECT, // (25)
ERR_CANT_RESOLVE,
ERR_CONNECTION_ERROR,
- ERR_CANT_AQUIRE_RESOURCE,
+ ERR_CANT_ACQUIRE_RESOURCE,
ERR_CANT_FORK,
ERR_INVALID_DATA, ///< Data passed is invalid (30)
ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
diff --git a/core/error_macros.h b/core/error_macros.h
index 005b0e32a3..1fa7f2c134 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -30,6 +30,7 @@
#ifndef ERROR_MACROS_H
#define ERROR_MACROS_H
+#include "typedefs.h"
/**
* Error macros. Unlike exceptions and asserts, these macros try to mantain consistency and stability
* inside the code. It is recommended to always return processable data, so in case of an error, the
@@ -130,7 +131,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_INDEX(m_index, m_size) \
do { \
- if ((m_index) < 0 || (m_index) >= (m_size)) { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
return; \
} else \
@@ -144,7 +145,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_INDEX_V(m_index, m_size, m_retval) \
do { \
- if ((m_index) < 0 || (m_index) >= (m_size)) { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
return m_retval; \
} else \
@@ -156,7 +157,7 @@ extern bool _err_error_exists;
*/
#define CRASH_BAD_INDEX(m_index, m_size) \
do { \
- if ((m_index) < 0 || (m_index) >= (m_size)) { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
GENERATE_TRAP \
} \
@@ -168,7 +169,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_NULL(m_param) \
{ \
- if (!m_param) { \
+ if (unlikely(!m_param)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter ' " _STR(m_param) " ' is null."); \
return; \
} else \
@@ -177,7 +178,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_NULL_V(m_param, m_retval) \
{ \
- if (!m_param) { \
+ if (unlikely(!m_param)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter ' " _STR(m_param) " ' is null."); \
return m_retval; \
} else \
@@ -190,7 +191,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_COND(m_cond) \
{ \
- if (m_cond) { \
+ if (unlikely(m_cond)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true."); \
return; \
} else \
@@ -202,7 +203,7 @@ extern bool _err_error_exists;
#define CRASH_COND(m_cond) \
{ \
- if (m_cond) { \
+ if (unlikely(m_cond)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Condition ' " _STR(m_cond) " ' is true."); \
GENERATE_TRAP \
} \
@@ -216,7 +217,7 @@ extern bool _err_error_exists;
#define ERR_FAIL_COND_V(m_cond, m_retval) \
{ \
- if (m_cond) { \
+ if (unlikely(m_cond)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. returned: " _STR(m_retval)); \
return m_retval; \
} else \
@@ -229,7 +230,7 @@ extern bool _err_error_exists;
#define ERR_CONTINUE(m_cond) \
{ \
- if (m_cond) { \
+ if (unlikely(m_cond)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. Continuing..:"); \
continue; \
} else \
@@ -242,7 +243,7 @@ extern bool _err_error_exists;
#define ERR_BREAK(m_cond) \
{ \
- if (m_cond) { \
+ if (unlikely(m_cond)) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. Breaking..:"); \
break; \
} else \
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 224ee0e0aa..6f58af2ccf 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -472,7 +472,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED); ///< resource is locked
BIND_GLOBAL_ENUM_CONSTANT(ERR_TIMEOUT);
- BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_AQUIRE_RESOURCE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_ACQUIRE_RESOURCE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); ///< Data passed is invalid
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER); ///< Parameter passed is invalid
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS); ///< When adding ), item already exists
diff --git a/core/image.cpp b/core/image.cpp
index 4d1f32c360..70a7b2bceb 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -530,7 +530,7 @@ static void _scale_cubic(const uint8_t *p_src, uint8_t *p_dst, uint32_t p_src_wi
int height = p_src_height;
double xfac = (double)width / p_dst_width;
double yfac = (double)height / p_dst_height;
- // coordinates of source points and cooefficiens
+ // coordinates of source points and coefficients
double ox, oy, dx, dy, k1, k2;
int ox1, oy1, ox2, oy2;
// destination pixel values
@@ -561,7 +561,7 @@ static void _scale_cubic(const uint8_t *p_src, uint8_t *p_dst, uint32_t p_src_wi
}
for (int n = -1; n < 3; n++) {
- // get Y cooefficient
+ // get Y coefficient
k1 = _bicubic_interp_kernel(dy - (double)n);
oy2 = oy1 + n;
@@ -571,7 +571,7 @@ static void _scale_cubic(const uint8_t *p_src, uint8_t *p_dst, uint32_t p_src_wi
oy2 = ymax;
for (int m = -1; m < 3; m++) {
- // get X cooefficient
+ // get X coefficient
k2 = k1 * _bicubic_interp_kernel((double)m - dx);
ox2 = ox1 + m;
diff --git a/core/object.cpp b/core/object.cpp
index b1770f1d7a..823cbe14d4 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1052,7 +1052,7 @@ Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Variant::Ca
Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int p_argcount) {
if (_block_signals)
- return ERR_CANT_AQUIRE_RESOURCE; //no emit, signals blocked
+ return ERR_CANT_ACQUIRE_RESOURCE; //no emit, signals blocked
Signal *s = signal_map.getptr(p_name);
if (!s) {
diff --git a/core/object.h b/core/object.h
index 3070439138..7af2c78fc3 100644
--- a/core/object.h
+++ b/core/object.h
@@ -64,9 +64,9 @@ enum PropertyHint {
PROPERTY_HINT_LAYERS_3D_RENDER,
PROPERTY_HINT_LAYERS_3D_PHYSICS,
PROPERTY_HINT_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
- PROPERTY_HINT_DIR, ///< a directort path must be passed
+ PROPERTY_HINT_DIR, ///< a directory path must be passed
PROPERTY_HINT_GLOBAL_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
- PROPERTY_HINT_GLOBAL_DIR, ///< a directort path must be passed
+ PROPERTY_HINT_GLOBAL_DIR, ///< a directory path must be passed
PROPERTY_HINT_RESOURCE_TYPE, ///< a resource object type
PROPERTY_HINT_MULTILINE_TEXT, ///< used for string properties that can contain multiple lines
PROPERTY_HINT_COLOR_NO_ALPHA, ///< used for ignoring alpha component when editing a color
@@ -221,7 +221,7 @@ struct MethodInfo {
//return NULL;
/*
- the following is an uncomprehensible blob of hacks and workarounds to compensate for many of the fallencies in C++. As a plus, this macro pretty much alone defines the object model.
+ the following is an incomprehensible blob of hacks and workarounds to compensate for many of the fallencies in C++. As a plus, this macro pretty much alone defines the object model.
*/
#define REVERSE_GET_PROPERTY_LIST \
diff --git a/core/typedefs.h b/core/typedefs.h
index 565e28020b..bf5c8b0f75 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -290,4 +290,12 @@ struct _GlobalLock {
#define __STRX(m_index) #m_index
#define __STR(m_index) __STRX(m_index)
+#ifdef __GNUC__
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#else
+#define likely(x) x
+#define unlikely(x) x
+#endif
+
#endif /* typedefs.h */
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 8273ed144b..b85996e3d1 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -1755,7 +1755,7 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
register int c;
int exp = 0; /* Exponent read from "EX" field. */
int fracExp = 0; /* Exponent that derives from the fractional
- * part. Under normal circumstatnces, it is
+ * part. Under normal circumstances, it is
* the negative of the number of digits in F.
* However, if I is very long, the last digits
* of I get dropped (otherwise a long I with a
@@ -2332,12 +2332,12 @@ int String::findn(String p_str, int p_from) const {
int String::rfind(String p_str, int p_from) const {
- //stabilish a limit
+ // establish a limit
int limit = length() - p_str.length();
if (limit < 0)
return -1;
- //stabilish a starting point
+ // establish a starting point
if (p_from < 0)
p_from = limit;
else if (p_from > limit)
@@ -2347,7 +2347,7 @@ int String::rfind(String p_str, int p_from) const {
int len = length();
if (src_len == 0 || len == 0)
- return -1; //wont find anything!
+ return -1; // won't find anything!
const CharType *src = c_str();
@@ -2378,12 +2378,12 @@ int String::rfind(String p_str, int p_from) const {
}
int String::rfindn(String p_str, int p_from) const {
- //stabilish a limit
+ // establish a limit
int limit = length() - p_str.length();
if (limit < 0)
return -1;
- //stabilish a starting point
+ // establish a starting point
if (p_from < 0)
p_from = limit;
else if (p_from > limit)
diff --git a/core/variant.cpp b/core/variant.cpp
index 52bdd4e22d..f70e4a5218 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -2469,10 +2469,10 @@ Variant::Variant(const Vector<Color> &p_array) {
void Variant::operator=(const Variant &p_variant) {
- if (this == &p_variant)
+ if (unlikely(this == &p_variant))
return;
- if (type != p_variant.type) {
+ if (unlikely(type != p_variant.type)) {
reference(p_variant);
return;
}
diff --git a/doc/Makefile b/doc/Makefile
index 4914c657d2..d68c66f8eb 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,5 +1,5 @@
BASEDIR = $(CURDIR)
-CLASSES = $(BASEDIR)/base/classes.xml
+CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
index a8fd377ecf..d8c9a57a88 100644
--- a/doc/classes/@Global Scope.xml
+++ b/doc/classes/@Global Scope.xml
@@ -1013,7 +1013,7 @@
</constant>
<constant name="ERR_TIMEOUT" value="24">
</constant>
- <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28">
+ <constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28">
</constant>
<constant name="ERR_INVALID_DATA" value="30">
</constant>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 6cb4fd5b17..d853345268 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -368,9 +368,9 @@
</argument>
<argument index="1" name="time" type="float">
</argument>
- <argument index="2" name="loc" type="Vector3">
+ <argument index="2" name="location" type="Vector3">
</argument>
- <argument index="3" name="rot" type="Quat">
+ <argument index="3" name="rotation" type="Quat">
</argument>
<argument index="4" name="scale" type="Vector3">
</argument>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index e093b5cb49..cef5053289 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -18,7 +18,7 @@
Return the angular damp rate.
</description>
</method>
- <method name="get_audio_bus" qualifiers="const">
+ <method name="get_audio_bus_name" qualifiers="const">
<return type="String">
</return>
<description>
@@ -167,7 +167,7 @@
In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
- <method name="set_audio_bus">
+ <method name="set_audio_bus_name">
<return type="void">
</return>
<argument index="0" name="name" type="String">
@@ -320,7 +320,7 @@
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus">
+ <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name">
The name of the Area2D's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index f833764141..9542c83eaf 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -213,7 +213,7 @@
</description>
</method>
<method name="resize">
- <argument index="0" name="position" type="int">
+ <argument index="0" name="size" type="int">
</argument>
<description>
Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 2dba35bec0..9b104fe757 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -23,7 +23,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 68afffdb41..600e0858dd 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -36,7 +36,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 1577c1e4d3..886b2b975a 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -78,7 +78,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 8fc2ff2bc2..4a9890ea18 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -172,7 +172,7 @@
</return>
<argument index="0" name="position" type="Vector2">
</argument>
- <argument index="1" name="rot" type="float">
+ <argument index="1" name="rotation" type="float">
</argument>
<argument index="2" name="scale" type="Vector2">
</argument>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
new file mode 100644
index 0000000000..e165ae376b
--- /dev/null
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_convert" qualifiers="virtual">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_converts_to" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index de9ea5282a..baab995fab 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -24,6 +24,8 @@
</return>
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
+ <argument index="1" name="bounds" type="Rect3">
+ </argument>
<description>
Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
</description>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 4338b188a6..3880c45a86 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -1,8 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Environment" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+<class name="Environment" inherits="Resource" category="Core" version="3.0">
<brief_description>
+ Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
<description>
+ Resource for environment nodes (like [WorldEnvironment]) that define multiple environment operations (such as background [Sky] or [Color], ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:
+ - DOF Blur
+ - Motion Blur
+ - Bloom
+ - Tonemap (auto exposure)
+ - Adjustments
</description>
<tutorials>
</tutorials>
@@ -982,118 +989,174 @@
</methods>
<members>
<member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness">
+ Global brightness value of the rendered scene (default value is 1).
</member>
<member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
+ Applies the provided [Texture] resource to affect the global color aspect of the rendered scene.
</member>
<member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast">
+ Global contrast value of the rendered scene (default value is 1).
</member>
<member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled">
+ Enables the adjustment_* options provided by this resource. If false, adjustments modifications will have no effect on the rendered scene.
</member>
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation">
+ Global color saturation value of the rendered scene (default value is 1).
</member>
<member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color">
+ [Color] of the ambient light.
</member>
<member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy">
+ Energy of the ambient light. The higher the value, the stronger the light.
</member>
<member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution">
+ Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
</member>
<member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure">
+ Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light.
</member>
<member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max">
+ Maximum luminance value for the auto exposure.
</member>
<member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min">
+ Minimum luminance value for the auto exposure.
</member>
<member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey">
+ Scale of the auto exposure effect. Affects the intensity of auto exposure.
</member>
<member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed">
+ Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
</member>
<member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer">
+ Maximum layer id (if using Layer background mode).
</member>
<member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color">
+ Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
</member>
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy">
+ Power of light emitted by the background.
</member>
<member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode">
+ Defines the mode of background.
</member>
<member name="background_sky" type="Sky" setter="set_sky" getter="get_sky">
+ [Sky] resource defined as background.
</member>
<member name="background_sky_scale" type="float" setter="set_sky_scale" getter="get_sky_scale">
+ [Sky] resource's scale.
</member>
<member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount">
+ Amount of far blur.
</member>
<member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance">
+ Distance from the camera where the far blur effect affects the rendering.
</member>
<member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled">
+ Enables the far blur effect.
</member>
<member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality">
+ Quality of the far blur quality.
</member>
<member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition">
+ Transition between no-blur area and far blur.
</member>
<member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount">
+ Amount of near blur.
</member>
<member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance">
+ Distance from the camera where the near blur effect affects the rendering.
</member>
<member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled">
+ Enables the near blur effect.
</member>
<member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality">
+ Quality of the near blur quality.
</member>
<member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition">
+ Transition between near blur and no-blur area.
</member>
<member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color">
+ Fog's [Color].
</member>
<member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin">
+ Fog's depth starting distance from the camera.
</member>
<member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve">
+ Value defining the fog depth intensity.
</member>
<member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled">
+ Enables the fog depth.
</member>
<member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled">
+ Enables the fog. Needs fog_height_enabled and/or for_depth_enabled to actually display fog.
</member>
<member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve">
+ Value defining the fog height intensity.
</member>
<member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled">
+ Enables the fog height.
</member>
<member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max">
+ Maximum height of fog.
</member>
<member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min">
+ Minimum height of fog.
</member>
<member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount">
+ Amount of sun that affects the fog rendering.
</member>
<member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color">
+ Sun [Color].
</member>
<member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve">
+ Amount of light that the fog transmits.
</member>
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled">
+ Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog.
</member>
<member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled">
</member>
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode">
+ Glow blending mode.
</member>
<member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom">
+ Bloom value (global glow).
</member>
<member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled">
+ Enables glow rendering.
</member>
<member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale">
+ Bleed scale of the HDR glow.
</member>
<member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold">
+ Bleed threshold of the HDR glow.
</member>
<member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity">
+ Glow intensity.
</member>
<member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ First level of glow (most local).
</member>
<member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Second level of glow.
</member>
<member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Third level of glow.
</member>
<member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Fourth level of glow.
</member>
<member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Fifth level of glow.
</member>
<member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Sixth level of glow.
</member>
<member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Seventh level of glow (most global).
</member>
<member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength">
+ Glow strength.
</member>
<member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance">
</member>
@@ -1126,48 +1189,69 @@
<member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2">
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure">
+ Default exposure for tonemap.
</member>
<member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper">
+ Tonemapping mode.
</member>
<member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white">
+ White reference value for tonemap.
</member>
</members>
<constants>
<constant name="BG_KEEP" value="5">
+ Keep on screen every pixel drawn in the background.
</constant>
<constant name="BG_CLEAR_COLOR" value="0">
+ Clear the background using the project's clear color.
</constant>
<constant name="BG_COLOR" value="1">
+ Clear the background using a custom clear color.
</constant>
<constant name="BG_SKY" value="2">
+ Display a user-defined sky in the background.
</constant>
<constant name="BG_COLOR_SKY" value="3">
+ Clear the background using a custom clear color and allows defining a sky for shading and reflection.
</constant>
<constant name="BG_CANVAS" value="4">
+ Display a [CanvasLayer] in the background.
</constant>
<constant name="BG_MAX" value="6">
+ Helper constant keeping track of the enum's size, has no direct usage in API calls.
</constant>
<constant name="GLOW_BLEND_MODE_ADDITIVE" value="0">
+ Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
</constant>
<constant name="GLOW_BLEND_MODE_SCREEN" value="1">
+ Screen glow blending mode. Increases brightness, used frequently with bloom.
</constant>
<constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2">
+ Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom.
</constant>
<constant name="GLOW_BLEND_MODE_REPLACE" value="3">
+ Replace glow blending mode. Replaces all pixels' color by the glow value.
</constant>
<constant name="TONE_MAPPER_LINEAR" value="0">
+ Linear tonemapper operator. Reads the linear data and performs an exposure adjustment.
</constant>
<constant name="TONE_MAPPER_REINHARDT" value="1">
+ Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color).
</constant>
<constant name="TONE_MAPPER_FILMIC" value="2">
+ Filmic tonemapper operator.
</constant>
<constant name="TONE_MAPPER_ACES" value="3">
+ Academy Color Encoding System tonemapper operator.
</constant>
<constant name="DOF_BLUR_QUALITY_LOW" value="0">
+ Low depth-of-field blur quality.
</constant>
<constant name="DOF_BLUR_QUALITY_MEDIUM" value="1">
+ Medium depth-of-field blur quality.
</constant>
<constant name="DOF_BLUR_QUALITY_HIGH" value="2">
+ High depth-of-field blur quality.
</constant>
</constants>
</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index c9771f1ada..f064029a01 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -228,9 +228,11 @@
<constants>
</constants>
<theme_items>
+ <theme_item name="SnapGrid" type="Texture">
+ </theme_item>
<theme_item name="bezier_len_neg" type="int">
</theme_item>
- <theme_item name="bezier_len_position" type="int">
+ <theme_item name="bezier_len_pos" type="int">
</theme_item>
<theme_item name="bg" type="StyleBox">
</theme_item>
@@ -244,7 +246,5 @@
</theme_item>
<theme_item name="reset" type="Texture">
</theme_item>
- <theme_item name="snap" type="Texture">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
index 7fab9c3949..d5d367a335 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RayShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Ray shape for 3D collisions.
</brief_description>
<description>
+ Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="length" type="float" setter="set_length" getter="get_length">
+ The ray's length.
</member>
</members>
<constants>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 90ee76cb98..9f8cdcce6d 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -47,6 +47,12 @@
<description>
</description>
</method>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
@@ -84,6 +90,12 @@
<description>
</description>
</method>
+ <method name="get_visible_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_meta_underlined" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 8e6e12a736..4d822a1705 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shape" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Base class for all 3D shape resources.
</brief_description>
<description>
+ Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index 0f1c57e85b..344a42b7c0 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -105,6 +105,18 @@
<description>
</description>
</method>
+ <method name="get_distance_fade_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_distance_fade_min_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_emission" qualifiers="const">
<return type="Color">
</return>
@@ -187,6 +199,12 @@
<description>
</description>
</method>
+ <method name="get_proximity_fade_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_refraction" qualifiers="const">
<return type="float">
</return>
@@ -297,12 +315,24 @@
<description>
</description>
</method>
+ <method name="is_distance_fade_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_grow_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
+ <method name="is_proximity_fade_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="set_albedo">
<return type="void">
</return>
@@ -439,6 +469,30 @@
<description>
</description>
</method>
+ <method name="set_distance_fade">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_distance_fade_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_distance_fade_min_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_emission">
<return type="void">
</return>
@@ -555,6 +609,22 @@
<description>
</description>
</method>
+ <method name="set_proximity_fade">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_proximity_fade_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_refraction">
<return type="void">
</return>
@@ -745,6 +815,12 @@
</member>
<member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV">
</member>
+ <member name="distance_fade_enable" type="bool" setter="set_distance_fade" getter="is_distance_fade_enabled">
+ </member>
+ <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
+ </member>
+ <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
+ </member>
<member name="emission" type="Color" setter="set_emission" getter="get_emission">
</member>
<member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature">
@@ -811,6 +887,10 @@
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
</member>
+ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance">
+ </member>
+ <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled">
+ </member>
<member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature">
</member>
<member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml
index 120c7fcc25..7c6174f4e4 100644
--- a/doc/classes/SphereShape.xml
+++ b/doc/classes/SphereShape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SphereShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Sphere shape for 3D collisions.
</brief_description>
<description>
+ Sphere shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. This shape is useful for modeling sphere-like 3D objects.
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The sphere's radius. The shape's diameter is double the radius.
</member>
</members>
<constants>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index a90013f922..0e39505ac3 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -36,7 +36,7 @@
<method name="Transform2D">
<return type="Transform2D">
</return>
- <argument index="0" name="rot" type="float">
+ <argument index="0" name="rotation" type="float">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 696e3c9c78..c4dff588b0 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -3,15 +3,19 @@
import codecs
import sys
+import os
import xml.etree.ElementTree as ET
input_list = []
for arg in sys.argv[1:]:
+ if arg.endswith(os.sep):
+ arg = arg[:-1]
input_list.append(arg)
if len(input_list) < 1:
- print 'usage: makerst.py <classes.xml>'
+ print 'usage: makerst.py <path to folders> and/or <path to .xml files> (order of arguments irrelevant)'
+ print 'example: makerst.py "../../modules/" "../classes" path_to/some_class.xml'
sys.exit(0)
@@ -34,7 +38,6 @@ def ul_string(str, ul):
def make_class_list(class_list, columns):
-
f = codecs.open('class_list.rst', 'wb', 'utf-8')
prev = 0
col_max = len(class_list) / columns + 1
@@ -102,7 +105,6 @@ def make_class_list(class_list, columns):
def rstize_text(text, cclass):
-
# Linebreak + tabs in the XML should become two line breaks unless in a "codeblock"
pos = 0
while True:
@@ -250,9 +252,6 @@ def rstize_text(text, cclass):
text = pre_text + tag_text + post_text
pos = len(pre_text) + len(tag_text)
- # tnode = ET.SubElement(parent,"div")
- # tnode.text=text
-
return text
@@ -272,7 +271,6 @@ def make_method(
event=False,
pp=None
):
-
if (declare or pp == None):
t = '- '
else:
@@ -340,7 +338,6 @@ def make_method(
if 'qualifiers' in m.attrib:
s += ' ' + m.attrib['qualifiers']
-# f.write(s)
if (not declare):
if (pp != None):
pp.append((t, s))
@@ -355,24 +352,23 @@ def make_heading(title, underline):
def make_rst_class(node):
-
name = node.attrib['name']
f = codecs.open("class_" + name.lower() + '.rst', 'wb', 'utf-8')
# Warn contributors not to edit this file directly
f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n")
- f.write(".. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.\n\n")
+ f.write(".. DO NOT EDIT THIS FILE, but the " + name + ".xml source instead.\n")
+ f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n")
f.write(".. _class_" + name + ":\n\n")
f.write(make_heading(name, '='))
if 'inherits' in node.attrib:
inh = node.attrib['inherits'].strip()
-# whle inh in classes[cn]
f.write('**Inherits:** ')
first = True
- while(inh in classes):
+ while (inh in classes):
if (not first):
f.write(" **<** ")
else:
@@ -436,10 +432,10 @@ def make_rst_class(node):
f.write(sep)
for s in ml:
rt = s[0]
- while(len(rt) < longest_s):
+ while (len(rt) < longest_s):
rt += " "
st = s[1]
- while(len(st) < longest_t):
+ while (len(st) < longest_t):
st += " "
f.write("| " + rt + " | " + st + " |\n")
f.write(sep)
@@ -494,8 +490,6 @@ def make_rst_class(node):
f.write(make_heading('Member Function Description', '-'))
for m in list(methods):
f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n")
-# f.write(ul_string(m.attrib['name'],"^"))
- #f.write('\n<a name="'+m.attrib['name']+'">' + m.attrib['name'] + '</a>\n------\n')
make_method(f, node.attrib['name'], m, True, name)
f.write('\n')
d = m.find('description')
@@ -506,7 +500,21 @@ def make_rst_class(node):
f.write('\n')
-for file in input_list:
+file_list = []
+
+for path in input_list:
+ if os.path.basename(path) == 'modules':
+ for subdir, dirs, _ in os.walk(path):
+ if 'doc_classes' in dirs:
+ doc_dir = os.path.join(subdir, 'doc_classes')
+ class_file_name = [f for f in os.listdir(doc_dir) if f.endswith('.xml')][0]
+ file_list.append(os.path.join(doc_dir, class_file_name))
+ elif not os.path.isfile(path):
+ file_list += [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.xml')]
+ elif os.path.isfile(path) and path.endswith('.xml'):
+ file_list.append(path)
+
+for file in file_list:
tree = ET.parse(file)
doc = tree.getroot()
@@ -515,17 +523,15 @@ for file in input_list:
sys.exit(255)
version = doc.attrib['version']
-
- for c in list(doc):
- if c.attrib['name'] in class_names:
- continue
- class_names.append(c.attrib['name'])
- classes[c.attrib['name']] = c
+ if doc.attrib['name'] in class_names:
+ continue
+ class_names.append(doc.attrib['name'])
+ classes[doc.attrib['name']] = doc
class_names.sort()
# Don't make class list for Sphinx, :toctree: handles it
-#make_class_list(class_names, 2)
+# make_class_list(class_names, 2)
for cn in class_names:
c = classes[cn]
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index af4044224c..0eb26ae58f 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -889,7 +889,7 @@ float GTR1(float NdotH, float a)
-void light_compute(vec3 N, vec3 L,vec3 V,vec3 B, vec3 T,vec3 light_color,vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float rim,float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,inout vec3 diffuse, inout vec3 specular) {
+void light_compute(vec3 N, vec3 L,vec3 V,vec3 B, vec3 T,vec3 light_color,vec3 attenuation,vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float rim,float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,inout vec3 diffuse, inout vec3 specular) {
#if defined(USE_LIGHT_SHADER_CODE)
//light is written by the light shader
@@ -964,9 +964,9 @@ LIGHT_SHADER_CODE
#endif
#if defined(TRANSMISSION_USED)
- diffuse += light_color * diffuse_color * mix(vec3(light_amount),vec3(1.0),transmission);
+ diffuse += light_color * diffuse_color * mix(vec3(light_amount),vec3(1.0),transmission) * attenuation;
#else
- diffuse += light_color * diffuse_color * light_amount;
+ diffuse += light_color * diffuse_color * light_amount * attenuation;
#endif
@@ -987,14 +987,14 @@ LIGHT_SHADER_CODE
vec3 H = normalize(V + L);
float dotNH = max(dot(N,H), 0.0 );
float intensity = pow( dotNH, (1.0-roughness) * 256.0);
- specular += light_color * intensity * specular_blob_intensity;
+ specular += light_color * intensity * specular_blob_intensity * attenuation;
#elif defined(SPECULAR_PHONG)
vec3 R = normalize(-reflect(L,N));
float dotNV = max(0.0,dot(R,V));
float intensity = pow( dotNV, (1.0-roughness) * 256.0);
- specular += light_color * intensity * specular_blob_intensity;
+ specular += light_color * intensity * specular_blob_intensity * attenuation;
#elif defined(SPECULAR_TOON)
@@ -1003,7 +1003,7 @@ LIGHT_SHADER_CODE
float mid = 1.0-roughness;
mid*=mid;
float intensity = smoothstep(mid-roughness*0.5,mid+roughness*0.5,dotNV) * mid;
- diffuse += light_color * intensity * specular_blob_intensity; //write to diffuse, as in toon shading you generally want no reflection
+ diffuse += light_color * intensity * specular_blob_intensity * attenuation; //write to diffuse, as in toon shading you generally want no reflection
#elif defined(SPECULAR_DISABLED)
//none..
@@ -1047,7 +1047,7 @@ LIGHT_SHADER_CODE
float speci = dotNL * D * F * vis;
- specular += speci * light_color * specular_blob_intensity;
+ specular += speci * light_color * specular_blob_intensity * attenuation;
#endif
#if defined(LIGHT_USE_CLEARCOAT)
@@ -1193,7 +1193,7 @@ void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 bino
light_attenuation*=mix(omni_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow);
}
- light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,omni_lights[idx].light_color_energy.rgb*light_attenuation,albedo,transmission,omni_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+ light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,omni_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,omni_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
}
@@ -1227,7 +1227,7 @@ void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 bi
light_attenuation*=mix(spot_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow);
}
- light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,spot_lights[idx].light_color_energy.rgb*light_attenuation,albedo,transmission,spot_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+ light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,spot_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,spot_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
}
@@ -1859,7 +1859,7 @@ FRAGMENT_SHADER_CODE
specular_light*=mix(vec3(1.0),light_attenuation,specular_light_interp.a);
#else
- light_compute(normal,-light_direction_attenuation.xyz,eye_vec,binormal,tangent,light_color_energy.rgb*light_attenuation,albedo,transmission,light_params.z*specular_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
+ light_compute(normal,-light_direction_attenuation.xyz,eye_vec,binormal,tangent,light_color_energy.rgb,light_attenuation,albedo,transmission,light_params.z*specular_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light);
#endif
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 54c6ff79ea..5a38ec939f 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3247,6 +3247,7 @@ void EditorNode::register_editor_types() {
ClassDB::register_virtual_class<ScriptEditor>();
ClassDB::register_virtual_class<EditorInterface>();
ClassDB::register_class<EditorExportPlugin>();
+ ClassDB::register_class<EditorResourceConversionPlugin>();
// FIXME: Is this stuff obsolete, or should it be ported to new APIs?
//ClassDB::register_class<EditorScenePostImport>();
@@ -4431,6 +4432,27 @@ void EditorNode::open_export_template_manager() {
export_template_manager->popup_manager();
}
+void EditorNode::add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) {
+ resource_conversion_plugins.push_back(p_plugin);
+}
+
+void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) {
+ resource_conversion_plugins.erase(p_plugin);
+}
+
+Vector<Ref<EditorResourceConversionPlugin> > EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
+
+ Vector<Ref<EditorResourceConversionPlugin> > ret;
+
+ for (int i = 0; i < resource_conversion_plugins.size(); i++) {
+ if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) {
+ ret.push_back(resource_conversion_plugins[i]);
+ }
+ }
+
+ return ret;
+}
+
void EditorNode::_bind_methods() {
ClassDB::bind_method("_menu_option", &EditorNode::_menu_option);
@@ -5497,6 +5519,11 @@ EditorNode::EditorNode() {
resource_preview->add_preview_generator(Ref<EditorMeshPreviewPlugin>(memnew(EditorMeshPreviewPlugin)));
resource_preview->add_preview_generator(Ref<EditorBitmapPreviewPlugin>(memnew(EditorBitmapPreviewPlugin)));
+ {
+ Ref<SpatialMaterialConversionPlugin> spatial_mat_convert;
+ spatial_mat_convert.instance();
+ resource_conversion_plugins.push_back(spatial_mat_convert);
+ }
circle_step_msec = OS::get_singleton()->get_ticks_msec();
circle_step_frame = Engine::get_singleton()->get_frames_drawn();
circle_step = 0;
diff --git a/editor/editor_node.h b/editor/editor_node.h
index e7853a27ba..0d1c6787cd 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -608,6 +608,8 @@ private:
void _license_tree_selected();
+ Vector<Ref<EditorResourceConversionPlugin> > resource_conversion_plugins;
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -776,6 +778,10 @@ public:
~EditorNode();
void get_singleton(const char *arg1, bool arg2);
+ void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
+ void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
+ Vector<Ref<EditorResourceConversionPlugin> > find_resource_conversion_plugin(const Ref<Resource> &p_for_resource);
+
static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); }
static void add_build_callback(EditorBuildCallback p_callback);
};
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 5e81fd0fb4..02a9999eae 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -558,7 +558,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("interface/source_font_size", 14);
hints["interface/source_font_size"] = PropertyInfo(Variant::INT, "interface/source_font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/custom_font", "");
- hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font,*.tres,*.res", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/dim_editor_on_dialog_popup", true);
set("interface/dim_amount", 0.6f);
hints["interface/dim_amount"] = PropertyInfo(Variant::REAL, "interface/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
@@ -645,7 +645,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.1");
set("text_editor/theme/font", "");
- hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.font");
+ hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.font,*.tres,*.res");
set("text_editor/completion/auto_brace_complete", false);
set("text_editor/files/restore_scripts_on_load", true);
set("text_editor/completion/complete_file_paths", true);
@@ -700,8 +700,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// freelook
set("editors/3d/freelook/freelook_inertia", 0.1);
hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- set("editors/3d/freelook/freelook_base_speed", 0.5);
- hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.1");
+ set("editors/3d/freelook/freelook_base_speed", 0.1);
+ hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
set("editors/3d/freelook/freelook_activation_modifier", 0);
hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
set("editors/3d/freelook/freelook_modifier_speed_factor", 3.0);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 791b3ee92c..51fdef37cf 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -168,6 +168,11 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = tr
exceptions.push_back("GuiCloseCustomizable");
exceptions.push_back("GuiGraphNodePort");
exceptions.push_back("GuiResizer");
+ exceptions.push_back("ZoomMore");
+ exceptions.push_back("ZoomLess");
+ exceptions.push_back("ZoomReset");
+ exceptions.push_back("LockViewport");
+ exceptions.push_back("GroupViewport");
clock_t begin_time = clock();
@@ -528,7 +533,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
+ theme->set_icon("submenu", "PopupMenu", theme->get_icon("ArrowRight", "EditorIcons"));
theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size) * EDSCALE);
+
// Tree & ItemList background
Ref<StyleBoxFlat> style_tree_bg = style_default->duplicate();
style_tree_bg->set_bg_color(dark_color_1);
@@ -548,6 +555,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("custom_button_font_highlight", "Tree", font_color_hl);
theme->set_color("font_color", "Tree", font_color);
theme->set_color("font_color_selected", "Tree", font_color);
+ theme->set_color("title_button_color", "Tree", font_color);
+ theme->set_color("guide_color", "Tree", Color(mono_color.r, mono_color.g, mono_color.b, 0.05));
+ theme->set_color("drop_position_color", "Tree", accent_color);
theme->set_constant("vseparation", "Tree", (extra_spacing + default_margin_size) * EDSCALE);
Ref<StyleBoxFlat> style_tree_btn = style_default->duplicate();
diff --git a/editor/icons/icon_GUI_dropdown.svg b/editor/icons/icon_GUI_dropdown.svg
index 22db0fa1a7..4aa800b470 100644
--- a/editor/icons/icon_GUI_dropdown.svg
+++ b/editor/icons/icon_GUI_dropdown.svg
@@ -1,7 +1,5 @@
<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#fff" fill-opacity=".58824" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="2">
-<circle cx="7.5" cy="1040.9" r="1.5"/>
-<circle cx="7.5" cy="1045.9" r="1.5"/>
-<circle cx="7.5" cy="1050.9" r="1.5"/>
+<g transform="translate(0 -1038.4)">
+<path d="m4 1045.4 3 3 3-3" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".58824" stroke-width="2"/>
</g>
</svg>
diff --git a/editor/icons/icon_GUI_mini_tab_menu.svg b/editor/icons/icon_GUI_mini_tab_menu.svg
index c54eb26115..8aeb85277c 100644
--- a/editor/icons/icon_GUI_mini_tab_menu.svg
+++ b/editor/icons/icon_GUI_mini_tab_menu.svg
@@ -1,7 +1,5 @@
<svg width="6" height="16" version="1.1" viewBox="0 0 6 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fff" fill-opacity=".39216">
-<circle cx="3" cy="1038.4" r="2"/>
-<circle cx="3" cy="1044.4" r="2"/>
-<circle cx="3" cy="1050.4" r="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m3 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm0 6a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm0 6a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" fill="#fff" fill-opacity=".39216"/>
</g>
</svg>
diff --git a/editor/icons/icon_GUI_tab_menu.svg b/editor/icons/icon_GUI_tab_menu.svg
index 3324adf98b..9284e7488b 100644
--- a/editor/icons/icon_GUI_tab_menu.svg
+++ b/editor/icons/icon_GUI_tab_menu.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fff" fill-opacity=".39216">
-<circle cx="8" cy="1038.4" r="2"/>
-<circle cx="8" cy="1044.4" r="2"/>
-<circle cx="8" cy="1050.4" r="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm0 6a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm0 6a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" fill="#fff" fill-opacity=".39216"/>
</g>
</svg>
diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/icon_audio_bus_bypass.svg
index 75c1caf7f1..f85c9d17b5 100644
--- a/editor/icons/icon_audio_bus_bypass.svg
+++ b/editor/icons/icon_audio_bus_bypass.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm3.0293 5v1 1h4v-1-1h-4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 1036.4)" d="m5 3c-0.55226 5.52e-5 -0.99994 0.44774-1 1v8c5.52e-5 0.55226 0.44774 0.99994 1 1h4c1.0702 0 2.0645-0.5732 2.5996-1.5 0.5351-0.9268 0.5351-2.0732 0-3-0.40058-0.69381-1.058-1.1892-1.8125-1.3945 0.33452-0.84425 0.27204-1.8062-0.18945-2.6055-0.5351-0.9268-1.5275-1.5-2.5977-1.5zm1 2h1c0.35887 0 0.6858 0.1892 0.86523 0.5s0.17943 0.6892 0 1-0.50637 0.5-0.86523 0.5h-1zm0 4h1 2c0.35887 0 0.68775 0.1892 0.86719 0.5 0.17943 0.3108 0.17943 0.6892 0 1-0.17944 0.3108-0.50832 0.5-0.86719 0.5h-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/icon_audio_bus_mute.svg
index a7d085d535..cacca295eb 100644
--- a/editor/icons/icon_audio_bus_mute.svg
+++ b/editor/icons/icon_audio_bus_mute.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm4.0195 2.9902a1.0001 1.0001 0 0 0 -0.69726 1.7168l1.293 1.293-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l1.293-1.293 1.293 1.293a1.0001 1.0001 0 1 0 1.4141 -1.4141l-1.293-1.293 1.293-1.293a1.0001 1.0001 0 0 0 -0.72656 -1.7148 1.0001 1.0001 0 0 0 -0.6875 0.30078l-1.293 1.293-1.293-1.293a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path d="m4 1048.4v-8l4 5 4-5v8" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</svg>
diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/icon_audio_bus_solo.svg
index e84c1cca25..25e26d6038 100644
--- a/editor/icons/icon_audio_bus_solo.svg
+++ b/editor/icons/icon_audio_bus_solo.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm8.0293 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v-2h-1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 1036.4)" d="m7 3a1 1 0 0 0 -0.12695 0.0078125c-1.0208 0.043703-1.957 0.60248-2.4707 1.4922-0.5351 0.9268-0.5351 2.0732 0 3 0.5351 0.9268 1.5275 1.5 2.5977 1.5h2c0.35887 0 0.6858 0.1892 0.86523 0.5 0.17943 0.3108 0.17943 0.6892 0 1-0.17943 0.3108-0.50637 0.5-0.86523 0.5h-3a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h3c1.0702 0 2.0626-0.5732 2.5977-1.5s0.5351-2.0732 0-3-1.5275-1.5-2.5977-1.5h-2c-0.35887 0-0.6858-0.1892-0.86523-0.5s-0.17943-0.6892 0-1 0.50637-0.5 0.86523-0.5h3a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_connect.svg b/editor/icons/icon_connect.svg
index 43ec84646c..97859370b7 100644
--- a/editor/icons/icon_connect.svg
+++ b/editor/icons/icon_connect.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<circle cx="4" cy="1048.4" r="2" fill="#e0e0e0"/>
-<path d="m4 1043.4a5 5 0 0 1 5 5" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m4 1039.4a9 9 0 0 1 9 9" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
+<path transform="translate(0 1036.4)" d="m4 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c4.4301 0 8 3.5699 8 8a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-5.511-4.489-10-10-10zm0 4a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c2.221 0 4 1.779 4 4a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-3.3018-2.6981-6-6-6zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/icon_editor_3d_handle.svg
index 189baf3dad..cd28f8d22e 100644
--- a/editor/icons/icon_editor_3d_handle.svg
+++ b/editor/icons/icon_editor_3d_handle.svg
@@ -1,5 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
+<circle cx="8" cy="1044.4" r="8" fill-opacity=".29412"/>
<circle cx="8" cy="1044.4" r="7" fill="#fff"/>
<circle cx="8" cy="1044.4" r="5" fill="#ff8484"/>
</g>
diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/icon_editor_control_anchor.svg
index eeee2c182f..5e75f9bdf5 100644
--- a/editor/icons/icon_editor_control_anchor.svg
+++ b/editor/icons/icon_editor_control_anchor.svg
@@ -1,8 +1,8 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8.832 6.1445a4 4 0 0 1 -2.6914 2.6855l9.8594 7.1699-7.168-9.8555z" fill="#a5efac" fill-rule="evenodd"/>
+<path transform="translate(0 1036.4)" d="m5 0a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 1.0566 -0.11914l9.9434 6.1191-6.1172-9.9395a5 5 0 0 0 0.11719 -1.0605 5 5 0 0 0 -5 -5z" fill-opacity=".39216" style="paint-order:fill markers stroke"/>
+<path transform="translate(0 1036.4)" d="m5 1a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 1.1406 -0.16992l9.8594 7.1699-7.168-9.8555a4 4 0 0 0 0.16797 -1.1445 4 4 0 0 0 -4 -4z" fill="#a5efac" fill-rule="evenodd"/>
<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-<ellipse cx="4" cy="1040.4" rx="4" ry="4" fill="#a5efac" style="paint-order:fill markers stroke"/>
<circle cx="5" cy="1041.4" r="0" fill="#a5efac" style="paint-order:fill markers stroke"/>
</g>
</svg>
diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/icon_editor_handle.svg
index 7e58aaa803..05f3e2f2cc 100644
--- a/editor/icons/icon_editor_handle.svg
+++ b/editor/icons/icon_editor_handle.svg
@@ -1,6 +1,7 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<ellipse cx="4" cy="1048.4" rx="4" ry="4" fill="#fff"/>
-<ellipse cx="4" cy="1048.4" rx="2.8572" ry="2.8571" fill="#ff8484"/>
+<svg width="10" height="10" version="1.1" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1042.4)">
+<ellipse cx="5" cy="1047.4" rx="5" ry="5" fill-opacity=".29412"/>
+<ellipse cx="5" cy="1047.4" rx="4" ry="4" fill="#fff"/>
+<ellipse cx="5" cy="1047.4" rx="3" ry="3" fill="#ff8484"/>
</g>
</svg>
diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/icon_editor_pivot.svg
index d59d2d804d..8b8d07c7de 100644
--- a/editor/icons/icon_editor_pivot.svg
+++ b/editor/icons/icon_editor_pivot.svg
@@ -1,6 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
<path transform="translate(0 1036.4)" d="m6 0v6h-6v4h6v6h4v-6h6v-4h-6v-6h-4zm1 7h2v2h-2v-2z" fill="#fff" fill-opacity=".70588"/>
-<path transform="translate(0 1036.4)" d="m7 1v5h2v-5h-2zm-6 6v2h5v-2h-5zm9 0v2h5v-2h-5zm-3 3v5h2v-5h-2z" fill="#ff8484" fill-opacity=".58824"/>
+<path transform="translate(0 1036.4)" d="m7 1v5h2v-5h-2zm-6 6v2h5v-2h-5zm9 0v2h5v-2h-5zm-3 3v5h2v-5h-2z" fill="#ff8484"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/icon_gizmo_camera.svg
index f6e5f885e7..cb80c16598 100644
--- a/editor/icons/icon_gizmo_camera.svg
+++ b/editor/icons/icon_gizmo_camera.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m76 16a28 28 0 0 0 -26.631 19.4 28 28 0 0 0 -13.369 -3.4004 28 28 0 0 0 -28 28 28 28 0 0 0 16 25.26v14.74c0 6.648 5.352 12 12 12h48c6.648 0 12-5.352 12-12l24 16v-64l-24 16v-4.4434a28 28 0 0 0 8 -19.557 28 28 0 0 0 -28 -28z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/>
<path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094 -6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8 -17.844 24 24 0 0 0 -24 -24z" fill="#f7f5cf"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/icon_gizmo_directional_light.svg
index f7fa732501..1b125b44de 100644
--- a/editor/icons/icon_gizmo_directional_light.svg
+++ b/editor/icons/icon_gizmo_directional_light.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m64 4c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8zm-36.77 15.223c-2.045 0-4.0893 0.78461-5.6562 2.3516-3.1339 3.1339-3.1339 8.1786 0 11.312l11.312 11.314c3.1339 3.1339 8.1806 3.1339 11.314 0s3.1339-8.1806 0-11.314l-11.314-11.312c-1.5669-1.5669-3.6113-2.3516-5.6562-2.3516zm73.539 0c-2.045 0-4.0893 0.78461-5.6562 2.3516l-11.314 11.312c-3.1339 3.1339-3.1339 8.1806 0 11.314s8.1806 3.1339 11.314 0l11.312-11.314c3.1339-3.1339 3.1339-8.1786 0-11.312-1.567-1.5669-3.6113-2.3516-5.6562-2.3516zm-36.77 20.777a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8h-16zm88 0c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8h-16zm-61.455 25.449c-2.045 0-4.0913 0.78266-5.6582 2.3496l-11.312 11.314c-3.1339 3.1339-3.1339 8.1786 0 11.312 3.1339 3.1339 8.1786 3.1339 11.312 0l11.314-11.312c3.1339-3.1339 3.1339-8.1806 0-11.314-1.5669-1.5669-3.6113-2.3496-5.6562-2.3496zm50.91 0c-2.045 0-4.0893 0.78266-5.6562 2.3496-3.1339 3.1339-3.1339 8.1806 0 11.314l11.314 11.312c3.1339 3.1339 8.1786 3.1339 11.312 0s3.1339-8.1786 0-11.312l-11.312-11.314c-1.5669-1.5669-3.6132-2.3496-5.6582-2.3496zm-25.455 10.551c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/>
<path transform="translate(0 924.36)" d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447 0.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446 0.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046 1e-5 -20 8.9543-20 20 7e-6 11.046 8.9543 20 20 20s20-8.9543 20-20c-8e-6 -11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm-61.455 25.453c-1.0225 0-2.0466 0.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-0.78347-0.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447 0.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-0.78347-0.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#f7f5cf"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/icon_gizmo_g_i_probe.svg
index 7d3adf4196..815da4d5c3 100644
--- a/editor/icons/icon_gizmo_g_i_probe.svg
+++ b/editor/icons/icon_gizmo_g_i_probe.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm27.715 17.951c-1.2324 0.086154-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516h-12.297zm18.902 23.951c-0.73947-0.051693-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8h-16z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 924.36)" d="m12 4c-4.4183 9.5e-6 -8 3.5817-8 8v104c9.5e-6 4.4183 3.5817 8 8 8h64v-16h-56v-88h88v7.7676a36 36 0 0 0 -16 -3.7676 36 36 0 0 0 -36 36 36 36 0 0 0 16 29.9v8.0996c0 4.8544 3.4253 8.8788 8 9.8008v16.199h24v-16.199c4.5747-0.92197 8-4.9464 8-9.8008v-8.0879a36 36 0 0 0 16 -29.912 36 36 0 0 0 -19.523 -32h15.523v-16c-1e-5 -4.4183-3.5817-8-8-8h-104zm28.25 17.996c-2.8358-0.076599-5.6171 1.3651-7.1406 4.0039-2.216 3.8382-0.90854 8.7117 2.9297 10.928l10.393 6c3.8382 2.216 8.7117 0.91049 10.928-2.9277s0.91049-8.7117-2.9277-10.928l-10.393-6c-1.1994-0.6925-2.5-1.0414-3.7891-1.0762zm51.75 22.004a16 16 0 0 1 16 16 16 16 0 0 1 -16 16 16 16 0 0 1 -16 -16 16 16 0 0 1 16 -16zm-60 8c-4.432 0-8 3.568-8 8s3.568 8 8 8h12c4.432 0 8-3.568 8-8s-3.568-8-8-8h-12zm18.221 23.996c-1.289 0.034818-2.5896 0.38367-3.7891 1.0762l-10.393 6c-3.8382 2.216-5.1457 7.0895-2.9297 10.928s7.0915 5.1437 10.93 2.9277l10.393-6c3.8382-2.216 5.1437-7.0895 2.9277-10.928-1.5235-2.6388-4.3028-4.0805-7.1387-4.0039z" fill-opacity=".29412"/>
+<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4zm27.715 17.951c-1.2324 0.08615-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516zm18.902 23.951c-0.73947-0.05169-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/icon_gizmo_light.svg
index c411d13dc7..0db2749e91 100644
--- a/editor/icons/icon_gizmo_light.svg
+++ b/editor/icons/icon_gizmo_light.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m64 2a44 44 0 0 0 -44 44 44 44 0 0 0 24 39.189v5.8105 5 3c0 5.0515 3.3756 9.2769 8 10.578v16.422h24v-16.422c4.6244-1.3012 8-5.5266 8-10.578v-3-5-5.8574a44 44 0 0 0 24 -39.143 44 44 0 0 0 -44 -44zm0 20a24 24 0 0 1 24 24 24 24 0 0 1 -24 24 24 24 0 0 1 -24 -24 24 24 0 0 1 24 -24z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2.2"/>
<path transform="translate(0 924.36)" d="m64 6a40 40 0 0 0 -40 40 40 40 0 0 0 24 36.607v15.393a8 8 0 0 0 8 8h16a8 8 0 0 0 8 -8v-15.363a40 40 0 0 0 24 -36.637 40 40 0 0 0 -40 -40zm0 12a28 28 0 0 1 28 28 28 28 0 0 1 -28 28 28 28 0 0 1 -28 -28 28 28 0 0 1 28 -28zm-8 96v8h16v-8h-16z" fill="#f7f5cf"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/icon_gizmo_listener.svg
index adb6aebaec..9b74469b67 100644
--- a/editor/icons/icon_gizmo_listener.svg
+++ b/editor/icons/icon_gizmo_listener.svg
@@ -1,6 +1,7 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
<g transform="matrix(2 0 0 2 -16 -1040.4)">
+<path d="m32 984.36c-12.126 2e-5 -22 9.8729-22 21.999 1.1e-4 1.1045 0.89548 1.9999 2 2h8c1.1045-1e-4 1.9999-0.8955 2-2 2.23e-4 -5.546 4.4536-9.999 10-9.999 5.5464 1e-5 9.9998 4.453 10 9.999 0 6.5873-1.6032 8.0251-3.8408 9.8897-1.0295 0.8579-2.3133 1.6111-3.7969 2.6826-0.72285 0.522-1.6649 1.2341-2.5488 2.3496-0.98288 1.2402-1.8135 2.99-1.8135 5.0781 0 2.3898-0.31658 3.686-0.61035 4.3194-0.29378 0.6333-0.4706 0.73-0.97754 1.0341-0.54947 0.3297-2.5162 0.6446-4.4121 0.6446-0.0065 3e-4 -0.01302 6e-4 -0.01953 1e-3h-3.9805c-1.1045 1e-4 -1.9999 0.8954-2 2v8c1.1e-4 1.1045 0.89548 1.9999 2 2h4c0.0072-3e-4 0.01432-5e-4 0.02148-1e-3 1.9052 1e-3 6.3098 0.1982 10.566-2.3555 4.0103-2.4061 6.6628-7.2724 7.1738-13.592 0.81224-0.548 2.3445-1.497 4.0791-2.9424 4.0025-3.3353 8.1592-9.5405 8.1592-19.108-9.5e-5 -12.126-9.8735-21.999-22-21.999zm31.807 4.002c-0.38259-0.0177-0.76221 0.0749-1.0938 0.2666l-6.9531 4.0156c-0.95754 0.55332-1.2843 1.7787-0.72949 2.7354 1.9364 3.3365 2.9609 7.1229 2.9717 10.98-0.0072 3.8597-1.0296 7.6487-2.9648 10.988-0.55452 0.9572-0.22681 2.1827 0.73144 2.7353l6.9453 4.0069c0.95656 0.5517 2.1792 0.2238 2.7314-0.7325 6.0717-10.516 6.0717-23.482 0-33.998-0.3406-0.59005-0.95812-0.96615-1.6387-0.99805z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
<path transform="matrix(.5 0 0 .5 8 982.36)" d="m48 8a40 39.998 0 0 0 -40 39.998h16a24 23.999 0 0 1 24 -23.998 24 23.999 0 0 1 24 23.998c0 13.999-4.33 18.859-9.1211 22.852-2.3955 1.9962-5.0363 3.5302-7.8125 5.5352-1.3881 1.0024-2.8661 2.126-4.3047 3.9414-1.4385 1.8152-2.7617 4.6719-2.7617 7.6719 0 10.221-2.5383 12.59-5.1172 14.137-2.5789 1.5472-6.8828 1.8594-10.883 1.8594v0.00195h-8v16h8v-0.00195c4 0 11.696 0.31158 19.117-4.1406 7.0602-4.236 12.198-13.279 12.695-26 0.1835-0.1636 0.14883-0.15489 0.62109-0.49609 1.7238-1.245 5.083-3.2112 8.6875-6.2148 7.209-6.0072 14.879-17.145 14.879-35.145a40 39.998 0 0 0 -40 -39.998zm63.426 8l-13.906 8.0312a48 47.998 0 0 1 6.4844 23.967 48 47.998 0 0 1 -6.4688 23.984l13.891 8.0137a64 63.997 0 0 0 0 -63.996z" fill="#f7f5cf"/>
</g>
</g>
diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/icon_gizmo_particles.svg
index 05fc84619e..0989c1acad 100644
--- a/editor/icons/icon_gizmo_particles.svg
+++ b/editor/icons/icon_gizmo_particles.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
+<path d="m63.998 928.36c-18.429 5e-3 -34.029 13.88-38.557 32.926-12.4 3.0077-21.427 14.08-21.441 27.07v4e-3c0 15.417 12.583 28 28 28h64c15.417 0 28-12.583 28-28v-4e-3c-0.0152-13-9.0549-24.076-21.467-27.074-4.5265-19.033-20.112-32.903-38.529-32.922zm32.002 88c-6.58 0-12 5.42-12 12s5.42 12 12 12c6.58 0 12-5.42 12-12s-5.42-12-12-12zm-64 0c-6.58 0-12 5.42-12 12s5.42 12 12 12 12-5.42 12-12-5.42-12-12-12zm32 8c-6.58 0-12 5.42-12 12s5.42 12 12 12 12-5.42 12-12-5.42-12-12-12z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
<path transform="translate(0 924.36)" d="m64 8a36 40 0 0 0 -35.311 32.256 24 24 0 0 0 -20.689 23.744 24 24 0 0 0 24 24h64a24 24 0 0 0 24 -24 24 24 0 0 0 -20.715 -23.746 36 40 0 0 0 -35.285 -32.254zm-32 88a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm64 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm-32 8a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8z" fill="#f7f5cf"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/icon_gizmo_reflection_probe.svg
index 6d80e73b8c..bcfd6e53f9 100644
--- a/editor/icons/icon_gizmo_reflection_probe.svg
+++ b/editor/icons/icon_gizmo_reflection_probe.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v24h8v-20h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm76 28a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48a4.0004 4.0004 0 0 0 5.8652 -0.22656l44.963-52.457v17.854a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-28a4.0004 4.0004 0 0 0 -4 -4h-28zm-80 52v28a4.0004 4.0004 0 0 0 4 4h104a4.0004 4.0004 0 0 0 4 -4v-28h-8v24h-96v-24h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<g transform="translate(0 -924.36)" shape-rendering="auto">
+<path d="m12 928.36c-4.3705 4.4e-4 -7.9996 3.6295-8 8v28h16v-20h88v8h16v-16c-4.4e-4 -4.3705-3.6295-7.9996-8-8zm76 28c-4.3709 0-8 3.6291-8 8s3.6291 8 8 8h10.035l-34.486 40.236-44.721-44.723-11.312 11.316 50.828 50.828c3.2536 3.2513 8.7374 3.0394 11.73-0.4531l37.926-44.244v7.0391c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-28c-4.4e-4 -4.3705-3.6295-7.9996-8-8zm-84 52v32c4.37e-4 4.3705 3.6295 7.9996 8 8h104c4.3705-4e-4 7.9996-3.6295 8-8v-32h-16v24h-88v-24z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path d="m12 932.36c-2.209 2.2e-4 -3.9998 1.791-4 4v24h8v-20h96v8h8v-12c-2.2e-4 -2.209-1.791-3.9998-4-4zm76 28c-2.2091 0-4 1.7909-4 4s1.7909 4 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48c1.648 1.6468 4.3491 1.5425 5.8652-0.2266l44.963-52.457v17.854c0 2.2091 1.7909 4 4 4s4-1.7909 4-4v-28c-2.2e-4 -2.209-1.791-3.9998-4-4zm-80 52v28c2.209e-4 2.2091 1.791 3.9998 4 4h104c2.209-2e-4 3.9998-1.7909 4-4v-28h-8v24h-96v-24z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/icon_gizmo_spatial_sample_player.svg
index 7dbb4744be..aa69248503 100644
--- a/editor/icons/icon_gizmo_spatial_sample_player.svg
+++ b/editor/icons/icon_gizmo_spatial_sample_player.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<g transform="translate(0 -924.36)" fill-rule="evenodd" shape-rendering="auto">
+<path d="m63.766 932.37c-2.0369 0.0594-3.9779 0.89602-5.4199 2.3359l-2e-3 2e-3 -29.656 29.658h-12.688c-4.3705 4.4e-4 -7.9996 3.6295-8 8v32c4.372e-4 4.3705 3.6295 7.9995 8 8h12.688l29.656 29.656c2.4 2.3983 5.9795 2.8662 8.7168 1.7324 2.7373-1.1337 4.9381-3.9958 4.9395-7.3886v-96.004c-3e-3 -4.4555-3.779-8.1211-8.2324-7.9922zm48.234 3.9941c-4.3709 0-8 3.6291-8 8v88c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-88c0-4.3709-3.6291-8-8-8zm-24 24c-4.3709 0-8 3.6291-8 8v40c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-40c0-4.3709-3.6291-8-8-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_spatial_stream_player.svg b/editor/icons/icon_gizmo_spatial_stream_player.svg
index 2cf3966364..1470d3bfba 100644
--- a/editor/icons/icon_gizmo_spatial_stream_player.svg
+++ b/editor/icons/icon_gizmo_spatial_stream_player.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path d="m99.766 934.36a8.0008 8.0011 0 0 0 -1.9609 0.296l-56 16a8.0008 8.0011 0 0 0 -5.8047 7.6964v48.119a18 18.001 0 0 0 -2 -0.116 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18.001 18 18.001 0 0 0 17.875 -16.001h0.125v-2-59.963l40-11.43v37.517a18 18.001 0 0 0 -2 -0.124 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18 18 18.001 0 0 0 17.875 -16h0.125v-2-66.003a8.0008 8.0011 0 0 0 -8.2344 -7.9924z" color="#000000" color-rendering="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
+<g transform="translate(0 -924.36)" shape-rendering="auto">
+<path transform="translate(0 924.36)" d="m99.645 6.0059c-0.9956 0.029687-1.9837 0.18322-2.9414 0.45703l-56 16c-5.1336 1.4668-8.7021 6.198-8.7031 11.537v44.203c-11.16 1.0331-20 10.379-20 21.797 1.1e-5 12.103 9.8971 22 22 22 12.103-1e-5 22-9.8971 22-22v-56.947l32-9.1426v28.293c-11.16 1.0331-20 10.379-20 21.797 1.1e-5 12.103 9.8971 22 22 22 12.103-1e-5 22-9.8971 22-22v-66c-0.00104-6.7137-5.6428-12.192-12.354-11.994z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 924.36)" d="m99.764 10.004a8.0008 8.0008 0 0 0 -1.9609 0.30469l-56 16a8.0008 8.0008 0 0 0 -5.8027 7.6914v48.121a18 18 0 0 0 -2 -0.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18 -18v-59.965l40-11.428v37.514a18 18 0 0 0 -2 -0.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18 -18v-66a8.0008 8.0008 0 0 0 -8.2363 -7.9961z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/icon_gizmo_spot_light.svg
index 9b4ddadd17..1881b6b60a 100644
--- a/editor/icons/icon_gizmo_spot_light.svg
+++ b/editor/icons/icon_gizmo_spot_light.svg
@@ -1,5 +1,6 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m52 4c-6.5788 0-12 5.4212-12 12v26.625c-12.263 7.2822-19.978 19.75-20 33.369l-0.005859 4.0059h28.578c1.7994 6.8632 8.0265 12 15.428 12s13.628-5.1368 15.428-12h28.576l-0.00391-4.0039c-0.01526-13.625-7.7323-26.099-20-33.385v-26.611c0-6.5788-5.4212-12-12-12zm-11.689 78.016c-1.536-0.10738-3.1419 0.23676-4.5586 1.0547l-10.393 6c-3.7786 2.1816-5.1117 7.1503-2.9297 10.93 2.1816 3.7786 7.1503 5.1117 10.93 2.9297l10.393-6c3.7796-2.1822 5.1087-7.1521 2.9277-10.93-1.3629-2.3605-3.8057-3.8052-6.3691-3.9844zm47.379 0c-2.5634 0.1792-5.0063 1.6238-6.3691 3.9844-2.181 3.7776-0.85187 8.7475 2.9277 10.93l10.393 6c3.7794 2.182 8.7481 0.8489 10.93-2.9297 2.182-3.7794 0.84891-8.7481-2.9297-10.93l-10.393-6c-1.4167-0.81792-3.0225-1.1621-4.5586-1.0547zm-23.689 13.984c-4.3628 0-8 3.6372-8 8v12c0 4.3628 3.6372 8 8 8s8-3.6372 8-8v-12c0-4.3628-3.6372-8-8-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
<path transform="translate(0 924.36)" d="m52 8c-4.432 0-8 3.568-8 8v12 16.875a40 36 0 0 0 -20 31.125h28a12 12 0 0 0 12 12 12 12 0 0 0 12 -12h28a40 36 0 0 0 -20 -31.141v-20.859-8c0-4.432-3.568-8-8-8h-24zm-11.969 78.006c-0.76793-0.053681-1.5596 0.1138-2.2793 0.5293l-10.393 6c-1.9191 1.108-2.5728 3.5457-1.4648 5.4648s3.5457 2.5728 5.4648 1.4648l10.393-6c1.9191-1.108 2.5709-3.5457 1.4629-5.4648-0.6925-1.1994-1.9037-1.9047-3.1836-1.9941zm47.938 0c-1.2799 0.08947-2.4911 0.7947-3.1836 1.9941-1.108 1.9191-0.45622 4.3568 1.4629 5.4648l10.393 6c1.9191 1.108 4.3568 0.45427 5.4648-1.4648s0.45427-4.3568-1.4648-5.4648l-10.393-6c-0.71967-0.4155-1.5114-0.58298-2.2793-0.5293zm-23.969 13.994c-2.216 0-4 1.784-4 4v12c0 2.216 1.784 4 4 4s4-1.784 4-4v-12c0-2.216-1.784-4-4-4z" fill="#f7f5cf" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.1082"/>
</g>
</svg>
diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/icon_group_viewport.svg
new file mode 100644
index 0000000000..350fb4103f
--- /dev/null
+++ b/editor/icons/icon_group_viewport.svg
@@ -0,0 +1,7 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m0 0v4h4v-4h-4zm6 0v6h-6v10h10v-6h6v-10h-10zm4 4h2v2h-2v-2zm2 8v4h4v-4h-4z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width=".5"/>
+<path transform="translate(0 1036.4)" d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#e0e0e0"/>
+<path transform="translate(0 1036.4)" d="m1 1v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm12 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm-12 12v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0zm12 0v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0z" fill="#fff"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_key.svg b/editor/icons/icon_key.svg
index 041b820e00..cc152b58a5 100644
--- a/editor/icons/icon_key.svg
+++ b/editor/icons/icon_key.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m11 4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<rect x="1" y="1043.4" width="8" height="2"/>
-<rect x="2" y="1045.4" width="3" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m11 4a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 3.8672 3 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#e0e0e0" fill-opacity=".99608"/>
</g>
</svg>
diff --git a/editor/icons/icon_key_move_disabled.svg b/editor/icons/icon_key_move_disabled.svg
deleted file mode 100644
index 05c158dc3c..0000000000
--- a/editor/icons/icon_key_move_disabled.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m7.984 1.002c-0.259 4e-3 -0.507 0.108-0.691 0.291l-2 2 1.414 1.414 1.293-1.293 1.293 1.293 1.414-1.414-2-2c-0.191-0.191-0.452-0.296-0.722-0.291h-1e-3zm-4.691 4.291l-2 2c-0.39 0.391-0.39 1.024 0 1.414l2 2 1.414-1.414-1.293-1.293 1.293-1.293-1.414-1.414zm9.414 0l-1.414 1.414 1.293 1.293-1.293 1.293 1.414 1.414 2-2c0.39-0.39 0.39-1.023 0-1.414l-2-2zm-6 6l-1.414 1.414 2 2c0.391 0.391 1.024 0.391 1.414 0l2-2-1.414-1.414-1.293 1.293-1.293-1.293z" fill="#e0e0e0" fill-opacity=".5" fill-rule="evenodd"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/>
-</svg>
diff --git a/editor/icons/icon_key_move_enabled.svg b/editor/icons/icon_key_move_enabled.svg
index 2d455f2d81..203b697ad2 100644
--- a/editor/icons/icon_key_move_enabled.svg
+++ b/editor/icons/icon_key_move_enabled.svg
@@ -1,4 +1,5 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m7.984 1.002c-0.259 4e-3 -0.507 0.108-0.691 0.291l-2 2 1.414 1.414 1.293-1.293 1.293 1.293 1.414-1.414-2-2c-0.191-0.191-0.452-0.296-0.722-0.291h-1e-3zm-4.691 4.291l-2 2c-0.39 0.391-0.39 1.024 0 1.414l2 2 1.414-1.414-1.293-1.293 1.293-1.293-1.414-1.414zm9.414 0l-1.414 1.414 1.293 1.293-1.293 1.293 1.414 1.414 2-2c0.39-0.39 0.39-1.023 0-1.414l-2-2zm-6 6l-1.414 1.414 2 2c0.391 0.391 1.024 0.391 1.414 0l2-2-1.414-1.414-1.293 1.293-1.293-1.293z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/>
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm-7 7v5c0 1.6569 1.3471 3.114 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1v-5h-2zm7 2c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm3 3c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1 1e-5 -0.55228 0.44772-0.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm-3-1c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/>
+</g>
</svg>
diff --git a/editor/icons/icon_key_rotate_disabled.svg b/editor/icons/icon_key_rotate_disabled.svg
deleted file mode 100644
index 6394bfd82d..0000000000
--- a/editor/icons/icon_key_rotate_disabled.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m8.088 1.001c-0.102-1e-3 -0.203 0-0.305 2e-3 -0.233 8e-3 -0.466 0.027-0.697 0.057-2.973 0.392-5.366 2.633-5.951 5.574-0.46 2.319 0.281 4.712 1.97 6.365h-1.105v2h4c0.308 1e-3 0.599-0.141 0.788-0.384 0.19-0.243 0.257-0.559 0.183-0.858l-1-4-1.942 0.487 0.281 1.121c-0.84-0.92-1.308-2.12-1.31-3.366 0-2.761 2.239-5 5-5 1.326 0 2.598 0.527 3.536 1.465 0.937 0.938 1.464 2.209 1.464 3.535-1e-3 1.326-0.529 2.597-1.467 3.534l1.416 1.416c2.12-2.121 2.654-5.356 1.328-8.045-1.165-2.362-3.556-3.869-6.189-3.903z" fill="#e0e0e0" fill-opacity=".5"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/>
-</svg>
diff --git a/editor/icons/icon_key_rotate_enabled.svg b/editor/icons/icon_key_rotate_enabled.svg
index 1dcb12c8ab..0f975631b2 100644
--- a/editor/icons/icon_key_rotate_enabled.svg
+++ b/editor/icons/icon_key_rotate_enabled.svg
@@ -1,4 +1,5 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m8.088 1.001c-0.102-1e-3 -0.203 0-0.305 2e-3 -0.233 8e-3 -0.466 0.027-0.697 0.057-2.973 0.392-5.366 2.633-5.951 5.574-0.46 2.319 0.281 4.712 1.97 6.365h-1.105v2h4c0.308 1e-3 0.599-0.141 0.788-0.384 0.19-0.243 0.257-0.559 0.183-0.858l-1-4-1.942 0.487 0.281 1.121c-0.84-0.92-1.308-2.12-1.31-3.366 0-2.761 2.239-5 5-5 1.326 0 2.598 0.527 3.536 1.465 0.937 0.938 1.464 2.209 1.464 3.535-1e-3 1.326-0.529 2.597-1.467 3.534l1.416 1.416c2.12-2.121 2.654-5.356 1.328-8.045-1.165-2.362-3.556-3.869-6.189-3.903z" fill="#e0e0e0" fill-opacity=".99608"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/>
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228 0-0.99999-0.4477-1-1v-1h2v-2h-2v-2h-2zm0 5c0-1.645-1.355-3-3-3s-3 1.355-3 3 1.355 3 3 3 3-1.355 3-3zm-7-3c-1.6569 0-3 1.3431-3 3v3h2v-3c9.6e-6 -0.5523 0.44772-1 1-1h1v-2h-1zm4 2c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/>
+</g>
</svg>
diff --git a/editor/icons/icon_key_scale_disabled.svg b/editor/icons/icon_key_scale_disabled.svg
deleted file mode 100644
index 9601e4925b..0000000000
--- a/editor/icons/icon_key_scale_disabled.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m9 1c-0.552 0-1 0.448-1 1s0.448 1 1 1h2.586l-1.293 1.293 1.414 1.414 1.293-1.293v2.586c0 0.552 0.448 1 1 1s1-0.448 1-1v-5c0-0.552-0.448-1-1-1h-5zm-7 7c-0.552 0-1 0.448-1 1v5c0 0.552 0.448 1 1 1h5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2.586l1.293-1.293-1.414-1.414-1.293 1.293v-2.586c0-0.552-0.448-1-1-1z" fill="#e0e0e0" fill-opacity=".5" fill-rule="evenodd"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/>
-</svg>
diff --git a/editor/icons/icon_key_scale_enabled.svg b/editor/icons/icon_key_scale_enabled.svg
index f00f3db35f..eaa12fdf0e 100644
--- a/editor/icons/icon_key_scale_enabled.svg
+++ b/editor/icons/icon_key_scale_enabled.svg
@@ -1,4 +1,5 @@
-<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m9 1c-0.552 0-1 0.448-1 1s0.448 1 1 1h2.586l-1.293 1.293 1.414 1.414 1.293-1.293v2.586c0 0.552 0.448 1 1 1s1-0.448 1-1v-5c0-0.552-0.448-1-1-1h-5zm-7 7c-0.552 0-1 0.448-1 1v5c0 0.552 0.448 1 1 1h5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2.586l1.293-1.293-1.414-1.414-1.293 1.293v-2.586c0-0.552-0.448-1-1-1z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/>
-<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/>
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1v-5h-2zm-8 2c-0.71466-1e-4 -1.3751 0.3811-1.7324 1-0.35727 0.6188-0.35727 1.3812 0 2 0.35733 0.6189 1.0178 1.0001 1.7324 1h-2v2h2c0.71466 1e-4 1.3751-0.3811 1.7324-1 0.35727-0.6188 0.35727-1.3812 0-2-0.35733-0.6189-1.0178-1.0001-1.7324-1h2v-2h-2zm6 0c-1.6569 0-3 1.3431-3 3s1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1 9.6e-6 -0.55228 0.44772-0.99999 1-1h1v-2h-1z" fill="#e0e0e0" fill-opacity=".99608"/>
+</g>
</svg>
diff --git a/editor/icons/icon_lock.svg b/editor/icons/icon_lock.svg
index b0b0125648..1202f1d86f 100644
--- a/editor/icons/icon_lock.svg
+++ b/editor/icons/icon_lock.svg
@@ -1,8 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/>
-<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5h2a3 3 0 0 1 3 -3 3 3 0 0 1 3 3h2a5 5 0 0 0 -5 -5z"/>
-<rect x="3" y="1042.4" width="2" height="2"/>
-<rect x="11" y="1042.4" width="2" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3 -3zm-1 7h2v3h-2v-3z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/icon_lock_viewport.svg
new file mode 100644
index 0000000000..54dc9f6b82
--- /dev/null
+++ b/editor/icons/icon_lock_viewport.svg
@@ -0,0 +1,6 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 0a6 6 0 0 0 -6 6v1h-1v9h14v-9h-1v-1a6 6 0 0 0 -6 -6zm0 4c1.1046 0 2 0.89543 2 2v1h-4v-1c0-1.1046 0.89543-2 2-2z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="4"/>
+<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3 -3zm-1 7h2v3h-2v-3z" fill="#e0e0e0"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_matrix.svg b/editor/icons/icon_matrix.svg
deleted file mode 100644
index ff5b1b0808..0000000000
--- a/editor/icons/icon_matrix.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m1 1v1 11h1 2v-1h-2v-10h2v-1h-2-1zm9 0v1h2v10h-2v1h3v-1-11h-3zm-7 2v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#ea686c"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_snap.svg b/editor/icons/icon_snap.svg
index 83e7b47fab..0e535b11ce 100644
--- a/editor/icons/icon_snap.svg
+++ b/editor/icons/icon_snap.svg
@@ -1,6 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 6v2h2v-2h-2zm4 4v2h2v-2h-2zm6 0v2h2v-2h-2z" fill="#f3f3f3"/>
+<path transform="translate(0 1036.4)" d="m3 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 6v2h2v-2h-2zm4 4v2h2v-2h-2zm6 0v2h2v-2h-2z" fill="#e0e0e0"/>
<path transform="translate(0 1036.4)" d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2 -2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4 -4z" fill="#fff" fill-opacity=".68627"/>
</g>
</svg>
diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/icon_snap_grid.svg
index 1cb9140f1f..7124bd918e 100644
--- a/editor/icons/icon_snap_grid.svg
+++ b/editor/icons/icon_snap_grid.svg
@@ -1,6 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#f3f3f3"/>
+<path transform="translate(0 1036.4)" d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#e0e0e0"/>
<path transform="translate(0 1036.4)" d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2 -2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4 -4z" fill="#fff" fill-opacity=".68627"/>
</g>
</svg>
diff --git a/editor/icons/icon_unlock.svg b/editor/icons/icon_unlock.svg
index 10ea82cbcf..591b3d0102 100644
--- a/editor/icons/icon_unlock.svg
+++ b/editor/icons/icon_unlock.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/>
-<path transform="translate(0 1036.4)" d="m8 1c-0.87738 0.001545-1.7389 0.23394-2.498 0.67383l1 1.7324c0.45506-0.26449 0.97171-0.40459 1.498-0.40625 1.6569 0 3 1.3431 3 3h2c0-2.7614-2.2386-5-5-5z"/>
-<rect x="11" y="1042.4" width="2" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1c-0.87738 0.001545-1.7389 0.23394-2.498 0.67383l1 1.7324c0.45506-0.26449 0.97171-0.40459 1.498-0.40625 1.6569 0 3 1.3431 3 3v2h-9v7h12v-7h-1v-2c0-2.7614-2.2386-5-5-5zm-1 9h2v3h-2v-3z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/icon_zoom_less.svg
index c78262841c..aebadf443f 100644
--- a/editor/icons/icon_zoom_less.svg
+++ b/editor/icons/icon_zoom_less.svg
@@ -1,5 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-4 6h8v2h-8v-2z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
+<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
+<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/>
+<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-4 6h8v2h-8v-2z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/icon_zoom_more.svg
index 55323cf96e..be1e13d145 100644
--- a/editor/icons/icon_zoom_more.svg
+++ b/editor/icons/icon_zoom_more.svg
@@ -1,5 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3v-3z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
+<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
+<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/>
+<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3v-3z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/icon_zoom_reset.svg
index 3ba2a149c8..aa5ad03727 100644
--- a/editor/icons/icon_zoom_reset.svg
+++ b/editor/icons/icon_zoom_reset.svg
@@ -1,5 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-0.029297 3.002a1.0001 1.0001 0 0 1 1.0293 0.99805v7h-2v-5.1309l-1.4453 0.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 0.52539 -0.16602z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
+<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
+<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/>
+<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-0.029297 3.002a1.0001 1.0001 0 0 1 1.0293 0.99805v7h-2v-5.1309l-1.4453 0.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 0.52539 -0.16602z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index e621394a07..c591bc733b 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2595,12 +2595,12 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p
}
if (ci) {
- Ref<Texture> lock = get_icon("Lock", "EditorIcons");
+ Ref<Texture> lock = get_icon("LockViewport", "EditorIcons");
if (p_node->has_meta("_edit_lock_")) {
lock->draw(viewport_ci, transform_ci.xform(Point2(0, 0)));
}
- Ref<Texture> group = get_icon("Group", "EditorIcons");
+ Ref<Texture> group = get_icon("GroupViewport", "EditorIcons");
if (ci->has_meta("_edit_group_")) {
Vector2 ofs = transform_ci.xform(Point2(0, 0));
if (ci->has_meta("_edit_lock_"))
@@ -3710,6 +3710,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport_base = memnew(Control);
palette_split->add_child(viewport_base);
+ viewport_base->set_clip_contents(true);
viewport_base->connect("draw", this, "_draw_viewport_base");
viewport_base->connect("gui_input", this, "_viewport_base_gui_input");
viewport_base->set_focus_mode(FOCUS_ALL);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index d2767bf1b2..5ea6b4b6b2 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -30,9 +30,11 @@
// FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
// Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
-#if 0
+
#include "material_editor_plugin.h"
+#if 0
+
#include "scene/main/viewport.h"
void MaterialEditor::_gui_input(InputEvent p_event) {
@@ -416,3 +418,41 @@ MaterialEditorPlugin::~MaterialEditorPlugin()
}
#endif
+
+String SpatialMaterialConversionPlugin::converts_to() const {
+
+ return "ShaderMaterial";
+}
+bool SpatialMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+
+ Ref<SpatialMaterial> mat = p_resource;
+ return mat.is_valid();
+}
+Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) {
+
+ Ref<SpatialMaterial> mat = p_resource;
+ ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
+
+ Ref<ShaderMaterial> smat;
+ smat.instance();
+
+ Ref<Shader> shader;
+ shader.instance();
+
+ String code = VS::get_singleton()->shader_get_code(mat->get_shader_rid());
+
+ shader->set_code(code);
+
+ smat->set_shader(shader);
+
+ List<PropertyInfo> params;
+ VS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), &params);
+
+ for (List<PropertyInfo>::Element *E = params.front(); E; E = E->next()) {
+ Variant value = VS::get_singleton()->material_get_param(mat->get_rid(), E->get().name);
+ smat->set_shader_param(E->get().name, value);
+ }
+
+ smat->set_render_priority(mat->get_render_priority());
+ return smat;
+}
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 10d7997a52..af9602f944 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -30,6 +30,7 @@
#ifndef MATERIAL_EDITOR_PLUGIN_H
#define MATERIAL_EDITOR_PLUGIN_H
+#include "editor/property_editor.h"
// FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
// Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
#if 0
@@ -101,4 +102,13 @@ public:
};
#endif
+
+class SpatialMaterialConversionPlugin : public EditorResourceConversionPlugin {
+ GDCLASS(SpatialMaterialConversionPlugin, EditorResourceConversionPlugin)
+public:
+ virtual String converts_to() const;
+ virtual bool handles(const Ref<Resource> &p_resource) const;
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource);
+};
+
#endif // MATERIAL_EDITOR_PLUGIN_H
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 1a3a7ff430..19f674c395 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -53,6 +53,49 @@
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
+void EditorResourceConversionPlugin::_bind_methods() {
+
+ MethodInfo mi;
+ mi.name = "_convert";
+ mi.return_val.type = Variant::OBJECT;
+ mi.return_val.class_name = "Resource";
+ mi.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE;
+ mi.return_val.hint_string = "Resource";
+ mi.arguments.push_back(mi.return_val);
+ mi.arguments[0].name = "resource";
+
+ BIND_VMETHOD(mi)
+
+ mi.name = "_handles";
+ mi.return_val = PropertyInfo(Variant::BOOL, "");
+
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_converts_to"));
+}
+
+String EditorResourceConversionPlugin::converts_to() const {
+
+ if (get_script_instance())
+ return get_script_instance()->call("_converts_to");
+
+ return "";
+}
+
+bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+
+ if (get_script_instance())
+ return get_script_instance()->call("_handles", p_resource);
+
+ return false;
+}
+
+Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) {
+
+ if (get_script_instance())
+ return get_script_instance()->call("_convert", p_resource);
+
+ return Ref<Resource>();
+}
+
void CustomPropertyEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {
@@ -213,6 +256,20 @@ void CustomPropertyEditor::_menu_option(int p_which) {
} break;
default: {
+ if (p_which >= CONVERT_BASE_ID) {
+
+ int to_type = p_which - CONVERT_BASE_ID;
+
+ Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v));
+
+ ERR_FAIL_INDEX(to_type, conversions.size());
+
+ Ref<Resource> new_res = conversions[to_type]->convert(v);
+
+ v = new_res;
+ emit_signal("variant_changed");
+ break;
+ }
ERR_FAIL_COND(inheritors_array.empty());
String intype = inheritors_array[p_which - TYPE_BASE_ID];
@@ -903,6 +960,27 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
}
+ if (!RES(v).is_null()) {
+
+ Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v));
+ if (conversions.size()) {
+ menu->add_separator();
+ }
+ for (int i = 0; i < conversions.size(); i++) {
+ String what = conversions[i]->converts_to();
+ Ref<Texture> icon;
+ if (has_icon(what, "EditorIcons")) {
+
+ icon = get_icon(what, "EditorIcons");
+ } else {
+
+ icon = get_icon(what, "Resource");
+ }
+
+ menu->add_icon_item(icon, vformat(TTR("Convert To %s"), what), CONVERT_BASE_ID + i);
+ }
+ }
+
menu->set_position(get_position());
menu->popup();
hide();
diff --git a/editor/property_editor.h b/editor/property_editor.h
index bfd5ee401e..e69ca8bcd5 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -53,6 +53,19 @@ class PropertyValueEvaluator;
class CreateDialog;
class PropertySelector;
+class EditorResourceConversionPlugin : public Reference {
+
+ GDCLASS(EditorResourceConversionPlugin, Reference)
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual String converts_to() const;
+ virtual bool handles(const Ref<Resource> &p_resource) const;
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource);
+};
+
class CustomPropertyEditor : public Popup {
GDCLASS(CustomPropertyEditor, Popup);
@@ -68,7 +81,8 @@ class CustomPropertyEditor : public Popup {
OBJ_MENU_PASTE = 5,
OBJ_MENU_NEW_SCRIPT = 6,
OBJ_MENU_SHOW_IN_FILE_SYSTEM = 7,
- TYPE_BASE_ID = 100
+ TYPE_BASE_ID = 100,
+ CONVERT_BASE_ID = 1000
};
enum {
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 1c5e91d733..18d51daeb3 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -103,7 +103,7 @@ typedef enum {
GODOT_ERR_CANT_CONNECT, // (25)
GODOT_ERR_CANT_RESOLVE,
GODOT_ERR_CONNECTION_ERROR,
- GODOT_ERR_CANT_AQUIRE_RESOURCE,
+ GODOT_ERR_CANT_ACQUIRE_RESOURCE,
GODOT_ERR_CANT_FORK,
GODOT_ERR_INVALID_DATA, ///< Data passed is invalid (30)
GODOT_ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index df7b16c96e..70340f0823 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -42,7 +42,7 @@ Variant *GDFunction::_get_variant(int p_address, GDInstance *p_instance, GDScrip
case ADDR_TYPE_SELF: {
- if (!p_instance) {
+ if (unlikely(!p_instance)) {
r_error = "Cannot access self without instance.";
return NULL;
}
@@ -54,7 +54,7 @@ Variant *GDFunction::_get_variant(int p_address, GDInstance *p_instance, GDScrip
} break;
case ADDR_TYPE_MEMBER: {
//member indexing is O(1)
- if (!p_instance) {
+ if (unlikely(!p_instance)) {
r_error = "Cannot access member without instance.";
return NULL;
}
@@ -279,7 +279,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#define GET_VARIANT_PTR(m_v, m_code_ofs) \
Variant *m_v; \
m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, _class, self, stack, err_text); \
- if (!m_v) \
+ if (unlikely(!m_v)) \
break;
#else
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index 995f4ddcc6..c7748b9b21 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -247,7 +247,7 @@ void AudioStreamPlaybackOpus::play(float p_from) {
frames_mixed = pre_skip;
playing = true;
if (p_from > 0) {
- seek_pos(p_from);
+ seek(p_from);
}
}
@@ -256,7 +256,7 @@ void AudioStreamPlaybackOpus::stop() {
playing = false;
}
-void AudioStreamPlaybackOpus::seek_pos(float p_time) {
+void AudioStreamPlaybackOpus::seek(float p_time) {
if (!playing) return;
ogg_int64_t pcm_offset = (ogg_int64_t)(p_time * osrate);
bool ok = op_pcm_seek(opus_file, pcm_offset) == 0;
@@ -340,7 +340,7 @@ float AudioStreamPlaybackOpus::get_length() const {
return length;
}
-float AudioStreamPlaybackOpus::get_position() const {
+float AudioStreamPlaybackOpus::get_playback_position() const {
int32_t frames = int32_t(frames_mixed);
if (frames < 0)
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index c7a053acd3..7b7740a804 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -99,8 +99,8 @@ public:
virtual int get_loop_count() const { return repeats; }
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual int get_channels() const { return stream_channels; }
virtual int get_mix_rate() const { return osrate; }
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index a3206187c0..27ea310780 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -58,7 +58,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
//end of file!
if (vorbis_stream->loop) {
//loop
- seek_pos(vorbis_stream->loop_offset);
+ seek(vorbis_stream->loop_offset);
loops++;
} else {
for (int i = mixed; i < p_frames; i++) {
@@ -78,7 +78,7 @@ float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
active = true;
- seek_pos(p_from_pos);
+ seek(p_from_pos);
loops = 0;
_begin_resample();
}
@@ -97,11 +97,11 @@ int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
return loops;
}
-float AudioStreamPlaybackOGGVorbis::get_position() const {
+float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
return float(frames_mixed) / vorbis_stream->sample_rate;
}
-void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) {
+void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
if (!active)
return;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index c38402fb3a..f4d381897b 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -67,8 +67,8 @@ public:
virtual int get_loop_count() const; //times it looped
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual float get_length() const; //if supported, otherwise return 0
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 603c31195d..c75bec31df 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -634,12 +634,12 @@ int VideoStreamPlaybackTheora::get_loop_count() const {
return 0;
};
-float VideoStreamPlaybackTheora::get_position() const {
+float VideoStreamPlaybackTheora::get_playback_position() const {
return get_time();
};
-void VideoStreamPlaybackTheora::seek_pos(float p_time){
+void VideoStreamPlaybackTheora::seek(float p_time){
// no
};
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index aeb5fa3511..484a1a7fb9 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -140,8 +140,8 @@ public:
virtual int get_loop_count() const;
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
void set_file(const String &p_file);
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 52aa2c5ee0..0afb889199 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -180,7 +180,7 @@ void AudioStreamPlaybackOGGVorbis::play(float p_from) {
frames_mixed = 0;
playing = true;
if (p_from > 0) {
- seek_pos(p_from);
+ seek(p_from);
}
}
@@ -203,7 +203,7 @@ void AudioStreamPlaybackOGGVorbis::stop() {
//_clear();
}
-float AudioStreamPlaybackOGGVorbis::get_position() const {
+float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
int32_t frames = int32_t(frames_mixed);
if (frames < 0)
@@ -211,7 +211,7 @@ float AudioStreamPlaybackOGGVorbis::get_position() const {
return double(frames) / stream_srate;
}
-void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) {
+void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
if (!playing)
return;
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 9f1d78850d..929b2651e9 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -96,8 +96,8 @@ public:
virtual int get_loop_count() const;
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual int get_channels() const { return stream_channels; }
virtual int get_mix_rate() const { return stream_srate; }
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 0b33ab6a70..2ec6b27471 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -204,11 +204,11 @@ float VideoStreamPlaybackWebm::get_length() const {
return 0.0f;
}
-float VideoStreamPlaybackWebm::get_position() const {
+float VideoStreamPlaybackWebm::get_playback_position() const {
return video_pos;
}
-void VideoStreamPlaybackWebm::seek_pos(float p_time) {
+void VideoStreamPlaybackWebm::seek(float p_time) {
//Not implemented
}
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index 36b0f02c5c..fc0720967a 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -81,8 +81,8 @@ public:
virtual float get_length() const;
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual void set_audio_track(int p_idx);
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 9fc6c8d23a..9ee77a710c 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -557,12 +557,12 @@ bool Area2D::is_overriding_audio_bus() const {
return audio_bus_override;
}
-void Area2D::set_audio_bus(const StringName &p_audio_bus) {
+void Area2D::set_audio_bus_name(const StringName &p_audio_bus) {
audio_bus = p_audio_bus;
}
-StringName Area2D::get_audio_bus() const {
+StringName Area2D::get_audio_bus_name() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
if (AudioServer::get_singleton()->get_bus_name(i) == audio_bus) {
@@ -644,8 +644,8 @@ void Area2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("overlaps_body", "body"), &Area2D::overlaps_body);
ClassDB::bind_method(D_METHOD("overlaps_area", "area"), &Area2D::overlaps_area);
- ClassDB::bind_method(D_METHOD("set_audio_bus", "name"), &Area2D::set_audio_bus);
- ClassDB::bind_method(D_METHOD("get_audio_bus"), &Area2D::get_audio_bus);
+ ClassDB::bind_method(D_METHOD("set_audio_bus_name", "name"), &Area2D::set_audio_bus_name);
+ ClassDB::bind_method(D_METHOD("get_audio_bus_name"), &Area2D::get_audio_bus_name);
ClassDB::bind_method(D_METHOD("set_audio_bus_override", "enable"), &Area2D::set_audio_bus_override);
ClassDB::bind_method(D_METHOD("is_overriding_audio_bus"), &Area2D::is_overriding_audio_bus);
@@ -679,7 +679,7 @@ void Area2D::_bind_methods() {
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index c56cf651a1..09ccb364e6 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -186,8 +186,8 @@ public:
void set_audio_bus_override(bool p_override);
bool is_overriding_audio_bus() const;
- void set_audio_bus(const StringName &p_audio_bus);
- StringName get_audio_bus() const;
+ void set_audio_bus_name(const StringName &p_audio_bus);
+ StringName get_audio_bus_name() const;
Area2D();
~Area2D();
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 4b108996f0..c40aeb764e 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -145,7 +145,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (!area2d->is_overriding_audio_bus())
continue;
- StringName bus_name = area2d->get_audio_bus();
+ StringName bus_name = area2d->get_audio_bus_name();
bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus_name);
break;
}
@@ -284,10 +284,10 @@ bool AudioStreamPlayer2D::is_playing() const {
return false;
}
-float AudioStreamPlayer2D::get_position() {
+float AudioStreamPlayer2D::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -395,7 +395,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer2D::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer2D::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer2D::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer2D::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer2D::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer2D::get_bus);
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index 112d05856b..85104fce21 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -72,7 +72,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index c8c478ae18..7bc8c9e89e 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -611,10 +611,10 @@ bool AudioStreamPlayer3D::is_playing() const {
return false;
}
-float AudioStreamPlayer3D::get_position() {
+float AudioStreamPlayer3D::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -807,7 +807,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer3D::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer3D::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer3D::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer3D::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer3D::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer3D::get_bus);
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index a6ce123790..2c2d4610c8 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -127,7 +127,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 11e6c1b2e1..14dd39a491 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -193,10 +193,10 @@ bool AudioStreamPlayer::is_playing() const {
return false;
}
-float AudioStreamPlayer::get_position() {
+float AudioStreamPlayer::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -284,7 +284,7 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer::get_bus);
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h
index 19b61ea5d8..4bfc44730d 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_player.h
@@ -83,7 +83,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 5713a35b7a..04c0817b15 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -39,7 +39,7 @@ void BaseButton::_unpress_group() {
if (!button_group.is_valid())
return;
- status.pressed = true;
+ status.pressed = false;
for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) {
if (E->get() == this)
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 71b9c4ec72..d9287e6f63 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -84,7 +84,7 @@ Rect2 RichTextLabel::_get_text_rect() {
Ref<StyleBox> style = get_stylebox("normal");
return Rect2(style->get_offset(), get_size() - style->get_minimum_size());
}
-void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &y, int p_width, int p_line, ProcessMode p_mode, const Ref<Font> &p_base_font, const Color &p_base_color, const Point2i &p_click_pos, Item **r_click_item, int *r_click_char, bool *r_outside, int p_char_count) {
+int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &y, int p_width, int p_line, ProcessMode p_mode, const Ref<Font> &p_base_font, const Color &p_base_color, const Point2i &p_click_pos, Item **r_click_item, int *r_click_char, bool *r_outside, int p_char_count) {
RID ci;
if (r_outside)
@@ -104,9 +104,11 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
int line = 0;
int spaces = 0;
+ int height = get_size().y;
+
if (p_mode != PROCESS_CACHE) {
- ERR_FAIL_INDEX(line, l.offset_caches.size());
+ ERR_FAIL_INDEX_V(line, l.offset_caches.size(), 0);
line_ofs = l.offset_caches[line];
}
@@ -133,12 +135,20 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
//line height should be the font height for the first time, this ensures that an empty line will never have zero height and successive newlines are displayed
int line_height = cfont->get_height();
+ int nonblank_line_count = 0; //number of nonblank lines as counted during PROCESS_DRAW
+
Variant meta;
+#define RETURN return nonblank_line_count
+
#define NEW_LINE \
{ \
if (p_mode != PROCESS_CACHE) { \
line++; \
+ if (!line_is_blank) { \
+ nonblank_line_count++; \
+ } \
+ line_is_blank = true; \
if (line < l.offset_caches.size()) \
line_ofs = l.offset_caches[line]; \
wofs = margin; \
@@ -168,7 +178,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
if (r_outside) *r_outside = true; \
*r_click_item = it; \
*r_click_char = rchar; \
- return; \
+ RETURN; \
} \
}
@@ -185,7 +195,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
if (r_outside) *r_outside = true; \
*r_click_item = it; \
*r_click_char = rchar; \
- return; \
+ RETURN; \
} \
NEW_LINE \
}
@@ -196,7 +206,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
if (r_outside) *r_outside = false; \
*r_click_item = it; \
*r_click_char = rchar; \
- return; \
+ RETURN; \
} \
wofs += m_width; \
}
@@ -206,6 +216,9 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
line_height = m_height; \
}
+#define YRANGE_VISIBLE(m_top, m_height) \
+ (m_height > 0 && ((m_top >= 0 && m_top < height) || ((m_top + m_height - 1) >= 0 && (m_top + m_height - 1) < height)))
+
Color selection_fg;
Color selection_bg;
@@ -214,8 +227,10 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
selection_fg = get_color("font_color_selected");
selection_bg = get_color("selection_color");
}
+
int rchar = 0;
int lh = 0;
+ bool line_is_blank = true;
while (it) {
@@ -327,7 +342,10 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
int cw = 0;
- bool visible = visible_characters < 0 || p_char_count < visible_characters;
+ bool visible = visible_characters < 0 || p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - (fh - 0 * ascent), fh); //getting rid of ascent seems to work??
+ if (visible)
+ line_is_blank = false;
+
if (c[i] == '\t')
visible = false;
@@ -384,7 +402,9 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
ENSURE_WIDTH(img->image->get_width());
- bool visible = visible_characters < 0 || p_char_count < visible_characters;
+ bool visible = visible_characters < 0 || p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - font->get_descent() - img->image->get_height(), img->image->get_height());
+ if (visible)
+ line_is_blank = false;
if (p_mode == PROCESS_DRAW && visible) {
img->image->draw(ci, p_ofs + Point2(align_ofs + wofs, y + lh - font->get_descent() - img->image->get_height()));
@@ -398,8 +418,10 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
case ITEM_NEWLINE: {
lh = 0;
- if (p_mode != PROCESS_CACHE)
+ if (p_mode != PROCESS_CACHE) {
lh = line < l.height_caches.size() ? l.height_caches[line] : 1;
+ line_is_blank = true;
+ }
} break;
case ITEM_TABLE: {
@@ -436,7 +458,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
idx++;
}
- //compute available width and total radio (for expanders)
+ //compute available width and total ratio (for expanders)
int total_ratio = 0;
int available_width = p_width - hseparation * (table->columns.size() - 1);
@@ -494,12 +516,14 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
int lines_ofs = p_ofs.y + offset.y + draw_ofs.y;
bool visible = lines_ofs < get_size().height && lines_ofs + lines_h >= 0;
+ if (visible)
+ line_is_blank = false;
for (int i = 0; i < frame->lines.size(); i++) {
if (visible) {
if (p_mode == PROCESS_DRAW) {
- _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor);
+ nonblank_line_count += _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor);
} else if (p_mode == PROCESS_POINTER) {
_process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_POINTER, cfont, ccolor, p_click_pos, r_click_item, r_click_char, r_outside);
}
@@ -547,15 +571,17 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
if (r_outside) *r_outside = true;
*r_click_item = itp;
*r_click_char = rchar;
- return;
+ RETURN;
}
break;
}
}
-
NEW_LINE;
+ RETURN;
+
+#undef RETURN
#undef NEW_LINE
#undef ENSURE_WIDTH
#undef ADVANCE
@@ -665,14 +691,14 @@ void RichTextLabel::_notification(int p_what) {
if (from_line >= main->lines.size())
break; //nothing to draw
-
int y = (main->lines[from_line].height_accum_cache - main->lines[from_line].height_cache) - ofs;
Ref<Font> base_font = get_font("normal_font");
Color base_color = get_color("default_color");
+ visible_line_count = 0;
while (y < size.height && from_line < main->lines.size()) {
- _process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, Point2i(), NULL, NULL, NULL, total_chars);
+ visible_line_count += _process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, Point2i(), NULL, NULL, NULL, total_chars);
total_chars += main->lines[from_line].char_count;
from_line++;
}
@@ -1013,7 +1039,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
if (p_frame->first_invalid_line == p_frame->lines.size())
return;
- //validate invalid lines!s
+ //validate invalid lines
Size2 size = get_size();
Rect2 text_rect = _get_text_rect();
@@ -1665,6 +1691,12 @@ int RichTextLabel::get_line_count() const {
return current_frame->lines.size();
}
+int RichTextLabel::get_visible_line_count() const {
+ if (!is_visible())
+ return 0;
+ return visible_line_count;
+}
+
void RichTextLabel::set_selection_enabled(bool p_enabled) {
selection.enabled = p_enabled;
@@ -1907,6 +1939,9 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_bbcode", "enable"), &RichTextLabel::set_use_bbcode);
ClassDB::bind_method(D_METHOD("is_using_bbcode"), &RichTextLabel::is_using_bbcode);
+ ClassDB::bind_method(D_METHOD("get_line_count"), &RichTextLabel::get_line_count);
+ ClassDB::bind_method(D_METHOD("get_visible_line_count"), &RichTextLabel::get_visible_line_count);
+
ADD_GROUP("BBCode", "bbcode_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bbcode_enabled"), "set_use_bbcode", "is_using_bbcode");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bbcode_text", PROPERTY_HINT_MULTILINE_TEXT), "set_bbcode", "get_bbcode");
@@ -1995,6 +2030,7 @@ RichTextLabel::RichTextLabel() {
visible_characters = -1;
percent_visible = 1;
+ visible_line_count = 0;
set_clip_contents(true);
}
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 4db2c3a8e9..24c1e5eb59 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -217,6 +217,7 @@ private:
int scroll_w;
bool updating_scroll;
int current_idx;
+ int visible_line_count;
int tab_size;
bool underline_meta;
@@ -260,7 +261,7 @@ private:
int visible_characters;
float percent_visible;
- void _process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &y, int p_width, int p_line, ProcessMode p_mode, const Ref<Font> &p_base_font, const Color &p_base_color, const Point2i &p_click_pos = Point2i(), Item **r_click_item = NULL, int *r_click_char = NULL, bool *r_outside = NULL, int p_char_count = 0);
+ int _process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &y, int p_width, int p_line, ProcessMode p_mode, const Ref<Font> &p_base_font, const Color &p_base_color, const Point2i &p_click_pos = Point2i(), Item **r_click_item = NULL, int *r_click_char = NULL, bool *r_outside = NULL, int p_char_count = 0);
void _find_click(ItemFrame *p_frame, const Point2i &p_click, Item **r_click_item = NULL, int *r_click_char = NULL, bool *r_outside = NULL);
Ref<Font> _find_font(Item *p_item);
@@ -325,6 +326,7 @@ public:
void scroll_to_line(int p_line);
int get_line_count() const;
+ int get_visible_line_count() const;
VScrollBar *get_v_scroll() { return vscroll; }
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index e08d050ca7..816556af30 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -282,7 +282,7 @@ float VideoPlayer::get_stream_position() const {
if (playback.is_null())
return 0;
- return playback->get_position();
+ return playback->get_playback_position();
};
Ref<Texture> VideoPlayer::get_video_texture() {
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index e47cb971ae..1fd84a860e 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -41,7 +41,7 @@ void AudioStreamPlaybackSample::start(float p_from_pos) {
ima_adpcm[i].window_ofs = 0;
}
- seek_pos(p_from_pos);
+ seek(p_from_pos);
sign = 1;
active = true;
}
@@ -61,11 +61,11 @@ int AudioStreamPlaybackSample::get_loop_count() const {
return 0;
}
-float AudioStreamPlaybackSample::get_position() const {
+float AudioStreamPlaybackSample::get_playback_position() const {
return float(offset >> MIX_FRAC_BITS) / base->mix_rate;
}
-void AudioStreamPlaybackSample::seek_pos(float p_time) {
+void AudioStreamPlaybackSample::seek(float p_time) {
if (base->format == AudioStreamSample::FORMAT_IMA_ADPCM)
return; //no seeking in ima-adpcm
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index 46fa78ddcf..fbb8010a9c 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -71,8 +71,8 @@ public:
virtual int get_loop_count() const; //times it looped
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames);
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 553e9b9905..c6b434af44 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -737,7 +737,7 @@ void SpatialMaterial::_update_shader() {
code += "\tALBEDO *= 1.0 - ref_amount;\n";
code += "\tALPHA = 1.0;\n";
- } else if (features[FEATURE_TRANSPARENT] || features[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) {
+ } else if (features[FEATURE_TRANSPARENT] || flags[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) {
code += "\tALPHA = albedo.a * albedo_tex.a;\n";
}
@@ -857,10 +857,10 @@ void SpatialMaterial::_update_shader() {
code += "\tvec3 detail_norm = mix(NORMALMAP,detail_norm_tex.rgb,detail_tex.a);\n";
code += "\tNORMALMAP = mix(NORMALMAP,detail_norm,detail_mask_tex.r);\n";
code += "\tALBEDO.rgb = mix(ALBEDO.rgb,detail,detail_mask_tex.r);\n";
+ }
- if (flags[FLAG_USE_ALPHA_SCISSOR]) {
- code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n";
- }
+ if (flags[FLAG_USE_ALPHA_SCISSOR]) {
+ code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n";
}
code += "}\n";
@@ -1611,6 +1611,12 @@ float SpatialMaterial::get_distance_fade_min_distance() const {
return distance_fade_min_distance;
}
+RID SpatialMaterial::get_shader_rid() const {
+
+ ERR_FAIL_COND_V(!shader_map.has(current_key), RID());
+ return shader_map[current_key].shader;
+}
+
void SpatialMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_albedo", "albedo"), &SpatialMaterial::set_albedo);
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 0c33891897..721514f586 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -579,6 +579,8 @@ public:
static RID get_material_rid_for_2d(bool p_shaded, bool p_transparent, bool p_double_sided, bool p_cut_alpha, bool p_opaque_prepass);
+ RID get_shader_rid() const;
+
SpatialMaterial();
virtual ~SpatialMaterial();
};
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index 30264691ee..0f07233185 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -55,8 +55,8 @@ public:
virtual float get_length() const = 0;
- virtual float get_position() const = 0;
- virtual void seek_pos(float p_time) = 0;
+ virtual float get_playback_position() const = 0;
+ virtual void seek(float p_time) = 0;
virtual void set_audio_track(int p_idx) = 0;
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index b6be2fb9d6..0e3d5824d9 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -178,16 +178,16 @@ int AudioStreamPlaybackRandomPitch::get_loop_count() const {
return 0;
}
-float AudioStreamPlaybackRandomPitch::get_position() const {
+float AudioStreamPlaybackRandomPitch::get_playback_position() const {
if (playing.is_valid()) {
- return playing->get_position();
+ return playing->get_playback_position();
}
return 0;
}
-void AudioStreamPlaybackRandomPitch::seek_pos(float p_time) {
+void AudioStreamPlaybackRandomPitch::seek(float p_time) {
if (playing.is_valid()) {
- playing->seek_pos(p_time);
+ playing->seek(p_time);
}
}
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index 97178ebd7c..3324597b41 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -45,8 +45,8 @@ public:
virtual int get_loop_count() const = 0; //times it looped
- virtual float get_position() const = 0;
- virtual void seek_pos(float p_time) = 0;
+ virtual float get_playback_position() const = 0;
+ virtual void seek(float p_time) = 0;
virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames) = 0;
@@ -133,8 +133,8 @@ public:
virtual int get_loop_count() const; //times it looped
- virtual float get_position() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames);
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 6ad433268f..ec3337686f 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -1377,6 +1377,10 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "sqrt", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "sqrt", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
{ "sqrt", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "inversesqrt", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "inversesqrt", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "inversesqrt", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "inversesqrt", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
//builtins - common
{ "abs", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
{ "abs", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },