From 6f51eca1e3045571ccc68414a922e8b0229111f0 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 10 Mar 2022 08:17:38 +0100 Subject: 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. --- modules/csg/csg_shape.cpp | 4 ---- modules/csg/csg_shape.h | 1 - modules/csg/register_types.cpp | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'modules/csg') diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index fec2d3137c..137df52215 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -491,10 +491,6 @@ Vector CSGShape3D::get_brush_faces() { return faces; } -Vector CSGShape3D::get_faces(uint32_t p_usage_flags) const { - return Vector(); -} - void CSGShape3D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_PARENTED: { diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index d16250e30d..4721d0c11c 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -128,7 +128,6 @@ public: virtual Vector get_brush_faces(); virtual AABB get_aabb() const override; - virtual Vector get_faces(uint32_t p_usage_flags) const override; void set_use_collision(bool p_enable); bool is_using_collision() const; diff --git a/modules/csg/register_types.cpp b/modules/csg/register_types.cpp index f01907bef3..f8db42b1a9 100644 --- a/modules/csg/register_types.cpp +++ b/modules/csg/register_types.cpp @@ -36,8 +36,8 @@ void register_csg_types() { #ifndef _3D_DISABLED - GDREGISTER_VIRTUAL_CLASS(CSGShape3D); - GDREGISTER_VIRTUAL_CLASS(CSGPrimitive3D); + GDREGISTER_ABSTRACT_CLASS(CSGShape3D); + GDREGISTER_ABSTRACT_CLASS(CSGPrimitive3D); GDREGISTER_CLASS(CSGMesh3D); GDREGISTER_CLASS(CSGSphere3D); GDREGISTER_CLASS(CSGBox3D); -- cgit v1.2.3