summaryrefslogtreecommitdiff
path: root/modules/fbx/editor_scene_importer_fbx.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-06 09:43:08 +0100
committerGitHub <noreply@github.com>2021-01-06 09:43:08 +0100
commitc197a565f293f98fcc1f8188cf9aedfe174b8382 (patch)
tree1263d2bbf15e2e7fba75dd22788492f33a949110 /modules/fbx/editor_scene_importer_fbx.cpp
parentcdfcf68af96fa3b9c0e78445e042bc60dff365f7 (diff)
parent74a72cf85eb52f92436ea2e1bf1f74b6fc4ef912 (diff)
Merge pull request #44900 from RevoluPowered/fbx-add-blender-support
Preliminary Blender FBX support [4.0]
Diffstat (limited to 'modules/fbx/editor_scene_importer_fbx.cpp')
-rw-r--r--modules/fbx/editor_scene_importer_fbx.cpp10
1 files changed, 7 insertions, 3 deletions
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;