summaryrefslogtreecommitdiff
path: root/modules/fbx
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fbx')
-rw-r--r--modules/fbx/data/fbx_material.cpp4
-rw-r--r--modules/fbx/data/fbx_mesh_data.cpp4
-rw-r--r--modules/fbx/data/import_state.h1
-rw-r--r--modules/fbx/editor_scene_importer_fbx.h1
-rw-r--r--modules/fbx/fbx_parser/ByteSwapper.h2
-rw-r--r--modules/fbx/fbx_parser/FBXDocument.cpp2
-rw-r--r--modules/fbx/register_types.cpp2
7 files changed, 9 insertions, 7 deletions
diff --git a/modules/fbx/data/fbx_material.cpp b/modules/fbx/data/fbx_material.cpp
index cf5d70fa5b..fb6c67f7b9 100644
--- a/modules/fbx/data/fbx_material.cpp
+++ b/modules/fbx/data/fbx_material.cpp
@@ -29,6 +29,10 @@
/*************************************************************************/
#include "fbx_material.h"
+
+// FIXME: Shouldn't depend on core_bind.h! Use DirAccessRef like the rest of
+// the engine instead of _Directory.
+#include "core/core_bind.h"
#include "scene/resources/material.h"
#include "scene/resources/texture.h"
#include "tools/validation_tools.h"
diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp
index 0d33b8e7c6..8b4b1e08b3 100644
--- a/modules/fbx/data/fbx_mesh_data.cpp
+++ b/modules/fbx/data/fbx_mesh_data.cpp
@@ -525,7 +525,7 @@ void FBXMeshData::reorganize_vertices(
}
const Vector3 vert_poly_normal = *nrml_arr->getptr(*pid);
- if ((this_vert_poly_normal - vert_poly_normal).length_squared() > CMP_EPSILON) {
+ if (!vert_poly_normal.is_equal_approx(this_vert_poly_normal)) {
// Yes this polygon need duplication.
need_duplication = true;
break;
@@ -586,7 +586,7 @@ void FBXMeshData::reorganize_vertices(
continue;
}
const Vector2 vert_poly_uv = *uvs->getptr(*pid);
- if (((*this_vert_poly_uv) - vert_poly_uv).length_squared() > CMP_EPSILON) {
+ if (!vert_poly_uv.is_equal_approx(*this_vert_poly_uv)) {
// Yes this polygon need duplication.
need_duplication = true;
break;
diff --git a/modules/fbx/data/import_state.h b/modules/fbx/data/import_state.h
index 83bc43faff..9ba60eaacf 100644
--- a/modules/fbx/data/import_state.h
+++ b/modules/fbx/data/import_state.h
@@ -37,7 +37,6 @@
#include "pivot_transform.h"
-#include "core/core_bind.h"
#include "core/io/resource_importer.h"
#include "core/templates/vector.h"
#include "editor/import/resource_importer_scene.h"
diff --git a/modules/fbx/editor_scene_importer_fbx.h b/modules/fbx/editor_scene_importer_fbx.h
index 4bb2c9d21b..4a3b78480b 100644
--- a/modules/fbx/editor_scene_importer_fbx.h
+++ b/modules/fbx/editor_scene_importer_fbx.h
@@ -36,7 +36,6 @@
#include "data/import_state.h"
#include "tools/import_utils.h"
-#include "core/core_bind.h"
#include "core/io/resource_importer.h"
#include "core/string/ustring.h"
#include "core/templates/local_vector.h"
diff --git a/modules/fbx/fbx_parser/ByteSwapper.h b/modules/fbx/fbx_parser/ByteSwapper.h
index 5c16383974..08d38147d5 100644
--- a/modules/fbx/fbx_parser/ByteSwapper.h
+++ b/modules/fbx/fbx_parser/ByteSwapper.h
@@ -70,7 +70,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-/** @file Helper class tp perform various byte oder swappings
+/** @file Helper class tp perform various byte order swappings
(e.g. little to big endian) */
#ifndef BYTE_SWAPPER_H
#define BYTE_SWAPPER_H
diff --git a/modules/fbx/fbx_parser/FBXDocument.cpp b/modules/fbx/fbx_parser/FBXDocument.cpp
index 89c69d2ee8..92c62e68b5 100644
--- a/modules/fbx/fbx_parser/FBXDocument.cpp
+++ b/modules/fbx/fbx_parser/FBXDocument.cpp
@@ -198,7 +198,7 @@ ObjectPtr LazyObject::LoadObject() {
object.reset(new ModelLimbNode(id, element, doc, name));
} else if (strcmp(classtag.c_str(), "IKEffector") && strcmp(classtag.c_str(), "FKEffector")) {
- // FK and IK effectors are not supporte
+ // FK and IK effectors are not supported.
object.reset(new Model(id, element, doc, name));
}
} else if (!strncmp(obtype, "Material", length)) {
diff --git a/modules/fbx/register_types.cpp b/modules/fbx/register_types.cpp
index b615c91cd2..a75da8f3a9 100644
--- a/modules/fbx/register_types.cpp
+++ b/modules/fbx/register_types.cpp
@@ -46,7 +46,7 @@ void register_fbx_types() {
ClassDB::APIType prev_api = ClassDB::get_current_api();
ClassDB::set_current_api(ClassDB::API_EDITOR);
- ClassDB::register_class<EditorSceneImporterFBX>();
+ GDREGISTER_CLASS(EditorSceneImporterFBX);
ClassDB::set_current_api(prev_api);