Skip to content

Commit

Permalink
Updated the MotionBuilder plugin with LiveLink role. With the role, y…
Browse files Browse the repository at this point in the history
…ou can now stream the camera information automaticly. Programmers can now create their own Role and send specific data.
  • Loading branch information
Patrick Boutot committed Aug 15, 2019
1 parent f2d7912 commit 64a95e2
Show file tree
Hide file tree
Showing 34 changed files with 1,006 additions and 439 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Epic Games
Copyright (c) 2019 Epic Games

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# MotionBuilder Live Link

## NOTE: If you are trying to build the plugin from source and you are using a recent version of the Engine from Github you will need to go to \Engine\Source\Runtime\LiveLinkInterface\LiveLinkInterface.Build.cs and remove "TimeManagement" from the PublicDependencyModuleNames list.
## This has been fixed in the main branch as of 2018/09/26

Enables Unreal to receives data from MotionBuilder via the Live Link system.

Currently built and tested with Unreal 4.18, 4.19, 4.20 and MotionBuilder 2016, 2017, 2018
Currently built and tested with Unreal 4.23 and MotionBuilder 2016, 2017, 2018, 2019

### Pre-built plugins are available on the Releases tab here: [https://github.com/ue4plugins/MobuLiveLink/releases](https://github.com/ue4plugins/MobuLiveLink/releases)

Expand Down
59 changes: 0 additions & 59 deletions Source/MobuLiveLinkPlugin.Build.cs

This file was deleted.

47 changes: 0 additions & 47 deletions Source/MobuLiveLinkPlugin.Target.cs

This file was deleted.

11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2016.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class MobuLiveLinkPlugin2016 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2016(ReadOnlyTargetRules Target) : base(Target, "2016")
{
}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2016.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public class MobuLiveLinkPlugin2016Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2016Target(TargetInfo Target) : base(Target, "2016")
{}
}
68 changes: 68 additions & 0 deletions Source/MobuLiveLinkPlugin2017.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public abstract class MobuLiveLinkPluginBase : ModuleRules
{
public MobuLiveLinkPluginBase(ReadOnlyTargetRules Target, string MobuVersionString) : base(Target)
{
PrivatePCHHeaderFile = "Private/MobuLiveLinkPluginPrivatePCH.h";

bEnforceIWYU = false;
bUseRTTI = true;

PrivateIncludePaths.AddRange(new string[]
{
Path.Combine(EngineDirectory, "Source/Runtime/Launch/Public"),
Path.Combine(EngineDirectory, "Source/Runtime/Launch/Private"),
Path.Combine(ModuleDirectory, "StreamObjects/Public")
});

// Unreal dependency modules
PrivateDependencyModuleNames.AddRange(new string[]
{
"Core",
"CoreUObject",
"ApplicationCore",
"Projects",
"UdpMessaging",
"LiveLinkInterface",
"LiveLinkMessageBusFramework",
});

// Mobu SDK setup
{
//UE_MOTIONBUILDER2017_INSTALLATIONFOLDER
string MobuInstallFolder = System.Environment.GetEnvironmentVariable("UE_MOTIONBUILDER" + MobuVersionString + "_INSTALLATIONFOLDER");
if (string.IsNullOrEmpty(MobuInstallFolder))
{
MobuInstallFolder = @"C:\Program Files\Autodesk\MotionBuilder " + MobuVersionString;
}

// Make sure this version of Mobu is actually installed
if (Directory.Exists(MobuInstallFolder))
{
PrivateIncludePaths.Add(Path.Combine(MobuInstallFolder, "OpenRealitySDK/include"));

if (Target.Platform == UnrealTargetPlatform.Win64) // @todo: Support other platforms?
{
PublicLibraryPaths.Add(Path.Combine(MobuInstallFolder, "OpenRealitySDK/lib/x64"));

// Mobu library we're depending on
PublicAdditionalLibraries.AddRange(new string[]
{
"fbsdk.lib",
});
}
}
}
}
}

public class MobuLiveLinkPlugin2017 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2017(ReadOnlyTargetRules Target) : base(Target, "2017")
{
}
}
44 changes: 44 additions & 0 deletions Source/MobuLiveLinkPlugin2017.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public abstract class MobuLiveLinkPluginTargetBase : TargetRules
{
public MobuLiveLinkPluginTargetBase(TargetInfo Target, string InMobuVersionString) : base(Target)
{
Type = TargetType.Program;

bShouldCompileAsDLL = true;
LinkType = TargetLinkType.Monolithic;

Tools.DotNETCommon.Log.TraceLog("MyMessage" + this.Name);

bool bIsNotForLicensees = false;
string NotForLicenseesFolder = bIsNotForLicensees ? "NotForLicensees" : "";

ExeBinariesSubFolder = Path.Combine(NotForLicenseesFolder, "MotionBuilder", InMobuVersionString);
LaunchModuleName = "MobuLiveLinkPlugin" + InMobuVersionString;

// We only need minimal use of the engine for this plugin
bBuildDeveloperTools = false;
bUseMallocProfiler = false;
bBuildWithEditorOnlyData = true;
bCompileAgainstEngine = false;
bCompileAgainstCoreUObject = true;
bCompileICU = false;
bHasExports = false;

string ResourcesFolder = Path.GetFullPath(Path.Combine("Programs", NotForLicenseesFolder, "MobuLiveLink/Resources"));
string BinariesDirectory = Path.GetFullPath(Path.Combine("../Binaries", "Win64", NotForLicenseesFolder, "MotionBuilder", InMobuVersionString));
string Command = "copy /a /b /y /v \"" + ResourcesFolder + "\\*.*\" \"" + BinariesDirectory + "\"";
PostBuildSteps.Add(Command);
}
}

public class MobuLiveLinkPlugin2017Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2017Target(TargetInfo Target) : base(Target, "2017")
{ }
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2018.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class MobuLiveLinkPlugin2018 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2018(ReadOnlyTargetRules Target) : base(Target, "2018")
{
}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2018.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public class MobuLiveLinkPlugin2018Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2018Target(TargetInfo Target) : base(Target, "2018")
{}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2019.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class MobuLiveLinkPlugin2019 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2019(ReadOnlyTargetRules Target) : base(Target, "2019")
{
}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2019.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public class MobuLiveLinkPlugin2019Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2019Target(TargetInfo Target) : base(Target, "2019")
{}
}
6 changes: 5 additions & 1 deletion Source/Private/MobuLiveLink.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

#include "RequiredProgramMainCPPInclude.h"
#include "MobuLiveLinkCommon.h"
Expand All @@ -22,7 +22,11 @@ bool FBLibrary::LibInit()
{
GEngineLoop.PreInit(TEXT("MobuLiveLinkPlugin -Messaging"));

// ensure target platform manager is referenced early as it must be created on the main thread
GetTargetPlatformManager();

ProcessNewlyLoadedUObjects();

// Tell the module manager that it may now process newly-loaded UObjects when new C++ modules are loaded
FModuleManager::Get().StartProcessingNewlyLoadedObjects();
FModuleManager::Get().LoadModule(TEXT("UdpMessaging"));
Expand Down
Loading

0 comments on commit 64a95e2

Please sign in to comment.