From e2b4cf4f6a55977e6f72798af93a232fbe1abde8 Mon Sep 17 00:00:00 2001 From: wongsinglam Date: Wed, 21 Oct 2020 20:23:35 +0100 Subject: [PATCH 1/2] Create NDDS.sln --- Source/NDDS.sln | 128 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Source/NDDS.sln diff --git a/Source/NDDS.sln b/Source/NDDS.sln new file mode 100644 index 00000000000..d29dde1067d --- /dev/null +++ b/Source/NDDS.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28315.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{94A6C6F3-99B3-346E-9557-ABF9D4064DBD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{8E2F6A87-1826-34F4-940C-CC23A48F9FE4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{D75B4297-A21D-482C-8306-186037F851F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NDDS", "Intermediate\ProjectFiles\NDDS.vcxproj", "{B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}" + ProjectSection(SolutionItems) = preProject + C:\Program Files\Epic Games\UE_4.25\Engine\Extras\VisualStudioDebugging\UE4.natvis = C:\Program Files\Epic Games\UE_4.25\Engine\Extras\VisualStudioDebugging\UE4.natvis + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DebugGame Editor|IOS = DebugGame Editor|IOS + DebugGame Editor|Linux = DebugGame Editor|Linux + DebugGame Editor|LinuxAArch64 = DebugGame Editor|LinuxAArch64 + DebugGame Editor|Win32 = DebugGame Editor|Win32 + DebugGame Editor|Win64 = DebugGame Editor|Win64 + DebugGame|IOS = DebugGame|IOS + DebugGame|Linux = DebugGame|Linux + DebugGame|LinuxAArch64 = DebugGame|LinuxAArch64 + DebugGame|Win32 = DebugGame|Win32 + DebugGame|Win64 = DebugGame|Win64 + Development Editor|IOS = Development Editor|IOS + Development Editor|Linux = Development Editor|Linux + Development Editor|LinuxAArch64 = Development Editor|LinuxAArch64 + Development Editor|Win32 = Development Editor|Win32 + Development Editor|Win64 = Development Editor|Win64 + Development|IOS = Development|IOS + Development|Linux = Development|Linux + Development|LinuxAArch64 = Development|LinuxAArch64 + Development|Win32 = Development|Win32 + Development|Win64 = Development|Win64 + Shipping|IOS = Shipping|IOS + Shipping|Linux = Shipping|Linux + Shipping|LinuxAArch64 = Shipping|LinuxAArch64 + Shipping|Win32 = Shipping|Win32 + Shipping|Win64 = Shipping|Win64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame Editor|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame Editor|Linux.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame Editor|LinuxAArch64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame|Linux.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame|LinuxAArch64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development Editor|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development Editor|Linux.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development Editor|LinuxAArch64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development|Linux.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development|LinuxAArch64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Shipping|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Shipping|Linux.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Shipping|LinuxAArch64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Shipping|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {D75B4297-A21D-482C-8306-186037F851F5}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|IOS.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|Linux.ActiveCfg = Linux_DebugGame_Editor|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|Linux.Build.0 = Linux_DebugGame_Editor|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|LinuxAArch64.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|Win32.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|IOS.ActiveCfg = IOS_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|IOS.Build.0 = IOS_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Linux.ActiveCfg = Linux_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Linux.Build.0 = Linux_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|LinuxAArch64.ActiveCfg = LinuxAArch64_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|LinuxAArch64.Build.0 = LinuxAArch64_DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Win32.ActiveCfg = DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Win32.Build.0 = DebugGame|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Win64.ActiveCfg = DebugGame|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.DebugGame|Win64.Build.0 = DebugGame|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|IOS.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|Linux.ActiveCfg = Linux_Development_Editor|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|Linux.Build.0 = Linux_Development_Editor|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|LinuxAArch64.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|Win32.ActiveCfg = Invalid|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|Win64.ActiveCfg = Development_Editor|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development Editor|Win64.Build.0 = Development_Editor|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|IOS.ActiveCfg = IOS_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|IOS.Build.0 = IOS_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Linux.ActiveCfg = Linux_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Linux.Build.0 = Linux_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|LinuxAArch64.ActiveCfg = LinuxAArch64_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|LinuxAArch64.Build.0 = LinuxAArch64_Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Win32.ActiveCfg = Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Win32.Build.0 = Development|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Win64.ActiveCfg = Development|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Development|Win64.Build.0 = Development|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|IOS.ActiveCfg = IOS_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|IOS.Build.0 = IOS_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Linux.ActiveCfg = Linux_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Linux.Build.0 = Linux_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|LinuxAArch64.ActiveCfg = LinuxAArch64_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|LinuxAArch64.Build.0 = LinuxAArch64_Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Win32.ActiveCfg = Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Win32.Build.0 = Shipping|Win32 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Win64.ActiveCfg = Shipping|x64 + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620}.Shipping|Win64.Build.0 = Shipping|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D75B4297-A21D-482C-8306-186037F851F5} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD} + {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B41ED7F0-3C62-4995-9B71-D4076FDEAB88} + EndGlobalSection +EndGlobal From 44551cbc028963a2e47ed47917afc0b644338165 Mon Sep 17 00:00:00 2001 From: wongsinglam Date: Wed, 21 Oct 2020 20:30:53 +0100 Subject: [PATCH 2/2] Upgrade to 4.25 --- Source/NDDS.sln | 3 --- Source/NDDS.uproject | 2 +- .../Components/RandomMaterialComponent.cpp | 11 ++++---- .../RandomMaterialParameterComponentBase.cpp | 10 +++---- .../Components/RandomVisibilityComponent.cpp | 2 +- .../DomainRandomizationDNN/Public/DRUtils.cpp | 26 +++++++++---------- .../Public/GroupActorManager.cpp | 7 ++--- .../Source/NVDataObject/NVDataObject.Build.cs | 2 +- .../NVDataObjectEditor.Build.cs | 2 +- .../NVSceneCapturer/NVSceneCapturer.Build.cs | 2 +- .../Private/NVImageExporter.cpp | 2 +- .../Private/NVObjectMaskManager.cpp | 24 ++++++++--------- .../Private/NVSceneCapturerActor.cpp | 12 ++++----- .../NVSceneCapturerViewpointComponent.cpp | 2 +- .../NVSceneFeatureExtractor_DataExport.cpp | 4 +-- .../Private/NVTextureReader.cpp | 19 +++++++++----- .../NVSceneCapturerEditor.Build.cs | 2 +- .../NVSceneCapturerGame.Build.cs | 2 +- .../Source/NVUtilities/NVUtilities.Build.cs | 2 +- 19 files changed, 70 insertions(+), 66 deletions(-) diff --git a/Source/NDDS.sln b/Source/NDDS.sln index d29dde1067d..fadfc1a332b 100644 --- a/Source/NDDS.sln +++ b/Source/NDDS.sln @@ -122,7 +122,4 @@ Global {D75B4297-A21D-482C-8306-186037F851F5} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD} {B3FD0025-2DAA-4C0D-BEDD-64DF94AE3620} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4} EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B41ED7F0-3C62-4995-9B71-D4076FDEAB88} - EndGlobalSection EndGlobal diff --git a/Source/NDDS.uproject b/Source/NDDS.uproject index 1850aa3df26..9a41a2f1a82 100644 --- a/Source/NDDS.uproject +++ b/Source/NDDS.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "4.22", + "EngineAssociation": "4.25", "Category": "", "Description": "", "Modules": [ diff --git a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialComponent.cpp b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialComponent.cpp index 9ddb57ef10b..c29be2aebd4 100644 --- a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialComponent.cpp +++ b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialComponent.cpp @@ -25,14 +25,15 @@ void URandomMaterialComponent::BeginPlay() { OwnerMeshComponents = DRUtils::GetValidChildMeshComponents(OwnerActor); - TArray ChildDecalComps = OwnerActor->GetComponentsByClass(UDecalComponent::StaticClass()); + TArray ChildDecalComps; + OwnerActor->GetComponents(ChildDecalComps); OwnerDecalComponents.Reset(); - for (UActorComponent* CheckComp : ChildDecalComps) + for (auto* CheckComp : ChildDecalComps) { UDecalComponent* CheckDecalComp = Cast(CheckComp); - if (CheckDecalComp) + if (CheckComp) { - OwnerDecalComponents.Add(CheckDecalComp); + OwnerDecalComponents.Add(CheckComp); } } } @@ -105,7 +106,7 @@ void URandomMaterialComponent::OnRandomization_Implementation() if (bAffectDecalComponents && (OwnerDecalComponents.Num() > 0)) { - for (UDecalComponent* CheckDecalComp : OwnerDecalComponents) + for (auto CheckDecalComp : OwnerDecalComponents) { if (CheckDecalComp) { diff --git a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialParameterComponentBase.cpp b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialParameterComponentBase.cpp index 47a348cfdcb..5803a566659 100644 --- a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialParameterComponentBase.cpp +++ b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomMaterialParameterComponentBase.cpp @@ -24,14 +24,14 @@ void URandomMaterialParameterComponentBase::BeginPlay() { OwnerMeshComponents = DRUtils::GetValidChildMeshComponents(OwnerActor); - TArray ChildDecalComps = OwnerActor->GetComponentsByClass(UDecalComponent::StaticClass()); + TArray ChildDecalComps; + OwnerActor->GetComponents(ChildDecalComps); OwnerDecalComponents.Reset(); - for (UActorComponent* CheckComp : ChildDecalComps) + for (auto* CheckComp : ChildDecalComps) { - UDecalComponent* CheckDecalComp = Cast(CheckComp); - if (CheckDecalComp) + if (CheckComp) { - OwnerDecalComponents.Add(CheckDecalComp); + OwnerDecalComponents.Add(CheckComp); } } } diff --git a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomVisibilityComponent.cpp b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomVisibilityComponent.cpp index c56839e2912..8b8e607b94a 100644 --- a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomVisibilityComponent.cpp +++ b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/Components/RandomVisibilityComponent.cpp @@ -17,7 +17,7 @@ void URandomVisibilityComponent::OnRandomization_Implementation() AActor* OwnerActor = GetOwner(); if (OwnerActor) { - bool bNewHidden = !OwnerActor->bHidden; + bool bNewHidden = !OwnerActor->IsHidden(); OwnerActor->SetActorHiddenInGame(bNewHidden); OwnerActor->SetActorEnableCollision(!bNewHidden); diff --git a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/DRUtils.cpp b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/DRUtils.cpp index 14e3a6e0f39..c1d5f0820fa 100644 --- a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/DRUtils.cpp +++ b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/DRUtils.cpp @@ -708,14 +708,14 @@ namespace DRUtils return FoundMeshComp; } - TArray ChildMeshComps = OwnerActor->GetComponentsByClass(UMeshComponent::StaticClass()); - for (UActorComponent* CheckComp : ChildMeshComps) + TArray ChildMeshComps; + OwnerActor->GetComponents(ChildMeshComps); + for (auto ChildMeshComp : ChildMeshComps) { - UMeshComponent* CheckMeshComp = Cast(CheckComp); - if (CheckMeshComp) + if (ChildMeshComp) { - USkinnedMeshComponent* SkinnedMeshComp = Cast(CheckMeshComp); - if (SkinnedMeshComp) + USkinnedMeshComponent* SkinnedMeshComp = Cast(ChildMeshComp); + if (SkinnedMeshComp) { if (SkinnedMeshComp->SkeletalMesh) { @@ -725,7 +725,7 @@ namespace DRUtils } else { - UStaticMeshComponent* StaticMeshComp = Cast(CheckMeshComp); + UStaticMeshComponent* StaticMeshComp = Cast(ChildMeshComp); if (StaticMeshComp && StaticMeshComp->GetStaticMesh()) { FoundMeshComp = StaticMeshComp; @@ -748,13 +748,13 @@ namespace DRUtils return ValidMeshComps; } - TArray ChildMeshComps = OwnerActor->GetComponentsByClass(UMeshComponent::StaticClass()); - for (UActorComponent* CheckComp : ChildMeshComps) + TArray ChildMeshComps; + OwnerActor->GetComponents(ChildMeshComps); + for (auto ChildMeshComp : ChildMeshComps) { - UMeshComponent* CheckMeshComp = Cast(CheckComp); - if (CheckMeshComp) + if (ChildMeshComp) { - USkinnedMeshComponent* SkinnedMeshComp = Cast(CheckMeshComp); + USkinnedMeshComponent* SkinnedMeshComp = Cast(ChildMeshComp); if (SkinnedMeshComp) { if (SkinnedMeshComp->SkeletalMesh) @@ -764,7 +764,7 @@ namespace DRUtils } else { - UStaticMeshComponent* StaticMeshComp = Cast(CheckMeshComp); + UStaticMeshComponent* StaticMeshComp = Cast(ChildMeshComp); if (StaticMeshComp && StaticMeshComp->GetStaticMesh()) { ValidMeshComps.Add(StaticMeshComp); diff --git a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/GroupActorManager.cpp b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/GroupActorManager.cpp index b30433fb029..df5468b8821 100644 --- a/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/GroupActorManager.cpp +++ b/Source/Plugins/DomainRandomizationDNN/Source/DomainRandomizationDNN/Public/GroupActorManager.cpp @@ -382,9 +382,9 @@ void AGroupActorManager::UpdateProxyMeshes() NewProxyMeshComponent->bIsEditorOnly = true; NewProxyMeshComponent->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName); NewProxyMeshComponent->bHiddenInGame = true; - NewProxyMeshComponent->bVisible = !bShouldHideProxyMesh; + NewProxyMeshComponent->SetVisibility(!bShouldHideProxyMesh); NewProxyMeshComponent->CastShadow = false; - NewProxyMeshComponent->PostPhysicsComponentTick.bCanEverTick = false; + //NewProxyMeshComponent->PostPhysicsComponentTick.bCanEverTick = false; NewProxyMeshComponent->CreationMethod = EComponentCreationMethod::Instance; NewProxyMeshComponent->RegisterComponentWithWorld(World); @@ -455,7 +455,8 @@ void AGroupActorManager::UpdateProxyMeshesVisibility() if (CheckMesh) { CheckMesh->bHiddenInGame = bShouldHideProxyMesh; - CheckMesh->bVisible = !bShouldHideProxyMesh; + //CheckMesh->bVisible = !bShouldHideProxyMesh; + CheckMesh->SetVisibility(!bShouldHideProxyMesh); } } } diff --git a/Source/Plugins/NVDataObject/Source/NVDataObject/NVDataObject.Build.cs b/Source/Plugins/NVDataObject/Source/NVDataObject/NVDataObject.Build.cs index 8669e8a9e89..6f1c399aba2 100644 --- a/Source/Plugins/NVDataObject/Source/NVDataObject/NVDataObject.Build.cs +++ b/Source/Plugins/NVDataObject/Source/NVDataObject/NVDataObject.Build.cs @@ -18,6 +18,6 @@ public NVDataObject(ReadOnlyTargetRules Target) : base(Target) PrivatePCHHeaderFile = "Public/NVDataObjectModule.h"; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file diff --git a/Source/Plugins/NVDataObject/Source/NVDataObjectEditor/NVDataObjectEditor.Build.cs b/Source/Plugins/NVDataObject/Source/NVDataObjectEditor/NVDataObjectEditor.Build.cs index 3ba61798ddf..dd01353d043 100644 --- a/Source/Plugins/NVDataObject/Source/NVDataObjectEditor/NVDataObjectEditor.Build.cs +++ b/Source/Plugins/NVDataObject/Source/NVDataObjectEditor/NVDataObjectEditor.Build.cs @@ -17,6 +17,6 @@ public NVDataObjectEditor(ReadOnlyTargetRules Target) : base(Target) PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/NVSceneCapturer.Build.cs b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/NVSceneCapturer.Build.cs index 1584c26ace4..175fd49bdec 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/NVSceneCapturer.Build.cs +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/NVSceneCapturer.Build.cs @@ -25,6 +25,6 @@ public NVSceneCapturer(ReadOnlyTargetRules Target) : base(Target) PrivatePCHHeaderFile = "Public/NVSceneCapturerModule.h"; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVImageExporter.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVImageExporter.cpp index b978159190c..1512cb6dd95 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVImageExporter.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVImageExporter.cpp @@ -401,7 +401,7 @@ uint32 FNVImageExporter_Thread::Run() ExportingImageCounterPtr->Increment(); auto TempExportingImageCounterPtr = ExportingImageCounterPtr; auto TempImageWrapperModule = ImageWrapperModule; - Async(AsyncExecution, [TempExportingImageCounterPtr, TempImageWrapperModule, CheckImageData = MoveTemp(TmpImageData)] + Async(AsyncExecution, [TempExportingImageCounterPtr, TempImageWrapperModule, CheckImageData = MoveTemp(TmpImageData)] { FNVImageExporter::ExportImage(TempImageWrapperModule, CheckImageData); if (TempExportingImageCounterPtr.IsValid()) diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVObjectMaskManager.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVObjectMaskManager.cpp index b97f18e3481..b950ca5a8c2 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVObjectMaskManager.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVObjectMaskManager.cpp @@ -62,10 +62,10 @@ FString UNVObjectMaskMananger::GetActorMaskName(ENVActorMaskNameType MaskNameTyp } case ENVActorMaskNameType::UseActorMeshName: { - TArray ActorMeshComps = CheckActor->GetComponentsByClass(UMeshComponent::StaticClass()); - for (UActorComponent* CheckComp : ActorMeshComps) + TArray ActorMeshComps; + CheckActor->GetComponents(ActorMeshComps); + for (auto CheckMeshComp : ActorMeshComps) { - UMeshComponent* CheckMeshComp = Cast(CheckComp); if (CheckMeshComp && CheckMeshComp->IsVisible()) { // Need to get the mesh which this component use @@ -82,7 +82,7 @@ FString UNVObjectMaskMananger::GetActorMaskName(ENVActorMaskNameType MaskNameTyp } else { - USkeletalMeshComponent* CheckSkeletalMeshComp = Cast(CheckComp); + USkeletalMeshComponent* CheckSkeletalMeshComp = Cast(CheckMeshComp); if (CheckSkeletalMeshComp) { USkeletalMesh* SkeletalMesh = CheckSkeletalMeshComp->SkeletalMesh; @@ -122,10 +122,10 @@ void UNVObjectMaskMananger::ApplyStencilMaskToActor(AActor* CheckActor, uint8 Ma else { // Update the actor's meshes to render custom depth or not as this component's data changed - TArray ActorMeshComps = CheckActor->GetComponentsByClass(UMeshComponent::StaticClass()); - for (UActorComponent* CheckComp : ActorMeshComps) + TArray ActorMeshComps; + CheckActor->GetComponents< UMeshComponent>(ActorMeshComps); + for (auto CheckMeshComp : ActorMeshComps) { - UMeshComponent* CheckMeshComp = Cast(CheckComp); if (CheckMeshComp) { CheckMeshComp->SetCustomDepthStencilValue((int32)MaskId); @@ -165,7 +165,7 @@ FString UNVObjectMaskMananger::GetActorMaskName(const AActor* CheckActor) const } else { - if (!CheckActor->bHidden) + if (!CheckActor->IsHidden()) { result = GetActorMaskName(ActorMaskNameType, CheckActor); } @@ -176,12 +176,12 @@ FString UNVObjectMaskMananger::GetActorMaskName(const AActor* CheckActor) const bool UNVObjectMaskMananger::ShouldCheckActorMask(const AActor* CheckActor) const { check(CheckActor); - if (CheckActor && !CheckActor->bHidden) + if (CheckActor && !CheckActor->IsHidden()) { - TArray ActorMeshComps = CheckActor->GetComponentsByClass(UMeshComponent::StaticClass()); - for (UActorComponent* CheckActorComp : ActorMeshComps) + TArray ActorMeshComps; + CheckActor->GetComponents< UMeshComponent>(ActorMeshComps); + for (auto CheckMeshComp : ActorMeshComps) { - UMeshComponent* CheckMeshComp = Cast(CheckActorComp); if (CheckMeshComp && CheckMeshComp->IsVisible()) { // TODO: May need to check if the mesh component are actually hook up with a mesh asset diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerActor.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerActor.cpp index 39a5d657796..7c4add4c0e3 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerActor.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerActor.cpp @@ -215,10 +215,10 @@ void ANVSceneCapturerActor::OnActorSelected(UObject* Object) { if (Object == this) { - TArray ChildComponents = GetComponentsByClass(UNVSceneCapturerViewpointComponent::StaticClass()); - for (int i = 0; i < ChildComponents.Num(); i++) + TArray ChildComponents; + GetComponents(ChildComponents); + for (auto CheckViewpointComp : ChildComponents) { - UNVSceneCapturerViewpointComponent* CheckViewpointComp = Cast(ChildComponents[i]); if (CheckViewpointComp && CheckViewpointComp->IsEnabled()) { GSelectedComponentAnnotation.Set(CheckViewpointComp); @@ -658,11 +658,11 @@ void ANVSceneCapturerActor::UpdateViewpointList() (CurrentState != ENVSceneCapturerState::Paused)) { // Keep track of all the child viewpoint components - TArray ChildComponents = this->GetComponentsByClass(UNVSceneCapturerViewpointComponent::StaticClass()); + TArray ChildComponents; + this->GetComponents(ChildComponents); ViewpointList.Reset(ChildComponents.Num()); - for (int i = 0; i < ChildComponents.Num(); i++) + for (auto CheckViewpoint : ChildComponents) { - UNVSceneCapturerViewpointComponent* CheckViewpoint = Cast(ChildComponents[i]); if (CheckViewpoint) { ViewpointList.Add(CheckViewpoint); diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerViewpointComponent.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerViewpointComponent.cpp index 408ec781299..351c9a990f8 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerViewpointComponent.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneCapturerViewpointComponent.cpp @@ -234,7 +234,7 @@ void UNVSceneCapturerViewpointComponent::OnRegister() ProxyMeshComponent->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName); ProxyMeshComponent->bHiddenInGame = true; ProxyMeshComponent->CastShadow = false; - ProxyMeshComponent->PostPhysicsComponentTick.bCanEverTick = false; + //ProxyMeshComponent->PostPhysicsComponentTick.bCanEverTick = false; ProxyMeshComponent->CreationMethod = CreationMethod; ProxyMeshComponent->RegisterComponentWithWorld(GetWorld()); } diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneFeatureExtractor_DataExport.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneFeatureExtractor_DataExport.cpp index 96fa9148044..54ad1182bad 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneFeatureExtractor_DataExport.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVSceneFeatureExtractor_DataExport.cpp @@ -454,7 +454,7 @@ bool UNVSceneFeatureExtractor_AnnotationData::ShouldExportActor(const AActor* Ch // The actor is considered as hidden if it's not rendered in the game // or it doesn't appear on the viewport - if (CheckActor->bHidden || !IsActorInViewFrustum(ViewFrustum, CheckActor)) + if (CheckActor->IsHidden() || !IsActorInViewFrustum(ViewFrustum, CheckActor)) { return bShouldExport; } @@ -463,7 +463,7 @@ bool UNVSceneFeatureExtractor_AnnotationData::ShouldExportActor(const AActor* Ch //Check if it's flagged //TODO (OS): Implement ENVIncludeObjects::MatchesTag UNVCapturableActorTag* Tag = Cast(CheckActor->GetComponentByClass(UNVCapturableActorTag::StaticClass())); - bShouldExport |= (!ProtectedDataExportSettings.bIgnoreHiddenActor) && (!CheckActor->bHidden); + bShouldExport |= (!ProtectedDataExportSettings.bIgnoreHiddenActor) && (!CheckActor->IsHidden()); bShouldExport |= ((ProtectedDataExportSettings.IncludeObjectsType == ENVIncludeObjects::AllTaggedObjects) && Tag && (Tag->bIncludeMe /* || IncludeAll*/)); if (bShouldExport) diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVTextureReader.cpp b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVTextureReader.cpp index fcc8c002297..043bd5d4aee 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVTextureReader.cpp +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturer/Private/NVTextureReader.cpp @@ -15,6 +15,7 @@ #include "CommonRenderResources.h" #include "RenderingThread.h" #include "RendererInterface.h" +#include "RenderTargetPool.h" #include "StaticBoundShaderState.h" #include "Engine/TextureRenderTarget2D.h" @@ -252,7 +253,7 @@ void FNVTextureReader::CopyTexture2d(class IRendererModule* RendererModule, FRHI false); TRefCountPtr ResampleTexturePooledRenderTarget; - RendererModule->RenderTargetPoolFindFreeElement(RHICmdList, OutputDesc, ResampleTexturePooledRenderTarget, TEXT("ResampleTexture")); + GRenderTargetPool.FindFreeElement(RHICmdList, OutputDesc, ResampleTexturePooledRenderTarget, TEXT("ResampleTexture")); check(ResampleTexturePooledRenderTarget); // Get a temporary render target from the render thread's pool to draw the source render target on const FSceneRenderTargetItem& DestRenderTarget = ResampleTexturePooledRenderTarget->GetRenderTargetItem(); @@ -282,13 +283,17 @@ void FNVTextureReader::CopyTexture2d(class IRendererModule* RendererModule, FRHI const ERHIFeatureLevel::Type FeatureLevel = GMaxRHIFeatureLevel; - TShaderMap* ShaderMap = GetGlobalShaderMap(FeatureLevel); - TShaderMapRef VertexShader(ShaderMap); - TShaderMapRef PixelShader(ShaderMap); + //TShaderMap* ShaderMap = GetGlobalShaderMap(FeatureLevel); + TShaderMapRef VertexShader(GetGlobalShaderMap(FeatureLevel)); + TShaderMapRef PixelShader(GetGlobalShaderMap(FeatureLevel)); + + GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GFilterVertexDeclaration.VertexDeclarationRHI; - GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader); - GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*PixelShader); + //GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader); + GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader(); + //GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*PixelShader); + GraphicsPSOInit.BoundShaderState.PixelShaderRHI = PixelShader.GetPixelShader(); GraphicsPSOInit.PrimitiveType = PT_TriangleList; SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit); @@ -325,7 +330,7 @@ void FNVTextureReader::CopyTexture2d(class IRendererModule* RendererModule, FRHI 1, 1, // Source USize, VSize SourceRect.Max - SourceRect.Min, // Target buffer size FIntPoint(1, 1), // Source texture size - *VertexShader, + VertexShader, EDRF_Default); } RHICmdList.EndRenderPass(); diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerEditor/NVSceneCapturerEditor.Build.cs b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerEditor/NVSceneCapturerEditor.Build.cs index 75763b4b952..ce9913c7021 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerEditor/NVSceneCapturerEditor.Build.cs +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerEditor/NVSceneCapturerEditor.Build.cs @@ -17,6 +17,6 @@ public NVSceneCapturerEditor(ReadOnlyTargetRules Target) : base(Target) PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file diff --git a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerGame/NVSceneCapturerGame.Build.cs b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerGame/NVSceneCapturerGame.Build.cs index f51a268d6c5..97988ed4b5b 100644 --- a/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerGame/NVSceneCapturerGame.Build.cs +++ b/Source/Plugins/NVSceneCapturer/Source/NVSceneCapturerGame/NVSceneCapturerGame.Build.cs @@ -17,6 +17,6 @@ public NVSceneCapturerGame(ReadOnlyTargetRules Target) : base(Target) PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file diff --git a/Source/Plugins/NVUtilities/Source/NVUtilities/NVUtilities.Build.cs b/Source/Plugins/NVUtilities/Source/NVUtilities/NVUtilities.Build.cs index 456294d6fd9..947f4c2d88b 100644 --- a/Source/Plugins/NVUtilities/Source/NVUtilities/NVUtilities.Build.cs +++ b/Source/Plugins/NVUtilities/Source/NVUtilities/NVUtilities.Build.cs @@ -18,6 +18,6 @@ public NVUtilities(ReadOnlyTargetRules Target) : base(Target) PrivatePCHHeaderFile = "Public/NVUtilitiesModule.h"; - bFasterWithoutUnity = true; + bUseUnity = true; } } \ No newline at end of file