Skip to content

Commit

Permalink
Fix live link scale being overriden by the live link component even i…
Browse files Browse the repository at this point in the history
…f bUseScale is false

Note that this change requires building the plugin against Unreal Engine 4.27 or later.
  • Loading branch information
jeremie roy authored and mattyjams committed Aug 16, 2021
1 parent 1716dd4 commit 12a2e76
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/MayaLiveLinkPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ struct FLiveLinkStreamedJointHierarchySubject : IStreamedEntity
if (StreamMode == FCharacterStreamMode::RootOnly)
{
FLiveLinkStaticDataStruct StaticData(FLiveLinkTransformStaticData::StaticStruct());
FLiveLinkTransformStaticData& TransformData = *StaticData.Cast<FLiveLinkTransformStaticData>();
TransformData.bIsScaleSupported = true;

LiveLinkProvider->UpdateSubjectStaticData(SubjectName, ULiveLinkTransformRole::StaticClass(), MoveTemp(StaticData));
}
else if (StreamMode == FCharacterStreamMode::FullHierarchy)
Expand Down Expand Up @@ -860,8 +863,11 @@ struct FLiveLinkStreamedPropSubject : IStreamedEntity
{
if (StreamMode == FPropStreamMode::RootOnly)
{
FLiveLinkStaticDataStruct TransformData(FLiveLinkTransformStaticData::StaticStruct());
LiveLinkProvider->UpdateSubjectStaticData(SubjectName, ULiveLinkTransformRole::StaticClass(), MoveTemp(TransformData));
FLiveLinkStaticDataStruct StaticData(FLiveLinkTransformStaticData::StaticStruct());
FLiveLinkTransformStaticData& TransformData = *StaticData.Cast<FLiveLinkTransformStaticData>();
TransformData.bIsScaleSupported = true;

LiveLinkProvider->UpdateSubjectStaticData(SubjectName, ULiveLinkTransformRole::StaticClass(), MoveTemp(StaticData));
}
else if (StreamMode == FPropStreamMode::FullHierarchy)
{
Expand Down

0 comments on commit 12a2e76

Please sign in to comment.