mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
This commit is contained in:
parent
741bbb9d7c
commit
6f51eca1e3
90 changed files with 1075 additions and 272 deletions
|
@ -130,8 +130,8 @@ bool CreateDialog::_should_hide_type(const String &p_type) const {
|
|||
}
|
||||
|
||||
if (ClassDB::class_exists(p_type)) {
|
||||
if (!ClassDB::can_instantiate(p_type)) {
|
||||
return true; // Can't create abstract class.
|
||||
if (!ClassDB::can_instantiate(p_type) || ClassDB::is_virtual(p_type)) {
|
||||
return true; // Can't create abstract or virtual class.
|
||||
}
|
||||
|
||||
if (!ClassDB::is_parent_class(p_type, base_type)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue