summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp8
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp22
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp10
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp28
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp14
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp6
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp16
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp22
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp10
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp4
12 files changed, 76 insertions, 76 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 5a62f0da4e..28f786e99a 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -347,16 +347,16 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
} else {
- Vector<Vector2> vertices = _get_polygon(insert.polygon);
- pre_move_edit = vertices;
+ Vector<Vector2> vertices2 = _get_polygon(insert.polygon);
+ pre_move_edit = vertices2;
printf("setting pre_move_edit\n");
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
- vertices.insert(edited_point.vertex, edited_point.pos);
+ vertices2.insert(edited_point.vertex, edited_point.pos);
selected_point = edited_point;
edge_point = PosVertex();
undo_redo->create_action(TTR("Insert Point"));
- _action_set_polygon(insert.polygon, vertices);
+ _action_set_polygon(insert.polygon, vertices2);
_commit_action();
return true;
}
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 13c80e5394..e615856195 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -785,8 +785,8 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
for (int i = 0; i < visible_properties.size(); i++) {
String pname = visible_properties[i]->get_edited_property().operator String();
if (pname.begins_with(base_path + prev_name)) {
- String new_name = pname.replace_first(base_path + prev_name, base_path + name);
- visible_properties[i]->set_object_and_property(visible_properties[i]->get_edited_object(), new_name);
+ String new_name2 = pname.replace_first(base_path + prev_name, base_path + name);
+ visible_properties[i]->set_object_and_property(visible_properties[i]->get_edited_object(), new_name2);
}
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index b32b537d3d..bbaf41e3cc 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1160,22 +1160,22 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
return;
}
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- //editor->edit_resource(anim);
- EditorSettings::get_singleton()->set_resource_clipboard(anim);
+ String current2 = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim2 = player->get_animation(current2);
+ //editor->edit_resource(anim2);
+ EditorSettings::get_singleton()->set_resource_clipboard(anim2);
} break;
case TOOL_PASTE_ANIM: {
- Ref<Animation> anim = EditorSettings::get_singleton()->get_resource_clipboard();
- if (!anim.is_valid()) {
+ Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
+ if (!anim2.is_valid()) {
error_dialog->set_text(TTR("No animation resource on clipboard!"));
error_dialog->popup_centered_minsize();
return;
}
- String name = anim->get_name();
+ String name = anim2->get_name();
if (name == "") {
name = TTR("Pasted Animation");
}
@@ -1189,7 +1189,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
}
undo_redo->create_action(TTR("Paste Animation"));
- undo_redo->add_do_method(player, "add_animation", name, anim);
+ undo_redo->add_do_method(player, "add_animation", name, anim2);
undo_redo->add_undo_method(player, "remove_animation", name);
undo_redo->add_do_method(this, "_animation_player_changed", player);
undo_redo->add_undo_method(this, "_animation_player_changed", player);
@@ -1206,9 +1206,9 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
return;
}
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- editor->edit_resource(anim);
+ String current2 = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim2 = player->get_animation(current2);
+ editor->edit_resource(anim2);
} break;
}
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 197ee77254..e73c4ebd8a 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -714,12 +714,12 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
tl.to += offset;
}
- for (int i = 0; i < node_rects.size(); i++) {
- if (node_rects[i].node_name == tl.from_node) {
- _clip_src_line_to_rect(tl.from, tl.to, node_rects[i].node);
+ for (int j = 0; j < node_rects.size(); j++) {
+ if (node_rects[j].node_name == tl.from_node) {
+ _clip_src_line_to_rect(tl.from, tl.to, node_rects[j].node);
}
- if (node_rects[i].node_name == tl.to_node) {
- _clip_dst_line_to_rect(tl.from, tl.to, node_rects[i].node);
+ if (node_rects[j].node_name == tl.to_node) {
+ _clip_dst_line_to_rect(tl.from, tl.to, node_rects[j].node);
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index b5d59dae99..ac05b03ed2 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -398,10 +398,10 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_li
// Expand with the other ones
for (List<CanvasItem *>::Element *E = p_list.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get();
- Transform2D xform = canvas_item->get_global_transform_with_canvas();
+ CanvasItem *canvas_item2 = E->get();
+ Transform2D xform = canvas_item2->get_global_transform_with_canvas();
- Rect2 current_rect = canvas_item->_edit_get_rect();
+ Rect2 current_rect = canvas_item2->_edit_get_rect();
rect.expand_to(xform.xform(current_rect.position));
rect.expand_to(xform.xform(current_rect.position + Vector2(current_rect.size.x, 0)));
rect.expand_to(xform.xform(current_rect.position + current_rect.size));
@@ -816,10 +816,10 @@ void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_ite
undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
undo_redo->add_undo_method(canvas_item, "_edit_set_state", se->undo_state);
if (commit_bones) {
- for (List<Dictionary>::Element *E = se->pre_drag_bones_undo_state.front(); E; E = E->next()) {
+ for (List<Dictionary>::Element *F = se->pre_drag_bones_undo_state.front(); F; F = F->next()) {
canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent());
undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", E->get());
+ undo_redo->add_undo_method(canvas_item, "_edit_set_state", F->get());
}
}
}
@@ -1921,9 +1921,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (drag_selection.size() == 1) {
Node2D *node_2d = Object::cast_to<Node2D>(drag_selection[0]);
if (node_2d && move_local_base_rotated) {
- Transform2D m;
- m.rotate(node_2d->get_rotation());
- new_pos += m.xform(drag_to);
+ Transform2D m2;
+ m2.rotate(node_2d->get_rotation());
+ new_pos += m2.xform(drag_to);
} else if (move_local_base) {
new_pos += drag_to;
} else {
@@ -2065,18 +2065,18 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
// Start dragging
if (still_selected) {
// Drag the node(s) if requested
- List<CanvasItem *> selection = _get_edited_canvas_items();
+ List<CanvasItem *> selection2 = _get_edited_canvas_items();
// Remove not movable nodes
- for (int i = 0; i < selection.size(); i++) {
- if (!_is_node_movable(selection[i], true)) {
- selection.erase(selection[i]);
+ for (int i = 0; i < selection2.size(); i++) {
+ if (!_is_node_movable(selection2[i], true)) {
+ selection2.erase(selection2[i]);
}
}
- if (selection.size() > 0) {
+ if (selection2.size() > 0) {
drag_type = DRAG_MOVE;
- drag_selection = selection;
+ drag_selection = selection2;
drag_from = click;
_save_canvas_item_state(drag_selection);
}
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 40ec03bc96..3e10cdbbfa 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -198,14 +198,14 @@ void MeshInstanceEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_UV2: {
- Ref<ArrayMesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<ArrayMesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("Contained Mesh is not of type ArrayMesh."));
err_dialog->popup_centered_minsize();
return;
}
- Error err = mesh->lightmap_unwrap(node->get_global_transform());
+ Error err = mesh2->lightmap_unwrap(node->get_global_transform());
if (err != OK) {
err_dialog->set_text(TTR("UV Unwrap failed, mesh may not be manifold?"));
err_dialog->popup_centered_minsize();
@@ -214,8 +214,8 @@ void MeshInstanceEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_DEBUG_UV1: {
- Ref<Mesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<Mesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("No mesh to debug."));
err_dialog->popup_centered_minsize();
return;
@@ -223,8 +223,8 @@ void MeshInstanceEditor::_menu_option(int p_option) {
_create_uv_lines(0);
} break;
case MENU_OPTION_DEBUG_UV2: {
- Ref<Mesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<Mesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("No mesh to debug."));
err_dialog->popup_centered_minsize();
return;
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 354475d268..a10eddb131 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -180,11 +180,11 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for segment split.
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && mode == MODE_EDIT && on_edge == true) {
- Vector2 gpoint = mb->get_position();
+ Vector2 gpoint2 = mb->get_position();
Ref<Curve2D> curve = node->get_curve();
int insertion_point = -1;
- float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint));
+ float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint2));
int len = curve->get_point_count();
for (int i = 0; i < len - 1; i++) {
float compareLength = curve->get_closest_offset(curve->get_point_position(i + 1));
@@ -195,7 +195,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
insertion_point = curve->get_point_count() - 2;
undo_redo->create_action(TTR("Split Curve"));
- undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
+ undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint2), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
undo_redo->add_undo_method(curve.ptr(), "remove_point", insertion_point + 1);
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
@@ -204,7 +204,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
action = ACTION_MOVING_POINT;
action_point = insertion_point + 1;
moving_from = curve->get_point_position(action_point);
- moving_screen_from = gpoint;
+ moving_screen_from = gpoint2;
canvas_item_editor->update_viewport();
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 33157bc88f..0dbbaf4177 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -1092,10 +1092,10 @@ void Polygon2DEditor::_uv_draw() {
PoolVector<int> points = polygons[i];
Vector<Vector2> polypoints;
- for (int i = 0; i < points.size(); i++) {
- int next = (i + 1) % points.size();
+ for (int j = 0; j < points.size(); j++) {
+ int next = (j + 1) % points.size();
- int idx = points[i];
+ int idx = points[j];
int idx_next = points[next];
if (idx < 0 || idx >= uvs.size())
continue;
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 4d1e0c08ce..f578d5037d 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -4695,10 +4695,10 @@ void SpatialEditor::_init_indicators() {
plane_mat->set_on_top_of_alpha();
plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED);
- Color col;
- col[i] = 1.0;
- col.a = gizmo_alph;
- plane_mat->set_albedo(col);
+ Color col2;
+ col2[i] = 1.0;
+ col2.a = gizmo_alph;
+ plane_mat->set_albedo(col2);
plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides
surftool->set_material(plane_mat);
surftool->commit(move_plane_gizmo[i]);
@@ -4824,10 +4824,10 @@ void SpatialEditor::_init_indicators() {
plane_mat->set_on_top_of_alpha();
plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED);
- Color col;
- col[i] = 1.0;
- col.a = gizmo_alph;
- plane_mat->set_albedo(col);
+ Color col2;
+ col2[i] = 1.0;
+ col2.a = gizmo_alph;
+ plane_mat->set_albedo(col2);
plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides
surftool->set_material(plane_mat);
surftool->commit(scale_plane_gizmo[i]);
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index a967374eb9..3670c78f1f 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -477,17 +477,17 @@ void TileMapEditor::_update_palette() {
if (sel_tile != TileMap::INVALID_CELL) {
if ((manual_autotile && tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) || tileset->tile_get_tile_mode(sel_tile) == TileSet::ATLAS_TILE) {
- const Map<Vector2, uint16_t> &tiles = tileset->autotile_get_bitmask_map(sel_tile);
+ const Map<Vector2, uint16_t> &tiles2 = tileset->autotile_get_bitmask_map(sel_tile);
- Vector<Vector2> entries;
- for (const Map<Vector2, uint16_t>::Element *E = tiles.front(); E; E = E->next()) {
- entries.push_back(E->key());
+ Vector<Vector2> entries2;
+ for (const Map<Vector2, uint16_t>::Element *E = tiles2.front(); E; E = E->next()) {
+ entries2.push_back(E->key());
}
- entries.sort();
+ entries2.sort();
Ref<Texture> tex = tileset->tile_get_texture(sel_tile);
- for (int i = 0; i < entries.size(); i++) {
+ for (int i = 0; i < entries2.size(); i++) {
manual_palette->add_item(String());
@@ -496,7 +496,7 @@ void TileMapEditor::_update_palette() {
Rect2 region = tileset->tile_get_region(sel_tile);
int spacing = tileset->autotile_get_spacing(sel_tile);
region.size = tileset->autotile_get_size(sel_tile); // !!
- region.position += (region.size + Vector2(spacing, spacing)) * entries[i];
+ region.position += (region.size + Vector2(spacing, spacing)) * entries2[i];
if (!region.has_no_area())
manual_palette->set_item_icon_region(manual_palette->get_item_count() - 1, region);
@@ -504,16 +504,16 @@ void TileMapEditor::_update_palette() {
manual_palette->set_item_icon(manual_palette->get_item_count() - 1, tex);
}
- manual_palette->set_item_metadata(manual_palette->get_item_count() - 1, entries[i]);
+ manual_palette->set_item_metadata(manual_palette->get_item_count() - 1, entries2[i]);
}
}
}
if (manual_palette->get_item_count() > 0) {
// Only show the manual palette if at least tile exists in it
- int selected = manual_palette->get_current();
- if (selected == -1) selected = 0;
- manual_palette->set_current(selected);
+ int selected2 = manual_palette->get_current();
+ if (selected2 == -1) selected2 = 0;
+ manual_palette->set_current(selected2);
manual_palette->show();
}
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 615b1abb75..36fe1af33f 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -2573,20 +2573,20 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
tileset_editor->_set_snap_sep(snap);
return true;
} else if (p_name.operator String().left(5) == "tile_") {
- String name = p_name.operator String().right(5);
+ String name2 = p_name.operator String().right(5);
bool v = false;
if (tileset_editor->get_current_tile() < 0 || tileset.is_null())
return false;
- if (name == "autotile_bitmask_mode") {
+ if (name2 == "autotile_bitmask_mode") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", p_value, &v);
- } else if (name == "subtile_size") {
+ } else if (name2 == "subtile_size") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/tile_size", p_value, &v);
- } else if (name == "subtile_spacing") {
+ } else if (name2 == "subtile_spacing") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/spacing", p_value, &v);
} else {
- tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/" + name, p_value, &v);
+ tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/" + name2, p_value, &v);
}
if (v) {
tileset->_change_notify("");
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 628c2f714c..734cd505d2 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1116,8 +1116,8 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
VisualShader::Type type = VisualShader::Type(i);
Vector<int> nodes = visual_shader->get_node_list(type);
- for (int i = 0; i < nodes.size(); i++) {
- Ref<VisualShaderNodeInput> input = visual_shader->get_node(type, nodes[i]);
+ for (int j = 0; j < nodes.size(); j++) {
+ Ref<VisualShaderNodeInput> input = visual_shader->get_node(type, nodes[j]);
if (!input.is_valid()) {
continue;
}