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 @@ -653,16 +653,28 @@ String EditorResourcePicker::_get_resource_type(const Ref<Resource> &p_resource)
653653 return res_type;
654654}
655655
656+ static bool _should_hide_type (const StringName &p_type) {
657+ if (ClassDB::is_virtual (p_type)) {
658+ return true ;
659+ }
660+
661+ if (p_type == SNAME (" MissingResource" )) {
662+ return true ;
663+ }
664+
665+ return false ;
666+ }
667+
656668static void _add_allowed_type (const StringName &p_type, List<StringName> *p_vector) {
657669 if (p_vector->find (p_type)) {
658670 // Already added.
659671 return ;
660672 }
661673
662674 if (ClassDB::class_exists (p_type)) {
663- // Engine class,
675+ // Engine class.
664676
665- if (!ClassDB::is_virtual (p_type)) {
677+ if (!_should_hide_type (p_type)) {
666678 p_vector->push_back (p_type);
667679 }
668680
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