Skip to content
Snippets Groups Projects
Commit 6bb1d7b9 authored by Sebastian Pape's avatar Sebastian Pape
Browse files

Merge remote-tracking branch 'remotes/origin/feature/UnrealInsightOptions' into 4.26

# Conflicts:
#	Source/NDisplayLaunchButton/Public/NDisplayLaunchButtonSettings.h (combine)
#	Source/NDisplayLaunchButton/Private/NDisplayLaunchButton.cpp (merge with TDW)
parents 12a4030d ac2147ed
No related branches found
No related tags found
2 merge requests!9Update current master to develop,!54.26
...@@ -138,6 +138,60 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -138,6 +138,60 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
GEngine->AddOnScreenDebugMessage(-1, 3, FColor::White, TEXT("The Button is set to do nothing.")); GEngine->AddOnScreenDebugMessage(-1, 3, FColor::White, TEXT("The Button is set to do nothing."));
return; return;
} }
FString InsightParameters = "";
if(Settings->bEnableInsights)
{
if (Settings->bStatNamedEvents)
{
InsightParameters.Append("-statnamedevents");
}
FString TraceChannels = "";
if (Settings->bLog)
{
TraceChannels.Append("log,");
}
if (Settings->bBookmark)
{
TraceChannels.Append("bookmark,");
}
if (Settings->bFrame)
{
TraceChannels.Append("frame,");
}
if (Settings->bCPU)
{
TraceChannels.Append("cpu,");
}
if (Settings->bGPU)
{
TraceChannels.Append("gpu,");
}
if (Settings->bLoadTime)
{
TraceChannels.Append("loadtime,");
}
if (Settings->bFile)
{
TraceChannels.Append("file,");
}
if (Settings->bNet)
{
TraceChannels.Append("net,");
}
if (TraceChannels.Len() > 0)
{
// There's probably a better way of doing this...
TraceChannels.RemoveFromEnd(",");
InsightParameters.Append(" -trace=");
InsightParameters.Append(TraceChannels);
}
if (Settings->TracehostIP.Len() > 0)
{
InsightParameters.Append(" -tracehost=");
InsightParameters.Append(Settings->TracehostIP);
}
InsightParameters.RemoveFromStart(" ");
}
/* Disable Plugins temporarily */ /* Disable Plugins temporarily */
if(!ChangePluginStateAndStoreConfig("SteamVR", false, SteamVRState)) return; if(!ChangePluginStateAndStoreConfig("SteamVR", false, SteamVRState)) return;
...@@ -161,7 +215,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -161,7 +215,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
if (Settings->StartDTrack) SendToDTrack(Settings->DTrackIP, Settings->DTrackPort, "dtrack2 tracking start\0"); if (Settings->StartDTrack) SendToDTrack(Settings->DTrackIP, Settings->DTrackPort, "dtrack2 tracking start\0");
if (Settings->SwitchProjector) ModeFromBefore = SwitchProjectorToState(Settings->ProjectorIP, Settings->ProjectorPort, Settings->ProjectorType); if (Settings->SwitchProjector) ModeFromBefore = SwitchProjectorToState(Settings->ProjectorIP, Settings->ProjectorPort, Settings->ProjectorType);
FProcHandle Instance = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + Settings->ROLVLaunchParameters), true, false, false, nullptr, 0, nullptr, nullptr); FProcHandle Instance = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + InsightParameters + " " + Settings->ROLVLaunchParameters), true, false, false, nullptr, 0, nullptr, nullptr);
FPlatformProcess::WaitForProc(Instance); FPlatformProcess::WaitForProc(Instance);
if (Settings->StartVRPN) FPlatformProcess::TerminateProc(VRPN); if (Settings->StartVRPN) FPlatformProcess::TerminateProc(VRPN);
...@@ -185,7 +239,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -185,7 +239,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
FProcHandle Processes[Num_Nodes]; FProcHandle Processes[Num_Nodes];
for (int i = 0; i < Num_Nodes; i++) for (int i = 0; i < Num_Nodes; i++)
{ {
Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr); Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + InsightParameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr);
} }
FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */ FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */
...@@ -204,7 +258,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -204,7 +258,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
FProcHandle Processes[Num_Nodes]; FProcHandle Processes[Num_Nodes];
for (int i = 0; i < Num_Nodes; i++) for (int i = 0; i < Num_Nodes; i++)
{ {
Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr); Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + InsightParameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr);
} }
FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */ FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */
...@@ -227,7 +281,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -227,7 +281,7 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
FProcHandle Processes[Num_Nodes]; FProcHandle Processes[Num_Nodes];
for (int i = 0; i < Num_Nodes; i++) for (int i = 0; i < Num_Nodes; i++)
{ {
Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr); Processes[i] = FPlatformProcess::CreateProc(*GetEditorExecutableName(), *(Parameters + " " + InsightParameters + " " + Windows_Node_Specific_Commands[i]), true, false, false, nullptr, 0, nullptr, nullptr);
} }
FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */ FPlatformProcess::WaitForProc(Processes[0]); /* wait for only one of them */
...@@ -240,7 +294,8 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -240,7 +294,8 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
*("\"" + (FPaths::ConvertRelativePathToFull(".") + "/UE4Editor\"") *("\"" + (FPaths::ConvertRelativePathToFull(".") + "/UE4Editor\"")
+ " " + FPaths::ConvertRelativePathToFull(FPaths::GetProjectFilePath()) + " " + FPaths::ConvertRelativePathToFull(FPaths::GetProjectFilePath())
+ " " + FString::FromInt(FEngineVersion::Current().GetMajor()) + " " + FString::FromInt(FEngineVersion::Current().GetMajor())
+ FString::FromInt(FEngineVersion::Current().GetMinor())), + FString::FromInt(FEngineVersion::Current().GetMinor())
+ " " + InsightParameters), // Test this
true, false, false, nullptr, 0, nullptr, nullptr); true, false, false, nullptr, 0, nullptr, nullptr);
FPlatformProcess::WaitForProc(Instance); FPlatformProcess::WaitForProc(Instance);
} }
......
...@@ -34,6 +34,9 @@ public: ...@@ -34,6 +34,9 @@ public:
UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Start ")) UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Start "))
TEnumAsByte<ButtonLaunchType> LaunchType = ButtonLaunchType_MiniCAVE; TEnumAsByte<ButtonLaunchType> LaunchType = ButtonLaunchType_MiniCAVE;
UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Unreal Insights "))
bool bEnableInsights = false;
/* /*
* TwoScreen Options * TwoScreen Options
*/ */
...@@ -131,4 +134,28 @@ public: ...@@ -131,4 +134,28 @@ public:
UPROPERTY(EditAnywhere, config, Category = "General|TiledDisplayWall|Log", meta = (DisplayName = "Write Log for BR-Node to Project Directory", EditCondition="LaunchType==ButtonLaunchType::ButtonLaunchType_TDW")) UPROPERTY(EditAnywhere, config, Category = "General|TiledDisplayWall|Log", meta = (DisplayName = "Write Log for BR-Node to Project Directory", EditCondition="LaunchType==ButtonLaunchType::ButtonLaunchType_TDW"))
bool TiledDisplayWallLogToProjectDirBR = false; bool TiledDisplayWallLogToProjectDirBR = false;
/*
* Insights Options
*/
UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Stat Named Events", EditCondition = "bEnableInsights==true"))
bool bStatNamedEvents = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Tracehost IP", EditCondition = "bEnableInsights==true"))
FString TracehostIP = "127.0.0.1";
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "Log", EditCondition = "bEnableInsights==true"))
bool bLog = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "Bookmark", EditCondition = "bEnableInsights==true"))
bool bBookmark = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "Frame", EditCondition = "bEnableInsights==true"))
bool bFrame = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "CPU", EditCondition = "bEnableInsights==true"))
bool bCPU = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "GPU", EditCondition = "bEnableInsights==true"))
bool bGPU = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "LoadTime", EditCondition = "bEnableInsights==true"))
bool bLoadTime = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "File", EditCondition = "bEnableInsights==true"))
bool bFile = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights|Trace Channels", meta = (DisplayName = "Net", EditCondition = "bEnableInsights==true"))
bool bNet = true;
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment