Fix typos with codespell
Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
This commit is contained in:
parent
55ca2a7c88
commit
5fc86026ca
|
@ -1247,7 +1247,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
|
||||||
bool disconnect = c.flags & CONNECT_ONESHOT;
|
bool disconnect = c.flags & CONNECT_ONESHOT;
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (disconnect && (c.flags & CONNECT_PERSIST) && Engine::get_singleton()->is_editor_hint()) {
|
if (disconnect && (c.flags & CONNECT_PERSIST) && Engine::get_singleton()->is_editor_hint()) {
|
||||||
//this signal was connected from the editor, and is being edited. just dont disconnect for now
|
//this signal was connected from the editor, and is being edited. just don't disconnect for now
|
||||||
disconnect = false;
|
disconnect = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Stores information about the audiobusses.
|
Stores information about the audiobusses.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See [AudioServer] for usage.
|
Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<return type="AudioBusLayout">
|
<return type="AudioBusLayout">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Generates an [AudioBusLayout] using the available busses and effects.
|
Generates an [AudioBusLayout] using the available buses and effects.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_bus_channels" qualifiers="const">
|
<method name="get_bus_channels" qualifiers="const">
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Returns the number of available busses.
|
Returns the number of available buses.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_bus_effect">
|
<method name="get_bus_effect">
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
<argument index="0" name="amount" type="int">
|
<argument index="0" name="amount" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Adds and removes busses to make the number of busses match [code]amount[/code].
|
Adds and removes buses to make the number of buses match [code]amount[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_bus_effect_enabled">
|
<method name="set_bus_effect_enabled">
|
||||||
|
|
|
@ -941,10 +941,10 @@
|
||||||
The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis.
|
The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="GROW_DIRECTION_END" value="1" enum="GrowDirection">
|
<constant name="GROW_DIRECTION_END" value="1" enum="GrowDirection">
|
||||||
The control wil grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
|
The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="GROW_DIRECTION_BOTH" value="2" enum="GrowDirection">
|
<constant name="GROW_DIRECTION_BOTH" value="2" enum="GrowDirection">
|
||||||
The control wil grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
|
The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="ANCHOR_BEGIN" value="0" enum="Anchor">
|
<constant name="ANCHOR_BEGIN" value="0" enum="Anchor">
|
||||||
Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
|
Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Override this method to provide the name that will appear in teh gizmo visibility menu.
|
Override this method to provide the name that will appear in the gizmo visibility menu.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_gizmo" qualifiers="virtual">
|
<method name="has_gizmo" qualifiers="virtual">
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<method name="add_triangle_fan">
|
<method name="add_triangle_fan">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<argument index="0" name="vertexes" type="PoolVector3Array">
|
<argument index="0" name="vertices" type="PoolVector3Array">
|
||||||
</argument>
|
</argument>
|
||||||
<argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
|
<argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
|
||||||
</argument>
|
</argument>
|
||||||
|
|
|
@ -2341,7 +2341,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
|
||||||
Transform sky_orientation(p_env->sky_orientation, Vector3(0.0, 0.0, 0.0));
|
Transform sky_orientation(p_env->sky_orientation, Vector3(0.0, 0.0, 0.0));
|
||||||
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, sky_orientation.affine_inverse() * p_view_transform);
|
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, sky_orientation.affine_inverse() * p_view_transform);
|
||||||
} else {
|
} else {
|
||||||
// would be a bit weird if we dont have this...
|
// would be a bit weird if we don't have this...
|
||||||
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, p_view_transform);
|
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, p_view_transform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2607,7 +2607,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
|
||||||
//push back the directional lights
|
//push back the directional lights
|
||||||
|
|
||||||
if (p_light_cull_count) {
|
if (p_light_cull_count) {
|
||||||
//harcoded limit of 256 lights
|
//hardcoded limit of 256 lights
|
||||||
render_light_instance_count = MIN(RenderList::MAX_LIGHTS, p_light_cull_count);
|
render_light_instance_count = MIN(RenderList::MAX_LIGHTS, p_light_cull_count);
|
||||||
render_light_instances = (LightInstance **)alloca(sizeof(LightInstance *) * render_light_instance_count);
|
render_light_instances = (LightInstance **)alloca(sizeof(LightInstance *) * render_light_instance_count);
|
||||||
render_directional_lights = 0;
|
render_directional_lights = 0;
|
||||||
|
@ -2621,7 +2621,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
|
||||||
|
|
||||||
if (light->light_ptr->type == VS::LIGHT_DIRECTIONAL) {
|
if (light->light_ptr->type == VS::LIGHT_DIRECTIONAL) {
|
||||||
render_directional_lights++;
|
render_directional_lights++;
|
||||||
//as goin in reverse, directional lights are always first anyway
|
//as going in reverse, directional lights are always first anyway
|
||||||
}
|
}
|
||||||
|
|
||||||
light->light_index = index;
|
light->light_index = index;
|
||||||
|
|
|
@ -81,7 +81,7 @@ static String _opstr(SL::Operator p_op) {
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
||||||
String id = "m_" + p_id;
|
String id = "m_" + p_id;
|
||||||
return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
|
return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
|
||||||
}
|
}
|
||||||
|
|
||||||
static String f2sp0(float p_float) {
|
static String f2sp0(float p_float) {
|
||||||
|
|
|
@ -199,7 +199,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
||||||
String id = "m_" + p_id;
|
String id = "m_" + p_id;
|
||||||
return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
|
return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderGLES2::Version *ShaderGLES2::get_current_version() {
|
ShaderGLES2::Version *ShaderGLES2::get_current_version() {
|
||||||
|
|
|
@ -167,7 +167,7 @@ static String _opstr(SL::Operator p_op) {
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
||||||
String id = "m_" + p_id;
|
String id = "m_" + p_id;
|
||||||
return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
|
return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
|
||||||
}
|
}
|
||||||
|
|
||||||
static String f2sp0(float p_float) {
|
static String f2sp0(float p_float) {
|
||||||
|
|
|
@ -124,7 +124,7 @@ vec4 texture2D_bicubic(sampler2D tex, vec2 uv, int p_lod) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec3 tonemap_filmic(vec3 color, float white) {
|
vec3 tonemap_filmic(vec3 color, float white) {
|
||||||
// exposure bias: input scale (color *= bias, white *= bias) to make the brighness consistent with other tonemappers
|
// exposure bias: input scale (color *= bias, white *= bias) to make the brightness consistent with other tonemappers
|
||||||
// also useful to scale the input to the range that the tonemapper is designed for (some require very high input values)
|
// also useful to scale the input to the range that the tonemapper is designed for (some require very high input values)
|
||||||
// has no effect on the curve's general shape or visual properties
|
// has no effect on the curve's general shape or visual properties
|
||||||
const float exposure_bias = 2.0f;
|
const float exposure_bias = 2.0f;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#define _WIN32_WINNT 0x0501 // Windows XP, disable Vista API
|
#define _WIN32_WINNT 0x0501 // Windows XP, disable Vista API
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
#undef _WIN32_WINNT
|
#undef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0600 // Reenable Vista API
|
#define _WIN32_WINNT 0x0600 // Re-enable Vista API
|
||||||
#else
|
#else
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
#endif // MINGW hack
|
#endif // MINGW hack
|
||||||
|
|
|
@ -543,7 +543,7 @@ void NetSocketPosix::set_blocking_enabled(bool p_enabled) {
|
||||||
|
|
||||||
void NetSocketPosix::set_ipv6_only_enabled(bool p_enabled) {
|
void NetSocketPosix::set_ipv6_only_enabled(bool p_enabled) {
|
||||||
ERR_FAIL_COND(!is_open());
|
ERR_FAIL_COND(!is_open());
|
||||||
// This option is only avaiable in IPv6 sockets.
|
// This option is only available in IPv6 sockets.
|
||||||
ERR_FAIL_COND(_ip_type == IP::TYPE_IPV4);
|
ERR_FAIL_COND(_ip_type == IP::TYPE_IPV4);
|
||||||
|
|
||||||
int par = p_enabled ? 1 : 0;
|
int par = p_enabled ? 1 : 0;
|
||||||
|
|
|
@ -282,7 +282,7 @@ uint64_t OS_Unix::get_ticks_usec() const {
|
||||||
uint64_t longtime = mach_absolute_time() * _clock_scale;
|
uint64_t longtime = mach_absolute_time() * _clock_scale;
|
||||||
#else
|
#else
|
||||||
// Unchecked return. Static analyzers might complain.
|
// Unchecked return. Static analyzers might complain.
|
||||||
// If _setup_clock() succeded, we assume clock_gettime() works.
|
// If _setup_clock() succeeded, we assume clock_gettime() works.
|
||||||
struct timespec tv_now = { 0, 0 };
|
struct timespec tv_now = { 0, 0 };
|
||||||
clock_gettime(GODOT_CLOCK, &tv_now);
|
clock_gettime(GODOT_CLOCK, &tv_now);
|
||||||
uint64_t longtime = ((uint64_t)tv_now.tv_nsec / 1000L) + (uint64_t)tv_now.tv_sec * 1000000L;
|
uint64_t longtime = ((uint64_t)tv_now.tv_nsec / 1000L) + (uint64_t)tv_now.tv_sec * 1000000L;
|
||||||
|
|
|
@ -2356,9 +2356,8 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
|
||||||
|
|
||||||
bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, List<Node *> *p_mgeom) {
|
bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, List<Node *> *p_mgeom) {
|
||||||
|
|
||||||
// bind shape matrix escala los huesos y los hace gigantes, asi la matriz despues achica
|
// Bind Shape Matrix scales the bones and makes them gigantic, so the matrix then shrinks the model?
|
||||||
// al modelo?
|
// Solution: apply the Bind Shape Matrix to the VERTICES, and if the object comes scaled, it seems to be left alone!
|
||||||
// solucion: aplicarle la bind shape matrix a los VERTICES, y si el objeto viene con escala, se la dejo me parece!
|
|
||||||
|
|
||||||
if (p_node->type == Node::TYPE_GEOMETRY) {
|
if (p_node->type == Node::TYPE_GEOMETRY) {
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
|
||||||
r_texture = generated;
|
r_texture = generated;
|
||||||
|
|
||||||
if (r_texture.is_valid() && preview_generators[i]->should_generate_small_preview()) {
|
if (r_texture.is_valid() && preview_generators[i]->should_generate_small_preview()) {
|
||||||
int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retreive the default icon size
|
int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retrieve the default icon size
|
||||||
small_thumbnail_size *= EDSCALE;
|
small_thumbnail_size *= EDSCALE;
|
||||||
|
|
||||||
Ref<Image> small_image = r_texture->get_data();
|
Ref<Image> small_image = r_texture->get_data();
|
||||||
|
|
|
@ -90,7 +90,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
|
||||||
|
|
||||||
if (searched_string.length() > 0) {
|
if (searched_string.length() > 0) {
|
||||||
if (file_name.to_lower().find(searched_string) < 0) {
|
if (file_name.to_lower().find(searched_string) < 0) {
|
||||||
// The seached string is not in the file name, we skip it
|
// The searched string is not in the file name, we skip it
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// We expand all parents
|
// We expand all parents
|
||||||
|
@ -375,7 +375,7 @@ void FileSystemDock::_notification(int p_what) {
|
||||||
// Update display of files in tree
|
// Update display of files in tree
|
||||||
display_mode_setting = DisplayModeSetting(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")));
|
display_mode_setting = DisplayModeSetting(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")));
|
||||||
|
|
||||||
// Update allways showfolders
|
// Update always showfolders
|
||||||
bool new_always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
|
bool new_always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
|
||||||
if (new_always_show_folders != always_show_folders) {
|
if (new_always_show_folders != always_show_folders) {
|
||||||
always_show_folders = new_always_show_folders;
|
always_show_folders = new_always_show_folders;
|
||||||
|
@ -1855,7 +1855,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
|
||||||
// Drop on the favorite folder
|
// Drop on the favorite folder
|
||||||
drop_position = 0;
|
drop_position = 0;
|
||||||
} else if (ti == resources_item) {
|
} else if (ti == resources_item) {
|
||||||
// Drop on the resouce item
|
// Drop on the resource item
|
||||||
drop_position = dirs.size();
|
drop_position = dirs.size();
|
||||||
} else {
|
} else {
|
||||||
// Drop in the list
|
// Drop in the list
|
||||||
|
@ -2157,7 +2157,7 @@ void FileSystemDock::select_file(const String &p_file) {
|
||||||
|
|
||||||
void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) {
|
void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) {
|
||||||
|
|
||||||
// Set the path to the current focussed item
|
// Set the path to the current focused item
|
||||||
int current = files->get_current();
|
int current = files->get_current();
|
||||||
if (current == p_index) {
|
if (current == p_index) {
|
||||||
String fpath = files->get_item_metadata(current);
|
String fpath = files->get_item_metadata(current);
|
||||||
|
|
|
@ -321,7 +321,7 @@ FindInFilesDialog::FindInFilesDialog() {
|
||||||
_search_text_line_edit->connect("text_entered", this, "_on_search_text_entered");
|
_search_text_line_edit->connect("text_entered", this, "_on_search_text_entered");
|
||||||
gc->add_child(_search_text_line_edit);
|
gc->add_child(_search_text_line_edit);
|
||||||
|
|
||||||
gc->add_child(memnew(Control)); // Space to mantain the grid aligned.
|
gc->add_child(memnew(Control)); // Space to maintain the grid aligned.
|
||||||
|
|
||||||
{
|
{
|
||||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||||
|
|
|
@ -424,7 +424,7 @@ void ImportDock::_reimport_attempt() {
|
||||||
void ImportDock::_reimport_and_restart() {
|
void ImportDock::_reimport_and_restart() {
|
||||||
|
|
||||||
EditorNode::get_singleton()->save_all_scenes();
|
EditorNode::get_singleton()->save_all_scenes();
|
||||||
EditorResourcePreview::get_singleton()->stop(); //dont try to re-create previews after import
|
EditorResourcePreview::get_singleton()->stop(); //don't try to re-create previews after import
|
||||||
_reimport();
|
_reimport();
|
||||||
EditorNode::get_singleton()->restart_editor();
|
EditorNode::get_singleton()->restart_editor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6822,7 +6822,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
||||||
return_type = original_type;
|
return_type = original_type;
|
||||||
return_type.is_meta_type = false;
|
return_type.is_meta_type = false;
|
||||||
|
|
||||||
valid = true; // There's always an initializer, we can asume this is true
|
valid = true; // There's always an initializer, we can assume this is true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
|
|
@ -313,7 +313,7 @@ void StreamPeerMbedTLS::disconnect_from_stream() {
|
||||||
|
|
||||||
Ref<StreamPeerTCP> tcp = base;
|
Ref<StreamPeerTCP> tcp = base;
|
||||||
if (tcp.is_valid() && tcp->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
|
if (tcp.is_valid() && tcp->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
|
||||||
// We are still connected on the socket, try to send close notity.
|
// We are still connected on the socket, try to send close notify.
|
||||||
mbedtls_ssl_close_notify(&ssl);
|
mbedtls_ssl_close_notify(&ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ def configure(env):
|
||||||
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
||||||
|
|
||||||
# Since we use both memory growth and MEMFS preloading,
|
# Since we use both memory growth and MEMFS preloading,
|
||||||
# this avoids unecessary copying on start-up.
|
# this avoids unnecessary copying on start-up.
|
||||||
env.Append(LINKFLAGS=['--no-heap-copy'])
|
env.Append(LINKFLAGS=['--no-heap-copy'])
|
||||||
|
|
||||||
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
|
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ Vector2 TileMap::world_to_map(const Vector2 &p_pos) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account for precision errors on the border (GH-23250).
|
// Account for precision errors on the border (GH-23250).
|
||||||
// 0.00005 is 5*CMP_EPSILON, results would start being unpredictible if
|
// 0.00005 is 5*CMP_EPSILON, results would start being unpredictable if
|
||||||
// cell size is > 15,000, but we can hardly have more precision anyway with
|
// cell size is > 15,000, but we can hardly have more precision anyway with
|
||||||
// floating point.
|
// floating point.
|
||||||
ret += Vector2(0.00005, 0.00005);
|
ret += Vector2(0.00005, 0.00005);
|
||||||
|
|
|
@ -122,7 +122,7 @@ void PathFollow::_update_transform() {
|
||||||
Vector3 pos = c->interpolate_baked(o, cubic);
|
Vector3 pos = c->interpolate_baked(o, cubic);
|
||||||
Transform t = get_transform();
|
Transform t = get_transform();
|
||||||
// Vector3 pos_offset = Vector3(h_offset, v_offset, 0); not used in all cases
|
// Vector3 pos_offset = Vector3(h_offset, v_offset, 0); not used in all cases
|
||||||
// will be replaced by "Vector3(h_offset, v_offset, 0)" where it was formely used
|
// will be replaced by "Vector3(h_offset, v_offset, 0)" where it was formerly used
|
||||||
|
|
||||||
if (rotation_mode == ROTATION_ORIENTED) {
|
if (rotation_mode == ROTATION_ORIENTED) {
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ void Skeleton::_notification(int p_what) {
|
||||||
Bone *bonesptr = bones.ptrw();
|
Bone *bonesptr = bones.ptrw();
|
||||||
int len = bones.size();
|
int len = bones.size();
|
||||||
|
|
||||||
vs->skeleton_allocate(skeleton, len); // if same size, nothin really happens
|
vs->skeleton_allocate(skeleton, len); // if same size, nothing really happens
|
||||||
|
|
||||||
_update_process_order();
|
_update_process_order();
|
||||||
|
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ void ItemList::_notification(int p_what) {
|
||||||
if (items[i].disabled)
|
if (items[i].disabled)
|
||||||
modulate.a *= 0.5;
|
modulate.a *= 0.5;
|
||||||
|
|
||||||
// If the icon is transposed, we have to swith the size so that it is drawn correctly
|
// If the icon is transposed, we have to switch the size so that it is drawn correctly
|
||||||
if (items[i].icon_transposed) {
|
if (items[i].icon_transposed) {
|
||||||
Size2 size_tmp = draw_rect.size;
|
Size2 size_tmp = draw_rect.size;
|
||||||
draw_rect.size.x = size_tmp.y;
|
draw_rect.size.x = size_tmp.y;
|
||||||
|
|
|
@ -1601,7 +1601,7 @@ void Tree::_range_click_timeout() {
|
||||||
mb.instance();
|
mb.instance();
|
||||||
;
|
;
|
||||||
|
|
||||||
propagate_mouse_activated = false; //done from outside, so signal handler cant clear the tree in the middle of emit(which is a common case)
|
propagate_mouse_activated = false; // done from outside, so signal handler can't clear the tree in the middle of emit (which is a common case)
|
||||||
blocked++;
|
blocked++;
|
||||||
propagate_mouse_event(pos + cache.offset, 0, 0, false, root, BUTTON_LEFT, mb);
|
propagate_mouse_event(pos + cache.offset, 0, 0, false, root, BUTTON_LEFT, mb);
|
||||||
blocked--;
|
blocked--;
|
||||||
|
|
|
@ -239,7 +239,7 @@ void Viewport::_collision_object_input_event(CollisionObject *p_object, Camera *
|
||||||
ObjectID id = p_object->get_instance_id();
|
ObjectID id = p_object->get_instance_id();
|
||||||
|
|
||||||
if (p_discard_empty_motion) {
|
if (p_discard_empty_motion) {
|
||||||
//avoid sending the event unnecesarily if nothing really changed in the context
|
//avoid sending the event unnecessarily if nothing really changed in the context
|
||||||
Ref<InputEventMouseMotion> mm = p_input_event;
|
Ref<InputEventMouseMotion> mm = p_input_event;
|
||||||
if (mm.is_valid() && object_transform == physics_last_object_transform && camera_transform == physics_last_camera_transform && physics_last_id == id) {
|
if (mm.is_valid() && object_transform == physics_last_object_transform && camera_transform == physics_last_camera_transform && physics_last_id == id) {
|
||||||
return; //discarded
|
return; //discarded
|
||||||
|
@ -425,7 +425,7 @@ void Viewport::_notification(int p_what) {
|
||||||
bool discard_empty_motion = false;
|
bool discard_empty_motion = false;
|
||||||
|
|
||||||
{ // if no motion event exists, create a new one. This is necessary because objects or camera may have moved.
|
{ // if no motion event exists, create a new one. This is necessary because objects or camera may have moved.
|
||||||
// while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecesary motion events every frame
|
// while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecessary motion events every frame
|
||||||
bool has_mouse_motion = false;
|
bool has_mouse_motion = false;
|
||||||
for (List<Ref<InputEvent> >::Element *E = physics_picking_events.front(); E; E = E->next()) {
|
for (List<Ref<InputEvent> >::Element *E = physics_picking_events.front(); E; E = E->next()) {
|
||||||
Ref<InputEventMouseMotion> mm = E->get();
|
Ref<InputEventMouseMotion> mm = E->get();
|
||||||
|
|
|
@ -190,10 +190,10 @@ void SurfaceTool::add_smooth_group(bool p_smooth) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {
|
void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {
|
||||||
ERR_FAIL_COND(!begun);
|
ERR_FAIL_COND(!begun);
|
||||||
ERR_FAIL_COND(primitive != Mesh::PRIMITIVE_TRIANGLES);
|
ERR_FAIL_COND(primitive != Mesh::PRIMITIVE_TRIANGLES);
|
||||||
ERR_FAIL_COND(p_vertexes.size() < 3);
|
ERR_FAIL_COND(p_vertices.size() < 3);
|
||||||
|
|
||||||
#define ADD_POINT(n) \
|
#define ADD_POINT(n) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -207,10 +207,10 @@ void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vect
|
||||||
add_normal(p_normals[n]); \
|
add_normal(p_normals[n]); \
|
||||||
if (p_tangents.size() > n) \
|
if (p_tangents.size() > n) \
|
||||||
add_tangent(p_tangents[n]); \
|
add_tangent(p_tangents[n]); \
|
||||||
add_vertex(p_vertexes[n]); \
|
add_vertex(p_vertices[n]); \
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < p_vertexes.size() - 2; i++) {
|
for (int i = 0; i < p_vertices.size() - 2; i++) {
|
||||||
ADD_POINT(0);
|
ADD_POINT(0);
|
||||||
ADD_POINT(i + 1);
|
ADD_POINT(i + 1);
|
||||||
ADD_POINT(i + 2);
|
ADD_POINT(i + 2);
|
||||||
|
@ -1012,7 +1012,7 @@ void SurfaceTool::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("add_weights", "weights"), &SurfaceTool::add_weights);
|
ClassDB::bind_method(D_METHOD("add_weights", "weights"), &SurfaceTool::add_weights);
|
||||||
ClassDB::bind_method(D_METHOD("add_smooth_group", "smooth"), &SurfaceTool::add_smooth_group);
|
ClassDB::bind_method(D_METHOD("add_smooth_group", "smooth"), &SurfaceTool::add_smooth_group);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertexes", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
|
ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertices", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("add_index", "index"), &SurfaceTool::add_index);
|
ClassDB::bind_method(D_METHOD("add_index", "index"), &SurfaceTool::add_index);
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
void add_weights(const Vector<float> &p_weights);
|
void add_weights(const Vector<float> &p_weights);
|
||||||
void add_smooth_group(bool p_smooth);
|
void add_smooth_group(bool p_smooth);
|
||||||
|
|
||||||
void add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vector<Vector2> &p_uvs = Vector<Vector2>(), const Vector<Color> &p_colors = Vector<Color>(), const Vector<Vector2> &p_uv2s = Vector<Vector2>(), const Vector<Vector3> &p_normals = Vector<Vector3>(), const Vector<Plane> &p_tangents = Vector<Plane>());
|
void add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs = Vector<Vector2>(), const Vector<Color> &p_colors = Vector<Color>(), const Vector<Vector2> &p_uv2s = Vector<Vector2>(), const Vector<Vector3> &p_normals = Vector<Vector3>(), const Vector<Plane> &p_tangents = Vector<Plane>());
|
||||||
|
|
||||||
void add_index(int p_index);
|
void add_index(int p_index);
|
||||||
|
|
||||||
|
|
|
@ -569,7 +569,7 @@ bool VisualShader::_set(const StringName &p_name, const Variant &p_value) {
|
||||||
String mode = name.get_slicec('/', 1);
|
String mode = name.get_slicec('/', 1);
|
||||||
int value = p_value;
|
int value = p_value;
|
||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
modes.erase(mode); //means its default anyway, so dont store it
|
modes.erase(mode); //means it's default anyway, so don't store it
|
||||||
} else {
|
} else {
|
||||||
modes[mode] = value;
|
modes[mode] = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -977,7 +977,7 @@ void AudioServer::update() {
|
||||||
uint64_t driver_time = AudioDriver::get_singleton()->get_profiling_time();
|
uint64_t driver_time = AudioDriver::get_singleton()->get_profiling_time();
|
||||||
uint64_t server_time = prof_time;
|
uint64_t server_time = prof_time;
|
||||||
|
|
||||||
// Substract the server time from the driver time
|
// Subtract the server time from the driver time
|
||||||
if (driver_time > server_time)
|
if (driver_time > server_time)
|
||||||
driver_time -= server_time;
|
driver_time -= server_time;
|
||||||
|
|
||||||
|
@ -995,7 +995,7 @@ void AudioServer::update() {
|
||||||
values.push_back(String(bus->name) + bus->effects[j].effect->get_name());
|
values.push_back(String(bus->name) + bus->effects[j].effect->get_name());
|
||||||
values.push_back(USEC_TO_SEC(bus->effects[j].prof_time));
|
values.push_back(USEC_TO_SEC(bus->effects[j].prof_time));
|
||||||
|
|
||||||
// Substract the effect time from the driver and server times
|
// Subtract the effect time from the driver and server times
|
||||||
if (driver_time > bus->effects[j].prof_time)
|
if (driver_time > bus->effects[j].prof_time)
|
||||||
driver_time -= bus->effects[j].prof_time;
|
driver_time -= bus->effects[j].prof_time;
|
||||||
if (server_time > bus->effects[j].prof_time)
|
if (server_time > bus->effects[j].prof_time)
|
||||||
|
|
|
@ -1337,7 +1337,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a, const T
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//edge-vertex( hsell)
|
//edge-vertex (shell)
|
||||||
|
|
||||||
for (int i = 0; i < edge_count_A; i++) {
|
for (int i = 0; i < edge_count_A; i++) {
|
||||||
|
|
||||||
|
@ -1438,7 +1438,7 @@ static void _collision_convex_polygon_face(const ShapeSW *p_a, const Transform &
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//edge-vertex( hsell)
|
//edge-vertex (shell)
|
||||||
|
|
||||||
for (int i = 0; i < edge_count; i++) {
|
for (int i = 0; i < edge_count; i++) {
|
||||||
|
|
||||||
|
|
|
@ -646,7 +646,7 @@ private:
|
||||||
const DataType args[MAX_ARGS];
|
const DataType args[MAX_ARGS];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BuiltinFuncOutArgs { //arguments used as out in built in funcions
|
struct BuiltinFuncOutArgs { //arguments used as out in built in functions
|
||||||
const char *name;
|
const char *name;
|
||||||
int argument;
|
int argument;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue