File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ void register_core_types() {
176176 GDREGISTER_VIRTUAL_CLASS (ScriptExtension);
177177 GDREGISTER_VIRTUAL_CLASS (ScriptLanguageExtension);
178178
179- GDREGISTER_VIRTUAL_CLASS (MissingResource);
179+ GDREGISTER_CLASS (MissingResource);
180180 GDREGISTER_CLASS (Image);
181181
182182 GDREGISTER_CLASS (Shortcut);
Original file line number Diff line number Diff line change @@ -856,6 +856,8 @@ CreateDialog::CreateDialog() {
856856
857857 type_blacklist.insert (" PluginScript" ); // PluginScript must be initialized before use, which is not possible here.
858858 type_blacklist.insert (" ScriptCreateDialog" ); // This is an exposed editor Node that doesn't have an Editor prefix.
859+ type_blacklist.insert (" MissingNode" );
860+ type_blacklist.insert (" MissingResource" );
859861
860862 HSplitContainer *hsc = memnew (HSplitContainer);
861863 add_child (hsc);
Original file line number Diff line number Diff line change @@ -671,16 +671,28 @@ String EditorResourcePicker::_get_resource_type(const Ref<Resource> &p_resource)
671671 return res_type;
672672}
673673
674+ static bool _should_hide_type (const StringName &p_type) {
675+ if (ClassDB::is_virtual (p_type)) {
676+ return true ;
677+ }
678+
679+ if (p_type == SNAME (" MissingResource" )) {
680+ return true ;
681+ }
682+
683+ return false ;
684+ }
685+
674686static void _add_allowed_type (const StringName &p_type, List<StringName> *p_vector) {
675687 if (p_vector->find (p_type)) {
676688 // Already added.
677689 return ;
678690 }
679691
680692 if (ClassDB::class_exists (p_type)) {
681- // Engine class,
693+ // Engine class.
682694
683- if (!ClassDB::is_virtual (p_type)) {
695+ if (!_should_hide_type (p_type)) {
684696 p_vector->push_back (p_type);
685697 }
686698
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ void register_scene_types() {
411411 OS::get_singleton ()->yield (); // may take time to init
412412
413413 GDREGISTER_CLASS (Node);
414- GDREGISTER_VIRTUAL_CLASS (MissingNode);
414+ GDREGISTER_CLASS (MissingNode);
415415 GDREGISTER_ABSTRACT_CLASS (InstancePlaceholder);
416416
417417 GDREGISTER_ABSTRACT_CLASS (CanvasItem);
You can’t perform that action at this time.
0 commit comments