Browse Source

Merge pull request #15916 from touilleMan/disable-pluginscritp-in-dialog-box

Hide only PluginScript in dialog box
George Marques 7 years ago
parent
commit
a695510674
1 changed files with 3 additions and 2 deletions
  1. 3 2
      editor/create_dialog.cpp

+ 3 - 2
editor/create_dialog.cpp

@@ -255,8 +255,9 @@ void CreateDialog::_update_search() {
 		if (base_type == "Node" && type.begins_with("Editor"))
 		if (base_type == "Node" && type.begins_with("Editor"))
 			continue; // do not show editor nodes
 			continue; // do not show editor nodes
 
 
-		if (base_type == "Resource" && ClassDB::is_parent_class(type, "Script"))
-			continue; // do not show script nodes
+		if (base_type == "Resource" && ClassDB::is_parent_class(type, "PluginScript"))
+			// PluginScript must be initialized before use, which is not possible here
+			continue;
 
 
 		if (!ClassDB::can_instance(type))
 		if (!ClassDB::can_instance(type))
 			continue; // can't create what can't be instanced
 			continue; // can't create what can't be instanced