From 0ef8bcac4d05a998e94d1a8b3db4f47401e5d730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 20 Apr 2020 12:29:34 +0200 Subject: DocData: Skip unexposed classes Properly expose classes that we actually want accessible. --- core/crypto/crypto.h | 4 ---- doc/classes/IP_Unix.xml | 15 --------------- doc/classes/MonoGCHandle.xml | 13 ------------- doc/classes/PhysicsDirectBodyState2DSW.xml | 15 --------------- doc/classes/PhysicsServer2DSW.xml | 15 --------------- doc/classes/ResourceFormatLoaderCrypto.xml | 13 ------------- doc/classes/ResourceFormatSaverCrypto.xml | 13 ------------- editor/doc_data.cpp | 6 ++++++ main/main.cpp | 6 ++++-- modules/bullet/config.py | 11 ----------- .../doc_classes/BulletPhysicsDirectBodyState3D.xml | 13 ------------- modules/bullet/doc_classes/BulletPhysicsServer3D.xml | 13 ------------- modules/gdscript/config.py | 1 - modules/gdscript/doc_classes/GDScriptNativeClass.xml | 19 ------------------- scene/register_scene_types.cpp | 16 ++++++++++------ servers/register_server_types.cpp | 11 ++++++----- 16 files changed, 26 insertions(+), 158 deletions(-) delete mode 100644 doc/classes/IP_Unix.xml delete mode 100644 doc/classes/MonoGCHandle.xml delete mode 100644 doc/classes/PhysicsDirectBodyState2DSW.xml delete mode 100644 doc/classes/PhysicsServer2DSW.xml delete mode 100644 doc/classes/ResourceFormatLoaderCrypto.xml delete mode 100644 doc/classes/ResourceFormatSaverCrypto.xml delete mode 100644 modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml delete mode 100644 modules/bullet/doc_classes/BulletPhysicsServer3D.xml delete mode 100644 modules/gdscript/doc_classes/GDScriptNativeClass.xml diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h index e515367de5..bcae0a8d91 100644 --- a/core/crypto/crypto.h +++ b/core/crypto/crypto.h @@ -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 *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 *p_extensions) const; diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml deleted file mode 100644 index 79cdf2ce08..0000000000 --- a/doc/classes/IP_Unix.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - UNIX IP support. See [IP]. - - - UNIX-specific implementation of IP support functions. See [IP]. - - - - - - - - diff --git a/doc/classes/MonoGCHandle.xml b/doc/classes/MonoGCHandle.xml deleted file mode 100644 index 1e33dd1359..0000000000 --- a/doc/classes/MonoGCHandle.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/doc/classes/PhysicsDirectBodyState2DSW.xml b/doc/classes/PhysicsDirectBodyState2DSW.xml deleted file mode 100644 index 94fc4213b7..0000000000 --- a/doc/classes/PhysicsDirectBodyState2DSW.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Software implementation of [PhysicsDirectBodyState2D]. - - - Software implementation of [PhysicsDirectBodyState2D]. This object exposes no new methods or properties and should not be used, as [PhysicsDirectBodyState2D] selects the best implementation available. - - - - - - - - diff --git a/doc/classes/PhysicsServer2DSW.xml b/doc/classes/PhysicsServer2DSW.xml deleted file mode 100644 index dac5e360f0..0000000000 --- a/doc/classes/PhysicsServer2DSW.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Software implementation of [PhysicsServer2D]. - - - This class exposes no new methods or properties and should not be used, as [PhysicsServer2D] automatically selects the best implementation available. - - - - - - - - diff --git a/doc/classes/ResourceFormatLoaderCrypto.xml b/doc/classes/ResourceFormatLoaderCrypto.xml deleted file mode 100644 index fda529fdbd..0000000000 --- a/doc/classes/ResourceFormatLoaderCrypto.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/doc/classes/ResourceFormatSaverCrypto.xml b/doc/classes/ResourceFormatSaverCrypto.xml deleted file mode 100644 index 31db8ff4f5..0000000000 --- a/doc/classes/ResourceFormatSaverCrypto.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp index 096be1fe4b..55abc4ff2e 100644 --- a/editor/doc_data.cpp +++ b/editor/doc_data.cpp @@ -243,6 +243,12 @@ void DocData::generate(bool p_basic_types) { Set 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()); diff --git a/main/main.cpp b/main/main.cpp index c625a9cb36..4897e1f20e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -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); diff --git a/modules/bullet/config.py b/modules/bullet/config.py index e8ca273f61..d22f9454ed 100644 --- a/modules/bullet/config.py +++ b/modules/bullet/config.py @@ -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" diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml deleted file mode 100644 index 1c0181bd9c..0000000000 --- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/bullet/doc_classes/BulletPhysicsServer3D.xml b/modules/bullet/doc_classes/BulletPhysicsServer3D.xml deleted file mode 100644 index b20595b4f6..0000000000 --- a/modules/bullet/doc_classes/BulletPhysicsServer3D.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/gdscript/config.py b/modules/gdscript/config.py index 185a10bcb2..6fc227e7f5 100644 --- a/modules/gdscript/config.py +++ b/modules/gdscript/config.py @@ -11,7 +11,6 @@ def get_doc_classes(): "@GDScript", "GDScript", "GDScriptFunctionState", - "GDScriptNativeClass", ] diff --git a/modules/gdscript/doc_classes/GDScriptNativeClass.xml b/modules/gdscript/doc_classes/GDScriptNativeClass.xml deleted file mode 100644 index 0a8982de8e..0000000000 --- a/modules/gdscript/doc_classes/GDScriptNativeClass.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 264295325f..dc3ef5b508 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -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 diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 556f9cd8e3..dd11f9260c 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -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(); ClassDB::register_virtual_class(); ClassDB::register_class(); - ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); ClassDB::register_class(); - ClassDB::add_compatibility_class("ARVRServer", "XRServer"); - ClassDB::add_compatibility_class("ARVRInterface", "XRInterface"); - ClassDB::add_compatibility_class("ARVRPositionalTracker", "XRPositionalTracker"); - ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); -- cgit v1.2.3