How to fix: reimporting a single mesh from an .fbx with many meshes in it causes the mesh to turn into a huge mesh (all of the meshes in the .fbx combined)
In Blender when you duplicate an object, let’s say Cube, you get a new object with the name Cube.001. However when you export that file to UE4 the importer automatically renames the mesh to Cube_001 because UE4 does not support periods in filenames. This is fine, but what happens when you try to reimport a renamed file? In this example you would reimport the mesh Cube_001, and UE4 then looks in the original .fbx for Cube_001, but it doesn’t exist, since it was originally named Cube.001. So UE4 says “screw it, better get everything then” or something like that. Better than crashing I guess!
You can fix this by editing the binary FBX exporter in Blender. You can find that in BlenderFolder\2.78\scripts\addons\io_scene_fbx, there’s a file called export_fbx_bin.py which is what you want. First save a duplicate of the file if anything goes wrong, then edit the file by searching for the row:
fbx_data_object_elements(objects, ob_obj, scene_data)
It should be line 2791 or around there. Then, right before that line, add this:
ob_obj.name = ob_obj.name.replace(".","_") #replace dots in object names with underscores
Important: first off, make sure you’re using the same spacing! Which means, only use spaces and not tabs. Or you’ll confuse the python code. Secondly the code needs to be at the same “depth”, so it should be aligned with the next row vertically.
When you’re done save the file, and try exporting an .fbx file with objects that have periods in their names. Try importing that file back into Blender and you should see the periods have been replaced with underscores, which is what you want. Now you should be able to reimport Blender meshes with periods in the name without strange things happening!
Mesh names are only used in Import into level for now. Not really necessary until reimporting of single assets in Import into level actually works, but for when it does:
In the same file as above, search for me_key, me, free = scene_data.data_meshes[me_obj].
Add this under that line. me.name = me.name.replace(".","")