Files
UnrealEngineUWP/Engine/Source/Programs/Enterprise/Datasmith/DatasmithMaxExporter/DatasmithMax2017.Build.cs

99 lines
2.9 KiB
C#
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public abstract class DatasmithMaxBase : ModuleRules
{
public DatasmithMaxBase(ReadOnlyTargetRules Target)
: base(Target)
{
3DS MAX DirectLink plugin - very WIP --- Ho to use. Build with environment variable set: DATASMITH_3DSMAX_PLUGIN_WITH_DIRECTLINK=1 Note - it should build DatasmithMax2022.gup in Engine\Binaries\Win64\3DSMax\2022 Add that ..Engine\Binaries\Win64\3DSMax\2022 folder to Max pluging paths. Max menu - Customize/Configure User and System Paths/3rd Party Plugins Execute Engine\Source\Programs\Enterprise\Datasmith\DatasmithMaxExporter\Extras\3dsMaxScripts\UI\DatasmithDialog.ms This will activate the plugin and create UI Sync/Connections/Export buttons should work --- Review disclaimer: - This is very preliminary review! - All in one file for now - Some code duplicated from baseline - like exporting hierarchy. Syncing is quite different from straight export! - Some baseline plugin code changed to be able to reuse - one which seemed to need little interference, less chance to break. - Export - most hierarchy export, with transforms, refscene; geometry - basic GeomObj only, materials - already using full existing plugin's export code - Missing export(to be on par with existing) - a lot! Other object types, collision, pivots, instances, forest.. - Change tracking - geometry/transforms/material assignment/material changes basically working. But lot to add/fix(e.g. hacky material re-export) - Slate UI working - Key functions exported to MaxScript - Built/tested only in 2022 #rb JeanLuc.Corenthin #jira UETOOL-3895 #ROBOMERGE-AUTHOR: kerim.borchaev #ROBOMERGE-SOURCE: CL 17595504 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257) [CL 17595522 by kerim borchaev in ue5-release-engine-test branch]
2021-09-22 10:22:19 -04:00
bUseRTTI = true;
// To avoid clashes with Max SDK
// todo: separate Slate code from 3ds max to a module
bUseUnity = false;
3DS MAX DirectLink plugin - very WIP --- Ho to use. Build with environment variable set: DATASMITH_3DSMAX_PLUGIN_WITH_DIRECTLINK=1 Note - it should build DatasmithMax2022.gup in Engine\Binaries\Win64\3DSMax\2022 Add that ..Engine\Binaries\Win64\3DSMax\2022 folder to Max pluging paths. Max menu - Customize/Configure User and System Paths/3rd Party Plugins Execute Engine\Source\Programs\Enterprise\Datasmith\DatasmithMaxExporter\Extras\3dsMaxScripts\UI\DatasmithDialog.ms This will activate the plugin and create UI Sync/Connections/Export buttons should work --- Review disclaimer: - This is very preliminary review! - All in one file for now - Some code duplicated from baseline - like exporting hierarchy. Syncing is quite different from straight export! - Some baseline plugin code changed to be able to reuse - one which seemed to need little interference, less chance to break. - Export - most hierarchy export, with transforms, refscene; geometry - basic GeomObj only, materials - already using full existing plugin's export code - Missing export(to be on par with existing) - a lot! Other object types, collision, pivots, instances, forest.. - Change tracking - geometry/transforms/material assignment/material changes basically working. But lot to add/fix(e.g. hacky material re-export) - Slate UI working - Key functions exported to MaxScript - Built/tested only in 2022 #rb JeanLuc.Corenthin #jira UETOOL-3895 #ROBOMERGE-AUTHOR: kerim.borchaev #ROBOMERGE-SOURCE: CL 17595504 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257) [CL 17595522 by kerim borchaev in ue5-release-engine-test branch]
2021-09-22 10:22:19 -04:00
PublicDefinitions.Add("NEW_DIRECTLINK_PLUGIN=1");
3DS MAX DirectLink plugin - very WIP --- Ho to use. Build with environment variable set: DATASMITH_3DSMAX_PLUGIN_WITH_DIRECTLINK=1 Note - it should build DatasmithMax2022.gup in Engine\Binaries\Win64\3DSMax\2022 Add that ..Engine\Binaries\Win64\3DSMax\2022 folder to Max pluging paths. Max menu - Customize/Configure User and System Paths/3rd Party Plugins Execute Engine\Source\Programs\Enterprise\Datasmith\DatasmithMaxExporter\Extras\3dsMaxScripts\UI\DatasmithDialog.ms This will activate the plugin and create UI Sync/Connections/Export buttons should work --- Review disclaimer: - This is very preliminary review! - All in one file for now - Some code duplicated from baseline - like exporting hierarchy. Syncing is quite different from straight export! - Some baseline plugin code changed to be able to reuse - one which seemed to need little interference, less chance to break. - Export - most hierarchy export, with transforms, refscene; geometry - basic GeomObj only, materials - already using full existing plugin's export code - Missing export(to be on par with existing) - a lot! Other object types, collision, pivots, instances, forest.. - Change tracking - geometry/transforms/material assignment/material changes basically working. But lot to add/fix(e.g. hacky material re-export) - Slate UI working - Key functions exported to MaxScript - Built/tested only in 2022 #rb JeanLuc.Corenthin #jira UETOOL-3895 #ROBOMERGE-AUTHOR: kerim.borchaev #ROBOMERGE-SOURCE: CL 17595504 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257) [CL 17595522 by kerim borchaev in ue5-release-engine-test branch]
2021-09-22 10:22:19 -04:00
PrivateDependencyModuleNames.AddRange(
new string[]
{
3DS MAX DirectLink plugin - very WIP --- Ho to use. Build with environment variable set: DATASMITH_3DSMAX_PLUGIN_WITH_DIRECTLINK=1 Note - it should build DatasmithMax2022.gup in Engine\Binaries\Win64\3DSMax\2022 Add that ..Engine\Binaries\Win64\3DSMax\2022 folder to Max pluging paths. Max menu - Customize/Configure User and System Paths/3rd Party Plugins Execute Engine\Source\Programs\Enterprise\Datasmith\DatasmithMaxExporter\Extras\3dsMaxScripts\UI\DatasmithDialog.ms This will activate the plugin and create UI Sync/Connections/Export buttons should work --- Review disclaimer: - This is very preliminary review! - All in one file for now - Some code duplicated from baseline - like exporting hierarchy. Syncing is quite different from straight export! - Some baseline plugin code changed to be able to reuse - one which seemed to need little interference, less chance to break. - Export - most hierarchy export, with transforms, refscene; geometry - basic GeomObj only, materials - already using full existing plugin's export code - Missing export(to be on par with existing) - a lot! Other object types, collision, pivots, instances, forest.. - Change tracking - geometry/transforms/material assignment/material changes basically working. But lot to add/fix(e.g. hacky material re-export) - Slate UI working - Key functions exported to MaxScript - Built/tested only in 2022 #rb JeanLuc.Corenthin #jira UETOOL-3895 #ROBOMERGE-AUTHOR: kerim.borchaev #ROBOMERGE-SOURCE: CL 17595504 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257) [CL 17595522 by kerim borchaev in ue5-release-engine-test branch]
2021-09-22 10:22:19 -04:00
"DatasmithExporter",
"DatasmithExporterUI",
"UdpMessaging", // required for DirectLink networking
"UEOpenExr",
"Slate",
"SlateCore",
}
);
3DS MAX DirectLink plugin - very WIP --- Ho to use. Build with environment variable set: DATASMITH_3DSMAX_PLUGIN_WITH_DIRECTLINK=1 Note - it should build DatasmithMax2022.gup in Engine\Binaries\Win64\3DSMax\2022 Add that ..Engine\Binaries\Win64\3DSMax\2022 folder to Max pluging paths. Max menu - Customize/Configure User and System Paths/3rd Party Plugins Execute Engine\Source\Programs\Enterprise\Datasmith\DatasmithMaxExporter\Extras\3dsMaxScripts\UI\DatasmithDialog.ms This will activate the plugin and create UI Sync/Connections/Export buttons should work --- Review disclaimer: - This is very preliminary review! - All in one file for now - Some code duplicated from baseline - like exporting hierarchy. Syncing is quite different from straight export! - Some baseline plugin code changed to be able to reuse - one which seemed to need little interference, less chance to break. - Export - most hierarchy export, with transforms, refscene; geometry - basic GeomObj only, materials - already using full existing plugin's export code - Missing export(to be on par with existing) - a lot! Other object types, collision, pivots, instances, forest.. - Change tracking - geometry/transforms/material assignment/material changes basically working. But lot to add/fix(e.g. hacky material re-export) - Slate UI working - Key functions exported to MaxScript - Built/tested only in 2022 #rb JeanLuc.Corenthin #jira UETOOL-3895 #ROBOMERGE-AUTHOR: kerim.borchaev #ROBOMERGE-SOURCE: CL 17595504 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257) [CL 17595522 by kerim borchaev in ue5-release-engine-test branch]
2021-09-22 10:22:19 -04:00
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"; }
}
}