Fix typos with codespell
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
This commit is contained in:
parent
42b6602f1d
commit
4219a4cb6f
|
@ -144,7 +144,7 @@ jobs:
|
||||||
scons --version
|
scons --version
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||||
# [Workaround] SwiftShader doesn't support tesselation, so we skip Godot check about it
|
# [Workaround] SwiftShader doesn't support tessellation, so we skip Godot check about it
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||||
|
|
|
@ -7,7 +7,7 @@ support of generous donors.
|
||||||
The ways to donate to the project, as well as details on how the funds are
|
The ways to donate to the project, as well as details on how the funds are
|
||||||
used, are described on [Godot's website](https://godotengine.org/donate).
|
used, are described on [Godot's website](https://godotengine.org/donate).
|
||||||
|
|
||||||
The following is a list of the current monthly donors, to be have their
|
The following is a list of the current monthly donors, who will have their
|
||||||
generous deed immortalized in the next stable release of Godot Engine.
|
generous deed immortalized in the next stable release of Godot Engine.
|
||||||
|
|
||||||
## Platinum sponsors
|
## Platinum sponsors
|
||||||
|
|
|
@ -166,7 +166,7 @@ void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent
|
||||||
ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object.");
|
ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object.");
|
||||||
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
|
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
|
||||||
if (_find_event(input_map[p_action], p_event, true)) {
|
if (_find_event(input_map[p_action], p_event, true)) {
|
||||||
return; // Already addded.
|
return; // Already added.
|
||||||
}
|
}
|
||||||
|
|
||||||
input_map[p_action].inputs.push_back(p_event);
|
input_map[p_action].inputs.push_back(p_event);
|
||||||
|
|
|
@ -843,7 +843,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
|
||||||
if (property_id == UINT16_MAX && p_from->get_script_instance()) {
|
if (property_id == UINT16_MAX && p_from->get_script_instance()) {
|
||||||
property_id = p_from->get_script_instance()->get_rset_property_id(p_name);
|
property_id = p_from->get_script_instance()->get_rset_property_id(p_name);
|
||||||
}
|
}
|
||||||
ERR_FAIL_COND_MSG(property_id == UINT16_MAX, "Unable to take the `property_id` for the property:" + p_name + ". this can happen only if this property is not marked as `remote`.");
|
ERR_FAIL_COND_MSG(property_id == UINT16_MAX, "Unable to take the `property_id` for the property:" + p_name + ". This can only happen if this property is not marked as `remote`.");
|
||||||
|
|
||||||
if (property_id <= UINT8_MAX) {
|
if (property_id <= UINT8_MAX) {
|
||||||
// The ID fits in 1 byte
|
// The ID fits in 1 byte
|
||||||
|
|
|
@ -1345,7 +1345,7 @@ void Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
|
||||||
if (!s) {
|
if (!s) {
|
||||||
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal) ||
|
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal) ||
|
||||||
(!script.is_null() && Ref<Script>(script)->has_script_signal(p_signal));
|
(!script.is_null() && Ref<Script>(script)->has_script_signal(p_signal));
|
||||||
ERR_FAIL_COND_MSG(signal_is_valid, "Attempt to disconnect a nonexistent connection from '" + to_string() + "'. signal: '" + p_signal + "', callable: '" + p_callable + "'.");
|
ERR_FAIL_COND_MSG(signal_is_valid, "Attempt to disconnect a nonexistent connection from '" + to_string() + "'. Signal: '" + p_signal + "', callable: '" + p_callable + "'.");
|
||||||
}
|
}
|
||||||
ERR_FAIL_COND_MSG(!s, vformat("Disconnecting nonexistent signal '%s' in %s.", p_signal, to_string()));
|
ERR_FAIL_COND_MSG(!s, vformat("Disconnecting nonexistent signal '%s' in %s.", p_signal, to_string()));
|
||||||
|
|
||||||
|
|
|
@ -333,14 +333,14 @@
|
||||||
[gdscript]
|
[gdscript]
|
||||||
# Will evaluate to `true`.
|
# Will evaluate to `true`.
|
||||||
if 2 in [2, 4, 6, 8]:
|
if 2 in [2, 4, 6, 8]:
|
||||||
print("Containes!")
|
print("Contains!")
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
// As there is no "in" keyword in C#, you have to use Contains
|
// As there is no "in" keyword in C#, you have to use Contains
|
||||||
var array = new Godot.Collections.Array{2, 4, 6, 8};
|
var array = new Godot.Collections.Array{2, 4, 6, 8};
|
||||||
if (array.Contains(2))
|
if (array.Contains(2))
|
||||||
{
|
{
|
||||||
GD.Print("Containes!");
|
GD.Print("Contains!");
|
||||||
}
|
}
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
The position offset the character will be drawn with (in pixels).
|
The position offset the character will be drawn with (in pixels).
|
||||||
</member>
|
</member>
|
||||||
<member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false">
|
<member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false">
|
||||||
If [code]ture[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
|
If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
|
||||||
</member>
|
</member>
|
||||||
<member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )">
|
<member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )">
|
||||||
Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.
|
Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
mdt.create_from_surface(mesh, 0)
|
mdt.create_from_surface(mesh, 0)
|
||||||
for i in range(mdt.get_vertex_count()):
|
for i in range(mdt.get_vertex_count()):
|
||||||
var vertex = mdt.get_vertex(i)
|
var vertex = mdt.get_vertex(i)
|
||||||
# In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
|
# In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
|
||||||
vertex += mdt.get_vertex_normal(i)
|
vertex += mdt.get_vertex_normal(i)
|
||||||
# Save your change.
|
# Save your change.
|
||||||
mdt.set_vertex(i, vertex)
|
mdt.set_vertex(i, vertex)
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
for (var i = 0; i < mdt.GetVertexCount(); i++)
|
for (var i = 0; i < mdt.GetVertexCount(); i++)
|
||||||
{
|
{
|
||||||
Vector3 vertex = mdt.GetVertex(i);
|
Vector3 vertex = mdt.GetVertex(i);
|
||||||
// In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
|
// In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
|
||||||
vertex += mdt.GetVertexNormal(i);
|
vertex += mdt.GetVertexNormal(i);
|
||||||
// Save your change.
|
// Save your change.
|
||||||
mdt.SetVertex(i, vertex);
|
mdt.SetVertex(i, vertex);
|
||||||
|
|
|
@ -357,7 +357,7 @@
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Returns the current UNIX epoch timestamp in seconds.
|
Returns the current UNIX epoch timestamp in seconds.
|
||||||
[b]Important:[/b] This is the system clock that the user can manully set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
|
[b]Important:[/b] This is the system clock that the user can manually set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_unix_time_from_datetime" qualifiers="const">
|
<method name="get_unix_time_from_datetime" qualifiers="const">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<description>
|
<description>
|
||||||
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
|
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
|
||||||
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
|
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
|
||||||
[b]Feature tags:[/b] Project settings can be overriden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
|
[b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
|
||||||
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
|
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
|
|
|
@ -529,7 +529,7 @@ Error VulkanContext::_check_capabilities() {
|
||||||
|
|
||||||
device_features_func(gpu, &device_features);
|
device_features_func(gpu, &device_features);
|
||||||
multiview_capabilities.is_supported = multiview_features.multiview;
|
multiview_capabilities.is_supported = multiview_features.multiview;
|
||||||
// For now we ignore if multiview is available in geometry and tesselation as we do not currently support those
|
// For now we ignore if multiview is available in geometry and tessellation as we do not currently support those
|
||||||
}
|
}
|
||||||
|
|
||||||
// check extended properties
|
// check extended properties
|
||||||
|
|
|
@ -63,7 +63,7 @@ static const char *_joy_axis_descriptions[JOY_AXIS_MAX * 2] = {
|
||||||
String InputEventConfigurationDialog::get_event_text(const Ref<InputEvent> &p_event) {
|
String InputEventConfigurationDialog::get_event_text(const Ref<InputEvent> &p_event) {
|
||||||
ERR_FAIL_COND_V_MSG(p_event.is_null(), String(), "Provided event is not a valid instance of InputEvent");
|
ERR_FAIL_COND_V_MSG(p_event.is_null(), String(), "Provided event is not a valid instance of InputEvent");
|
||||||
|
|
||||||
// Joypad motion events will display slighlty differently than what the event->as_text() provides. See #43660.
|
// Joypad motion events will display slightly differently than what the event->as_text() provides. See #43660.
|
||||||
Ref<InputEventJoypadMotion> jpmotion = p_event;
|
Ref<InputEventJoypadMotion> jpmotion = p_event;
|
||||||
if (jpmotion.is_valid()) {
|
if (jpmotion.is_valid()) {
|
||||||
String desc = TTR("Unknown Joypad Axis");
|
String desc = TTR("Unknown Joypad Axis");
|
||||||
|
@ -731,7 +731,7 @@ void ActionMapEditor::_add_action_pressed() {
|
||||||
|
|
||||||
void ActionMapEditor::_add_action(const String &p_name) {
|
void ActionMapEditor::_add_action(const String &p_name) {
|
||||||
if (p_name == "" || !_is_action_name_valid(p_name)) {
|
if (p_name == "" || !_is_action_name_valid(p_name)) {
|
||||||
show_message(TTR("Invalid action name. it cannot be.is_empty()() nor contain '/', ':', '=', '\\' or '\"'"));
|
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ void ActionMapEditor::_action_edited() {
|
||||||
|
|
||||||
if (new_name == "" || !_is_action_name_valid(new_name)) {
|
if (new_name == "" || !_is_action_name_valid(new_name)) {
|
||||||
ti->set_text(0, old_name);
|
ti->set_text(0, old_name);
|
||||||
show_message(TTR("Invalid action name. it cannot be.is_empty()() nor contain '/', ':', '=', '\\' or '\"'"));
|
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ public:
|
||||||
EditorPlugin *get_editor_plugin(int p_idx);
|
EditorPlugin *get_editor_plugin(int p_idx);
|
||||||
|
|
||||||
UndoRedo &get_undo_redo();
|
UndoRedo &get_undo_redo();
|
||||||
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks shoud have 4 args: (Object* undo_redo, Object *modified_object, String property, Varian new_value)
|
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have 4 args: (Object* undo_redo, Object *modified_object, String property, Variant new_value)
|
||||||
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
|
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
|
||||||
const Vector<Callable> get_undo_redo_inspector_hook_callback();
|
const Vector<Callable> get_undo_redo_inspector_hook_callback();
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ EditorLog::EditorLog() {
|
||||||
collapse_button = memnew(Button);
|
collapse_button = memnew(Button);
|
||||||
collapse_button->set_flat(true);
|
collapse_button->set_flat(true);
|
||||||
collapse_button->set_focus_mode(FOCUS_NONE);
|
collapse_button->set_focus_mode(FOCUS_NONE);
|
||||||
collapse_button->set_tooltip(TTR("Collapse duplicate messages into one log entry. Shows number of occurences."));
|
collapse_button->set_tooltip(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
|
||||||
collapse_button->set_toggle_mode(true);
|
collapse_button->set_toggle_mode(true);
|
||||||
collapse_button->set_pressed(false);
|
collapse_button->set_pressed(false);
|
||||||
collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
|
collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
|
||||||
|
|
|
@ -5291,7 +5291,7 @@ void EditorNode::_file_access_close_error_notify(const String &p_str) {
|
||||||
|
|
||||||
void EditorNode::reload_scene(const String &p_path) {
|
void EditorNode::reload_scene(const String &p_path) {
|
||||||
/*
|
/*
|
||||||
* No longer necesary since scenes now reset and reload their internal resource if needed.
|
* No longer necessary since scenes now reset and reload their internal resource if needed.
|
||||||
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
|
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
|
||||||
|
|
||||||
List<Ref<Resource>> cached;
|
List<Ref<Resource>> cached;
|
||||||
|
|
|
@ -339,7 +339,7 @@ void SceneImportSettings::_update_scene() {
|
||||||
material_tree->clear();
|
material_tree->clear();
|
||||||
mesh_tree->clear();
|
mesh_tree->clear();
|
||||||
|
|
||||||
//hiden roots
|
//hidden roots
|
||||||
material_tree->create_item();
|
material_tree->create_item();
|
||||||
mesh_tree->create_item();
|
mesh_tree->create_item();
|
||||||
|
|
||||||
|
|
|
@ -2147,7 +2147,7 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c
|
||||||
|
|
||||||
Map<int, int> terrain_count;
|
Map<int, int> terrain_count;
|
||||||
|
|
||||||
// Count the number of occurences per terrain.
|
// Count the number of occurrences per terrain.
|
||||||
Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits();
|
Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits();
|
||||||
for (Map<Vector2i, TileSet::CellNeighbor>::Element *E_overlapping = overlapping_terrain_bits.front(); E_overlapping; E_overlapping = E_overlapping->next()) {
|
for (Map<Vector2i, TileSet::CellNeighbor>::Element *E_overlapping = overlapping_terrain_bits.front(); E_overlapping; E_overlapping = E_overlapping->next()) {
|
||||||
if (!p_to_replace.has(E_overlapping->key())) {
|
if (!p_to_replace.has(E_overlapping->key())) {
|
||||||
|
@ -2165,7 +2165,7 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the terrain with the max number of occurences.
|
// Get the terrain with the max number of occurrences.
|
||||||
int max = 0;
|
int max = 0;
|
||||||
int max_terrain = -1;
|
int max_terrain = -1;
|
||||||
for (Map<int, int>::Element *E_terrain_count = terrain_count.front(); E_terrain_count; E_terrain_count = E_terrain_count->next()) {
|
for (Map<int, int>::Element *E_terrain_count = terrain_count.front(); E_terrain_count; E_terrain_count = E_terrain_count->next()) {
|
||||||
|
@ -2231,7 +2231,7 @@ Map<Vector2i, TileMapEditorTerrainsPlugin::TerrainsTilePattern> TileMapEditorTer
|
||||||
per_cell_acceptable_tiles[E->get()] = _get_valid_terrains_tile_patterns_for_constraints(p_terrain_set, E->get(), constraints);
|
per_cell_acceptable_tiles[E->get()] = _get_valid_terrains_tile_patterns_for_constraints(p_terrain_set, E->get(), constraints);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ouput map.
|
// Output map.
|
||||||
Map<Vector2i, TerrainsTilePattern> output;
|
Map<Vector2i, TerrainsTilePattern> output;
|
||||||
|
|
||||||
// Add all positions to a set.
|
// Add all positions to a set.
|
||||||
|
@ -2450,7 +2450,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map
|
||||||
output[E->key()] = _get_random_tile_from_pattern(p_terrain_set, E->get());
|
output[E->key()] = _get_random_tile_from_pattern(p_terrain_set, E->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override the WFC results to make sure at least the painted tiles are acutally painted.
|
// Override the WFC results to make sure at least the painted tiles are actually painted.
|
||||||
for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) {
|
for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) {
|
||||||
output[E_to_paint->key()] = _get_random_tile_from_pattern(p_terrain_set, E_to_paint->get());
|
output[E_to_paint->key()] = _get_random_tile_from_pattern(p_terrain_set, E_to_paint->get());
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
|
||||||
tile_set_atlas_source_editor->init_source();
|
tile_set_atlas_source_editor->init_source();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the selected source (thus trigerring an update).
|
// Update the selected source (thus triggering an update).
|
||||||
_update_atlas_sources_list(source_id);
|
_update_atlas_sources_list(source_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2427,7 +2427,7 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) {
|
||||||
for (Set<int>::Element *E = current_set.front(); E; E = E->next()) {
|
for (Set<int>::Element *E = current_set.front(); E; E = E->next()) {
|
||||||
int node_id = E->get();
|
int node_id = E->get();
|
||||||
Ref<VisualShaderNode> node = visual_shader->get_node(type_id, node_id);
|
Ref<VisualShaderNode> node = visual_shader->get_node(type_id, node_id);
|
||||||
bool catched = false;
|
bool caught = false;
|
||||||
Variant var;
|
Variant var;
|
||||||
|
|
||||||
// float
|
// float
|
||||||
|
@ -2436,112 +2436,112 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) {
|
||||||
if (float_const.is_valid()) {
|
if (float_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeFloatConstant", "VisualShaderNodeFloatUniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeFloatConstant", "VisualShaderNodeFloatUniform");
|
||||||
var = float_const->get_constant();
|
var = float_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeFloatUniform> float_uniform = Object::cast_to<VisualShaderNodeFloatUniform>(node.ptr());
|
Ref<VisualShaderNodeFloatUniform> float_uniform = Object::cast_to<VisualShaderNodeFloatUniform>(node.ptr());
|
||||||
if (float_uniform.is_valid()) {
|
if (float_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeFloatUniform", "VisualShaderNodeFloatConstant");
|
_replace_node(type_id, node_id, "VisualShaderNodeFloatUniform", "VisualShaderNodeFloatConstant");
|
||||||
var = float_uniform->get_default_value();
|
var = float_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// int
|
// int
|
||||||
if (!catched) {
|
if (!caught) {
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
Ref<VisualShaderNodeIntConstant> int_const = Object::cast_to<VisualShaderNodeIntConstant>(node.ptr());
|
Ref<VisualShaderNodeIntConstant> int_const = Object::cast_to<VisualShaderNodeIntConstant>(node.ptr());
|
||||||
if (int_const.is_valid()) {
|
if (int_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeIntConstant", "VisualShaderNodeIntUniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeIntConstant", "VisualShaderNodeIntUniform");
|
||||||
var = int_const->get_constant();
|
var = int_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeIntUniform> int_uniform = Object::cast_to<VisualShaderNodeIntUniform>(node.ptr());
|
Ref<VisualShaderNodeIntUniform> int_uniform = Object::cast_to<VisualShaderNodeIntUniform>(node.ptr());
|
||||||
if (int_uniform.is_valid()) {
|
if (int_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeIntUniform", "VisualShaderNodeIntConstant");
|
_replace_node(type_id, node_id, "VisualShaderNodeIntUniform", "VisualShaderNodeIntConstant");
|
||||||
var = int_uniform->get_default_value();
|
var = int_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// boolean
|
// boolean
|
||||||
if (!catched) {
|
if (!caught) {
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
Ref<VisualShaderNodeBooleanConstant> boolean_const = Object::cast_to<VisualShaderNodeBooleanConstant>(node.ptr());
|
Ref<VisualShaderNodeBooleanConstant> boolean_const = Object::cast_to<VisualShaderNodeBooleanConstant>(node.ptr());
|
||||||
if (boolean_const.is_valid()) {
|
if (boolean_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeBooleanConstant", "VisualShaderNodeBooleanUniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeBooleanConstant", "VisualShaderNodeBooleanUniform");
|
||||||
var = boolean_const->get_constant();
|
var = boolean_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeBooleanUniform> boolean_uniform = Object::cast_to<VisualShaderNodeBooleanUniform>(node.ptr());
|
Ref<VisualShaderNodeBooleanUniform> boolean_uniform = Object::cast_to<VisualShaderNodeBooleanUniform>(node.ptr());
|
||||||
if (boolean_uniform.is_valid()) {
|
if (boolean_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeBooleanUniform", "VisualShaderNodeBooleanConstant");
|
_replace_node(type_id, node_id, "VisualShaderNodeBooleanUniform", "VisualShaderNodeBooleanConstant");
|
||||||
var = boolean_uniform->get_default_value();
|
var = boolean_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// vec3
|
// vec3
|
||||||
if (!catched) {
|
if (!caught) {
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
Ref<VisualShaderNodeVec3Constant> vec3_const = Object::cast_to<VisualShaderNodeVec3Constant>(node.ptr());
|
Ref<VisualShaderNodeVec3Constant> vec3_const = Object::cast_to<VisualShaderNodeVec3Constant>(node.ptr());
|
||||||
if (vec3_const.is_valid()) {
|
if (vec3_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeVec3Constant", "VisualShaderNodeVec3Uniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeVec3Constant", "VisualShaderNodeVec3Uniform");
|
||||||
var = vec3_const->get_constant();
|
var = vec3_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeVec3Uniform> vec3_uniform = Object::cast_to<VisualShaderNodeVec3Uniform>(node.ptr());
|
Ref<VisualShaderNodeVec3Uniform> vec3_uniform = Object::cast_to<VisualShaderNodeVec3Uniform>(node.ptr());
|
||||||
if (vec3_uniform.is_valid()) {
|
if (vec3_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeVec3Uniform", "VisualShaderNodeVec3Constant");
|
_replace_node(type_id, node_id, "VisualShaderNodeVec3Uniform", "VisualShaderNodeVec3Constant");
|
||||||
var = vec3_uniform->get_default_value();
|
var = vec3_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// color
|
// color
|
||||||
if (!catched) {
|
if (!caught) {
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
Ref<VisualShaderNodeColorConstant> color_const = Object::cast_to<VisualShaderNodeColorConstant>(node.ptr());
|
Ref<VisualShaderNodeColorConstant> color_const = Object::cast_to<VisualShaderNodeColorConstant>(node.ptr());
|
||||||
if (color_const.is_valid()) {
|
if (color_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeColorConstant", "VisualShaderNodeColorUniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeColorConstant", "VisualShaderNodeColorUniform");
|
||||||
var = color_const->get_constant();
|
var = color_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeColorUniform> color_uniform = Object::cast_to<VisualShaderNodeColorUniform>(node.ptr());
|
Ref<VisualShaderNodeColorUniform> color_uniform = Object::cast_to<VisualShaderNodeColorUniform>(node.ptr());
|
||||||
if (color_uniform.is_valid()) {
|
if (color_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeColorUniform", "VisualShaderNodeColorConstant");
|
_replace_node(type_id, node_id, "VisualShaderNodeColorUniform", "VisualShaderNodeColorConstant");
|
||||||
var = color_uniform->get_default_value();
|
var = color_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// transform
|
// transform
|
||||||
if (!catched) {
|
if (!caught) {
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
Ref<VisualShaderNodeTransformConstant> transform_const = Object::cast_to<VisualShaderNodeTransformConstant>(node.ptr());
|
Ref<VisualShaderNodeTransformConstant> transform_const = Object::cast_to<VisualShaderNodeTransformConstant>(node.ptr());
|
||||||
if (transform_const.is_valid()) {
|
if (transform_const.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeTransformConstant", "VisualShaderNodeTransformUniform");
|
_replace_node(type_id, node_id, "VisualShaderNodeTransformConstant", "VisualShaderNodeTransformUniform");
|
||||||
var = transform_const->get_constant();
|
var = transform_const->get_constant();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ref<VisualShaderNodeTransformUniform> transform_uniform = Object::cast_to<VisualShaderNodeTransformUniform>(node.ptr());
|
Ref<VisualShaderNodeTransformUniform> transform_uniform = Object::cast_to<VisualShaderNodeTransformUniform>(node.ptr());
|
||||||
if (transform_uniform.is_valid()) {
|
if (transform_uniform.is_valid()) {
|
||||||
_replace_node(type_id, node_id, "VisualShaderNodeTransformUniform", "VisualShaderNodeTransformConstant");
|
_replace_node(type_id, node_id, "VisualShaderNodeTransformUniform", "VisualShaderNodeTransformConstant");
|
||||||
var = transform_uniform->get_default_value();
|
var = transform_uniform->get_default_value();
|
||||||
catched = true;
|
caught = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ERR_CONTINUE(!catched);
|
ERR_CONTINUE(!caught);
|
||||||
int preview_port = node->get_output_port_for_preview();
|
int preview_port = node->get_output_port_for_preview();
|
||||||
|
|
||||||
if (!p_vice_versa) {
|
if (!p_vice_versa) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// This service worker is required to expose an exported Godot project as a
|
// This service worker is required to expose an exported Godot project as a
|
||||||
// Progressive Web App. It provides an offline fallback page telling the user
|
// Progressive Web App. It provides an offline fallback page telling the user
|
||||||
// that they need an Internet conneciton to run the project if desired.
|
// that they need an Internet connection to run the project if desired.
|
||||||
// Incrementing CACHE_VERSION will kick off the install event and force
|
// Incrementing CACHE_VERSION will kick off the install event and force
|
||||||
// previously cached resources to be updated from the network.
|
// previously cached resources to be updated from the network.
|
||||||
const CACHE_VERSION = "@GODOT_VERSION@";
|
const CACHE_VERSION = "@GODOT_VERSION@";
|
||||||
|
|
|
@ -53,11 +53,11 @@ if file_contents.find("ObjectDB instances leaked at exit") != -1:
|
||||||
# execution of project
|
# execution of project
|
||||||
|
|
||||||
if file_contents.find("Assertion failed") != -1:
|
if file_contents.find("Assertion failed") != -1:
|
||||||
print("ERROR: Assertion failed in project, check exectution log for more info")
|
print("ERROR: Assertion failed in project, check execution log for more info")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# For now Godot leaks a lot of rendering stuff so for now we just show info
|
# For now Godot leaks a lot of rendering stuff so for now we just show info
|
||||||
# about it and this needs to be reenabled after fixing this memory leaks.
|
# about it and this needs to be re-enabled after fixing this memory leaks.
|
||||||
|
|
||||||
if file_contents.find("were leaked") != -1 or file_contents.find("were never freed") != -1:
|
if file_contents.find("were leaked") != -1 or file_contents.find("were never freed") != -1:
|
||||||
print("WARNING: Memory leak was found")
|
print("WARNING: Memory leak was found")
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds.
|
Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds.
|
||||||
The [code]timeout_limit[/code] is a factor that, multiplied by a value based on the avarage round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [code]timeout_min[/code]. The [code]timeout_max[/code] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
|
The [code]timeout_limit[/code] is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [code]timeout_min[/code]. The [code]timeout_max[/code] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
|
|
@ -15,7 +15,7 @@ functionality. If anything we should give this parser back to assimp at some poi
|
||||||
|
|
||||||
# Updating assimp fbx parser
|
# Updating assimp fbx parser
|
||||||
|
|
||||||
Don't. it's not possible the code is rewritten in many areas to remove thirdparty deps and various bugs are fixed.
|
Don't. It's not possible the code is rewritten in many areas to remove thirdparty deps and various bugs are fixed.
|
||||||
|
|
||||||
Many days were put into rewriting the parser to use safe code and safe memory accessors.
|
Many days were put into rewriting the parser to use safe code and safe memory accessors.
|
||||||
|
|
||||||
|
|
|
@ -945,7 +945,7 @@ void FBXMeshData::triangulate_polygon(SurfaceData *surface, const Vector<int> &p
|
||||||
for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) {
|
for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) {
|
||||||
TPPLPoly &tp = I->get();
|
TPPLPoly &tp = I->get();
|
||||||
|
|
||||||
ERR_FAIL_COND_MSG(tp.GetNumPoints() != 3, "The triangulator retuned more points, how this is possible?");
|
ERR_FAIL_COND_MSG(tp.GetNumPoints() != 3, "The triangulator returned more points, how this is possible?");
|
||||||
// Find Index
|
// Find Index
|
||||||
for (int i = 2; i >= 0; i -= 1) {
|
for (int i = 2; i >= 0; i -= 1) {
|
||||||
const Vector2 vertex = tp.GetPoint(i);
|
const Vector2 vertex = tp.GetPoint(i);
|
||||||
|
|
|
@ -156,7 +156,7 @@ private:
|
||||||
/// [0, 2, 1, 3, 4]
|
/// [0, 2, 1, 3, 4]
|
||||||
/// The negative values are computed using this formula: `(-value) - 1`
|
/// The negative values are computed using this formula: `(-value) - 1`
|
||||||
///
|
///
|
||||||
/// Returns the vertex index from the poligon vertex.
|
/// Returns the vertex index from the polygon vertex.
|
||||||
/// Returns -1 if `p_index` is invalid.
|
/// Returns -1 if `p_index` is invalid.
|
||||||
int get_vertex_from_polygon_vertex(const std::vector<int> &p_face_indices, int p_index) const;
|
int get_vertex_from_polygon_vertex(const std::vector<int> &p_face_indices, int p_index) const;
|
||||||
|
|
||||||
|
|
|
@ -1056,7 +1056,7 @@ Node3D *EditorSceneImporterFBX::_generate_scene(
|
||||||
//print_verbose("[doc] node animation path: " + node_path);
|
//print_verbose("[doc] node animation path: " + node_path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// note: this could actually be unsafe this means we should be careful about continuing here, if we see bizzare effects later we should disable this.
|
// note: this could actually be unsafe this means we should be careful about continuing here, if we see bizarre effects later we should disable this.
|
||||||
// I am not sure if this is unsafe or not, testing will tell us this.
|
// I am not sure if this is unsafe or not, testing will tell us this.
|
||||||
print_error("[doc] invalid fbx target detected for this track");
|
print_error("[doc] invalid fbx target detected for this track");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -487,7 +487,7 @@ const std::vector<const AnimationStack *> &Document::AnimationStacks() const {
|
||||||
const AnimationStack *stack = lazy->Get<AnimationStack>();
|
const AnimationStack *stack = lazy->Get<AnimationStack>();
|
||||||
ERR_CONTINUE_MSG(!stack, "invalid ptr to AnimationStack - conversion failure");
|
ERR_CONTINUE_MSG(!stack, "invalid ptr to AnimationStack - conversion failure");
|
||||||
|
|
||||||
// We push back the weak reference :) to keep things simple, as ownership is on the parser side so it wont be cleaned up.
|
// We push back the weak reference :) to keep things simple, as ownership is on the parser side so it won't be cleaned up.
|
||||||
animationStacksResolved.push_back(stack);
|
animationStacksResolved.push_back(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -699,7 +699,7 @@ private:
|
||||||
typedef std::vector<int64_t> KeyTimeList;
|
typedef std::vector<int64_t> KeyTimeList;
|
||||||
typedef std::vector<float> KeyValueList;
|
typedef std::vector<float> KeyValueList;
|
||||||
|
|
||||||
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefor) */
|
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefore) */
|
||||||
class AnimationCurve : public Object {
|
class AnimationCurve : public Object {
|
||||||
public:
|
public:
|
||||||
AnimationCurve(uint64_t id, const ElementPtr element, const std::string &name, const Document &doc);
|
AnimationCurve(uint64_t id, const ElementPtr element, const std::string &name, const Document &doc);
|
||||||
|
|
|
@ -125,7 +125,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
|
||||||
|
|
||||||
ScopePtr sc = element->Compound();
|
ScopePtr sc = element->Compound();
|
||||||
ERR_FAIL_COND_MSG(sc == nullptr, "failed to read geometry, prevented crash");
|
ERR_FAIL_COND_MSG(sc == nullptr, "failed to read geometry, prevented crash");
|
||||||
ERR_FAIL_COND_MSG(!HasElement(sc, "Vertices"), "Detected mesh with no vertexes, didn't populate the mesh");
|
ERR_FAIL_COND_MSG(!HasElement(sc, "Vertices"), "Detected mesh with no vertices, didn't populate the mesh");
|
||||||
|
|
||||||
// must have Mesh elements:
|
// must have Mesh elements:
|
||||||
const ElementPtr Vertices = GetRequiredElement(sc, "Vertices", element);
|
const ElementPtr Vertices = GetRequiredElement(sc, "Vertices", element);
|
||||||
|
@ -140,7 +140,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
|
||||||
ParseVectorDataArray(m_vertices, Vertices);
|
ParseVectorDataArray(m_vertices, Vertices);
|
||||||
ParseVectorDataArray(m_face_indices, PolygonVertexIndex);
|
ParseVectorDataArray(m_face_indices, PolygonVertexIndex);
|
||||||
|
|
||||||
ERR_FAIL_COND_MSG(m_vertices.empty(), "mesh with no vertexes in FBX file, did you mean to delete it?");
|
ERR_FAIL_COND_MSG(m_vertices.empty(), "mesh with no vertices in FBX file, did you mean to delete it?");
|
||||||
ERR_FAIL_COND_MSG(m_face_indices.empty(), "mesh has no faces, was this intended?");
|
ERR_FAIL_COND_MSG(m_face_indices.empty(), "mesh has no faces, was this intended?");
|
||||||
|
|
||||||
// Retrieve layer elements, for all of the mesh
|
// Retrieve layer elements, for all of the mesh
|
||||||
|
@ -278,7 +278,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// As the algorithm above, this check is useless. Because the first
|
// As the algorithm above, this check is useless. Because the first
|
||||||
// ever vertex is always considered the begining of a polygon.
|
// ever vertex is always considered the beginning of a polygon.
|
||||||
ERR_FAIL_COND_MSG(found_it == false, "Was not possible to find the first vertex of this polygon. FBX file is corrupted.");
|
ERR_FAIL_COND_MSG(found_it == false, "Was not possible to find the first vertex of this polygon. FBX file is corrupted.");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -418,7 +418,7 @@ MeshGeometry::MappingData<T> MeshGeometry::resolve_vertex_data_array(
|
||||||
// parse data into array
|
// parse data into array
|
||||||
ParseVectorDataArray(tempData.data, GetRequiredElement(source, dataElementName));
|
ParseVectorDataArray(tempData.data, GetRequiredElement(source, dataElementName));
|
||||||
|
|
||||||
// index array wont always exist
|
// index array won't always exist
|
||||||
const ElementPtr element = GetOptionalElement(source, indexDataElementName);
|
const ElementPtr element = GetOptionalElement(source, indexDataElementName);
|
||||||
if (element) {
|
if (element) {
|
||||||
ParseVectorDataArray(tempData.index, element);
|
ParseVectorDataArray(tempData.index, element);
|
||||||
|
|
|
@ -122,7 +122,7 @@ typedef std::vector<int> MatIndexArray;
|
||||||
/// ## Map Type:
|
/// ## Map Type:
|
||||||
/// * None The mapping is undetermined.
|
/// * None The mapping is undetermined.
|
||||||
/// * ByVertex There will be one mapping coordinate for each surface control point/vertex (ControlPoint is a vertex).
|
/// * ByVertex There will be one mapping coordinate for each surface control point/vertex (ControlPoint is a vertex).
|
||||||
/// * If you have direct reference type verticies[x]
|
/// * If you have direct reference type vertices[x]
|
||||||
/// * If you have IndexToDirect reference type the UV
|
/// * If you have IndexToDirect reference type the UV
|
||||||
/// * ByPolygonVertex There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part. (Sorted by polygon, referencing vertex)
|
/// * ByPolygonVertex There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part. (Sorted by polygon, referencing vertex)
|
||||||
/// * ByPolygon There can be only one mapping coordinate for the whole polygon.
|
/// * ByPolygon There can be only one mapping coordinate for the whole polygon.
|
||||||
|
@ -186,7 +186,7 @@ public:
|
||||||
/// Returns -1 if the vertices doesn't form an edge. Vertex order, doesn't
|
/// Returns -1 if the vertices doesn't form an edge. Vertex order, doesn't
|
||||||
// matter.
|
// matter.
|
||||||
static int get_edge_id(const std::vector<Edge> &p_map, int p_vertex_a, int p_vertex_b);
|
static int get_edge_id(const std::vector<Edge> &p_map, int p_vertex_a, int p_vertex_b);
|
||||||
// Retuns the edge point bu that ID, or the edge with -1 vertices if the
|
// Returns the edge point bu that ID, or the edge with -1 vertices if the
|
||||||
// id is not valid.
|
// id is not valid.
|
||||||
static Edge get_edge(const std::vector<Edge> &p_map, int p_id);
|
static Edge get_edge(const std::vector<Edge> &p_map, int p_id);
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ Transform get_unscaled_transform(const Transform &p_initial, real_t p_scale) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 get_poly_normal(const std::vector<Vector3> &p_vertices) {
|
Vector3 get_poly_normal(const std::vector<Vector3> &p_vertices) {
|
||||||
ERR_FAIL_COND_V_MSG(p_vertices.size() < 3, Vector3(0, 0, 0), "At least 3 vertices are necesary");
|
ERR_FAIL_COND_V_MSG(p_vertices.size() < 3, Vector3(0, 0, 0), "At least 3 vertices are necessary");
|
||||||
// Using long double to make sure that normal is computed for even really tiny objects.
|
// Using long double to make sure that normal is computed for even really tiny objects.
|
||||||
typedef long double ldouble;
|
typedef long double ldouble;
|
||||||
ldouble x = 0.0;
|
ldouble x = 0.0;
|
||||||
|
|
|
@ -112,7 +112,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for trival cases
|
// Check for trivial cases
|
||||||
if (!begin_poly || !end_poly) {
|
if (!begin_poly || !end_poly) {
|
||||||
return Vector<Vector3>();
|
return Vector<Vector3>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,7 +481,7 @@ void GDScript::_update_doc() {
|
||||||
methods[i].return_val.class_name = _get_gdscript_reference_class_name(Object::cast_to<GDScript>(return_type.script_type));
|
methods[i].return_val.class_name = _get_gdscript_reference_class_name(Object::cast_to<GDScript>(return_type.script_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change class name if argumetn is script reference.
|
// Change class name if argument is script reference.
|
||||||
for (int j = 0; j < fn->get_argument_count(); j++) {
|
for (int j = 0; j < fn->get_argument_count(); j++) {
|
||||||
GDScriptDataType arg_type = fn->get_argument_type(j);
|
GDScriptDataType arg_type = fn->get_argument_type(j);
|
||||||
if (arg_type.kind == GDScriptDataType::GDSCRIPT) {
|
if (arg_type.kind == GDScriptDataType::GDSCRIPT) {
|
||||||
|
|
|
@ -397,7 +397,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
|
||||||
text += DADDR(1 + argc);
|
text += DADDR(1 + argc);
|
||||||
text += " = ";
|
text += " = ";
|
||||||
|
|
||||||
text += "<unkown type>(";
|
text += "<unknown type>(";
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
text += ", ";
|
text += ", ";
|
||||||
|
@ -688,7 +688,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
|
||||||
int argc = _code_ptr[ip + 1 + instr_var_args];
|
int argc = _code_ptr[ip + 1 + instr_var_args];
|
||||||
text += DADDR(1 + argc) + " = ";
|
text += DADDR(1 + argc) + " = ";
|
||||||
|
|
||||||
text += "<unkown function>";
|
text += "<unknown function>";
|
||||||
text += "(";
|
text += "(";
|
||||||
|
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
|
|
|
@ -1173,7 +1173,7 @@ GDScriptParser::EnumNode *GDScriptParser::parse_enum() {
|
||||||
consume(GDScriptTokenizer::Token::BRACE_CLOSE, R"(Expected closing "}" for enum.)");
|
consume(GDScriptTokenizer::Token::BRACE_CLOSE, R"(Expected closing "}" for enum.)");
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
// Enum values documentaion.
|
// Enum values documentation.
|
||||||
for (int i = 0; i < enum_node->values.size(); i++) {
|
for (int i = 0; i < enum_node->values.size(); i++) {
|
||||||
if (i == enum_node->values.size() - 1) {
|
if (i == enum_node->values.size() - 1) {
|
||||||
// If close bracket is same line as last value.
|
// If close bracket is same line as last value.
|
||||||
|
|
|
@ -1970,7 +1970,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (err.error != Callable::CallError::CALL_OK) {
|
if (err.error != Callable::CallError::CALL_OK) {
|
||||||
// TODO: Add this information in debug.
|
// TODO: Add this information in debug.
|
||||||
String methodstr = "<unkown function>";
|
String methodstr = "<unknown function>";
|
||||||
if (dst->get_type() == Variant::STRING) {
|
if (dst->get_type() == Variant::STRING) {
|
||||||
// Call provided error string.
|
// Call provided error string.
|
||||||
err_text = "Error calling GDScript utility function '" + methodstr + "': " + String(*dst);
|
err_text = "Error calling GDScript utility function '" + methodstr + "': " + String(*dst);
|
||||||
|
|
|
@ -368,7 +368,7 @@ Ref<Script> CSharpLanguage::get_template(const String &p_class_name, const Strin
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
// Replaces all spaces in p_class_name with underscores to prevent
|
// Replaces all spaces in p_class_name with underscores to prevent
|
||||||
// erronous C# Script templates from being generated when the object name
|
// invalid C# Script templates from being generated when the object name
|
||||||
// has spaces in it.
|
// has spaces in it.
|
||||||
String class_name_no_spaces = p_class_name.replace(" ", "_");
|
String class_name_no_spaces = p_class_name.replace(" ", "_");
|
||||||
String base_class_name = get_base_class_name(p_base_class_name, class_name_no_spaces);
|
String base_class_name = get_base_class_name(p_base_class_name, class_name_no_spaces);
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
Valid [code]options[/code] are:
|
Valid [code]options[/code] are:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
{
|
{
|
||||||
"negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. data_channel_received will not be called.
|
"negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. "data_channel_received" will not be called.
|
||||||
"id": 1, # When "negotiated" is true this value must also be set to the same value on both peer.
|
"id": 1, # When "negotiated" is true this value must also be set to the same value on both peer.
|
||||||
|
|
||||||
# Only one of maxRetransmits and maxPacketLifeTime can be specified, not both. They make the channel unreliable (but also better at real time).
|
# Only one of maxRetransmits and maxPacketLifeTime can be specified, not both. They make the channel unreliable (but also better at real time).
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
WebXR is an open standard that allows creating VR and AR applications that run in the web browser.
|
WebXR is an open standard that allows creating VR and AR applications that run in the web browser.
|
||||||
As such, this interface is only available when running in an HTML5 export.
|
As such, this interface is only available when running in an HTML5 export.
|
||||||
WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones).
|
WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones).
|
||||||
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to intialize than other AR/VR interfaces.
|
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to initialize than other AR/VR interfaces.
|
||||||
Here's the minimum code required to start an immersive VR session:
|
Here's the minimum code required to start an immersive VR session:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
|
@ -56,7 +56,7 @@ static NSMutableArray<ApplicationDelegateService *> *services = nil;
|
||||||
[services addObject:service];
|
[services addObject:service];
|
||||||
}
|
}
|
||||||
|
|
||||||
// UIApplicationDelegate documantation can be found here: https://developer.apple.com/documentation/uikit/uiapplicationdelegate
|
// UIApplicationDelegate documentation can be found here: https://developer.apple.com/documentation/uikit/uiapplicationdelegate
|
||||||
|
|
||||||
// MARK: Window
|
// MARK: Window
|
||||||
|
|
||||||
|
|
|
@ -536,7 +536,7 @@ bool DisplayServerJavaScript::screen_is_touchscreen(int p_screen) const {
|
||||||
return godot_js_display_touchscreen_is_available();
|
return godot_js_display_touchscreen_is_available();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Virtual Keybaord
|
// Virtual Keyboard
|
||||||
void DisplayServerJavaScript::vk_input_text_callback(const char *p_text, int p_cursor) {
|
void DisplayServerJavaScript::vk_input_text_callback(const char *p_text, int p_cursor) {
|
||||||
DisplayServerJavaScript *ds = DisplayServerJavaScript::get_singleton();
|
DisplayServerJavaScript *ds = DisplayServerJavaScript::get_singleton();
|
||||||
if (!ds || ds->input_text_callback.is_null()) {
|
if (!ds || ds->input_text_callback.is_null()) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ const GodotAudio = {
|
||||||
}
|
}
|
||||||
onstatechange(state);
|
onstatechange(state);
|
||||||
};
|
};
|
||||||
ctx.onstatechange(); // Immeditately notify state.
|
ctx.onstatechange(); // Immediately notify state.
|
||||||
// Update computed latency
|
// Update computed latency
|
||||||
GodotAudio.interval = setInterval(function () {
|
GodotAudio.interval = setInterval(function () {
|
||||||
let computed_latency = 0;
|
let computed_latency = 0;
|
||||||
|
|
|
@ -653,7 +653,7 @@ void GPUParticlesCollisionHeightField::_bind_methods() {
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents");
|
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096,8192"), "set_resolution", "get_resolution");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096,8192"), "set_resolution", "get_resolution");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "WhenMoved,Always"), "set_update_mode", "get_update_mode");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "WhenMoved,Always"), "set_update_mode", "get_update_mode");
|
||||||
ADD_GROUP("Folow Camera", "follow_camera_");
|
ADD_GROUP("Follow Camera", "follow_camera_");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_camera_enabled"), "set_follow_camera_mode", "is_follow_camera_mode_enabled");
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_camera_enabled"), "set_follow_camera_mode", "is_follow_camera_mode_enabled");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_camera_push_ratio", PROPERTY_HINT_RANGE, "0.01,1,0.01"), "set_follow_camera_push_ratio", "get_follow_camera_push_ratio");
|
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_camera_push_ratio", PROPERTY_HINT_RANGE, "0.01,1,0.01"), "set_follow_camera_push_ratio", "get_follow_camera_push_ratio");
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ void GraphNode::_resort() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stretch_avail += stretch_diff - sb->get_margin(SIDE_BOTTOM) - sb->get_margin(SIDE_TOP); //available stretch space.
|
stretch_avail += stretch_diff - sb->get_margin(SIDE_BOTTOM) - sb->get_margin(SIDE_TOP); //available stretch space.
|
||||||
/** Second, pass sucessively to discard elements that can't be stretched, this will run while stretchable
|
/** Second, pass successively to discard elements that can't be stretched, this will run while stretchable
|
||||||
elements exist */
|
elements exist */
|
||||||
|
|
||||||
while (stretch_ratio_total > 0) { // first of all, don't even be here if no stretchable objects exist
|
while (stretch_ratio_total > 0) { // first of all, don't even be here if no stretchable objects exist
|
||||||
|
|
|
@ -1414,7 +1414,7 @@ CanvasItem::~CanvasItem() {
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CanvasTexture::set_diffuse_texture(const Ref<Texture2D> &p_diffuse) {
|
void CanvasTexture::set_diffuse_texture(const Ref<Texture2D> &p_diffuse) {
|
||||||
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_diffuse.ptr()) != nullptr, "Cant self-assign a CanvasTexture");
|
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_diffuse.ptr()) != nullptr, "Can't self-assign a CanvasTexture");
|
||||||
diffuse_texture = p_diffuse;
|
diffuse_texture = p_diffuse;
|
||||||
|
|
||||||
RID tex_rid = diffuse_texture.is_valid() ? diffuse_texture->get_rid() : RID();
|
RID tex_rid = diffuse_texture.is_valid() ? diffuse_texture->get_rid() : RID();
|
||||||
|
@ -1426,7 +1426,7 @@ Ref<Texture2D> CanvasTexture::get_diffuse_texture() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CanvasTexture::set_normal_texture(const Ref<Texture2D> &p_normal) {
|
void CanvasTexture::set_normal_texture(const Ref<Texture2D> &p_normal) {
|
||||||
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_normal.ptr()) != nullptr, "Cant self-assign a CanvasTexture");
|
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_normal.ptr()) != nullptr, "Can't self-assign a CanvasTexture");
|
||||||
normal_texture = p_normal;
|
normal_texture = p_normal;
|
||||||
RID tex_rid = normal_texture.is_valid() ? normal_texture->get_rid() : RID();
|
RID tex_rid = normal_texture.is_valid() ? normal_texture->get_rid() : RID();
|
||||||
RS::get_singleton()->canvas_texture_set_channel(canvas_texture, RS::CANVAS_TEXTURE_CHANNEL_NORMAL, tex_rid);
|
RS::get_singleton()->canvas_texture_set_channel(canvas_texture, RS::CANVAS_TEXTURE_CHANNEL_NORMAL, tex_rid);
|
||||||
|
@ -1436,7 +1436,7 @@ Ref<Texture2D> CanvasTexture::get_normal_texture() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CanvasTexture::set_specular_texture(const Ref<Texture2D> &p_specular) {
|
void CanvasTexture::set_specular_texture(const Ref<Texture2D> &p_specular) {
|
||||||
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_specular.ptr()) != nullptr, "Cant self-assign a CanvasTexture");
|
ERR_FAIL_COND_MSG(Object::cast_to<CanvasTexture>(p_specular.ptr()) != nullptr, "Can't self-assign a CanvasTexture");
|
||||||
specular_texture = p_specular;
|
specular_texture = p_specular;
|
||||||
RID tex_rid = specular_texture.is_valid() ? specular_texture->get_rid() : RID();
|
RID tex_rid = specular_texture.is_valid() ? specular_texture->get_rid() : RID();
|
||||||
RS::get_singleton()->canvas_texture_set_channel(canvas_texture, RS::CANVAS_TEXTURE_CHANNEL_SPECULAR, tex_rid);
|
RS::get_singleton()->canvas_texture_set_channel(canvas_texture, RS::CANVAS_TEXTURE_CHANNEL_SPECULAR, tex_rid);
|
||||||
|
|
|
@ -1267,7 +1267,7 @@ void SceneTree::_bind_methods() {
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multiplayer_poll"), "set_multiplayer_poll_enabled", "is_multiplayer_poll_enabled");
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multiplayer_poll"), "set_multiplayer_poll_enabled", "is_multiplayer_poll_enabled");
|
||||||
|
|
||||||
ADD_SIGNAL(MethodInfo("tree_changed"));
|
ADD_SIGNAL(MethodInfo("tree_changed"));
|
||||||
ADD_SIGNAL(MethodInfo("tree_process_mode_changed")); //editor only signal, but due to API hash it cant be removed in run-time
|
ADD_SIGNAL(MethodInfo("tree_process_mode_changed")); //editor only signal, but due to API hash it can't be removed in run-time
|
||||||
ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
||||||
ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
||||||
ADD_SIGNAL(MethodInfo("node_renamed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
ADD_SIGNAL(MethodInfo("node_renamed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
|
||||||
|
|
|
@ -255,7 +255,8 @@ public:
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
||||||
virtual String generate_global_per_node(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
virtual String generate_global_per_node(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
||||||
virtual String generate_global_per_func(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
virtual String generate_global_per_func(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const = 0; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
// If no output is connected, the output var passed will be empty. If no input is connected and input is NIL, the input var passed will be empty.
|
||||||
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const = 0;
|
||||||
|
|
||||||
virtual String get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const;
|
virtual String get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const;
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(float p_value);
|
void set_constant(float p_value);
|
||||||
float get_constant() const;
|
float get_constant() const;
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(int p_value);
|
void set_constant(int p_value);
|
||||||
int get_constant() const;
|
int get_constant() const;
|
||||||
|
@ -134,7 +134,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(bool p_value);
|
void set_constant(bool p_value);
|
||||||
bool get_constant() const;
|
bool get_constant() const;
|
||||||
|
@ -164,7 +164,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(Color p_value);
|
void set_constant(Color p_value);
|
||||||
Color get_constant() const;
|
Color get_constant() const;
|
||||||
|
@ -194,7 +194,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(Vector3 p_value);
|
void set_constant(Vector3 p_value);
|
||||||
Vector3 get_constant() const;
|
Vector3 get_constant() const;
|
||||||
|
@ -224,7 +224,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_constant(Transform p_value);
|
void set_constant(Transform p_value);
|
||||||
Transform get_constant() const;
|
Transform get_constant() const;
|
||||||
|
@ -280,7 +280,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_source(Source p_source);
|
void set_source(Source p_source);
|
||||||
Source get_source() const;
|
Source get_source() const;
|
||||||
|
@ -323,7 +323,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_texture(Ref<CurveTexture> p_value);
|
void set_texture(Ref<CurveTexture> p_value);
|
||||||
Ref<CurveTexture> get_texture() const;
|
Ref<CurveTexture> get_texture() const;
|
||||||
|
@ -360,7 +360,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_source(Source p_source);
|
void set_source(Source p_source);
|
||||||
Source get_source() const;
|
Source get_source() const;
|
||||||
|
@ -455,7 +455,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_source(Source p_source);
|
void set_source(Source p_source);
|
||||||
Source get_source() const;
|
Source get_source() const;
|
||||||
|
@ -512,7 +512,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -554,7 +554,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -601,7 +601,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -647,7 +647,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -690,7 +690,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -733,7 +733,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_operator(Operator p_op);
|
void set_operator(Operator p_op);
|
||||||
Operator get_operator() const;
|
Operator get_operator() const;
|
||||||
|
@ -804,7 +804,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -846,7 +846,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -920,7 +920,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -961,7 +961,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -1002,7 +1002,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -1032,7 +1032,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeDotProduct();
|
VisualShaderNodeDotProduct();
|
||||||
};
|
};
|
||||||
|
@ -1055,7 +1055,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeVectorLen();
|
VisualShaderNodeVectorLen();
|
||||||
};
|
};
|
||||||
|
@ -1078,7 +1078,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeDeterminant();
|
VisualShaderNodeDeterminant();
|
||||||
};
|
};
|
||||||
|
@ -1118,7 +1118,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<StringName> get_editable_properties() const override;
|
virtual Vector<StringName> get_editable_properties() const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeClamp();
|
VisualShaderNodeClamp();
|
||||||
};
|
};
|
||||||
|
@ -1155,7 +1155,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -1195,7 +1195,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -1225,7 +1225,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeFaceForward();
|
VisualShaderNodeFaceForward();
|
||||||
};
|
};
|
||||||
|
@ -1248,7 +1248,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeOuterProduct();
|
VisualShaderNodeOuterProduct();
|
||||||
};
|
};
|
||||||
|
@ -1288,7 +1288,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<StringName> get_editable_properties() const override;
|
virtual Vector<StringName> get_editable_properties() const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeStep();
|
VisualShaderNodeStep();
|
||||||
};
|
};
|
||||||
|
@ -1330,7 +1330,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<StringName> get_editable_properties() const override;
|
virtual Vector<StringName> get_editable_properties() const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeSmoothStep();
|
VisualShaderNodeSmoothStep();
|
||||||
};
|
};
|
||||||
|
@ -1355,7 +1355,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeVectorDistance();
|
VisualShaderNodeVectorDistance();
|
||||||
};
|
};
|
||||||
|
@ -1378,7 +1378,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeVectorRefract();
|
VisualShaderNodeVectorRefract();
|
||||||
};
|
};
|
||||||
|
@ -1418,7 +1418,7 @@ public:
|
||||||
|
|
||||||
virtual Vector<StringName> get_editable_properties() const override;
|
virtual Vector<StringName> get_editable_properties() const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeMix();
|
VisualShaderNodeMix();
|
||||||
};
|
};
|
||||||
|
@ -1443,7 +1443,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeVectorCompose();
|
VisualShaderNodeVectorCompose();
|
||||||
};
|
};
|
||||||
|
@ -1464,7 +1464,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeTransformCompose();
|
VisualShaderNodeTransformCompose();
|
||||||
};
|
};
|
||||||
|
@ -1487,7 +1487,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeVectorDecompose();
|
VisualShaderNodeVectorDecompose();
|
||||||
};
|
};
|
||||||
|
@ -1508,7 +1508,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeTransformDecompose();
|
VisualShaderNodeTransformDecompose();
|
||||||
};
|
};
|
||||||
|
@ -1550,7 +1550,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
virtual bool is_use_prop_slots() const override;
|
virtual bool is_use_prop_slots() const override;
|
||||||
|
@ -1616,7 +1616,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
virtual bool is_use_prop_slots() const override;
|
virtual bool is_use_prop_slots() const override;
|
||||||
|
@ -1673,7 +1673,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
virtual bool is_use_prop_slots() const override;
|
virtual bool is_use_prop_slots() const override;
|
||||||
|
@ -1716,7 +1716,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
|
|
||||||
|
@ -1758,7 +1758,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
virtual bool is_use_prop_slots() const override;
|
virtual bool is_use_prop_slots() const override;
|
||||||
|
@ -1801,7 +1801,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_show_prop_names() const override;
|
virtual bool is_show_prop_names() const override;
|
||||||
virtual bool is_use_prop_slots() const override;
|
virtual bool is_use_prop_slots() const override;
|
||||||
|
@ -1858,7 +1858,7 @@ public:
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
virtual bool is_code_generated() const override;
|
virtual bool is_code_generated() const override;
|
||||||
|
|
||||||
|
@ -1895,7 +1895,7 @@ public:
|
||||||
|
|
||||||
virtual String generate_global_per_node(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global_per_node(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_global_per_func(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global_per_func(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeTextureUniformTriplanar();
|
VisualShaderNodeTextureUniformTriplanar();
|
||||||
};
|
};
|
||||||
|
@ -1918,7 +1918,7 @@ public:
|
||||||
|
|
||||||
virtual String get_input_port_default_hint(int p_port) const override;
|
virtual String get_input_port_default_hint(int p_port) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeTexture2DArrayUniform();
|
VisualShaderNodeTexture2DArrayUniform();
|
||||||
};
|
};
|
||||||
|
@ -1941,7 +1941,7 @@ public:
|
||||||
|
|
||||||
virtual String get_input_port_default_hint(int p_port) const override;
|
virtual String get_input_port_default_hint(int p_port) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeTexture3DUniform();
|
VisualShaderNodeTexture3DUniform();
|
||||||
};
|
};
|
||||||
|
@ -1964,7 +1964,7 @@ public:
|
||||||
|
|
||||||
virtual String get_input_port_default_hint(int p_port) const override;
|
virtual String get_input_port_default_hint(int p_port) const override;
|
||||||
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override;
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
VisualShaderNodeCubemapUniform();
|
VisualShaderNodeCubemapUniform();
|
||||||
};
|
};
|
||||||
|
@ -2092,7 +2092,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_function(Function p_func);
|
void set_function(Function p_func);
|
||||||
Function get_function() const;
|
Function get_function() const;
|
||||||
|
@ -2153,7 +2153,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_comparison_type(ComparisonType p_type);
|
void set_comparison_type(ComparisonType p_type);
|
||||||
ComparisonType get_comparison_type() const;
|
ComparisonType get_comparison_type() const;
|
||||||
|
@ -2201,7 +2201,7 @@ public:
|
||||||
virtual PortType get_output_port_type(int p_port) const override;
|
virtual PortType get_output_port_type(int p_port) const override;
|
||||||
virtual String get_output_port_name(int p_port) const override;
|
virtual String get_output_port_name(int p_port) const override;
|
||||||
|
|
||||||
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
|
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
|
||||||
|
|
||||||
void set_op_type(OpType p_type);
|
void set_op_type(OpType p_type);
|
||||||
OpType get_op_type() const;
|
OpType get_op_type() const;
|
||||||
|
|
|
@ -690,7 +690,7 @@ public:
|
||||||
Vector3 axis = (p_point_B - p_point_A);
|
Vector3 axis = (p_point_B - p_point_A);
|
||||||
real_t depth = axis.length();
|
real_t depth = axis.length();
|
||||||
|
|
||||||
// Filter out bogus directions with a treshold and re-testing axis.
|
// Filter out bogus directions with a threshold and re-testing axis.
|
||||||
if (separator->best_depth - depth > 0.001) {
|
if (separator->best_depth - depth > 0.001) {
|
||||||
separator->test_axis(axis / depth);
|
separator->test_axis(axis / depth);
|
||||||
}
|
}
|
||||||
|
|
|
@ -662,7 +662,7 @@ void main() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALPHA_ANTIALIASING_EDGE_USED
|
#ifdef ALPHA_ANTIALIASING_EDGE_USED
|
||||||
// If alpha scissor is used, we must further the edge threshold, otherwise we wont get any edge feather
|
// If alpha scissor is used, we must further the edge threshold, otherwise we won't get any edge feather
|
||||||
#ifdef ALPHA_SCISSOR_USED
|
#ifdef ALPHA_SCISSOR_USED
|
||||||
alpha_antialiasing_edge = clamp(alpha_scissor_threshold + alpha_antialiasing_edge, 0.0, 1.0);
|
alpha_antialiasing_edge = clamp(alpha_scissor_threshold + alpha_antialiasing_edge, 0.0, 1.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -622,7 +622,7 @@ void main() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALPHA_ANTIALIASING_EDGE_USED
|
#ifdef ALPHA_ANTIALIASING_EDGE_USED
|
||||||
// If alpha scissor is used, we must further the edge threshold, otherwise we wont get any edge feather
|
// If alpha scissor is used, we must further the edge threshold, otherwise we won't get any edge feather
|
||||||
#ifdef ALPHA_SCISSOR_USED
|
#ifdef ALPHA_SCISSOR_USED
|
||||||
alpha_antialiasing_edge = clamp(alpha_scissor_threshold + alpha_antialiasing_edge, 0.0, 1.0);
|
alpha_antialiasing_edge = clamp(alpha_scissor_threshold + alpha_antialiasing_edge, 0.0, 1.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -845,7 +845,7 @@ public:
|
||||||
|
|
||||||
RID_PtrOwner<Instance, true> instance_owner;
|
RID_PtrOwner<Instance, true> instance_owner;
|
||||||
|
|
||||||
uint32_t geometry_instance_pair_mask; // used in traditional forward, unnecesary on clustered
|
uint32_t geometry_instance_pair_mask; // used in traditional forward, unnecessary on clustered
|
||||||
|
|
||||||
virtual RID instance_allocate();
|
virtual RID instance_allocate();
|
||||||
virtual void instance_initialize(RID p_rid);
|
virtual void instance_initialize(RID p_rid);
|
||||||
|
|
|
@ -322,7 +322,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport, XRInterface::Eyes p_
|
||||||
Vector2 point = clip_rect.position + clip_rect.size * signs[j];
|
Vector2 point = clip_rect.position + clip_rect.size * signs[j];
|
||||||
|
|
||||||
if (sign_cmp == light_dir_sign) {
|
if (sign_cmp == light_dir_sign) {
|
||||||
//both point in same direction, plot offseted
|
//both point in same direction, plot offsetted
|
||||||
points[point_count++] = point + light_dir * cull_distance;
|
points[point_count++] = point + light_dir * cull_distance;
|
||||||
} else if (sign_cmp.x == light_dir_sign.x || sign_cmp.y == light_dir_sign.y) {
|
} else if (sign_cmp.x == light_dir_sign.x || sign_cmp.y == light_dir_sign.y) {
|
||||||
int next_j = (j + 1) % 4;
|
int next_j = (j + 1) % 4;
|
||||||
|
|
|
@ -982,7 +982,7 @@ public:
|
||||||
enum InitialAction {
|
enum InitialAction {
|
||||||
INITIAL_ACTION_CLEAR, //start rendering and clear the whole framebuffer (region or not) (supply params)
|
INITIAL_ACTION_CLEAR, //start rendering and clear the whole framebuffer (region or not) (supply params)
|
||||||
INITIAL_ACTION_CLEAR_REGION, //start rendering and clear the framebuffer in the specified region (supply params)
|
INITIAL_ACTION_CLEAR_REGION, //start rendering and clear the framebuffer in the specified region (supply params)
|
||||||
INITIAL_ACTION_CLEAR_REGION_CONTINUE, //countinue rendering and clear the framebuffer in the specified region (supply params)
|
INITIAL_ACTION_CLEAR_REGION_CONTINUE, //continue rendering and clear the framebuffer in the specified region (supply params)
|
||||||
INITIAL_ACTION_KEEP, //start rendering, but keep attached color texture contents (depth will be cleared)
|
INITIAL_ACTION_KEEP, //start rendering, but keep attached color texture contents (depth will be cleared)
|
||||||
INITIAL_ACTION_DROP, //start rendering, ignore what is there, just write above it
|
INITIAL_ACTION_DROP, //start rendering, ignore what is there, just write above it
|
||||||
INITIAL_ACTION_CONTINUE, //continue rendering (framebuffer must have been left in "continue" state as final action previously)
|
INITIAL_ACTION_CONTINUE, //continue rendering (framebuffer must have been left in "continue" state as final action previously)
|
||||||
|
|
|
@ -873,10 +873,10 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
|
||||||
} else if (i == RS::ARRAY_BONES) {
|
} else if (i == RS::ARRAY_BONES) {
|
||||||
switch (p_arrays[i].get_type()) {
|
switch (p_arrays[i].get_type()) {
|
||||||
case Variant::PACKED_INT32_ARRAY: {
|
case Variant::PACKED_INT32_ARRAY: {
|
||||||
Vector<Vector3> vertexes = p_arrays[RS::ARRAY_VERTEX];
|
Vector<Vector3> vertices = p_arrays[RS::ARRAY_VERTEX];
|
||||||
Vector<int32_t> bones = p_arrays[i];
|
Vector<int32_t> bones = p_arrays[i];
|
||||||
int32_t bone_8_group_count = bones.size() / (ARRAY_WEIGHTS_SIZE * 2);
|
int32_t bone_8_group_count = bones.size() / (ARRAY_WEIGHTS_SIZE * 2);
|
||||||
int32_t vertex_count = vertexes.size();
|
int32_t vertex_count = vertices.size();
|
||||||
if (vertex_count == bone_8_group_count) {
|
if (vertex_count == bone_8_group_count) {
|
||||||
format |= RS::ARRAY_FLAG_USE_8_BONE_WEIGHTS;
|
format |= RS::ARRAY_FLAG_USE_8_BONE_WEIGHTS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ TEST_CASE("[Geometry2D] Point in circle") {
|
||||||
CHECK(Geometry2D::is_point_in_circle(Vector2(7, -42), Vector2(4, -40), 3.7));
|
CHECK(Geometry2D::is_point_in_circle(Vector2(7, -42), Vector2(4, -40), 3.7));
|
||||||
CHECK_FALSE(Geometry2D::is_point_in_circle(Vector2(7, -42), Vector2(4, -40), 3.5));
|
CHECK_FALSE(Geometry2D::is_point_in_circle(Vector2(7, -42), Vector2(4, -40), 3.5));
|
||||||
|
|
||||||
// This tests points on the edge of the circle. They are treated as beeing inside the circle.
|
// This tests points on the edge of the circle. They are treated as being inside the circle.
|
||||||
// In `is_point_in_triangle` and `is_point_in_polygon` they are treated as being outside, so in order the make
|
// In `is_point_in_triangle` and `is_point_in_polygon` they are treated as being outside, so in order the make
|
||||||
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
||||||
CHECK(Geometry2D::is_point_in_circle(Vector2(1.0, 0.0), Vector2(0, 0), 1.0));
|
CHECK(Geometry2D::is_point_in_circle(Vector2(1.0, 0.0), Vector2(0, 0), 1.0));
|
||||||
|
@ -65,7 +65,7 @@ TEST_CASE("[Geometry2D] Point in triangle") {
|
||||||
CHECK(Geometry2D::is_point_in_triangle(Vector2(-3, -2.5), Vector2(-1, -4), Vector2(-3, -2), Vector2(-5, -4)));
|
CHECK(Geometry2D::is_point_in_triangle(Vector2(-3, -2.5), Vector2(-1, -4), Vector2(-3, -2), Vector2(-5, -4)));
|
||||||
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(0, 0), Vector2(1, 4), Vector2(3, 2), Vector2(5, 4)));
|
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(0, 0), Vector2(1, 4), Vector2(3, 2), Vector2(5, 4)));
|
||||||
|
|
||||||
// This tests points on the edge of the triangle. They are treated as beeing outside the triangle.
|
// This tests points on the edge of the triangle. They are treated as being outside the triangle.
|
||||||
// In `is_point_in_circle` they are treated as being inside, so in order the make
|
// In `is_point_in_circle` they are treated as being inside, so in order the make
|
||||||
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
||||||
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(1, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1)));
|
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(1, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1)));
|
||||||
|
@ -95,7 +95,7 @@ TEST_CASE("[Geometry2D] Point in polygon") {
|
||||||
CHECK(Geometry2D::is_point_in_polygon(Vector2(370, 55), p));
|
CHECK(Geometry2D::is_point_in_polygon(Vector2(370, 55), p));
|
||||||
CHECK(Geometry2D::is_point_in_polygon(Vector2(-160, 190), p));
|
CHECK(Geometry2D::is_point_in_polygon(Vector2(-160, 190), p));
|
||||||
|
|
||||||
// This tests points on the edge of the polygon. They are treated as beeing outside the polygon.
|
// This tests points on the edge of the polygon. They are treated as being outside the polygon.
|
||||||
// In `is_point_in_circle` they are treated as being inside, so in order the make
|
// In `is_point_in_circle` they are treated as being inside, so in order the make
|
||||||
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
|
||||||
CHECK_FALSE(Geometry2D::is_point_in_polygon(Vector2(68, 112), p));
|
CHECK_FALSE(Geometry2D::is_point_in_polygon(Vector2(68, 112), p));
|
||||||
|
@ -227,7 +227,7 @@ TEST_CASE("[Geometry2D] Polygon intersection") {
|
||||||
CHECK(r[0][2].is_equal_approx(Point2(160.52632, 92.63157)));
|
CHECK(r[0][2].is_equal_approx(Point2(160.52632, 92.63157)));
|
||||||
}
|
}
|
||||||
|
|
||||||
SUBCASE("[Geometry2D] Intersection with one polygon beeing completly inside the other polygon") {
|
SUBCASE("[Geometry2D] Intersection with one polygon being completely inside the other polygon") {
|
||||||
b.push_back(Point2(80, 100));
|
b.push_back(Point2(80, 100));
|
||||||
b.push_back(Point2(50, 50));
|
b.push_back(Point2(50, 50));
|
||||||
b.push_back(Point2(150, 50));
|
b.push_back(Point2(150, 50));
|
||||||
|
|
|
@ -144,7 +144,7 @@ TEST_CASE("[Rect2] Absolute coordinates") {
|
||||||
"abs() should return the expected Rect2.");
|
"abs() should return the expected Rect2.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("[Rect2] Intersecton") {
|
TEST_CASE("[Rect2] Intersection") {
|
||||||
CHECK_MESSAGE(
|
CHECK_MESSAGE(
|
||||||
Rect2(0, 100, 1280, 720).intersection(Rect2(0, 300, 100, 100)).is_equal_approx(Rect2(0, 300, 100, 100)),
|
Rect2(0, 100, 1280, 720).intersection(Rect2(0, 300, 100, 100)).is_equal_approx(Rect2(0, 300, 100, 100)),
|
||||||
"intersection() with fully enclosed Rect2 should return the expected result.");
|
"intersection() with fully enclosed Rect2 should return the expected result.");
|
||||||
|
|
Loading…
Reference in New Issue