summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-04-28 22:49:10 +0200
committerreduz <reduzio@gmail.com>2022-05-03 17:08:09 +0200
commit0a57f964a357976e023b638e872397ba94123776 (patch)
tree73b2d68b63b7634857150b6a31ae281b27cb392f /editor
parentd5d86cb26e65b89a00b644de6eef510d8ca06797 (diff)
Implement missing Node & Resource placeholders
Implemented by request of @neikeq to advance in the GDExtension version of Mono. * If a Resource type is missing upon load, it will be remembered together with its data (Unless manually overriden). * If a Node type is missing upon load, it will be also be remembered together with its data (unless deleted). This feature makes working with GDExtension much easier, as it ensures that missing types no longer cause data loss.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp1
-rw-r--r--editor/icons/MissingNode.svg1
-rw-r--r--editor/icons/MissingResource.svg1
3 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f4caa29a47..2830282d8c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5890,6 +5890,7 @@ EditorNode::EditorNode() {
SceneState::set_disable_placeholders(true);
ResourceLoader::clear_translation_remaps(); // Using no remaps if in editor.
ResourceLoader::clear_path_remaps();
+ ResourceLoader::set_create_missing_resources_if_class_unavailable(true);
Input *id = Input::get_singleton();
diff --git a/editor/icons/MissingNode.svg b/editor/icons/MissingNode.svg
new file mode 100644
index 0000000000..582b244614
--- /dev/null
+++ b/editor/icons/MissingNode.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9902 1.9902a1.0001 1.0001 0 0 0 -.69727 1.7168l4.293 4.293-4.293 4.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.293-4.293 4.293 4.293a1.0001 1.0001 0 1 0 1.4141-1.4141l-4.293-4.293 4.293-4.293a1.0001 1.0001 0 0 0 -.72656-1.7148 1.0001 1.0001 0 0 0 -.6875.30078l-4.293 4.293-4.293-4.293a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#ff5f5f" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/MissingResource.svg b/editor/icons/MissingResource.svg
new file mode 100644
index 0000000000..582b244614
--- /dev/null
+++ b/editor/icons/MissingResource.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9902 1.9902a1.0001 1.0001 0 0 0 -.69727 1.7168l4.293 4.293-4.293 4.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.293-4.293 4.293 4.293a1.0001 1.0001 0 1 0 1.4141-1.4141l-4.293-4.293 4.293-4.293a1.0001 1.0001 0 0 0 -.72656-1.7148 1.0001 1.0001 0 0 0 -.6875.30078l-4.293 4.293-4.293-4.293a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#ff5f5f" fill-rule="evenodd"/></svg>