DocData: Skip unexposed classes

Properly expose classes that we actually want accessible.
This commit is contained in:
Rémi Verschelde 2020-04-20 12:29:34 +02:00
parent 088c2a0870
commit 0ef8bcac4d
16 changed files with 26 additions and 158 deletions

View file

@ -84,8 +84,6 @@ public:
};
class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
GDCLASS(ResourceFormatLoaderCrypto, ResourceFormatLoader);
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@ -94,8 +92,6 @@ public:
};
class ResourceFormatSaverCrypto : public ResourceFormatSaver {
GDCLASS(ResourceFormatSaverCrypto, ResourceFormatSaver);
public:
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const;

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="IP_Unix" inherits="IP" version="4.0">
<brief_description>
UNIX IP support. See [IP].
</brief_description>
<description>
UNIX-specific implementation of IP support functions. See [IP].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MonoGCHandle" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsDirectBodyState2DSW" inherits="PhysicsDirectBodyState2D" version="4.0">
<brief_description>
Software implementation of [PhysicsDirectBodyState2D].
</brief_description>
<description>
Software implementation of [PhysicsDirectBodyState2D]. This object exposes no new methods or properties and should not be used, as [PhysicsDirectBodyState2D] selects the best implementation available.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsServer2DSW" inherits="PhysicsServer2D" version="4.0">
<brief_description>
Software implementation of [PhysicsServer2D].
</brief_description>
<description>
This class exposes no new methods or properties and should not be used, as [PhysicsServer2D] automatically selects the best implementation available.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceFormatLoaderCrypto" inherits="ResourceFormatLoader" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceFormatSaverCrypto" inherits="ResourceFormatSaver" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -243,6 +243,12 @@ void DocData::generate(bool p_basic_types) {
Set<StringName> setters_getters;
String name = classes.front()->get();
if (!ClassDB::is_class_exposed(name)) {
print_verbose(vformat("Class '%s' is not exposed, skipping.", name));
classes.pop_front();
continue;
}
String cname = name;
if (cname.begins_with("_")) //proxy class
cname = cname.substr(1, name.length());

View file

@ -1162,9 +1162,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
ProjectSettings::get_singleton()->set_custom_property_info("debug/settings/fps/force_fps", PropertyInfo(Variant::INT, "debug/settings/fps/force_fps", PROPERTY_HINT_RANGE, "0,120,1,or_greater"));
GLOBAL_DEF("debug/settings/stdout/print_fps", false);
GLOBAL_DEF("debug/settings/stdout/verbose_stdout", false);
if (!OS::get_singleton()->_verbose_stdout) //overridden
OS::get_singleton()->_verbose_stdout = GLOBAL_DEF("debug/settings/stdout/verbose_stdout", false);
if (!OS::get_singleton()->_verbose_stdout) { // Not manually overridden.
OS::get_singleton()->_verbose_stdout = GLOBAL_GET("debug/settings/stdout/verbose_stdout");
}
if (frame_delay == 0) {
frame_delay = GLOBAL_DEF("application/run/frame_delay_msec", 0);

View file

@ -4,14 +4,3 @@ def can_build(env, platform):
def configure(env):
pass
def get_doc_classes():
return [
"BulletPhysicsDirectBodyState3D",
"BulletPhysicsServer3D",
]
def get_doc_path():
return "doc_classes"

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BulletPhysicsDirectBodyState3D" inherits="PhysicsDirectBodyState3D" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BulletPhysicsServer3D" inherits="PhysicsServer3D" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View file

@ -11,7 +11,6 @@ def get_doc_classes():
"@GDScript",
"GDScript",
"GDScriptFunctionState",
"GDScriptNativeClass",
]

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GDScriptNativeClass" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="new">
<return type="Variant">
</return>
<description>
</description>
</method>
</methods>
<constants>
</constants>
</class>

View file

@ -757,8 +757,16 @@ void register_scene_types() {
ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree");
// Renamed in 4.0.
// Keep alphabetical ordering to easily locate classes and avoid duplicates.
ClassDB::add_compatibility_class("AnimatedSprite", "AnimatedSprite2D");
ClassDB::add_compatibility_class("Area", "Area3D");
ClassDB::add_compatibility_class("ARVRCamera", "XRCamera3D");
ClassDB::add_compatibility_class("ARVRController", "XRController3D");
ClassDB::add_compatibility_class("ARVRAnchor", "XRAnchor3D");
ClassDB::add_compatibility_class("ARVRInterface", "XRInterface");
ClassDB::add_compatibility_class("ARVROrigin", "XROrigin3D");
ClassDB::add_compatibility_class("ARVRPositionalTracker", "XRPositionalTracker");
ClassDB::add_compatibility_class("ARVRServer", "XRServer");
ClassDB::add_compatibility_class("BoneAttachment", "BoneAttachment3D");
ClassDB::add_compatibility_class("BoxShape", "BoxShape3D");
ClassDB::add_compatibility_class("BulletPhysicsDirectBodyState", "BulletPhysicsDirectBodyState3D");
@ -806,6 +814,7 @@ void register_scene_types() {
ClassDB::add_compatibility_class("Navigation2DServer", "NavigationServer2D");
ClassDB::add_compatibility_class("NavigationServer", "NavigationServer3D");
ClassDB::add_compatibility_class("OmniLight", "OmniLight3D");
ClassDB::add_compatibility_class("PanoramaSky", "Sky");
ClassDB::add_compatibility_class("Particles", "GPUParticles3D");
ClassDB::add_compatibility_class("Particles2D", "GPUParticles2D");
ClassDB::add_compatibility_class("Path", "Path3D");
@ -827,6 +836,7 @@ void register_scene_types() {
ClassDB::add_compatibility_class("PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D");
ClassDB::add_compatibility_class("PinJoint", "PinJoint3D");
ClassDB::add_compatibility_class("PlaneShape", "WorldMarginShape3D");
ClassDB::add_compatibility_class("ProceduralSky", "Sky");
ClassDB::add_compatibility_class("ProximityGroup", "ProximityGroup3D");
ClassDB::add_compatibility_class("RayCast", "RayCast3D");
ClassDB::add_compatibility_class("RayShape", "RayShape3D");
@ -857,12 +867,6 @@ void register_scene_types() {
ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp");
ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform", "VisualShaderNodeFloatUniform");
ClassDB::add_compatibility_class("World", "World3D");
ClassDB::add_compatibility_class("ProceduralSky", "Sky");
ClassDB::add_compatibility_class("PanoramaSky", "Sky");
ClassDB::add_compatibility_class("ARVRCamera", "XRCamera3D");
ClassDB::add_compatibility_class("ARVROrigin", "XROrigin3D");
ClassDB::add_compatibility_class("ARVRController", "XRController3D");
ClassDB::add_compatibility_class("ARVRAnchor", "XRAnchor3D");
#endif

View file

@ -62,6 +62,7 @@
#include "physics_3d/physics_server_3d_sw.h"
#include "physics_server_2d.h"
#include "physics_server_3d.h"
#include "rendering/rendering_device.h"
#include "rendering_server.h"
#include "servers/rendering/shader_types.h"
#include "xr/xr_interface.h"
@ -100,18 +101,18 @@ void register_server_types() {
ClassDB::register_virtual_class<DisplayServer>();
ClassDB::register_virtual_class<RenderingServer>();
ClassDB::register_class<AudioServer>();
ClassDB::register_virtual_class<PhysicsServer3D>();
ClassDB::register_virtual_class<PhysicsServer2D>();
ClassDB::register_virtual_class<PhysicsServer3D>();
ClassDB::register_virtual_class<NavigationServer2D>();
ClassDB::register_virtual_class<NavigationServer3D>();
ClassDB::register_class<XRServer>();
ClassDB::register_class<CameraServer>();
ClassDB::register_virtual_class<RenderingDevice>();
ClassDB::register_virtual_class<XRInterface>();
ClassDB::register_class<XRPositionalTracker>();
ClassDB::add_compatibility_class("ARVRServer", "XRServer");
ClassDB::add_compatibility_class("ARVRInterface", "XRInterface");
ClassDB::add_compatibility_class("ARVRPositionalTracker", "XRPositionalTracker");
ClassDB::register_virtual_class<AudioStream>();
ClassDB::register_virtual_class<AudioStreamPlayback>();
ClassDB::register_virtual_class<AudioStreamPlaybackResampled>();