Can't include FBX import headers

I’m trying to use the FBX import pipeline to do some stuff:


#include "Editor/UnrealEd/Private/FbxImporter.h"

This is resulting in this line:


c:\Program Files\Epic Games\4.8\Engine\Source\Editor/UnrealEd/Private/FbxImporter.h(76) : fatal error C1083: Cannot open include file: 'fbxsdk.h': No such file or directory

That’s not even my header file that’s unable to find the file, it’s in the engine file that I’m including above. Any idea how I can resolve this?

Also, what’s with that bizarre change from backslash to forwardslash mid-path?

This usually happens because your build rules don’t include the proper module dependencies, or your PCH is missing a necessary include. It can get very confusing and very frustrating to figure out as in a lot of cases there just isn’t the proper documentation to help, so it comes down to trial and error.

The first thing to do is go to the API documentation and look up the exact class you plan to use, then look at the very bottom of the page to see what Module that class is in. Then ensure that module is properly included as a dependency in your build file.

For FBX stuff I believe you are going to need a dependency on the editor itself, with the UnrealEd module.

Ah yes, modules. I keep forgetting they exist. Thank you!

I already had unrealed in the module dependencies, so I went looking and the fbx import classes aren’t in the documentation. Is it because it’s private?


#include "Editor/UnrealEd/Private/FbxImporter.h"

Also, pretty much nothing can find this, not just FbxImporter.h:


#include <fbxsdk.h>

Can I add the ThirdParty FBX classes from the engine to my plugin?

Edit: When I go to the engine’s Source/Thirdparty/FBX/ directory there’s nothing there but a build file. Is this why it could be failing? Should I replace the default engine project in my solution with a checkout from github?

I expected as much, but randomly including the FBX SDK in my project didn’t solve anything. :slight_smile:

Perhaps I’m going about this wrong. My end goal here is to take some geometry from another source and save it into a static mesh asset in the content browser. Everything I’ve seen so far suggests piggybacking the FBX importer code. Is there perhaps a better way of doing this? I have vertices, all I need is to populate a staticmech object!

I’ve got the same problem. Anything new on this?

I DID have this working, back in 4.8. Now I am trying to get it working again, and no luck. Have you made any progress on getting fbxsdk.h to #include?

Same here, I’m trying to make it work and no luck so far. Have you managed to solve the issue ?

I did… but it’s weird. I downloaded the 4.12 engine source, dropped my plugin (with fbx code) in the engine plugins folder and recompiled the engine. After that it picked up the links and runs fine. It may not work for you, but give it a shot. :slight_smile:

Haha, you were right ! I did the same and it worked perfectly. Thank you for the solution ! I might ask you some more questions if I get stuck with the FBX though, it seems that you’ve used the FFbxImporter fairly extensively… :stuck_out_tongue:

To be able to import and link, a cleanish way to go is to copy the relevant verbiage in the engine’s FBX.Build.cs to your own plugin’s .Build.cs file.

I have the same issue, I solved it by editing my plugin’s “Build.cs” file:
Find the line with “PublicDependencyModuleNames…”, you can see somethings like “Core”, “Engine” , add “FBX” after the existed strings.