Files
UnrealEngineUWP/Engine/Source/Programs/Enterprise/Datasmith/DatasmithMaxExporter/DatasmithMax2017.Build.cs
kerim borchaev 7d36311597 [3ds Max] DirectLink: Messages Window rewrite with Slate
Fixed(compared to previous):
- Selection
- Copy(to clipboard) Button
- Colored message types
- Clear button
- Resizing
- Tooltips

#preflight 625ee35f5f498a37c91fba54
#jira UETOOL-5108
#rb benoit.deschenes

[CL 19935575 by kerim borchaev in ue5-main branch]
2022-04-27 01:19:45 -04:00

99 lines
2.9 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public abstract class DatasmithMaxBase : ModuleRules
{
public DatasmithMaxBase(ReadOnlyTargetRules Target)
: base(Target)
{
bUseRTTI = true;
// To avoid clashes with Max SDK
// todo: separate Slate code from 3ds max to a module
bUseUnity = false;
PublicDefinitions.Add("NEW_DIRECTLINK_PLUGIN=1");
PrivateDependencyModuleNames.AddRange(
new string[]
{
"DatasmithExporter",
"DatasmithExporterUI",
"UdpMessaging", // required for DirectLink networking
"UEOpenExr",
"Slate",
"SlateCore",
}
);
PrivateIncludePaths.AddRange( new string[] { "Runtime/Launch/Public", "Runtime/Launch/Private", ModuleDirectory } );
// Max SDK setup
{
string MaxVersionString = GetMaxVersion();
string MaxSDKLocation = "";
// Try with build machine setup
string SDKRootEnvVar = System.Environment.GetEnvironmentVariable("UE_SDKS_ROOT");
if (SDKRootEnvVar != null && SDKRootEnvVar != "")
{
MaxSDKLocation = Path.Combine(SDKRootEnvVar, "HostWin64", "Win64", "3dsMax", MaxVersionString);
}
if (!Directory.Exists(MaxSDKLocation))
{
// Try with custom setup
string MaxSDKEnvVar = System.Environment.GetEnvironmentVariable("ADSK_3DSMAX_SDK_" + MaxVersionString);
if (MaxSDKEnvVar != null && MaxSDKEnvVar != "")
{
MaxSDKLocation = MaxSDKEnvVar;
}
}
// Make sure this version of Max is actually installed
if (Directory.Exists(MaxSDKLocation))
{
PrivateIncludePaths.Add(Path.Combine(MaxSDKLocation, "include"));
string LibraryPaths = Path.Combine(MaxSDKLocation, "lib", "x64", "Release");
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "assetmanagement.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "bmm.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "core.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "geom.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "maxutil.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "Maxscrpt.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPaths, "mesh.lib"));
}
}
// Itoo ForestPack/RailClone API
string ItooInterfaceLocation = Path.Combine(ModuleDirectory, "ThirdParty", "Itoo");
bool bWithItooInterface = Directory.Exists(ItooInterfaceLocation);
PublicDefinitions.Add("WITH_ITOO_INTERFACE=" + (bWithItooInterface ? "1" : "0"));
if (bWithItooInterface)
{
PrivateIncludePaths.Add(ItooInterfaceLocation);
}
}
public abstract string GetMaxVersion();
}
[SupportedPlatforms("Win64")]
public class DatasmithMax2017 : DatasmithMaxBase
{
public DatasmithMax2017(ReadOnlyTargetRules Target)
: base(Target)
{
}
public override string GetMaxVersion() { return "2017"; }
}
}