Skip to content

Commit

Permalink
1.1.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-dsk committed May 13, 2022
1 parent 066f994 commit ee63966
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ MSpace::Space G_TransformSpace = MSpace::kTransform;

bool bUEInitialized = false;

const char PluginVersion[] = "v1.1.0";
const char PluginVersion[] = "v1.1.1";
const char PluginAppId[] = "3726213941804942083";

static const char OtherUEVersionLoadedEnvVar[] = "OtherUEVersionLoaded";
Expand Down Expand Up @@ -937,9 +937,14 @@ bool CameraManipStarted = false;
bool CameraManipEnded = false;
bool AnimCurveEdited = false;
bool AnimKeyFrameEdited = false;
std::atomic<bool> SendUpdatedData {false};

void OnTimeChanged(MTime& Time, void* ClientData)
// Helper method to send data to unreal when SendUpdatedData is set.
void StreamDataToUnreal()
{
// Stream data only when this flag is set.
if (!SendUpdatedData) return;

if (!CameraManipEnded && !AnimCurveEdited && !AnimKeyFrameEdited)
{
MayaLiveLinkStreamManager::TheOne().StreamSubjects();
Expand All @@ -959,6 +964,14 @@ void OnTimeChanged(MTime& Time, void* ClientData)
}
}
CameraManipStarted = false;

// Set the streaming flag to false.
SendUpdatedData = false;
}

void OnTimeChanged(MTime& Time, void* ClientData)
{
SendUpdatedData = true;
}

void OnAnimCurveEdited(MObjectArray& Objects, void* ClientData)
Expand Down Expand Up @@ -1117,6 +1130,8 @@ void OnPostRenderViewport(const MString &str, void* ClientData)
return;
}

StreamDataToUnreal();

auto& MayaStreamManager = MayaLiveLinkStreamManager::TheOne();

#ifdef MAYA_OLD_PLUGIN
Expand Down
Binary file modified resource/UnrealLiveLinkForMaya.pdf
Binary file not shown.

0 comments on commit ee63966

Please sign in to comment.