From 4c69e8c026b9e2a1cc551e22554bb398ee201674 Mon Sep 17 00:00:00 2001 From: 398utubzyt <398utubzyt@gmail.com> Date: Wed, 28 Feb 2024 05:09:29 -0800 Subject: [PATCH] Fix compilation errors when `DISABLE_DEPRECATED` is defined --- core/object/class_db.cpp | 2 ++ modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp | 2 +- modules/gltf/editor/editor_scene_importer_gltf.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index 63adc5b5021..231a8e4d686 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -599,7 +599,9 @@ ObjectGDExtension *ClassDB::get_placeholder_extension(const StringName &p_class) placeholder_extension->property_can_revert = &PlaceholderExtensionInstance::placeholder_instance_property_can_revert; placeholder_extension->property_get_revert = &PlaceholderExtensionInstance::placeholder_instance_property_get_revert; placeholder_extension->validate_property = &PlaceholderExtensionInstance::placeholder_instance_validate_property; +#ifndef DISABLE_DEPRECATED placeholder_extension->notification = nullptr; +#endif // DISABLE_DEPRECATED placeholder_extension->notification2 = &PlaceholderExtensionInstance::placeholder_instance_notification; placeholder_extension->to_string = &PlaceholderExtensionInstance::placeholder_instance_to_string; placeholder_extension->reference = &PlaceholderExtensionInstance::placeholder_instance_reference; diff --git a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp index 3ef54ec0df8..b615b5aed83 100644 --- a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp +++ b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp @@ -121,7 +121,7 @@ Node *EditorSceneFormatImporterFBX2GLTF::import_scene(const String &p_path, uint bool remove_immutable = p_options.has("animation/remove_immutable_tracks") ? (bool)p_options["animation/remove_immutable_tracks"] : true; return gltf->generate_scene(state, (float)p_options["animation/fps"], trimming, remove_immutable); #else - return gltf->create_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"], (bool)p_options["animation/remove_immutable_tracks"]); + return gltf->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"], (bool)p_options["animation/remove_immutable_tracks"]); #endif } diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 38d7f5521b5..78beaac3ed0 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -75,7 +75,7 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t bool remove_immutable = p_options.has("animation/remove_immutable_tracks") ? (bool)p_options["animation/remove_immutable_tracks"] : true; return gltf->generate_scene(state, (float)p_options["animation/fps"], trimming, remove_immutable); #else - return gltf->create_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"], (bool)p_options["animation/remove_immutable_tracks"]); + return gltf->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"], (bool)p_options["animation/remove_immutable_tracks"]); #endif }