sideeffects / HoudiniEngineForUnreal-v2

Houdini Engine Plugin for Unreal Engine 4 - Version 2
http://www.sidefx.com/unreal
Other
295 stars 75 forks source link

Alpha 3 - LOCTEXT_NAMESPACE errors & warning #31

Closed Robmaister closed 3 years ago

Robmaister commented 3 years ago

Just integrated Alpha 3 into our 4.24 project. It looks like there's an inconsistency between master and the 4.24/4.23 branches with the namespace at the top of SNewFilePathPicker.cpp, I get a warning about redefining HOUDINI_LOCTEXT_NAMESPACE. Commented the line out to match up with the master branch.

I also had to add a #define LOCTEXT_NAMESPACE HOUDINI_LOCTEXT_NAMESPACE to the top of HoudiniParameterDetails to get rid of errors.

Compiling fine otherwise :)

EDIT: Had to change the line at the top of SNewFilePathPicker.cpp to define it as LOCTEXT_NAMESPACE. Guessing the unity build file grouping changed while testing something else and the original namespace was pulled from an earlier cpp file, so there's probably another undef missing somewhere

Robmaister commented 3 years ago

I see it's now defined in the editor private PCH, so I'm locally undef-ing it in SNewFilePathPicker.cpp, commenting out the remaining #defines at the top of cpp files, and ensuring all cpp files do not end with an undef

Robmaister commented 3 years ago

Ok so for most of the cpp files in the HoudiniEngineEditor module, I've commented out the lines:

The only exception is SNewFilePathPicker.cpp, which I've set up as:

#ifdef LOCTEXT_NAMESPACE
    #define PREV_LOCTEXT_NAMESPACE LOCTEXT_NAMESPACE
    #undef LOCTEXT_NAMESPACE
#endif

#define LOCTEXT_NAMESPACE "SNewFilePathPicker"

// Body of file...

#undef LOCTEXT_NAMESPACE

#ifdef PREV_LOCTEXT_NAMESPACE
    #define LOCTEXT_NAMESPACE PREV_LOCTEXT_NAMESPACE
    #undef PREV_LOCTEXT_NAMESPACE
#endif

Intellisense will not be happy with the removal of the PCH include, but it will all still compile just fine.

dpernuit commented 3 years ago

Hi Rob,

As mentioned on the other issue, I found out about these unity build issues after publishing the alpha3 update, and will commit an update for it shortly. The actual fix for this was to remove the #define in the PCH file, and ensure that all cpp files have proper #define and #undef .

Cheers