From 74a72cf85eb52f92436ea2e1bf1f74b6fc4ef912 Mon Sep 17 00:00:00 2001 From: Gordon MacPherson Date: Sun, 3 Jan 2021 20:29:38 +0000 Subject: Preliminary Blender FBX support [4.0] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit limitations: - always has to use generated normal's. - some animations won't be compatible (yet) Co-authored-by: RĂ©mi Verschelde --- modules/fbx/editor_scene_importer_fbx.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/fbx/editor_scene_importer_fbx.cpp') diff --git a/modules/fbx/editor_scene_importer_fbx.cpp b/modules/fbx/editor_scene_importer_fbx.cpp index 5918f4dbed..6576147b2b 100644 --- a/modules/fbx/editor_scene_importer_fbx.cpp +++ b/modules/fbx/editor_scene_importer_fbx.cpp @@ -180,10 +180,12 @@ Node3D *EditorSceneImporterFBX::import_scene(const String &p_path, uint32_t p_fl } if (is_blender_fbx) { - WARN_PRINT("Blender FBX files will not work properly with keyframes or skeletons until we make fixes. Please stand by."); + WARN_PRINT("We don't officially support Blender FBX animations yet, due to issues with upstream Blender,\n" + "so please wait for us to work around remaining issues. We will continue to import the file but it may be broken.\n" + "For minimal breakage, please export FBX from Blender with -Z forward, and Y up."); } - Node3D *spatial = _generate_scene(p_path, &doc, p_flags, p_bake_fps, 8); + Node3D *spatial = _generate_scene(p_path, &doc, p_flags, p_bake_fps, 8, is_blender_fbx); // todo: move to document shutdown (will need to be validated after moving; this code has been validated already) for (FBXDocParser::TokenPtr token : tokens) { if (token) { @@ -327,8 +329,10 @@ Node3D *EditorSceneImporterFBX::_generate_scene( const FBXDocParser::Document *p_document, const uint32_t p_flags, int p_bake_fps, - const int32_t p_max_bone_weights) { + const int32_t p_max_bone_weights, + bool p_is_blender_fbx) { ImportState state; + state.is_blender_fbx = p_is_blender_fbx; state.path = p_path; state.animation_player = NULL; -- cgit v1.2.3