Skip to content

Commit

Permalink
Merge pull request #33 from jason-d-walter/v3.0.4
Browse files Browse the repository at this point in the history
Add 2025 support and fix a crash with saving Unreal device in an Fbx file
  • Loading branch information
jdw-epicgames authored Apr 17, 2024
2 parents 2568852 + 9bb90d5 commit 621b241
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 17 deletions.
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
# MotionBuilder Live Link

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

Currently built and tested with Unreal 4.27 and MotionBuilder 2016, 2017, 2018, 2019, 2020, and 2022

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

### Please see the Wiki for details on setup, usage and known issues: [https://github.com/ue4plugins/MobuLiveLink/wiki](https://github.com/ue4plugins/MobuLiveLink/wiki)

### If you have any issues or questions please log them in the issues tab
Documentation for MotionBuilder Live Link can be found on our site:
https://docs.unrealengine.com/en-US/Engine/Animation/LiveLinkPlugin/ConnectingLiveLinktoMobu/index.html
12 changes: 12 additions & 0 deletions Source/MobuLiveLinkPlugin2025.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

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

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

public class MobuLiveLinkPlugin2025Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2025Target(TargetInfo Target) : base(Target, "2025")
{}
}
2 changes: 1 addition & 1 deletion Source/Private/MobuLiveLinkDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ bool FMobuLiveLink::DeviceOperation(kDeviceOperations pOperation)

void FMobuLiveLink::SetDeviceInformation(const char* NewDeviceInformation)
{
FString VersionString("v3.0.3 (");
FString VersionString("v3.0.4 (");
VersionString += __DATE__;
VersionString += ")";
HardwareVersionInfo.SetString(FStringToChar(VersionString));
Expand Down
18 changes: 13 additions & 5 deletions Source/StreamObjects/Private/EditorActiveCameraStreamObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,21 @@ bool FEditorActiveCameraStreamObject::IsValid() const

void FEditorActiveCameraStreamObject::Refresh(const TSharedPtr<ILiveLinkProvider> Provider)
{
if (!bIsActive)
{
return;
}

FBSystem System;
const FBCamera* CameraModel = System.Scene->Renderer->GetCameraInPane(0);

FLiveLinkStaticDataStruct CameraData(FLiveLinkCameraStaticData::StaticStruct());
FModelStreamObject::UpdateSubjectTransformStaticData(CameraModel, bSendAnimatable, *CameraData.Cast<FLiveLinkCameraStaticData>());
FCameraStreamObject::UpdateSubjectCameraStaticData(CameraModel, *CameraData.Cast<FLiveLinkCameraStaticData>());
Provider->UpdateSubjectStaticData(SubjectName, ULiveLinkCameraRole::StaticClass(), MoveTemp(CameraData));
if (CameraModel)
{
FLiveLinkStaticDataStruct CameraData(FLiveLinkCameraStaticData::StaticStruct());
FModelStreamObject::UpdateSubjectTransformStaticData(CameraModel, bSendAnimatable, *CameraData.Cast<FLiveLinkCameraStaticData>());
FCameraStreamObject::UpdateSubjectCameraStaticData(CameraModel, *CameraData.Cast<FLiveLinkCameraStaticData>());
Provider->UpdateSubjectStaticData(SubjectName, ULiveLinkCameraRole::StaticClass(), MoveTemp(CameraData));
}
}

void FEditorActiveCameraStreamObject::UpdateSubjectFrame(const TSharedPtr<ILiveLinkProvider> Provider, FLiveLinkWorldTime WorldTime, FQualifiedFrameTime QualifiedFrameTime)
Expand All @@ -122,4 +130,4 @@ void FEditorActiveCameraStreamObject::UpdateSubjectFrame(const TSharedPtr<ILiveL
FCameraStreamObject::UpdateSubjectCameraFrameData(CameraModel, *CameraData.Cast<FLiveLinkCameraFrameData>());
Provider->UpdateSubjectFrameData(SubjectName, MoveTemp(CameraData));
}
}
}

0 comments on commit 621b241

Please sign in to comment.