From db168f81de0d460c6ce366445cb2632d646598d2 Mon Sep 17 00:00:00 2001 From: Andy Gallay Date: Tue, 23 Jan 2024 15:38:40 -0500 Subject: [PATCH] Copied a fix from PR #31 --- .../BuildMayaUnrealLiveLinkPlugin.xml | 6 +----- .../MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkPlugin.cpp | 6 ++++-- .../Subjects/MLiveLinkPropSubject.cpp | 3 ++- .../UnrealInitializer/UnrealInitializer.cpp | 4 ++++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/Programs/MayaUnrealLiveLinkPlugin/BuildMayaUnrealLiveLinkPlugin.xml b/Source/Programs/MayaUnrealLiveLinkPlugin/BuildMayaUnrealLiveLinkPlugin.xml index a426fd4..24f888f 100644 --- a/Source/Programs/MayaUnrealLiveLinkPlugin/BuildMayaUnrealLiveLinkPlugin.xml +++ b/Source/Programs/MayaUnrealLiveLinkPlugin/BuildMayaUnrealLiveLinkPlugin.xml @@ -14,11 +14,7 @@ - - - - - + diff --git a/Source/Programs/MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkPlugin.cpp b/Source/Programs/MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkPlugin.cpp index c6c9bf6..b361041 100644 --- a/Source/Programs/MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkPlugin.cpp +++ b/Source/Programs/MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkPlugin.cpp @@ -2478,7 +2478,8 @@ void OnPlaybackRangeChanged(void* ClientData) if (DetectIdleEvent.IsValid()) { DetectIdleEvent->Stop(); - DetectIdleEvent.Release(); + // DetectIdleEvent.Release(); + DetectIdleEvent.Reset(); } // Start the worker thread that will wait for additional user input before rebuilding the subjects @@ -2700,7 +2701,8 @@ MStatus initializePlugin(MObject MayaPluginObject) */ MStatus uninitializePlugin(MObject MayaPluginObject) { - DetectIdleEvent.Release(); + // DetectIdleEvent.Release(); + DetectIdleEvent.Reset(); // Get the plugin API for the plugin object MFnPlugin MayaPlugin(MayaPluginObject); diff --git a/Source/Programs/MayaUnrealLiveLinkPlugin/Subjects/MLiveLinkPropSubject.cpp b/Source/Programs/MayaUnrealLiveLinkPlugin/Subjects/MLiveLinkPropSubject.cpp index 734b141..17042d9 100644 --- a/Source/Programs/MayaUnrealLiveLinkPlugin/Subjects/MLiveLinkPropSubject.cpp +++ b/Source/Programs/MayaUnrealLiveLinkPlugin/Subjects/MLiveLinkPropSubject.cpp @@ -22,7 +22,8 @@ #include "MLiveLinkPropSubject.h" #include "../MayaLiveLinkStreamManager.h" -#include "MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkUtils.h" +// #include "MayaUnrealLiveLinkPlugin/MayaUnrealLiveLinkUtils.h" +#include "../MayaUnrealLiveLinkUtils.h" #include "LiveLinkTypes.h" #include "Roles/MayaLiveLinkTimelineTypes.h" diff --git a/Source/Programs/MayaUnrealLiveLinkPlugin/UnrealInitializer/UnrealInitializer.cpp b/Source/Programs/MayaUnrealLiveLinkPlugin/UnrealInitializer/UnrealInitializer.cpp index c3f67f3..fe7a7bf 100644 --- a/Source/Programs/MayaUnrealLiveLinkPlugin/UnrealInitializer/UnrealInitializer.cpp +++ b/Source/Programs/MayaUnrealLiveLinkPlugin/UnrealInitializer/UnrealInitializer.cpp @@ -79,6 +79,10 @@ void UnrealInitializer::InitializeUnreal() // Load UdpMessaging module needed by message bus. FModuleManager::Get().LoadModule(TEXT("UdpMessaging")); + IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PreDefault); + IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::Default); + IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PostDefault); + InitializedOnce = true; }