Browse Source

FBX: Clarify outdated format error

See #44780.

(cherry picked from commit 1dd75f41e50d336bd199b63d89bad28c00a025e5)
Rémi Verschelde 4 năm trước cách đây
mục cha
commit
10cc044ea5
1 tập tin đã thay đổi với 7 bổ sung8 xóa
  1. 7 8
      modules/fbx/editor_scene_importer_fbx.cpp

+ 7 - 8
modules/fbx/editor_scene_importer_fbx.cpp

@@ -62,8 +62,7 @@ void EditorSceneImporterFBX::get_extensions(List<String> *r_extensions) const {
 	const String fbx_str = "fbx";
 	Vector<String> exts;
 	exts.push_back(fbx_str);
-	_register_project_setting_import(fbx_str, import_setting_string, exts, r_extensions,
-			true);
+	_register_project_setting_import(fbx_str, import_setting_string, exts, r_extensions, true);
 }
 
 void EditorSceneImporterFBX::_register_project_setting_import(const String generic,
@@ -193,11 +192,11 @@ Node *EditorSceneImporterFBX::import_scene(const String &p_path, uint32_t p_flag
 
 				return spatial;
 			} else {
-				print_error("We can't import blender FBX files, they're not implemented correctly at export time and would require several hacks in the FBX importer which could break Maya imports.");
+				ERR_PRINT("We can't import Blender FBX files for the time being. Please favor glTF 2.0 when exporting from Blender.");
 			}
 
 		} else {
-			print_error("Cannot import file: " + p_path + " version of file is unsupported, please re-export in your modelling package file version is: " + itos(doc.FBXVersion()));
+			ERR_PRINT(vformat("Cannot import FBX file: %s. It uses file format %d which is unsupported by Godot. Please re-export it or convert it to a newer format.", p_path, doc.FBXVersion()));
 		}
 	}
 
@@ -593,8 +592,8 @@ Spatial *EditorSceneImporterFBX::_generate_scene(
 
 			print_verbose("populating skeleton with bone: " + bone->bone_name);
 
-			//			// populate bone skeleton - since fbx has no DOM for the skeleton just a node.
-			//			bone->bone_skeleton = fbx_skeleton_inst;
+			//// populate bone skeleton - since fbx has no DOM for the skeleton just a node.
+			//bone->bone_skeleton = fbx_skeleton_inst;
 
 			// now populate bone on the armature node list
 			fbx_skeleton_inst->skeleton_bones.push_back(bone);
@@ -731,8 +730,8 @@ Spatial *EditorSceneImporterFBX::_generate_scene(
 		//
 		// Get Mesh Node Xform only
 		//
-		//		ERR_CONTINUE_MSG(!state.fbx_target_map.has(mesh_id), "invalid xform for the skin pose: " + itos(mesh_id));
-		//		Ref<FBXNode> mesh_node_xform_data = state.fbx_target_map[mesh_id];
+		//ERR_CONTINUE_MSG(!state.fbx_target_map.has(mesh_id), "invalid xform for the skin pose: " + itos(mesh_id));
+		//Ref<FBXNode> mesh_node_xform_data = state.fbx_target_map[mesh_id];
 
 		if (!mesh_skin) {
 			continue; // not a deformer.