From 8f48eeaa8833066e050e15bb6978ed5beb051212 Mon Sep 17 00:00:00 2001 From: mrezai Date: Sun, 22 Oct 2017 21:24:20 +0330 Subject: [PATCH] Fix disable_3d=yes compile errors --- scene/3d/SCsub | 3 +++ scene/register_scene_types.cpp | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scene/3d/SCsub b/scene/3d/SCsub index 72739b527e1..4008f4f1963 100644 --- a/scene/3d/SCsub +++ b/scene/3d/SCsub @@ -7,6 +7,9 @@ if env['disable_3d']: env.scene_sources.append("3d/spatial.cpp") env.scene_sources.append("3d/skeleton.cpp") + env.scene_sources.append("3d/particles.cpp") + env.scene_sources.append("3d/visual_instance.cpp") + env.scene_sources.append("3d/scenario_fx.cpp") else: env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 75268aad1f8..3bdfe097c96 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -152,6 +152,10 @@ #include "scene/resources/world_2d.h" #include "scene/scene_string_names.h" +#include "scene/3d/particles.h" +#include "scene/3d/scenario_fx.h" +#include "scene/3d/spatial.h" + #ifndef _3D_DISABLED #include "scene/3d/area.h" #include "scene/3d/arvr_nodes.h" @@ -169,7 +173,6 @@ #include "scene/3d/multimesh_instance.h" #include "scene/3d/navigation.h" #include "scene/3d/navigation_mesh.h" -#include "scene/3d/particles.h" #include "scene/3d/path.h" #include "scene/3d/physics_body.h" #include "scene/3d/physics_joint.h" @@ -180,9 +183,7 @@ #include "scene/3d/reflection_probe.h" #include "scene/3d/remote_transform.h" #include "scene/3d/room_instance.h" -#include "scene/3d/scenario_fx.h" #include "scene/3d/skeleton.h" -#include "scene/3d/spatial.h" #include "scene/3d/sprite_3d.h" #include "scene/3d/vehicle_body.h" #include "scene/3d/visibility_notifier.h" @@ -551,7 +552,9 @@ void register_scene_types() { ClassDB::register_class(); ClassDB::register_class(); +#ifndef _3D_DISABLED ClassDB::register_class(); +#endif ClassDB::register_virtual_class(); ClassDB::register_class();