We are working on an editor plugin that depends on the ModelingToolsEditorMode plugin. We have noticed that the “ENABLE_STYLUS_SUPPORT” define is used within public headers in ModelingToolsEditorModeToolkit.h, whereas it has only been added to the PrivateDefinitions Array in ModelingToolsEditorMode.Build.cs. As a result, we are having to redefine this macro in our own plugin’s Build.cs file when including ModelingToolsEditorModeToolkit.h, failing which we are unable to compile.
Would it be possible for this to be modified in the future so that we can remove this duplicate code from our build file?
[Attachment Removed]
Hi,
Thanks for reporting. I have created a JIRA to track this: Unreal Engine Issues and Bug Tracker (UE\-361056\). The JIRA will be reviewed and made public within the next 48h normally. Hopefully, this is going to be addressed for UE 5.8.
Regards,
Patrick
[Attachment Removed]
Hi,
No problems, I think the right solution would be to remove the member or make the type opaque, so that the type doesn’t need to be know in the .h and in the .cpp, the code cast it to the actual type when needed. It requires a bit of work.
Regards,
Patrick
[Attachment Removed]
Hi Patrick,
Thank you for your response and update! I wanted to provide some additional findings on the same:
I tried making a local engine mod by changing “ENABLE_STYLUS_SUPPORT” to a PublicDefinition in ModelingToolsEditorMode.Build.cs, and came upon the following errors from SkeletalMeshModelingToolsEditorMode (which depends on ModelingToolsEditorMode):
Engine\Plugins\Experimental\Animation\SkeletalMeshModelingTools\Source\SkeletalMeshModelingTools\Private\SkeletalMeshModelingToolsEditorMode.cpp(18): error C2220: the following warning is treated as an error
Engine\Plugins\Experimental\Animation\SkeletalMeshModelingTools\Source\SkeletalMeshModelingTools\Private\SkeletalMeshModelingToolsEditorMode.cpp(18): warning C4005: 'ENABLE_STYLUS_SUPPORT': macro redefinition
Due to this bit of code from SkeletalMeshModelingToolsEditorMode.cpp:
// Stylus support is currently disabled due to issues with the stylus plugin
// We are leaving the code in this cpp file, defined out, so that it is easier to bring back if/when the stylus plugin is improved.
#define ENABLE_STYLUS_SUPPORT 0
We are therefore unable to make a local engine mod due to these additional dependencies.
Warm regards,
Amritha
[Attachment Removed]