summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-12-08 15:22:48 +0100
committerYuri Sizov <yuris@humnom.net>2023-12-08 15:22:48 +0100
commit0481a0b8b3f8db1f2cb4c341eab870782f34815e (patch)
tree9dadb3706ad5453ba38f829a26136b3eaf372888 /editor/editor_properties.cpp
parentae4e48246a8aa1ebd59772dc1d9b867859221aca (diff)
parent7559eb1667da2329ba4bf216a1030079c4ee96e4 (diff)
downloadredot-engine-0481a0b8b3f8db1f2cb4c341eab870782f34815e.tar.gz
Merge pull request #82528 from SaracenOne/path_types
Add support for exporting script classes without a name
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 2d35d4e9ac..6d27829e2e 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2929,6 +2929,14 @@ bool EditorPropertyNodePath::is_drop_valid(const Dictionary &p_drag_data) const
if (dropped_node->is_class(E) ||
EditorNode::get_singleton()->is_object_of_custom_type(dropped_node, E)) {
return true;
+ } else {
+ Ref<Script> dropped_node_script = dropped_node->get_script();
+ while (dropped_node_script.is_valid()) {
+ if (dropped_node_script->get_path() == E) {
+ return true;
+ }
+ dropped_node_script = dropped_node_script->get_base_script();
+ }
}
}