summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp6
-rw-r--r--editor/debugger/script_editor_debugger.cpp19
-rw-r--r--editor/doc_data.cpp65
-rw-r--r--editor/doc_data.h17
-rw-r--r--editor/editor_export.cpp3
-rw-r--r--editor/editor_node.cpp12
-rw-r--r--editor/editor_plugin.cpp2
-rw-r--r--editor/filesystem_dock.cpp3
-rw-r--r--editor/icons/CanvasGroup.svg1
-rw-r--r--editor/icons/CodeEdit.svg1
-rw-r--r--editor/icons/EditorCurveHandle.svg2
-rw-r--r--editor/icons/EditorPathSharpHandle.svg2
-rw-r--r--editor/icons/EditorPathSmoothHandle.svg2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp6
-rw-r--r--editor/plugins/node_3d_editor_plugin.h2
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp6
-rw-r--r--editor/scene_tree_dock.cpp4
17 files changed, 124 insertions, 29 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 236d1e884e..3182bca0eb 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1138,6 +1138,7 @@ void CodeTextEditor::move_lines_up() {
int from_col = text_editor->get_selection_from_column();
int to_line = text_editor->get_selection_to_line();
int to_column = text_editor->get_selection_to_column();
+ int cursor_line = text_editor->cursor_get_line();
for (int i = from_line; i <= to_line; i++) {
int line_id = i;
@@ -1155,7 +1156,9 @@ void CodeTextEditor::move_lines_up() {
}
int from_line_up = from_line > 0 ? from_line - 1 : from_line;
int to_line_up = to_line > 0 ? to_line - 1 : to_line;
+ int cursor_line_up = cursor_line > 0 ? cursor_line - 1 : cursor_line;
text_editor->select(from_line_up, from_col, to_line_up, to_column);
+ text_editor->cursor_set_line(cursor_line_up);
} else {
int line_id = text_editor->cursor_get_line();
int next_id = line_id - 1;
@@ -1181,6 +1184,7 @@ void CodeTextEditor::move_lines_down() {
int from_col = text_editor->get_selection_from_column();
int to_line = text_editor->get_selection_to_line();
int to_column = text_editor->get_selection_to_column();
+ int cursor_line = text_editor->cursor_get_line();
for (int i = to_line; i >= from_line; i--) {
int line_id = i;
@@ -1198,7 +1202,9 @@ void CodeTextEditor::move_lines_down() {
}
int from_line_down = from_line < text_editor->get_line_count() ? from_line + 1 : from_line;
int to_line_down = to_line < text_editor->get_line_count() ? to_line + 1 : to_line;
+ int cursor_line_down = cursor_line < text_editor->get_line_count() ? cursor_line + 1 : cursor_line;
text_editor->select(from_line_down, from_col, to_line_down, to_column);
+ text_editor->cursor_set_line(cursor_line_down);
} else {
int line_id = text_editor->cursor_get_line();
int next_id = line_id + 1;
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 248073c5a2..fd33115cda 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -487,8 +487,11 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
error->set_text_align(0, TreeItem::ALIGN_LEFT);
String error_title;
- // Include method name, when given, in error title.
- if (!oe.source_func.empty()) {
+ if (oe.callstack.size() > 0) {
+ // If available, use the script's stack in the error title.
+ error_title = oe.callstack[oe.callstack.size() - 1].func + ": ";
+ } else if (!oe.source_func.empty()) {
+ // Otherwise try to use the C++ source function.
error_title += oe.source_func + ": ";
}
// If we have a (custom) error message, use it as title, and add a C++ Error
@@ -529,9 +532,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
cpp_source->set_metadata(0, source_meta);
}
- error->set_tooltip(0, tooltip);
- error->set_tooltip(1, tooltip);
-
// Format stack trace.
// stack_items_count is the number of elements to parse, with 3 items per frame
// of the stack trace (script, method, line).
@@ -548,10 +548,17 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
stack_trace->set_text(0, "<" + TTR("Stack Trace") + ">");
stack_trace->set_text_align(0, TreeItem::ALIGN_LEFT);
error->set_metadata(0, meta);
+ tooltip += TTR("Stack Trace:") + "\n";
}
- stack_trace->set_text(1, infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()");
+
+ String frame_txt = infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()";
+ tooltip += frame_txt + "\n";
+ stack_trace->set_text(1, frame_txt);
}
+ error->set_tooltip(0, tooltip);
+ error->set_tooltip(1, tooltip);
+
if (oe.warning) {
warning_count++;
} else {
diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp
index 6767159721..8504d61d2f 100644
--- a/editor/doc_data.cpp
+++ b/editor/doc_data.cpp
@@ -569,12 +569,15 @@ void DocData::generate(bool p_basic_types) {
method_list.sort();
Variant::get_constructor_list(Variant::Type(i), &method_list);
- for (int j = 0; j < Variant::OP_AND; j++) { //showing above 'and' is pretty confusing and there are a lot of variations
-
+ for (int j = 0; j < Variant::OP_AND; j++) { // Showing above 'and' is pretty confusing and there are a lot of variations.
for (int k = 0; k < Variant::VARIANT_MAX; k++) {
Variant::Type rt = Variant::get_operator_return_type(Variant::Operator(j), Variant::Type(i), Variant::Type(k));
- if (rt != Variant::NIL) {
- //has operator
+ if (rt != Variant::NIL) { // Has operator.
+ // Skip String % operator as it's registered separately for each Variant arg type,
+ // we'll add it manually below.
+ if (i == Variant::STRING && Variant::Operator(j) == Variant::OP_MODULE) {
+ continue;
+ }
MethodInfo mi;
mi.name = "operator " + Variant::get_operator_name(Variant::Operator(j));
mi.return_val.type = rt;
@@ -589,6 +592,21 @@ void DocData::generate(bool p_basic_types) {
}
}
+ if (i == Variant::STRING) {
+ // We skipped % operator above, and we register it manually once for Variant arg type here.
+ MethodInfo mi;
+ mi.name = "operator %";
+ mi.return_val.type = Variant::STRING;
+
+ PropertyInfo arg;
+ arg.name = "right";
+ arg.type = Variant::NIL;
+ arg.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
+ mi.arguments.push_back(arg);
+
+ method_list.push_back(mi);
+ }
+
if (Variant::is_keyed(Variant::Type(i))) {
MethodInfo mi;
mi.name = "operator []";
@@ -718,6 +736,43 @@ void DocData::generate(bool p_basic_types) {
}
c.properties.push_back(pd);
}
+
+ List<StringName> utility_functions;
+ Variant::get_utility_function_list(&utility_functions);
+ utility_functions.sort_custom<StringName::AlphCompare>();
+ for (List<StringName>::Element *E = utility_functions.front(); E; E = E->next()) {
+ MethodDoc md;
+ md.name = E->get();
+ //return
+ if (Variant::has_utility_function_return_value(E->get())) {
+ PropertyInfo pi;
+ pi.type = Variant::get_utility_function_return_type(E->get());
+ if (pi.type == Variant::NIL) {
+ pi.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
+ }
+ DocData::ArgumentDoc ad;
+ argument_doc_from_arginfo(ad, pi);
+ md.return_type = ad.type;
+ }
+
+ if (Variant::is_utility_function_vararg(E->get())) {
+ md.qualifiers = "vararg";
+ } else {
+ for (int i = 0; i < Variant::get_utility_function_argument_count(E->get()); i++) {
+ PropertyInfo pi;
+ pi.type = Variant::get_utility_function_argument_type(E->get(), i);
+ pi.name = Variant::get_utility_function_argument_name(E->get(), i);
+ if (pi.type == Variant::NIL) {
+ pi.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
+ }
+ DocData::ArgumentDoc ad;
+ argument_doc_from_arginfo(ad, pi);
+ md.arguments.push_back(ad);
+ }
+ }
+
+ c.methods.push_back(md);
+ }
}
// Built-in script reference.
@@ -1147,7 +1202,7 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
qualifiers += " qualifiers=\"" + m.qualifiers.xml_escape() + "\"";
}
- _write_string(f, 2, "<method name=\"" + m.name + "\"" + qualifiers + ">");
+ _write_string(f, 2, "<method name=\"" + m.name.xml_escape() + "\"" + qualifiers + ">");
if (m.return_type != "") {
String enum_text;
diff --git a/editor/doc_data.h b/editor/doc_data.h
index 5fa20c6f0c..2cb475d137 100644
--- a/editor/doc_data.h
+++ b/editor/doc_data.h
@@ -43,6 +43,9 @@ public:
String enumeration;
String default_value;
bool operator<(const ArgumentDoc &p_arg) const {
+ if (name == p_arg.name) {
+ return type < p_arg.type;
+ }
return name < p_arg.name;
}
};
@@ -55,6 +58,20 @@ public:
String description;
Vector<ArgumentDoc> arguments;
bool operator<(const MethodDoc &p_method) const {
+ if (name == p_method.name) {
+ // Must be a constructor since there is no overloading.
+ // We want this arbitrary order for a class "Foo":
+ // - 1. Default constructor: Foo()
+ // - 2. Copy constructor: Foo(Foo)
+ // - 3+. Other constructors Foo(Bar, ...) based on first argument's name
+ if (arguments.size() == 0 || p_method.arguments.size() == 0) { // 1.
+ return arguments.size() < p_method.arguments.size();
+ }
+ if (arguments[0].type == return_type || p_method.arguments[0].type == p_method.return_type) { // 2.
+ return (arguments[0].type == return_type) || (p_method.arguments[0].type != p_method.return_type);
+ }
+ return arguments[0] < p_method.arguments[0];
+ }
return name < p_method.name;
}
};
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 97800fe961..3aeffede82 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -737,6 +737,9 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
_edit_filter_list(paths, p_preset->get_include_filter(), false);
_edit_filter_list(paths, p_preset->get_exclude_filter(), true);
+ // Ignore import files, since these are automatically added to the jar later with the resources
+ _edit_filter_list(paths, String("*.import"), true);
+
// Get encryption filters.
bool enc_pck = p_preset->get_enc_pck();
Vector<String> enc_in_filters;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index d0d99e071a..c6613cdf63 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2705,10 +2705,14 @@ void EditorNode::_screenshot(bool p_use_utc) {
}
void EditorNode::_save_screenshot(NodePath p_path) {
- SubViewport *viewport = Object::cast_to<SubViewport>(EditorInterface::get_singleton()->get_editor_viewport()->get_viewport());
- viewport->set_clear_mode(SubViewport::CLEAR_MODE_ONLY_NEXT_FRAME);
- Ref<Image> img = viewport->get_texture()->get_data();
- viewport->set_clear_mode(SubViewport::CLEAR_MODE_ALWAYS);
+ Control *editor_viewport = EditorInterface::get_singleton()->get_editor_viewport();
+ ERR_FAIL_COND_MSG(!editor_viewport, "Cannot get editor viewport.");
+ Viewport *viewport = editor_viewport->get_viewport();
+ ERR_FAIL_COND_MSG(!viewport, "Cannot get editor viewport.");
+ Ref<ViewportTexture> texture = viewport->get_texture();
+ ERR_FAIL_COND_MSG(texture.is_null(), "Cannot get editor viewport texture.");
+ Ref<Image> img = texture->get_data();
+ ERR_FAIL_COND_MSG(img.is_null(), "Cannot get editor viewport texture image.");
Error error = img->save_png(p_path);
ERR_FAIL_COND_MSG(error != OK, "Cannot save screenshot to file '" + p_path + "'.");
}
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index e330713cfb..49d8e58955 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -866,6 +866,8 @@ void EditorPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_spatial_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_spatial_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_plugin_name"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "get_plugin_icon"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "has_main_screen"));
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 2052319e3e..ee0ee91893 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2665,7 +2665,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
editor = p_editor;
path = "res://";
- ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KEY_MASK_CMD | KEY_C);
+ // `KEY_MASK_CMD | KEY_C` conflicts with other editor shortcuts.
+ ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C);
ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D);
ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), KEY_DELETE);
ED_SHORTCUT("filesystem_dock/rename", TTR("Rename"));
diff --git a/editor/icons/CanvasGroup.svg b/editor/icons/CanvasGroup.svg
new file mode 100644
index 0000000000..232ae53231
--- /dev/null
+++ b/editor/icons/CanvasGroup.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#a5b8f3" fill-opacity=".588235"/><path d="m1 1v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm12 0v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm-12 12v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0zm12 0v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0z" fill="#a5b7f4"/></svg>
diff --git a/editor/icons/CodeEdit.svg b/editor/icons/CodeEdit.svg
new file mode 100644
index 0000000000..0750b072e7
--- /dev/null
+++ b/editor/icons/CodeEdit.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1036.4)"><path d="m29 1042.4h1v1h-1z" fill="#fefeff"/><path d="m3 1c-1.1046 0-2 .8954-2 2v10c0 1.1046.89543 2 2 2h10c1.1046 0 2-.8954 2-2v-10c0-1.1046-.89543-2-2-2zm0 2h10v10h-10zm2 1-1 1 1 1-1 1 1 1 2-2zm2 3v1h2v-1z" fill="#a5efac" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/EditorCurveHandle.svg b/editor/icons/EditorCurveHandle.svg
index ea69f4e4cc..e0f3256807 100644
--- a/editor/icons/EditorCurveHandle.svg
+++ b/editor/icons/EditorCurveHandle.svg
@@ -1 +1 @@
-<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><circle cx="5" cy="5" fill="#fefefe" r="2.75" stroke="#000" stroke-linecap="square"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fefefe" r="4.4" stroke="#000" stroke-linecap="square" stroke-width="1.6"/></svg>
diff --git a/editor/icons/EditorPathSharpHandle.svg b/editor/icons/EditorPathSharpHandle.svg
index 328dc04677..5166930cca 100644
--- a/editor/icons/EditorPathSharpHandle.svg
+++ b/editor/icons/EditorPathSharpHandle.svg
@@ -1 +1 @@
-<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m-3.035534-10.106602h6.071068v6.071068h-6.071068z" fill="#fefefe" stroke="#000" stroke-linecap="square" transform="matrix(-.70710678 .70710678 -.70710678 -.70710678 0 0)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14.868629 8.0000002-6.8686288 6.8686288-6.8686293-6.8686288 6.8686293-6.8686293z" fill="#fefefe" stroke="#000" stroke-linecap="square" stroke-width="1.6"/></svg>
diff --git a/editor/icons/EditorPathSmoothHandle.svg b/editor/icons/EditorPathSmoothHandle.svg
index b498345d5a..2ab4f3a96a 100644
--- a/editor/icons/EditorPathSmoothHandle.svg
+++ b/editor/icons/EditorPathSmoothHandle.svg
@@ -1 +1 @@
-<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m1.5-8.5h7v7h-7z" fill="#fefefe" stroke="#000" stroke-linecap="square" transform="rotate(90)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.6 2.4v11.2h-11.2v-11.2z" fill="#fefefe" stroke="#000" stroke-linecap="square" stroke-width="1.6"/></svg>
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index fdbf3415db..28acb26012 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6753,12 +6753,12 @@ void EditorNode3DGizmoPlugin::create_icon_material(const String &p_name, const R
materials[p_name] = icons;
}
-void EditorNode3DGizmoPlugin::create_handle_material(const String &p_name, bool p_billboard) {
+void EditorNode3DGizmoPlugin::create_handle_material(const String &p_name, bool p_billboard, const Ref<Texture2D> &p_icon) {
Ref<StandardMaterial3D> handle_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
handle_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
handle_material->set_flag(StandardMaterial3D::FLAG_USE_POINT_SIZE, true);
- Ref<Texture2D> handle_t = Node3DEditor::get_singleton()->get_theme_icon("Editor3DHandle", "EditorIcons");
+ Ref<Texture2D> handle_t = p_icon != nullptr ? p_icon : Node3DEditor::get_singleton()->get_theme_icon("Editor3DHandle", "EditorIcons");
handle_material->set_point_size(handle_t->get_width());
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle_t);
handle_material->set_albedo(Color(1, 1, 1));
@@ -6842,7 +6842,7 @@ void EditorNode3DGizmoPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_material", "name", "color", "billboard", "on_top", "use_vertex_color"), &EditorNode3DGizmoPlugin::create_material, DEFVAL(false), DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("create_icon_material", "name", "texture", "on_top", "color"), &EditorNode3DGizmoPlugin::create_icon_material, DEFVAL(false), DEFVAL(Color(1, 1, 1, 1)));
- ClassDB::bind_method(D_METHOD("create_handle_material", "name", "billboard"), &EditorNode3DGizmoPlugin::create_handle_material, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("create_handle_material", "name", "billboard", "texture"), &EditorNode3DGizmoPlugin::create_handle_material, DEFVAL(false), DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("add_material", "name", "material"), &EditorNode3DGizmoPlugin::add_material);
ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorNode3DGizmoPlugin::get_material); //, DEFVAL(Ref<EditorNode3DGizmo>()));
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 4c4faef07f..07f6d69d76 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -866,7 +866,7 @@ protected:
public:
void create_material(const String &p_name, const Color &p_color, bool p_billboard = false, bool p_on_top = false, bool p_use_vertex_color = false);
void create_icon_material(const String &p_name, const Ref<Texture2D> &p_texture, bool p_on_top = false, const Color &p_albedo = Color(1, 1, 1, 1));
- void create_handle_material(const String &p_name, bool p_billboard = false);
+ void create_handle_material(const String &p_name, bool p_billboard = false, const Ref<Texture2D> &p_texture = nullptr);
void add_material(const String &p_name, Ref<StandardMaterial3D> p_material);
Ref<StandardMaterial3D> get_material(const String &p_name, const Ref<EditorNode3DGizmo> &p_gizmo = Ref<EditorNode3DGizmo>());
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index f53130c24d..280f6fafd8 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -224,6 +224,7 @@ void Path3DGizmo::redraw() {
Ref<StandardMaterial3D> path_material = gizmo_plugin->get_material("path_material", this);
Ref<StandardMaterial3D> path_thin_material = gizmo_plugin->get_material("path_thin_material", this);
Ref<StandardMaterial3D> handles_material = gizmo_plugin->get_material("handles");
+ Ref<StandardMaterial3D> sec_handles_material = gizmo_plugin->get_material("sec_handles");
Ref<Curve3D> c = path->get_curve();
if (c.is_null()) {
@@ -281,7 +282,7 @@ void Path3DGizmo::redraw() {
add_handles(handles, handles_material);
}
if (sec_handles.size()) {
- add_handles(sec_handles, handles_material, false, true);
+ add_handles(sec_handles, sec_handles_material, false, true);
}
}
}
@@ -641,5 +642,6 @@ Path3DGizmoPlugin::Path3DGizmoPlugin() {
Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8));
create_material("path_material", path_color);
create_material("path_thin_material", Color(0.5, 0.5, 0.5));
- create_handle_material("handles");
+ create_handle_material("handles", false, Node3DEditor::get_singleton()->get_theme_icon("EditorPathSmoothHandle", "EditorIcons"));
+ create_handle_material("sec_handles", false, Node3DEditor::get_singleton()->get_theme_icon("EditorCurveHandle", "EditorIcons"));
}
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index add5047c99..038b18a648 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1270,10 +1270,6 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri
}
void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath>> *p_renames) {
- if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true))) {
- return;
- }
-
Vector<StringName> base_path;
Node *n = p_node->get_parent();
while (n) {