NegInfinity / ProjectExodus

Project Exodus - Unity to Unreal scene/project transfer tool.
BSD 3-Clause "New" or "Revised" License
491 stars 97 forks source link

Fix for building in Unreal 4.22.2 #12

Closed ericblade closed 5 years ago

NegInfinity commented 5 years ago

Hi. Thanks for the submission (and sorry for a slow reply), but I cannot accept this in its current form, as there's very large number of whitespace changes, and this is going to cause problem if I ever need to bisect it.

I incorporated your tweak in resourcemapper, however, as this was an obvious bug.

I see that you chose to manually undef loctext_namespace in C++ files. Did this cause build issues for you?

ericblade commented 5 years ago

Ooops, my bad. I didn't even look at the commit differences :-S I'm.. realizing I'm not even sure how to defeat Visual Studio automatically fixing trailing whitespaces. :-D i'll look into that.

After upgrading from 4.22.1 to 4.22.2 the plugin did not build without undefining LOCTEXT_NAMESPACE at the end of each source file. The other plugin that I have source for does that, as well as one or two of the files in this plugin already doing it, and all the Epic plugins do that as well, so I figured that that was the correct solution for getting errors about redefining LOCTEXT_NAMESPACE.

NegInfinity commented 5 years ago

@ericblade Could you post the error you were getting? Because I tried to compile the plugin project myself two different ways, and I'm receiving any LOCTEXT_NAMESPACE issues at the moment. I'll check epic's plugins, though.

ericblade commented 5 years ago

sure thing, was just rebuilding with the most recent master, thanks

1>Building 4 actions with 8 processes...
1>  [1/4] Module.ExodusImport.cpp
1>F:\unreal\UE_4.22\Engine\Source\Runtime\Slate\Public\Widgets/Input/SSearchBox.h(15): warning C4005: 'LOCTEXT_NAMESPACE': macro redefinition
1>  F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\builders\JointBuilder.cpp(10): note: see previous definition of 'LOCTEXT_NAMESPACE'
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(23): error C2039: 'processTerrains': is not a member of 'JsonImporter'
1>  F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\SkeletalMeshBuilder.h(15): note: see declaration of 'JsonImporter'
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(26): error C3861: 'processTerrain': identifier not found
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(31): error C2039: 'processTerrain': is not a member of 'JsonImporter'
1>  F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\SkeletalMeshBuilder.h(15): note: see declaration of 'JsonImporter'
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(36): error C2065: 'terrainDataMap': undeclared identifier
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(37): error C3536: 'terrainData': cannot be used before it is initialized
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(43): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter\Terrain.cpp(43): error C2100: illegal indirection
1>F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Public\JsonImportCommands.cpp(6): warning C4005: 'LOCTEXT_NAMESPACE': macro redefinition
1>  F:\unreal\projects\IID\Plugins\ExodusImport\Source\ExodusImport\Private\JsonImporter.cpp(43): note: see previous definition of 'LOCTEXT_NAMESPACE'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command "F:\unreal\UE_4.22\Engine\Build\BatchFiles\Build.bat IIDEditor Win64 Development -Project="f:\unreal\projects\IID\IID.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "IID.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
ericblade commented 5 years ago

repushed that with only the actual undefs

NegInfinity commented 5 years ago

@ericblade A similar change was made by me yesterday, please see if it works,

I gotta say that explosive errors after the LOCTEXT_NAMESPACE in your compile error list are a bit unexpected. Were they fixed by undefs?

ericblade commented 5 years ago

Yes, the undefs fix it.