Files
UnrealEngineUWP/Engine/Source/Editor/WorldBrowser/Private/LevelModel.cpp

882 lines
19 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "LevelModel.h"
#include "GameFramework/Actor.h"
#include "Misc/MessageDialog.h"
#include "HAL/FileManager.h"
#include "Modules/ModuleManager.h"
#include "Misc/PackageName.h"
#include "Engine/Brush.h"
#include "GameFramework/WorldSettings.h"
#include "Engine/Selection.h"
#include "Editor.h"
#include "ScopedTransaction.h"
#include "LevelUtils.h"
#include "EditorLevelUtils.h"
#include "ActorEditorUtils.h"
#include "Engine/LevelScriptBlueprint.h"
#include "LevelCollectionModel.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "Subsystems/AssetEditorSubsystem.h"
#define LOCTEXT_NAMESPACE "WorldBrowser"
FLevelModel::FLevelModel(FLevelCollectionModel& InLevelCollectionModel)
: LevelCollectionModel(InLevelCollectionModel)
, bSelected(false)
, bExpanded(false)
, bLoadingLevel(false)
, bFilteredOut(false)
, LevelTranslationDelta(0,0)
, LevelActorsCount(0)
{
SimulationStatus = FSimulationLevelStatus();
FAssetRegistryModule& AssetRegistryModule = FModuleManager::GetModuleChecked<FAssetRegistryModule>(TEXT("AssetRegistry"));
AssetRegistryModule.Get().OnAssetRenamed().AddRaw(this, &FLevelModel::OnAssetRenamed);
}
FLevelModel::~FLevelModel()
{
FAssetRegistryModule& AssetRegistryModule = FModuleManager::GetModuleChecked<FAssetRegistryModule>(TEXT("AssetRegistry"));
AssetRegistryModule.Get().OnAssetRenamed().RemoveAll(this);
}
void FLevelModel::OnAssetRenamed(const FAssetData& AssetData, const FString& OldObjectPath)
{
const FString CurrentPackage = GetLongPackageName().ToString();
if (FPackageName::ObjectPathToPackageName(OldObjectPath) == CurrentPackage)
{
UpdateAsset(AssetData);
UpdateDisplayName();
}
}
void FLevelModel::SetLevelSelectionFlag(bool bSelectedFlag)
{
bSelected = bSelectedFlag;
}
bool FLevelModel::GetLevelSelectionFlag() const
{
return bSelected;
}
void FLevelModel::SetLevelExpansionFlag(bool bExpandedFlag)
{
bExpanded = bExpandedFlag;
}
bool FLevelModel::GetLevelExpansionFlag() const
{
return bExpanded;
}
void FLevelModel::SetLevelFilteredOutFlag(bool bFiltredOutFlag)
{
bFilteredOut = bFiltredOutFlag;
}
bool FLevelModel::GetLevelFilteredOutFlag() const
{
return bFilteredOut;
}
FString FLevelModel::GetDisplayName() const
{
return DisplayName;
}
FString FLevelModel::GetPackageFileName() const
{
const FName LocalPackageName = GetLongPackageName();
if (LocalPackageName != NAME_None)
{
return FPackageName::LongPackageNameToFilename(LocalPackageName.ToString(), FPackageName::GetMapPackageExtension());
}
else
{
return FString();
}
}
void FLevelModel::Accept(FLevelModelVisitor& Vistor)
{
Vistor.Visit(*this);
for (auto It = AllChildren.CreateIterator(); It; ++It)
{
(*It)->Accept(Vistor);
}
}
void FLevelModel::Update()
{
UpdateLevelActorsCount();
BroadcastChangedEvent();
}
void FLevelModel::UpdateVisuals()
{
BroadcastChangedEvent();
}
bool FLevelModel::IsSimulating() const
{
return LevelCollectionModel.IsSimulating();
}
bool FLevelModel::IsCurrent() const
{
if (GetLevelObject())
{
return GetLevelObject()->IsCurrentLevel();
}
return false;
}
bool FLevelModel::IsPersistent() const
{
return LevelCollectionModel.GetWorld()->PersistentLevel == GetLevelObject();
}
bool FLevelModel::IsEditable() const
{
return (IsLoaded() == true && IsLocked() == false);
}
bool FLevelModel::IsDirty() const
{
if (GetLevelObject())
{
return GetLevelObject()->GetOutermost()->IsDirty();
}
return false;
}
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3154632) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3122543 on 2016/09/13 by Ben.Woodhouse Override HasOcclusion for Widget3DComponentProxy to detect if the material is has depth testing enabled. #jira UE-35878 Change 3122544 on 2016/09/13 by Ben.Woodhouse Shadow stencil optimisation with cvar (enabled by default) Avoids redundant clearing the stencil buffer for per-object and pre shadows by zeroing the stencil during testing, following discussion on UDN. This means we don't benefit from Hi Stencil on GCN for the shadow projection draw calls, but it's still faster in all the cases I could find, including for the player character where the bounding box is quite large. (Note: early stencil still works fine, according to PIX) Shadow projection GPU time profiling : Test map with 35 characters, stationary directional light - 4ms-2ms on XB1 - 2.5ms to 0.9ms on PC (r9-390X) - 3ms-2ms on PS4 Paragon PS4 (roughly 20% reduced - from ~0.39ms) Change 3122687 on 2016/09/13 by Rolando.Caloca DR - vk - Fix ES31 crash Change 3122691 on 2016/09/13 by Rolando.Caloca DR - vk - Fixes for SDK 1.0.26.0 Change 3122778 on 2016/09/13 by Rolando.Caloca DR - vk - Fix number of layers on barrier Change 3122921 on 2016/09/13 by Rolando.Caloca DR - vk - Fix ES3.1 Change 3122925 on 2016/09/13 by Ben.Woodhouse Fix sky lighting issue with skin and re-enable non-checkerboard lighting by default (fallout from lightaccumulator refactor) #jira UE-35904 Change 3123016 on 2016/09/13 by Chris.Bunner Fixed adaptive tessellation, broken by CL 3089208 refactor. #jira UE-35341 Change 3123079 on 2016/09/13 by Rolando.Caloca DR - vk - Force StoreOp store instead of DontCare everywhere (temporarily) Change 3123503 on 2016/09/13 by David.Hill #jira UE-25623 converted a check() to checkf() to include better diagnostic information. Change 3123617 on 2016/09/13 by Guillaume.Abadie Fixes artifact when the camera direction is almost parallel to a wide plane with SSR. #jira UE-35128 Change 3123743 on 2016/09/13 by Brian.Karis Separate mesh reduction interfaces for static and skeletal. Zero bad tangents from input mesh. Change 3125378 on 2016/09/14 by Arne.Schober DR - [UE-34481] - Extract all the State which is necessary to execute the DebugTextDrawingDelegate from the SceneProxy into its own Helpers to be drawn to the canvas later on. The issue was that the SceneProxys are only owned by the RT after their creation and the GT should avoid reading from or writing state to them. Change 3125527 on 2016/09/14 by Arne.Schober DR - [UE-34481] - Fix UT build and mac Change 3125741 on 2016/09/14 by Rolando.Caloca DR - Extra debug mode for tracking down SCW crashes (r.DumpSCWQueuedJobs=1) Change 3125763 on 2016/09/14 by Rolando.Caloca DR - vk - Added new Renderpass cache - Fix buffer barrier warning Change 3125769 on 2016/09/14 by Rolando.Caloca DR - Renamed cvar to r.DumpSCWQueuedJobs Change 3125771 on 2016/09/14 by Rolando.Caloca DR - Added support for SV_ClipDistance on GL3 & 4 Change 3125792 on 2016/09/14 by Arne.Schober DR - [UE-34481] - Fix Odin and PS4 Change 3125880 on 2016/09/14 by Arne.Schober DR - [UE-34481] - Fix Fortnite Change 3125968 on 2016/09/14 by Brian.Karis Removed comment Change 3126315 on 2016/09/15 by Ben.Woodhouse GPU profiler robustness - Change stat gathering update to handle multiple views and non-scenerenderer stats (such Slate) properly - Simplify gathering logic - Fix race condition where we could read back queries before they're submitted on the RHI thread. - Fix for movie player stat gathering - disable gathering outside of the main engine tick #jira UE-35975 Change 3126792 on 2016/09/15 by Rolando.Caloca DR - vk - Release render pass cache Change 3126804 on 2016/09/15 by Rolando.Caloca DR - vk - Fix UpdateTexture2D() #jira UE-34151 Change 3126884 on 2016/09/15 by Rolando.Caloca DR - vk - Compile fix Change 3126953 on 2016/09/15 by Rolando.Caloca DR - Enable GPU capture when running OpenGL under RenderDoc - Will also set the memory mode to non coherent so not to kill performance on RenderDoc Change 3126966 on 2016/09/15 by Rolando.Caloca DR - Allow cooking for Vulkan SM4 to help with packaging Change 3127082 on 2016/09/15 by Guillaume.Abadie Wraps up contact shadows for release fixing different artifacts and handling correctly their screen space length. #jira UE-35367, UE-33602, UE-33603, UE-33604 #review-3125887 @brian.karis Change 3127130 on 2016/09/15 by Mark.Satterthwaite Add overloads to as* functions in hlslcc - HLSL allows you to call these on variables of the same type, in which case it simply returns the existing value but we had only defined the float<->u/int conversions, so hlslcc added implicit casts that broke such cases (i.e. asuint(uint) -> floatBitsToUint(float(uint))). This change defines the missing overloads as returns with regular casts. #jira FORT-25869 #jira UE-34263 Change 3127475 on 2016/09/15 by Rolando.Caloca DR - vk - Debug dump Change 3128131 on 2016/09/16 by Ben.Woodhouse (Integrated from //UE4/Private-Partner-NREAL/...) Alpha output support for postprocess materials (optional via a parameter) Needed for end of frame compositing. Could be used to pass intermediate data from one blendable postprocess to another (e.g edge detection) Change 3128135 on 2016/09/16 by Ben.Woodhouse GPU profiler (PS4) - remove bubbles between commandlist submissions from query times Use r.ps4.AdjustRenderQueryTimestamps cvar to enable/disable (defaults to on) Also fixes some potential precision issues with unit GPU timing Change 3128247 on 2016/09/16 by Rolando.Caloca DR - vk - Cache framebuffers Change 3128593 on 2016/09/16 by Rolando.Caloca DR - vk - Fix for crash loading map #jira UE-36072 Change 3128759 on 2016/09/16 by Mark.Satterthwaite Back out changelist 3127130 - its causing a build failure in FPostProcessVelocityScatterVS because hlslcc is picking the wrong as_* overload. Change 3130236 on 2016/09/19 by Chris.Bunner Exposed full SceneCaptureComponent classes instead of select methods. #jira UE-35996 Change 3130388 on 2016/09/19 by Rolando.Caloca DR - Avoid crash when adding dynamic primitives #jira UE-35327 Change 3130393 on 2016/09/19 by Marc.Olano Improve vector noise tooltips & documentation Change 3130547 on 2016/09/19 by Ben.Woodhouse Fix for ensure fail when initializing point light shadowmaps. This came about because cubemap rendertargets always have Extents of (Resolution, 0). The Y component was implicitly used to determine if it was a cubemap, which is odd... The fix was to make the definition explicit via a flag and initialize both the X and Y parameters. I suspect the ensure started happening recently due to a more recent change, but fixing the underlying logic seems like the correct fix. #jira UE-35837 Change 3130578 on 2016/09/19 by Daniel.Wright Workaround OpenGL/NVidia bug with non-power-of-2 textures by disabling CSM atlassing if we're using OpenGL Change 3130682 on 2016/09/19 by Rolando.Caloca DR - Better fix for UE-35327 #jira UE-35327 Change 3130767 on 2016/09/19 by Uriel.Doyon Better handling of color array in VisualizeComplexity code to prevent assert. #jira UE-29332 Change 3130965 on 2016/09/19 by Arne.Schober DR - [UE-35679] - the crash was caused by the Resource of the UTexture being Null. And one of the Kismet Nodes calling a function on that resource. The solution was to disable that call from Kismet when only cooking. Change 3130967 on 2016/09/19 by Chris.Bunner Hid redundant texture sampler properties from texture object parameter. Hid redundant texture property input on texture parameter nodes. Fixed copy-paste error in expression texture parameter docs. #jira UE-32724 Change 3131118 on 2016/09/19 by Mark.Satterthwaite Second attempt - this time with the correct input types. Add overloads to as* functions in hlslcc - HLSL allows you to call these on variables of the same type, in which case it simply returns the existing value but we had only defined the float<->u/int conversions, so hlslcc added implicit casts that broke such cases (i.e. asuint(uint) -> floatBitsToUint(float(uint))). This change defines the missing overloads as returns with regular casts. #jira FORT-25869 #jira UE-34263 Change 3131153 on 2016/09/19 by Rolando.Caloca DR - Fix recompute normals when triangles have a LHS tangent basis Integrate from 3028634 - Also make meshes that don't have morphs be able to run through the recompute normals path #jira UE-35472 Change 3131228 on 2016/09/19 by Mark.Satterthwaite Duplicate CL #3114668: Always disable asynchronous shader compilation for the global shader map on Metal as some of them are needed very early. #jira UE-35240 Change 3131246 on 2016/09/19 by Rolando.Caloca DR - Shrink gpu skinning permutations Change 3131261 on 2016/09/19 by Mark.Satterthwaite Fix Metal validation failures due to particle rendering not binding buffers to all buffer inputs declared in the shader. ContentExamples Effects no longer aborts complaining that the particle system didn't bind a required buffer. Change 3131265 on 2016/09/19 by Mark.Satterthwaite Fix FMetalDynamicRHI::RHIReadSurfaceData for shared textures on iOS. Change 3131271 on 2016/09/19 by Mark.Satterthwaite Use private memory for the Metal stencil SRV workaround needed on El Capitan. Change 3131273 on 2016/09/19 by Mark.Satterthwaite Disable the lazy-encoder construction in Metal for AMD - there is a situation that causes the lazy construction to perform a clear that isn't wanted and so far this hasn't been tracked down and fixed. Until then, this will render correctly. Change 3131280 on 2016/09/19 by Mark.Satterthwaite For GLSL interpolation mode flags must come before storage mode flags and you can't redeclare the system variable gl_Layer to use a differing interpolation mode. Change 3131283 on 2016/09/19 by Mark.Satterthwaite Change the ShaderCache to not cache resource bindings in the draw states for shader platforms that don't care - reduces the number of draw states considered significantly without reducing effectiveness. We can support ShaderCache with Metal SM5 but not the RHI thread enabled so change when we enable it and make sure we load the binary shader cache. Change 3131402 on 2016/09/19 by Rolando.Caloca DR - Disambiguate callstack #jira UE-34415 Change 3131469 on 2016/09/19 by Rolando.Caloca DR - vk - Check if we can allocate descriptors off a pool Change 3131482 on 2016/09/19 by Rolando.Caloca DR - vk - Remove unused var Change 3131506 on 2016/09/19 by Mark.Satterthwaite With permission from Josh.A & Michael.T, deprecate Mac OpenGL support. For now this just means visibly warning users with message boxes - but in a future release OpenGL support will be removed from macOS. Change 3131536 on 2016/09/19 by Rolando.Caloca DR - vk - Compile fix Change 3131564 on 2016/09/19 by Rolando.Caloca DR - vk - Submit Hint - Disable framebuffer recycling as its causing a hang Change 3131625 on 2016/09/19 by Mark.Satterthwaite Inside MetalRHI add an optional cache for disposed texture objects so we may reuse them - controlled by CVAR rhi.Metal.TextureCacheMode which must be set prior to running as it can't be changed at runtime. Settings: 0 = off, 1 (default) = will attempt to reuse private memory texture objects within the frame they are released otherwise they are disposed of as before. Setting 2 extends the caching to all textures - though Managed/Shared textures cannot be reused until after the frame in which they were released has been processed on the GPU. In this mode id<MTLTexture> objects are never returned to the OS so in order to conserve VRAM calls to setPurgeableState are made to allow the driver to reclaim unusued memory if required. Change 3131630 on 2016/09/19 by Mark.Satterthwaite More statistics in Metal added to track down where performance was going in a particular project but which may be more generally useful. Change 3131955 on 2016/09/20 by Gil.Gribb Merging //UE4/Dev-Main@3129758 to Dev-Rendering (//UE4/Dev-Rendering) Change 3131978 on 2016/09/20 by Gil.Gribb CIS fix Change 3132584 on 2016/09/20 by Ben.Woodhouse Add some additional checks to help track down a rare crash with terrain rendering and shader recompiling #jira UE-35937 Change 3132696 on 2016/09/20 by Mark.Satterthwaite Use set*Bytes to handle uploading buffers < 4Kb when available - this is faster than lots of small Metal buffers and reduces the amount of GPU heap fragmentation. Where the API feature isn't available or hasn't been tested yet we'll use another ring-buffer inside the MetalCommandEncoder to emulate it. Change 3132772 on 2016/09/20 by Mark.Satterthwaite Rework Metal's handling of RHISetStreamSource calls that override the stride of vertex declarations to be much more efficient. Change 3132870 on 2016/09/20 by Ben.Woodhouse Fix mac compile error Change 3133049 on 2016/09/20 by Brian.Karis Changed light source shapes in reflection captures to use alpha Change 3133057 on 2016/09/20 by Brian.Karis Alphaed out on spot light cone as well. Change 3133263 on 2016/09/20 by Rolando.Caloca DR - vk - Debug names for objects Change 3133292 on 2016/09/20 by Rolando.Caloca DR - vk - Fix SRGB upload/formats Change 3133395 on 2016/09/20 by Rolando.Caloca DR - vk - SM5 fixes Change 3134026 on 2016/09/21 by Gil.Gribb Merging //UE4/Dev-Main@3133983 to Dev-Rendering (//UE4/Dev-Rendering) Change 3134663 on 2016/09/21 by Chris.Bunner Merging Dev-MaterialLayers to Dev-Rendering, CL 3134208. Initial material attribute extensibility changes. #jira UE-34347 Change 3134730 on 2016/09/21 by Arne.Schober DR - [UE-34481] - Fix minor brokenness found by Gil Change 3134792 on 2016/09/21 by Chris.Bunner Fixed compile errors for non-editor builds. Change 3135214 on 2016/09/21 by Rolando.Caloca DR - vk - Fix visualize texture - Dump memory when OOM (to track leaks) Change 3135225 on 2016/09/21 by Rolando.Caloca DR - vk - Ensure on exit if mem leak - Update fences if running wait for idle Change 3135672 on 2016/09/22 by Gil.Gribb Merging //UE4/Dev-Main@3135568 to Dev-Rendering (//UE4/Dev-Rendering) Change 3135793 on 2016/09/22 by Rolando.Caloca DR - vk - Set dynamic state after binding pipeline or on a fresh cmd buffer Change 3135816 on 2016/09/22 by Rolando.Caloca DR - Add names for d3d on renderdoc Change 3135894 on 2016/09/22 by Chris.Bunner Fixed initialization order warning. Change 3136024 on 2016/09/22 by Rolando.Caloca DR - vk - Fix stencil faces Change 3136042 on 2016/09/22 by Marcus.Wassmer Fix compile error Change 3136046 on 2016/09/22 by Chris.Bunner Renamed material for PostTonemapHDRColor visualization to reflect actual usage. Change 3136308 on 2016/09/22 by Uriel.Doyon Changed how the component relative rotation is computed, in order to have more consistency after blueprint rescript. #jira UE-36094 Change 3136798 on 2016/09/22 by Chris.Bunner Gather object references from stereo view state in USceneCaptureComponent. This matches behavior of other classes such as ULocalPlayer. Change 3137092 on 2016/09/22 by Rolando.Caloca DR - vk - Rename pipeline to gfx pipeline Change 3137263 on 2016/09/22 by Mark.Satterthwaite Duplicate CL #3135157: Fix one cause of Metal crashes loading into a zone - the PlanarReflection shader code needs to always set the IsStereoParameter so that the shader can perform the if-test without causing an invalid GPU access. #jira FORT-30061 Change 3137265 on 2016/09/22 by Mark.Satterthwaite Duplicate CL #3135169: Correct Metal texture creation for AVF media framework - we can't provide a render-targetable version of the texture without blitting. The native texture we get is a GPU copy that can be made CPU accessible (i.e. it is not tiled). Change 3137266 on 2016/09/22 by Mark.Satterthwaite Duplicate CL #3135237: Metal validation layer fix: under Metal if there are no reads from the vertex stage-in buffers we should use the Empty vertex declaration, not the filter declaration, otherwise we have to bind a redundant vertex stream buffer to silence the validation layer. Change 3137268 on 2016/09/22 by Mark.Satterthwaite Duplicate CL #3136033: To fix the Fortnite login screen force Nvidia Macs to use the set*Bytes API for small buffer updates even on El Capitan. We can't do this globally as Intel didn't implement these functions until macOS Sierra. Fix GPU selection code in MetalRHI to confirm everything is working. #jira FORT-30385 Change 3137269 on 2016/09/22 by Mark.Satterthwaite Duplicate CL #3137164: Add stats to track exactly how many command buffers are allocated and committed each frame to work out why Fortnite on AMD is hanging, which turns out to be because each texture update/reallocation ends up in its own command-buffer. This needs to be rethought to pack these into fewer command buffers with the same synchronisation requirements to minimise command-buffer splits but for now we'll just make the default sufficiently large that we shouldn't see the hang until the work is done. Also ensure that command-buffer failure is always fatal - there is no way to recover or continue if a command-buffer fails. #jira FORT-30377 Change 3137606 on 2016/09/23 by Gil.Gribb Merging //UE4/Dev-Main@3137560 to Dev-Rendering (//UE4/Dev-Rendering) Change 3137936 on 2016/09/23 by Rolando.Caloca DR - Split RHICmdList clear into color & ds in prep for changes Change 3138346 on 2016/09/23 by Rolando.Caloca DR - vk - Some renaming and splitting classes in prep for compute Change 3138628 on 2016/09/23 by Rolando.Caloca DR - vk - Fix mem leak on framebuffers Change 3138721 on 2016/09/23 by Daniel.Wright Better comment for r.DefaultFeature.AntiAliasing Change 3138722 on 2016/09/23 by Daniel.Wright Fixed assert from decals with MSAA due to binding the Scene Depth Texture instead of surface Change 3138723 on 2016/09/23 by Daniel.Wright Corrected GC doc Change 3138892 on 2016/09/23 by Daniel.Wright Fixed instanced static meshes being unbuilt after a lighting build if you ever cancelled a previous lighting build Change 3138905 on 2016/09/23 by Daniel.Wright "Optimizations" -> "Optimization Viewmodes" Change 3138939 on 2016/09/23 by Daniel.Wright Disabled the stationary light overlap viewmode with forward shading Change 3139710 on 2016/09/26 by Rolando.Caloca DR - Rename and added texture RHIClearDepthStencil -> RHIClearDepthStencilTexture Change 3139820 on 2016/09/26 by Rolando.Caloca DR - Remove prefix from shader frequency strings Change 3139828 on 2016/09/26 by Marcus.Wassmer Add SetShaderValue() specialization for bools on AsyncCompute commandlists to match the Gfx specialization. Change 3139840 on 2016/09/26 by Benjamin.Hyder Adding VectorNoise Examples to TM-Noise map Change 3139862 on 2016/09/26 by Rolando.Caloca DR - Better log to track down crash #jira UE-36271 Change 3140142 on 2016/09/26 by Rolando.Caloca DR - Fix clang warning Change 3140145 on 2016/09/26 by Rolando.Caloca DR - Rename RHIClearColor(MRT) to RHIClearColorTextures and pass textures as parameters Change 3140360 on 2016/09/26 by Daniel.Wright Lighting Scenarios and lightmaps moved to separate package * Levels can be marked as lighting scenarios (eg Day, Night). Lighting is built separately for each lighting scenario with actors / lights in all other scenario levels hidden. Only one lighting scenario level should be visible at a time in game, and its lightmaps will be applied to the world. * Most outputs of the lighting build now go into a separate _BuiltData package. This improves level Save and AutoSave times as the separate package will only be dirtied after lighting rebuilds. * If a lighting scenario is present, all lightmaps are placed inside it's _BuiltData package. This means that only the currently loaded lighting scenario's lightmaps will be loaded (Day or Night, but not both). This also means that lightmaps for a streaming level will not be streamed with it. * For backwards compatibility, existing lightmaps are moved to a new _BuiltData package on load. * Reflection captures and precomputed visibility were not moved to the separate package. Reflection captures are force updated on load of a lighting scenario level, which can increase load times. Change 3140361 on 2016/09/26 by Daniel.Wright Lighting Scenarios UI Change 3140582 on 2016/09/26 by Mark.Satterthwaite Duplicate CL #3140166 Fix the video playback in Fortnite - bind our shader resource texture as the render-target texture as for some reason the playback code expects it there, even though we could never provide one. #jira FORT-30551 Change 3140584 on 2016/09/26 by Mark.Satterthwaite Duplicate CL #3140131: Fix crash under the validation layer & Nvidia's El Capitan (10.11) drivers when distance field particle collisions are used without any scene distance fields available - bind the black volume texture when that is the case to avoid bad access on the GPU. #jira FORT-30622 Change 3140586 on 2016/09/26 by Mark.Satterthwaite Duplicate CL #3140450: Fix launching the game on Intel GPUs by disabling Tiled Reflections on Intel for macOS Sierra like we did for El Capitan as there's currently a driver bug to means it doesn't work properly. #jira FORT-30649 Change 3140594 on 2016/09/26 by Zabir.Hoque Fix benchmark shaders register bindings. TEXCOORD0 was bound to register 1 in VS and then register 0 in PS. DX12 treats this a PSO creation failuer unlike DX11 this was an error. Change 3140601 on 2016/09/26 by Marcus.Wassmer New 'Cinematic' Scalability level. Remove unused 'new' motionblur CVAR Change 3140602 on 2016/09/26 by Zabir.Hoque CreateTexture3D on XB1 DX11 was leaking ESRAM by reserving it but not allocating to it. #Tests: Fix was tested by licensee (GearBox). Change 3140622 on 2016/09/26 by Rolando.Caloca DR - vk - More prep for sm5 Change 3140765 on 2016/09/26 by Rolando.Caloca DR - Fix ensure from bad clear depth surface Change 3141251 on 2016/09/27 by Rolando.Caloca DR - vk - Rename & cleanup Change 3141394 on 2016/09/27 by Rolando.Caloca DR - vk - Compute pipeline state Change 3141463 on 2016/09/27 by Mark.Satterthwaite Fix the include order to avoid compile errors on Mac. Change 3141529 on 2016/09/27 by Gil.Gribb Merging //UE4/Dev-Main@3139632 to Dev-Rendering (//UE4/Dev-Rendering) Change 3141830 on 2016/09/27 by zachary.wilson Adding testing content for lighting scenarios to collaborate with Ben Change 3141941 on 2016/09/27 by Olaf.Piesche Speculative fix for UE-34815; have yet to repro this but there's really only so many things it could be. I currently don't see how the sim resources could go away after queueing, so I'm replacing the check with an ensure and null checking the resource pointer. Change 3142035 on 2016/09/27 by Olaf.Piesche Fix compiler error from silly leftover bit of code. Change 3142065 on 2016/09/27 by Benjamin.Hyder Updating Lighting Scenario map Change 3142262 on 2016/09/27 by Mark.Satterthwaite Change Apple RHI initialisation to select the first compatible shader platform to decide which RHI to initialise. Internally in MetalRHI we must gracefully fallback to a lower feature-level when this initial selection is not available on the current device/OS, in which case we need to validate that the selected shader platform was actually packaged. The order of initialisation is different per-platform: On Mac: Order of initialisation is the order listed in TargetedRHIs .ini specifications. On iOS/tvOS: Order is explicit: Metal MRT > Metal ES 3.1 > OpenGL ES 2 #jira UE-35749 Change 3142292 on 2016/09/27 by Rolando.Caloca DR - hlslcc - Fix for warning X3206: implicit truncation of vector type causing error #jira UE-31438 Change 3142397 on 2016/09/27 by Mark.Satterthwaite Update hlslcc for Mac including RCO's changes in CL #3142292. #jira UE-31438 Change 3142438 on 2016/09/27 by Daniel.Wright UMapBuildDataRegistry's created for legacy lightmap data are placed in the map package, which avoids problems with cooking Change 3142452 on 2016/09/27 by Rolando.Caloca DR - Proper support for int defines Change 3142519 on 2016/09/27 by Arne.Schober DR - [UE-33438] - Added a Project Setting to enable Skincache Shader Permuations. The Default value for the Skincache mode was changed to enabled. The reasoning behind this was that it will be auto disabled when Skincache Shaders are disabled, and runtime toggle is a debuging feature that mainly programmers are dealing with. The Recompute Tangents option in the Skinned Mesh is now automatically grayed out when no Skincache Shader Permuations are available. Change 3142537 on 2016/09/27 by Daniel.Wright Fixed r.ScreenPercentage with MSAA - a scissor rect was being setup during the resolve and not reset Change 3142691 on 2016/09/27 by Daniel.Wright Disabled renaming of legacy ULightmap2D's to the separate package since UMapBuildDataRegistry is no longer put in a separate package for legacy content Change 3142711 on 2016/09/27 by Daniel.Wright GComponentsWithLegacyLightmaps entries get handled by USceneComponent::AddReferencedObjects, fixes a crash when you open a map directly from the content browser Change 3142712 on 2016/09/27 by Daniel.Wright Separate category for ParticleCutout properties Change 3142762 on 2016/09/27 by Uriel.Doyon Added per static mesh and per skeletal mesh UV density data. The data is now saved and available in cooked builds. The density are computed by the engine but can be overridden by the user in the material tabs. Texture streaming intermediate component data is now per material instead of per lod-section. New ViewModeParam in FSceneViewFamily allowing context specific param per viewmode. This is currently used to show which UV channel and which texture index is being shown in the texture streaming accuracy viewmodes. This replaces r.Streaming.AnalysisIndex Renamed texture streaming viewmodes: MeshTexCoordSizeAccuracy -> MeshUVDensityAccuracy MaterialTexCoordScalesAccuracy -> MaterialTextureScaleAccuracy MaterialTexCoordScalesAnalysis -> OutputMaterialTextureScales Improved UV density computation and viewmode. LightmapUVDensity is now computed separately from UVChannel Density. Fixed texture streaming for instanced static mesh component and derived types. Change 3143464 on 2016/09/28 by Daniel.Wright Removed 'experimental' from forward shading setting Change 3143508 on 2016/09/28 by Chris.Bunner Added component type handling to FoldedMath and Length material expressions. #jira UE-36304 Change 3143557 on 2016/09/28 by Rolando.Caloca DR - Back out changelist 3142292 Change 3143563 on 2016/09/28 by Rolando.Caloca DR - vk - Force hlslcc re-link Change 3143648 on 2016/09/28 by Daniel.Wright Moved GetMeshMapBuildData to UStaticMeshComponent since FStaticMeshComponentLODInfo::OwningComponent can't be initialized reliably in the case of SpawnActor off of a blueprint default that has LODData entries already. Change 3143661 on 2016/09/28 by Chris.Bunner Warning fix. Change 3143723 on 2016/09/28 by Daniel.Wright DumpUnbuiltLightIteractions after lighting build for debugging Change 3143822 on 2016/09/28 by Arne.Schober DR - Refactoring of the ViewMatrices. Moved the Derived Matrices into the FViewMatrix struct. Made all members private do emphasize the static constness of that struct after creation. Renamed the heavy weight members on this struct to Compute*. Methods that modify The ViewMatrices have been renamed to Hack* to discurage their use in the future until a better solution for those problems is found. The ViewMatrix modification is especially misleading because it only changes the State of the ViewMatrices to read their Position from the Material Editior as if coming from the Lightsource (mainly for manual bilboards) as well as doing someting similar to generate CPU bilboards for shadows. Change 3143860 on 2016/09/28 by Benjamin.Hyder Updating TM-Noise map to include 3d noise examples Change 3143939 on 2016/09/28 by Rolando.Caloca DR - vk - Better debugging of submissions - Added r.Vulkan.IgnoreCPUReads to help track down hangs on some ihvs Change 3144006 on 2016/09/28 by Brian.Karis Fixed PixelError not being set correctly with LOD groups. Removed unneeded Simplygon references. Mesh reduction module can now be chosen by name with r.MeshReductionModule Change 3144026 on 2016/09/28 by Benjamin.Hyder Updating QA-Effects map to correct numbering issue Change 3144098 on 2016/09/28 by Arne.Schober DR - ViewMatrices Refactoring - Fix UT Change 3144158 on 2016/09/28 by Rolando.Caloca DR - Undo splitting RHI command context Change 3144952 on 2016/09/29 by Rolando.Caloca DR - vk - Missing swapchain flag Change 3145064 on 2016/09/29 by Olaf.Piesche #jira UE-36091 Pulling range update for vector distributions even when UDist is not dirty; some content has a lookup table and a clean dist, but the range values have not been baked; always pulling them should be safe and not significantly costly. Change 3145354 on 2016/09/29 by Benjamin.Hyder Updating Tm-ContactShadows Change 3145485 on 2016/09/29 by Daniel.Wright Made SeamlessTravelLoadCallback handle legacy lightmaps Change 3145527 on 2016/09/29 by Daniel.Wright Don't clear legacy lightmap annotations on each map - fixes lighting unbuilt when doing seamless travel Change 3145530 on 2016/09/29 by Simon.Tovey UE-36188 - Editor crash when updating hierarchical instance static mesh component Dirtied render state rather than unsafe update of bounds. Change 3145608 on 2016/09/29 by Gil.Gribb Attempt to fix a random compiler error under win32 Change 3145749 on 2016/09/29 by Uriel.Doyon Fix for static analysis warning Change 3146091 on 2016/09/29 by Zabir.Hoque RHI Interface changes to support PSO based APIs Change 3146092 on 2016/09/29 by Zabir.Hoque D3D12 RHI support for PSO based APIs. Change 3146590 on 2016/09/30 by Gil.Gribb Merging //UE4/Dev-Main@3146520 to Dev-Rendering (//UE4/Dev-Rendering) Change 3146731 on 2016/09/30 by Rolando.Caloca DR - Fix merge conflicts Change 3146778 on 2016/09/30 by Rolando.Caloca DR - More integration compile fixes Change 3146790 on 2016/09/30 by Rolando.Caloca DR - Integration fix Change 3146849 on 2016/09/30 by Rolando.Caloca DR - Final integration fix Change 3146899 on 2016/09/30 by Daniel.Wright Static analysis fix for dereferencing World Change 3147020 on 2016/09/30 by Rolando.Caloca DR - vk - Fix depth issue on AMD cards - Added VULKAN_KEEP_CREATE_INFO to help debugging creation - Added num color attachments to pipeline key Change 3147034 on 2016/09/30 by Rolando.Caloca DR - Fix Kite crash where shader pipelines were optimizing non-tessellation pipelines #jira UE-36277 #jira UE-36500 Change 3147080 on 2016/09/30 by Rolando.Caloca DR - vk - Disable debug info by default Change 3147082 on 2016/09/30 by Chris.Bunner Allow tessellation to be used with DrawTile calls by swapping fixed mesh to triangle list. #jira UE-36491 Change 3147388 on 2016/09/30 by Chris.Bunner Blacklisted Nvidia driver 372.70 as it has known stability issues skewing our top crashes list. Also updated recommended version numbers. #jira UE-35288 Change 3147394 on 2016/09/30 by Chris.Bunner Additional logging for rare error. #jira UE-35812 Change 3147459 on 2016/09/30 by Rolando.Caloca DR - vk - Some more srgb formats Change 3147537 on 2016/09/30 by Rolando.Caloca DR - vk - Standarize srgb flag like D3D11 - Minor FVulkanShader cleanup Change 3147620 on 2016/09/30 by Olaf.Piesche #jira UE=34486 particle component tick function task can be invalid during pause; add check Change 3148028 on 2016/10/01 by Daniel.Wright Renamed RenderingSettings.cpp to match header Change 3148059 on 2016/10/01 by Daniel.Wright Disabled reparenting in the profiler which is disorienting Change 3148067 on 2016/10/01 by Daniel.Wright Support for ReflectionEnvironment and light type show flags with ForwardShading Change 3148069 on 2016/10/01 by Daniel.Wright Added CapsuleIndirectShadowMinVisibility to SkinnedMeshComponent, so artists have control over indirect capsule shadow darkness without changing cvars Change 3148072 on 2016/10/01 by Daniel.Wright Added a rendering setting to disable the new lightmap mixing behavior, where smooth surfaces don't have any mixing. r.ReflectionEnvironmentLightmapMixBasedOnRoughness Change 3148073 on 2016/10/01 by Daniel.Wright r.VertexFoggingForOpaque only affects forward shading - manual copy of Ben's fix from Orion stream Change 3148074 on 2016/10/01 by Daniel.Wright Enabled planar reflection receiving on the material used for the preview of a APlanarReflection Change 3148084 on 2016/10/01 by Daniel.Wright Fixed reflections on Surface TranslucencyVolume in deferred Change 3148085 on 2016/10/01 by Daniel.Wright Fixed planar reflection composite being done too many times in stereo deferred Change 3148086 on 2016/10/01 by Daniel.Wright Clamp IndirectLightingQuality to 1 in preview builds - keeps preview useful even with IndirectLightingQuality jacked up to 10. Change 3148107 on 2016/10/01 by Daniel.Wright CIS fix Change 3148113 on 2016/10/01 by Daniel.Wright Translucency lighting modes for forward shading * Per-vertex modes use GetSimpleDynamicLighting since they can't support specular anyway Change 3148306 on 2016/10/02 by Rolando.Caloca DR - vk - Fix for some NV drivers on Win10 Change 3148307 on 2016/10/02 by Rolando.Caloca DR - vk - Compute pipeline Change 3148358 on 2016/10/02 by Rolando.Caloca DR - vk - Consolidate and renumber enum for binding types Change 3148396 on 2016/10/03 by Rolando.Caloca DR - vk - Warning fix Change 3148697 on 2016/10/03 by Benjamin.Hyder Submitting M_Chromebal after enabling planar reflectionsl Change 3148799 on 2016/10/03 by Rolando.Caloca DR - vk - static analysis fix Change 3148934 on 2016/10/03 by Chris.Bunner Added pre-skinned local position material graph node, vertex shader only. Change 3148994 on 2016/10/03 by Chris.Bunner Added missing header file. Change 3149085 on 2016/10/03 by Daniel.Wright Support for ReflectionEnvironment show flag in base pass reflections without any shader overhead Change 3149095 on 2016/10/03 by Rolando.Caloca DR - vk - Disable new render passes Change 3149125 on 2016/10/03 by Rolando.Caloca DR - vk - Fix for multiple memory types Change 3149181 on 2016/10/03 by Rolando.Caloca DR - Better message when missing pipelines Change 3149215 on 2016/10/03 by Rolando.Caloca DR - RHIClearColor -> RHIClearColorTexture #tests Orion Editor run match on Agora_P Change 3149288 on 2016/10/03 by Chris.Bunner Added PreTonemapHDRColor for buffer visualization and target output. #jira UE-36333 Change 3149402 on 2016/10/03 by Daniel.Wright Light attenuation buffer is now multisampled, fixes preshadows with MSAA (depth testing failed during stencil pass) but adds a resolve (.12ms at VR res) Change 3149403 on 2016/10/03 by Daniel.Wright Forward lighting supports lighting channels Change 3149574 on 2016/10/03 by Marcus.Wassmer PR #2817: Ansel/Photography system (Contributed by adamnv) Modified to become a plugin Change 3149615 on 2016/10/03 by Rolando.Caloca DR - vk - Fix PF_G16R16 which fixes reflections Change 3149639 on 2016/10/03 by Olaf.Piesche Adding more ensures to catch NaNs occasionally appearing in particle locations early Change 3149745 on 2016/10/03 by Uriel.Doyon Moved UVDensity computation in the staticmesh DDC. Change 3149749 on 2016/10/03 by Daniel.Wright Fixed lightmaps on BSP, which was fallout from Lighting Scenarios backwards compatibility Change 3149755 on 2016/10/03 by Benjamin.Hyder Checking in built lighting for QA-postprocessing Change 3149758 on 2016/10/03 by Benjamin.Hyder re-submitting built lighting for QA-PostProcessing Change 3149940 on 2016/10/04 by Gil.Gribb Merging //UE4/Dev-Main@3149754 to Dev-Rendering (//UE4/Dev-Rendering) Change 3150098 on 2016/10/04 by Marcus.Wassmer Fix some clang and win32 errors Change 3150323 on 2016/10/04 by Rolando.Caloca DR - vk - Static analysis fix Change 3150456 on 2016/10/04 by Daniel.Wright Revert temp logs Change 3150731 on 2016/10/04 by Daniel.Wright Static lights now add a dummy map build data entry for their ULightComponent::IsPrecomputedLightingValid Change 3150795 on 2016/10/04 by Marcus.Wassmer Fix RHIClearUAV and Drawindirect bugs on PS4. Also fix PS4 compile error from bad merge. Change 3151065 on 2016/10/04 by Ben.Marsh Merging //UE4/Dev-Main to Dev-Rendering (//UE4/Dev-Rendering) Change 3151134 on 2016/10/04 by Brian.Karis Fixed corrupt mesh generation from quadric simplifier due to uninitialized color array. Change 3151201 on 2016/10/04 by Marcus.Wassmer Nvidia approved icon for ansel plugin. Change 3151240 on 2016/10/04 by Marcus.Wassmer Fix string concat build error. Change 3151258 on 2016/10/04 by Ben.Marsh Fix compile error. Change 3151290 on 2016/10/04 by Marcus.Wassmer Bumping static mesh DDC key to hopefully fix distancefield crashes after brian's quadric simplifier fix. Change 3152104 on 2016/10/05 by Chris.Bunner Workaround for legacy BreakMA material node invalid component masks. #jira UE-36832 Change 3152130 on 2016/10/05 by Ben.Woodhouse Fix issue with skylight SH and fast semantics on DX11. We need to clear the cube scratch textures before writing to them to avoid issues when reading them back for mip downsampling #jira UE-35890 Change 3152240 on 2016/10/05 by Rolando.Caloca DR - Fix for missing gizmo colors #jira UE-36515 Change 3152338 on 2016/10/05 by Daniel.Wright Hopeful fix for FDistanceFieldVolumeTexture assert in the cooker Change 3152833 on 2016/10/05 by Brian.Karis Improved precision of quadrics. Fixes bad triangles on large meshes Change 3153376 on 2016/10/06 by Rolando.Caloca DR - Fix for SM4 missing pipelines fallout Change 3153650 on 2016/10/06 by Gil.Gribb Merging //UE4/Dev-Main@3153068 to Dev-Rendering (//UE4/Dev-Rendering) Change 3153656 on 2016/10/06 by Uriel.Doyon Fixed main integration compilation issues. Some of the Mesh UVDensity UI is temporary disabled. Change 3153725 on 2016/10/06 by Uriel.Doyon Fixed crash when source data is missing for lightmaps #jira UE-36157 Change 3153998 on 2016/10/06 by Gil.Gribb Merging //UE4/Dev-Main to Dev-Rendering@3153705 (//UE4/Dev-Rendering) Change 3154056 on 2016/10/06 by Marcus.Wassmer Fix compile errors from merge. Also restore some light scencario code Change 3154176 on 2016/10/06 by Marcus.Wassmer Fix deprecation warning Change 3154252 on 2016/10/06 by Marcus.Wassmer Fix more deprecation warnings Change 3154632 on 2016/10/07 by Chris.Bunner Fix for incorrect re-entrant detection with a function called twice in a row. The function input Preview expression is overridden when the function is called to link it into the caller graph, but it was restored too late for chained calls to the same function. #jira UE-37002 [CL 3154728 by Gil Gribb in Main branch]
2016-10-07 10:20:36 -04:00
bool FLevelModel::IsLightingScenario() const
{
if (GetLevelObject())
{
return GetLevelObject()->bIsLightingScenario;
}
return false;
}
void FLevelModel::SetIsLightingScenario(bool bNew)
{
if (GetLevelObject())
{
GetLevelObject()->SetLightingScenario(bNew);
}
}
bool FLevelModel::IsLoaded() const
{
return (LevelCollectionModel.IsSimulating() ? SimulationStatus.bLoaded : (GetLevelObject() != NULL));
}
bool FLevelModel::IsLoading() const
{
return (LevelCollectionModel.IsSimulating() ? SimulationStatus.bLoading : bLoadingLevel);
}
bool FLevelModel::IsVisible() const
{
if (LevelCollectionModel.IsSimulating())
{
return SimulationStatus.bVisible;
}
else
{
ULevel* Level = GetLevelObject();
if (Level)
{
if (ULevelStreaming* StreamingLevel = FLevelUtils::FindStreamingLevel(Level))
{
return StreamingLevel->ShouldBeVisible();
}
else
{
return FLevelUtils::IsLevelVisible(Level);
}
}
return false;
}
}
bool FLevelModel::IsLocked() const
{
ULevel* Level = GetLevelObject();
if (Level)
{
return FLevelUtils::IsLevelLocked(Level);
}
return false;
}
bool FLevelModel::IsFileReadOnly() const
{
if (HasValidPackage())
{
FName PackageName = GetLongPackageName();
FString PackageFileName;
if (FPackageName::DoesPackageExist(PackageName.ToString(), &PackageFileName))
{
return IFileManager::Get().IsReadOnly(*PackageFileName);
}
}
return false;
}
void FLevelModel::LoadLevel()
{
}
void FLevelModel::SetVisible(bool bVisible)
{
TArray<FLevelModel*> LevelModels({ this });
TArray<bool> bAreVisible({ bVisible });
FLevelModel::SetVisible(LevelModels, bAreVisible);
}
void FLevelModel::SetVisible(TArray<FLevelModel*>& LevelModels, const TArray<bool>& bAreVisible)
{
// Don't create unnecessary transactions
if (LevelModels.Num() == 0 || LevelModels.Num() != bAreVisible.Num())
{
return;
}
TArray<ULevel*> Levels;
TArray<bool> bAreVisibleCleaned; // Required because of the continue in the for loop
TArray<bool> bOldAreDirty;
for (int32 LevelModelIdx = 0; LevelModelIdx < LevelModels.Num(); ++LevelModelIdx)
{
FLevelModel* LevelModel = LevelModels[LevelModelIdx];
// If visibility does not change, omit it
if (LevelModel->IsVisible() == bAreVisible[LevelModelIdx])
{
continue;
}
// Otherwise, add Level and IsDirty into each TArray
Levels.Add(LevelModel->GetLevelObject());
bAreVisibleCleaned.Add(bAreVisible[LevelModelIdx]);
bOldAreDirty.Add(LevelModel->IsDirty());
}
// Don't create unnecessary transactions
if (Levels.Num() == 0)
{
return;
}
const FScopedTransaction Transaction(LOCTEXT("ToggleVisibility", "Toggle Level Visibility"));
// This call hides all owned actors, etc.
EditorLevelUtils::SetLevelsVisibility(Levels, bAreVisibleCleaned, false);
// Note that Levels.Num() != LevelModels.Num() given the continue in the first for loop
for (int32 LevelModelIdx = 0; LevelModelIdx < Levels.Num(); ++LevelModelIdx)
{
if (!bOldAreDirty[LevelModelIdx])
{
// Don't set the dirty flag if we're just changing the visibility of the level within the editor
ULevel* Level = Levels[LevelModelIdx];
if (Level)
{
Level->GetOutermost()->SetDirtyFlag(false);
}
}
}
}
void FLevelModel::SetLocked(bool bLocked)
{
if (LevelCollectionModel.IsReadOnly())
{
return;
}
ULevel* Level = GetLevelObject();
if (Level == NULL)
{
return;
}
// Do nothing if attempting to set the level to the same locked state
if (bLocked == IsLocked())
{
return;
}
// If locking the level, deselect all of its actors and BSP surfaces
if (bLocked)
{
DeselectAllActors();
DeselectAllSurfaces();
// Tell the editor selection status was changed.
GEditor->NoteSelectionChange();
// If locking the current level, reset the p-level as the current level
//@todo: fix this!
}
// Change the level's locked status
FLevelUtils::ToggleLevelLock(Level);
}
void FLevelModel::MakeLevelCurrent()
{
if (LevelCollectionModel.IsReadOnly())
{
return;
}
if (!IsLoaded())
{
// Load level from disk
FLevelModelList LevelsList; LevelsList.Add(this->AsShared());
LevelCollectionModel.LoadLevels(LevelsList);
}
ULevel* Level = GetLevelObject();
if (Level == NULL)
{
return;
}
// Locked levels can't be made current.
if (!FLevelUtils::IsLevelLocked(Level))
{
// Make current.
if (LevelCollectionModel.GetWorld()->SetCurrentLevel(Level))
{
FEditorDelegates::NewCurrentLevel.Broadcast();
// Deselect all selected builder brushes.
bool bDeselectedSomething = false;
for (FSelectionIterator It(GEditor->GetSelectedActorIterator()); It; ++It)
{
AActor* Actor = static_cast<AActor*>(*It);
checkSlow(Actor->IsA(AActor::StaticClass()));
ABrush* Brush = Cast< ABrush >( Actor );
if (Brush && FActorEditorUtils::IsABuilderBrush(Brush))
{
GEditor->SelectActor(Actor, /*bInSelected=*/ false, /*bNotify=*/ false);
bDeselectedSomething = true;
}
}
// Send a selection change callback if necessary.
if (bDeselectedSomething)
{
GEditor->NoteSelectionChange();
}
}
// Force the current level to be visible.
LevelCollectionModel.ShowLevels({ AsShared() });
}
else
{
FMessageDialog::Open(EAppMsgType::Ok, NSLOCTEXT("UnrealEd", "Error_OperationDisallowedOnLockedLevelMakeLevelCurrent", "MakeLevelCurrent: The requested operation could not be completed because the level is locked."));
}
Update();
}
bool FLevelModel::HitTest2D(const FVector2D& Point) const
{
return false;
}
FVector2D FLevelModel::GetLevelPosition2D() const
{
return FVector2D::ZeroVector;
}
FVector2D FLevelModel::GetLevelSize2D() const
{
return FVector2D::ZeroVector;
}
FBox FLevelModel::GetLevelBounds() const
{
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3293188) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3203880 on 2016/11/18 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3207429 on 2016/11/22 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3207285 Change 3252627 on 2017/01/10 by Lukasz.Furman removed duplicated entries from visual logger shape rendering #ue4 Change 3252675 on 2017/01/10 by Ori.Cohen Add support for tagged memory regions (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252686 on 2017/01/10 by Ori.Cohen Refactor BodySetup to make it easier to reuse shape creation (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252833 on 2017/01/10 by Ori.Cohen Refactor constraint so that it can be used for external solvers. (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3252887 on 2017/01/10 by Dan.Reynolds Increased modes to include: Harmonic minor Melodic minor (going up) Pentatonic (Major) Pentatonic (minor) Whole Tone Diminished (WH) and Blues Change 3252895 on 2017/01/10 by Aaron.McLeran update to music utilities. Change 3253060 on 2017/01/10 by Aaron.McLeran Updates to synthesis plugin and some new features to DSP objects Change 3253061 on 2017/01/10 by Aaron.McLeran Updates to music maps Change 3253078 on 2017/01/10 by Aaron.McLeran Removing pragma optimization code accidentally checked in Change 3253110 on 2017/01/10 by Ori.Cohen First iteration of immediate mode ragdoll node (Copying //Tasks/UE4/Dev-ImmediateModePhysics to Dev-Framework (//UE4/Dev-Framework)) Change 3253315 on 2017/01/10 by Aaron.McLeran Fixing a few bugs in DSP objects - Added a new types file EpicSynth1 and EpicSynth1 component can share enums Change 3253577 on 2017/01/11 by Aaron.McLeran Checking in updates to assets for music -- celestial manager for rotating objects like planets, new ambient map Change 3254052 on 2017/01/11 by Ori.Cohen Fix build. Change 3254059 on 2017/01/11 by Ori.Cohen Turn off html5 trying to build apex. Change 3254095 on 2017/01/11 by Ori.Cohen Fix build Change 3254200 on 2017/01/11 by Jon.Nabozny Make vectorized FTransform Accumulate (with blend) and AccumulateWithAdditive (with blend) consistent with the non-vectorized version and comments. #JIRA UE-40469 Change 3254334 on 2017/01/11 by Marc.Audy Put in missing virtual Change 3254397 on 2017/01/11 by dan.reynolds Updates to OtonOkeMap Change 3254410 on 2017/01/11 by Marc.Audy Cleanup autos Change 3254420 on 2017/01/11 by Marc.Audy PR #3110: Add missing IsInAudioThread check (Contributed by projectgheist) Modified somewhat, but based on what PR indicated as a problem. #jira UE-40369 Change 3254423 on 2017/01/11 by Marc.Audy Optimize GetDefaultSubobjectByName and GetDefaultSubobjects Remove autos Change 3254826 on 2017/01/11 by Aaron.McLeran Bringing optimizations to dev-framework Change 3254831 on 2017/01/11 by dan.reynolds Modified MidiSynthTestBP to use Program Change events to pull a Preset from a Preset Bank--added a Data Blueprint Object ES1Bank_Default (containing Preset arrays) with children classes for different classifications of Presets. Change 3254833 on 2017/01/11 by dan.reynolds Updating MidiSynthTestBP's default SynthPreset pan value. Change 3254851 on 2017/01/11 by dan.reynolds Updating ES1Bank_Bass Updating OtonOkeMap Change 3254854 on 2017/01/11 by Aaron.McLeran Some fixups for pan modulation Change 3255682 on 2017/01/12 by aaron.mcleran Turning the bass down a bit on OtonOkeMap Change 3255721 on 2017/01/12 by Marc.Audy Fix spelling error Change 3255790 on 2017/01/12 by Marc.Audy Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3256263 on 2017/01/12 by Ori.Cohen Refactor immediate mode api to take PxD6Joint and PxRigidActor instead. Change 3256288 on 2017/01/12 by Ori.Cohen Undo constraint refactor as we found a way around it and it made the code much harder to read/debug Change 3256360 on 2017/01/12 by Ori.Cohen Make sure physx actors passed into immediate mode are done so with proper locks (can probably improve this in the case where the actor is not even in the scene) Change 3256846 on 2017/01/13 by Marc.Audy Deprecate FBox/FBox2D int32 constructor because it makes no sense if you pass in a non 0 value. Use ForceInit instead. Change 3256954 on 2017/01/13 by Marc.Audy Fix missed fixup of deprecated constructor use Change 3257167 on 2017/01/13 by Jon.Nabozny Fix check in FBodyInstance::SetCollisionEnabled. Create convenience methods for HasPhysics and HasQuery. #jira UE-39633 Change 3257181 on 2017/01/13 by Zak.Parrish Adding input map and some testing content to Xenakis Change 3257183 on 2017/01/13 by Mieszko.Zielinski Implemented an improved navigation projection BP function that retrieves both projected locaiton as well as a boolean indicating if the projection succeeded #UE4 Also, did similar changes to GetRandomReachablePointInRadius and GetRandomPointInNavigableRadius #jira UE-40368 Change 3257211 on 2017/01/13 by Jon.Nabozny Fix CIS issue caused by 3257167. Change 3257220 on 2017/01/13 by Marc.Audy Additional FBox constructor deprecation fixups Change 3257236 on 2017/01/13 by zak.parrish Fixed error on Xenakis input pawn Change 3257242 on 2017/01/13 by zak.parrish Update to InputListener Change 3257273 on 2017/01/13 by Marc.Audy No reason to pass simple types by reference Change 3257418 on 2017/01/13 by Ori.Cohen Attempt to turn android physx libs back to static libs. Change 3257445 on 2017/01/13 by Ori.Cohen Turn android libs back to OBJ and removed unreal side linking as it seems we are now just merging into a single physx lib Change 3257903 on 2017/01/14 by Aaron.McLeran Additions to synth module and updates to dsp objects - Adding ability to create arbitrary modular patches from modulating sources to modulation destinations - DSP objects define their default depths but patches can override - Creating new SynthesisEditor module for synthesis plugin so we can create synthesis preset assets - Adding a preset bank type so we can store a bank of presets (aka factory presets) Change 3258179 on 2017/01/15 by Seth.Weedin Duplicating input test map for some FX work Change 3258181 on 2017/01/15 by Seth.Weedin Modify skybox in test map to be dark and spooky Change 3258183 on 2017/01/15 by aaron.johnson substituted classes, changed wind speed and adjusted level lighting Change 3258190 on 2017/01/15 by aaron.johnson substituted triplet pawn and motion controller classes, enabled grabbing animations Change 3258191 on 2017/01/15 by Aaron.McLeran Getting source effects working for GDC demo - Added new synthesis editor module to create instances of user-created source effects - Added code to do source effects - Modified old design to a newer, more simpler design for calling into client code to set parameters. No longer using the complex struct reflection design and instead just pass in the uobject preset the user created. They'll then cast it to the type that has the actual settings. - Tweaks and fixes to existing dsp objects to get source effects working - Modified existing engine code to allow for playing out source effect tails - Only supporting mono and stereo assets for source effect processing. Multi-channel effect processing is overly complex for this feature though we may extend the capabilities in the future. - Fixed issue of pitching with stereo delay effect on setting first interpolated param - Moving synth/dsp stuff in synthesis plugins into appropriate public/private folders in plugin/module - Deleting some cruft files no longer needed Change 3258201 on 2017/01/15 by Seth.Weedin C++ and BP classes for managing grid cells. Initial grid mapping tests. #rb none Change 3258206 on 2017/01/15 by aaron.johnson map push, triplets interface created, debug widget placed in level Change 3258222 on 2017/01/15 by Aaron.McLeran Fixing crash when there's a null entry in the source effect chain Fixed some zippering introduced by applying volume twice. Change 3258225 on 2017/01/15 by aaron.johnson Interface changes, pawn output values wip Change 3258228 on 2017/01/15 by aaron.johnson Pawn should be outputting all correct values for Tripletsinterface Change 3258242 on 2017/01/15 by Stanley.Hayes Edge lights and Spherical Density Materials Change 3258251 on 2017/01/16 by Seth.Weedin More progress on grid FX. Add curve strength modifiers, begin hooking up interaction. #rb none Change 3258284 on 2017/01/16 by Aaron.McLeran Fixing CIS build error Surprised that MSVC allows that... Change 3258525 on 2017/01/16 by Mieszko.Zielinski Made UGameplayTask::ResourceOverlapPolicy configurable via ini files #UE4 Change 3258537 on 2017/01/16 by Lukasz.Furman fixed duplicated & undo operations not updating navigation area in nav link proxy and nav link component #ue4 Change 3258595 on 2017/01/16 by Marc.Audy Fix static analysis warning Change 3259364 on 2017/01/16 by Mieszko.Zielinski BTTask_RotateToFaceBBEntry comment spelling fix #UE4 #jira UE-40669 Change 3259683 on 2017/01/16 by dan.reynolds Updated Preset Bank System implemented in MidiSynthTestBP and 4 Preset Banks have been started Change 3260244 on 2017/01/17 by Lina.Halper #anim - optimize layer blend node to not create mask weights in run-time but in compile time. #code review: Martin.Wilson Change 3260617 on 2017/01/17 by Ori.Cohen Immediate mode spawns its own actors. Change 3260701 on 2017/01/17 by Ori.Cohen Don't bother blending physics with animation when physics is QueryOnly Change 3260796 on 2017/01/17 by Ori.Cohen EndPhysics tick will no longer be scheduled if QueryOnly is used on a ragdoll. Change 3261207 on 2017/01/17 by Ori.Cohen First iteration of contact enabling/disabling for immediate mode. Change 3262010 on 2017/01/18 by Marc.Audy Remove some autos Change 3262525 on 2017/01/18 by Lina.Halper Fix crash with required bones index not using property indexing #jira: UE-40786 Change 3263658 on 2017/01/19 by Martin.Wilson Add AnimTechDemo to dev-framework (base third person + feng mao) Change 3263684 on 2017/01/19 by Lina.Halper #anim : layer node - fix allocation change I made by mistake Change 3264523 on 2017/01/19 by Ori.Cohen Immediate mode can now add static geometry it finds in the world. Also improve contact gen by caching iteration order Change 3264701 on 2017/01/19 by Ori.Cohen Make it so that immediate mode ragdolls collide with the ground in persona.This is a bit of an editor only hack which allows immediate mode to find non-static actors Change 3264980 on 2017/01/19 by Ori.Cohen Make sure physics asset collision disabled works in immediate mode. Change 3265011 on 2017/01/19 by Ori.Cohen Added the ability to override physics asset for immediate mode Change 3265030 on 2017/01/19 by Ori.Cohen Added override gravity for immediate mode. Change 3265650 on 2017/01/20 by Benn.Gallagher NvCloth Source Change 3265652 on 2017/01/20 by Benn.Gallagher NvCloth Lib #rnx Change 3265653 on 2017/01/20 by Benn.Gallagher NvCloth Bin #rnx Change 3266195 on 2017/01/20 by Danny.Bouimad Initial ClothTest Assets for NCloth Before and after comparison TM-MultiClothTest (Under Maps>Framework>Cloth) Change 3266377 on 2017/01/20 by Marc.Audy Ensure that OrphanedDataOnly and TrashClass blueprint generated classes are correctly considered a blueprint class for disregard for GC purposes. Change 3267873 on 2017/01/23 by Jon.Nabozny Fix SceneProxy shadowing in UGeometryCacheComponent. Change 3268025 on 2017/01/23 by Benn.Gallagher IWYU change, platform PCH generation seemed to hide this one. Change 3268026 on 2017/01/23 by Benn.Gallagher Fixed LOCTEXT_NAMESPACE being inconsistently scoped in an #if block #rnx Change 3268630 on 2017/01/23 by Zak.Parrish Updating to add MIGS shooter content, as well as audio interaction Blueprints Change 3268663 on 2017/01/23 by Ori.Cohen Ragdoll animnode uses raw physics asset pointer to ensure it makes a hard reference. Change 3268811 on 2017/01/23 by Ori.Cohen Added component space sim for immediate mode Change 3269369 on 2017/01/24 by Benn.Gallagher Copying //Tasks/UE4/Dev-UEFW-11-NewClothingPipeline to Dev-Framework (//UE4/Dev-Framework) Replaced clothing with new simulation framework Change 3269417 on 2017/01/24 by danny.bouimad Minor Update to cloth map for test Change 3269420 on 2017/01/24 by Benn.Gallagher Removed APEX simulation from clothing framework (used in testing, not fully complete) Change 3269421 on 2017/01/24 by danny.bouimad Small tweaks Change 3269515 on 2017/01/24 by Lukasz.Furman enabled gameplay debugger's OnSelectionChanged event support for both PIE and SIE modes fixed GameplayAbility debugger's category not using IAbilitySystemInterface #ue4 Change 3269595 on 2017/01/24 by mason.seay Break apart physics asset for crash bug Change 3269819 on 2017/01/24 by Ori.Cohen Make the possibly kinematic actor the first actor in the immediate mode joint. This is consistent with physx vanilla solver. Change 3270364 on 2017/01/24 by Josh.Stoddard upgrade to the latest version of v-HACD: https://github.com/kmammou/v-hacd/tree/master/src/VHACD_Lib commit: 7a09f9d NOTE: only updated windows binaries mac and linux still using old binaries until they can be tested #jira UE-40124 #rb josh.stoddard Change 3271188 on 2017/01/25 by Jurre.deBaare Post-import script support #jira UEFW-80 Change 3271249 on 2017/01/25 by Thomas.Sarkanen Move soundwave-internal curve tables to advanced display Exposing it was confusing to audio people Change 3271586 on 2017/01/25 by Marc.Audy Don't rerun construction scripts twice on a level that has been hidden and reshown #jira UE-40306 Change 3272048 on 2017/01/25 by Ori.Cohen Fix for immediate mode sim when root body is the same as the root bone. Change 3272083 on 2017/01/25 by Ori.Cohen Make sure to warn when component space sim and collision are used together. Also handle it gracefully. Change 3272300 on 2017/01/25 by Ori.Cohen Fix incorrect collision generation when a shape's local pose is not identity. Change 3273195 on 2017/01/26 by Jurre.deBaare Fix for Anim import script crash in GetBonePosesForTime Change 3273204 on 2017/01/26 by Ben.Marsh Ignore PRAGMA_DISABLE_SHADOW_VARIABLE_WARNINGS and PRAGMA_ENABLE_SHADOW_VARIABLE_WARNINGS macros between include directives. Fixes CIS warning with IncludeTool. Change 3273378 on 2017/01/26 by James.Golding In AnimBP editor, call CopyNodeDataToPreviewNode when properties are edited, not just pin defaults changed Change 3273381 on 2017/01/26 by James.Golding Big refactor to PoseDriver - RBF logic now moved into its own class/file - Allow editing of transform and radial scaling per-target - Add support for different falloff functions (not just Gaussian) - Allow driving curves directly, rather than always poses - Add details customization for pose driver node - Edits to PoseDriver settings now take immediate effect, don't need to recompile Change 3273826 on 2017/01/26 by Josh.Stoddard modify VHACD to improve quality of hulls generated by convex decomposition NOTE: mac libs not included - mac editor will use legacy libs for now Change 3273902 on 2017/01/26 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3273433 Change 3274018 on 2017/01/26 by Ori.Cohen Added immediate physics preview in phat. Change 3274165 on 2017/01/26 by Ori.Cohen PhAT now depends on immediate mode plugin. Fix build #JIRA UE-41179 Change 3275001 on 2017/01/27 by Jurre.deBaare Fix for crash in Persona with Anim Modifiers Change 3275297 on 2017/01/27 by Ori.Cohen Big refactor to iterate over shapes instead of bodies (allows multiple shape per body collision) Change 3275340 on 2017/01/27 by Benn.Gallagher Fixed Paragon clothing crashes during clothing upgrade step, fixed bone mapping not getting updated on reimport with different hierarchy #jira UE-41025 #jira UE-41039 Change 3275383 on 2017/01/27 by Benn.Gallagher Blacklisted double promotion warning on ps4 NvCloth build #rnx Change 3275426 on 2017/01/27 by Benn.Gallagher Removed CUDA dependencies from NvCloth cmake files Change 3275670 on 2017/01/27 by Ori.Cohen Fix phat ragdoll in immediate mode updating sketal mesh component transform Change 3275673 on 2017/01/27 by Ori.Cohen Add position/velocity iteration to immediate mode Change 3276001 on 2017/01/27 by Alan.Noon Migrated Immediate Mode Minion Ragdoll Content to GDC AnimTech Project. Updated DefaultInput.ini none Change 3276596 on 2017/01/28 by Aaron.McLeran Removing unused #ifdef Change 3276597 on 2017/01/28 by Aaron.McLeran Getting rid of static analysis warning Change 3277354 on 2017/01/30 by Lukasz.Furman fixed custom navlink Id collisions #ue4 Change 3277356 on 2017/01/30 by Lukasz.Furman fixed comments in GameplayDebugger.h #jira UE-41103 Change 3277371 on 2017/01/30 by mason.seay Test map for spawn sound/force feedback bug. Change 3277445 on 2017/01/30 by Lukasz.Furman fixed compilation warning #ue4 Change 3277560 on 2017/01/30 by Danny.Bouimad Made checkin to Fix Crash that occured due to bad content. Change 3277567 on 2017/01/30 by Ori.Cohen Fix immediate mode crashing when joint is empty. #JIRA UE-41026 Change 3277928 on 2017/01/30 by Ori.Cohen Turn on immediate mode plugin by default Change 3278433 on 2017/01/30 by Ori.Cohen Immediate mode supports heightfield collision. Change 3278449 on 2017/01/30 by Ori.Cohen Fix immediate mode cache not being initialized properly. Change 3278787 on 2017/01/31 by James.Golding Fix CIS error in ImmediatePhysicsSimulation.cpp Change 3279303 on 2017/01/31 by mason.seay Assets for RigidBody node bug Change 3279352 on 2017/01/31 by Benn.Gallagher Fixed inertia blends on self collision cloth assets as we now only have local space simulation and these values weren't used before Change 3279377 on 2017/01/31 by Alan.Noon GDC AnimTech Demo: adjusted minion physics assets none Change 3279425 on 2017/01/31 by james.cobbett Updating QA-Physics map. Made one of the simulated physics objects more user-friendly, able to enable/disable physics on key-press now. Change 3279436 on 2017/01/31 by Benn.Gallagher Fixed inertia scales on Owen mesh Change 3279480 on 2017/01/31 by Benn.Gallagher Fixes for clothing behavior changes #jira UE-41092 Change 3279495 on 2017/01/31 by Ori.Cohen Remove unneeded cache clearing when contact pairs are not skipped, but there is no collision. Change 3279579 on 2017/01/31 by james.cobbett Added new scenario to QA-Physics map. Moving platforms (up/down, left/right) with physics objects on them. Change 3279695 on 2017/01/31 by mason.seay RigidBody node test asset Change 3280105 on 2017/01/31 by Ori.Cohen Prevent query only ragdolls from simulating if their bodysetup is marked as simulated. Also remove slow check in term body for owning components. This is not true for destructibles or immediate mode Change 3280148 on 2017/01/31 by mason.seay First round of assets for force feedback testing Change 3280860 on 2017/02/01 by James.Golding Merge CL 3280853 to Dev-Framework Fix crash with null CurrentSkeleton on AnimInstance when using Re-import button in SkelMesh Editor Change 3281172 on 2017/02/01 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3281156 Change 3281210 on 2017/02/01 by james.cobbett Updated QA-Physics map Added cube that starts off with physics enabled, then disables. Made physics toggleable on that and another cube. Change 3281211 on 2017/02/01 by James.Golding Details customization for editing PoseDriver targets list Change 3281332 on 2017/02/01 by Marc.Audy Fix bad merge Fix file types Change 3281388 on 2017/02/01 by mason.seay Updated Force Feedback asset Change 3281396 on 2017/02/01 by mason.seay moving asset Change 3281987 on 2017/02/01 by Benn.Gallagher Fixed project generation failing after main merge Change 3282047 on 2017/02/01 by Marc.Audy Fix up Target and build cs files after changes from Dev-Build Change 3282214 on 2017/02/01 by Ori.Cohen Expose radial forces to immediate mode Change 3282221 on 2017/02/01 by Alan.Noon Immediate Mode GDC demo content: development on minion anim B, refined Orbital Laser Pawn controls, tweaked laser parameters none Change 3282273 on 2017/02/01 by Ori.Cohen Fix crash when recompiling animbp of immediate mode due to null pointer. Change 3282368 on 2017/02/01 by Ori.Cohen Quick iteration on minion demo Change 3282824 on 2017/02/02 by James.Golding Fix for CIS in RBFSolver.h Change 3282829 on 2017/02/02 by James.Golding Fix CIS in PoseDriverDetails.cpp Fix list UI not refreshing after copying targets from PoseAsset Change 3282834 on 2017/02/02 by Danny.Bouimad Adding Pose driver additive assets Change 3282863 on 2017/02/02 by James.Golding Add Mambo mesh and Skeleton Change 3282892 on 2017/02/02 by James.Golding Copy Aurora (Ice) and Mambo meshes/materials/some anims from Dev-General to AnimTechDemo project in Dev-Framework Change 3283157 on 2017/02/02 by Mieszko.Zielinski Cook Orion Win64 fix #UE4 Had to change the Extent param of K2_ProjectPointToNavigation. Updated the error causing Orion BP Change 3283159 on 2017/02/02 by Marc.Audy Additional CIS fixes Change 3283179 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283197 on 2017/02/02 by Jurre.deBaare Fix for issues importing Fornite geometry cache assets #fix Use actual import number of frames instead of total number of frames in the Alembic Cache Change 3283201 on 2017/02/02 by Marc.Audy Keep fixing CIS Change 3283270 on 2017/02/02 by James.Golding Merging CL 3276013 to Dev-Framework - fix issue with additive pose preview applying twice Change 3283499 on 2017/02/02 by Marc.Audy More CIS fixes Change 3283543 on 2017/02/02 by Jon.Nabozny Update comment on AActor::GetActorBounds to properly reflect ChildActorComponents aren't included in the calculation. Change 3283663 on 2017/02/02 by Ori.Cohen Fix potential null dereference in ragdoll node Change 3283757 on 2017/02/02 by Marc.Audy May fix remaining CIS issues Change 3283984 on 2017/02/02 by Marc.Audy Fix linux CIS Change 3284039 on 2017/02/02 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3283913 Change 3284067 on 2017/02/02 by Marc.Audy Fixup mistakes in converting redirects Change 3284187 on 2017/02/02 by Ori.Cohen Immediate mode works with radial force (not just radial impulse) Change 3284358 on 2017/02/02 by Ori.Cohen Update arcblade phys asset for immediate mode Change 3284667 on 2017/02/02 by Marc.Audy Arguments is an array not a string now. Fixing commented out code. Change 3284684 on 2017/02/02 by Marc.Audy Move AVIWriter out in to its own module to avoid any possible unity build issues where xwindows.h got indirectly included through the DirectShow third party library and caused FGenericWindow::IsMaximized and IsMinimized to conflict with a macro. Change 3284707 on 2017/02/02 by Marc.Audy Fix AVIWriter module compilation on Mac Change 3285012 on 2017/02/03 by Benn.Gallagher Fixes for Dx NvCloth shader warnings Change 3285016 on 2017/02/03 by Marc.Audy Fix missing include Change 3285048 on 2017/02/03 by Benn.Gallagher Fixed Persona needing a restart when changing number of clothing assets (import/delete) #jira UE-41323 Change 3285325 on 2017/02/03 by Marc.Audy Properly implement AVIWriter module Change 3285538 on 2017/02/03 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3285499 Change 3285735 on 2017/02/03 by Jon.Nabozny Add IsInAir method to UVehicleWheel. #jira UE-38369 Change 3285862 on 2017/02/03 by Aaron.McLeran UE-41435 Fixing PIE audio - Fixing PIE audio. Recent change to editor preferences from Dev-Editor branch (CL 3234495) caused all audio to be muted in PIE. Change 3285914 on 2017/02/03 by danny.bouimad RecomputeTangents Test Assets Change 3286246 on 2017/02/03 by Mieszko.Zielinski Changes to game-specific BPs containing calls to deprecated NavigationSystem functions #UE4 #jira UE-41527 #jira UE-41518 Change 3286308 on 2017/02/03 by Ori.Cohen Make sure physx trimesh scale is never too small. Fix box clamping being ignored. Fixes cook warnings for Odin. #JIRA UE-41529 Change 3286396 on 2017/02/03 by Ori.Cohen Fix CIS Change 3286479 on 2017/02/03 by Ori.Cohen Copying //UE4/Dev-Physics-Upgrade to Dev-Framework (//UE4/Dev-Framework) Change 3287421 on 2017/02/06 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3286819 Change 3287427 on 2017/02/06 by James.Golding Fix PoseBlendNode to 'pass through' if no poses are activated Change 3287430 on 2017/02/06 by James.Golding - Add support to PoseDriver for evaluating source bone in the space of a different bone - Fix driven bone adding a scale of 1 - Fix posedriver values 'sticking' (reset all weights to zero each frame) - Move CopyTargetsFromPoseAsset and AutoSetTargetScales from FAnimNode_PoseDriver to UAnimGraphNode_PoseDriver (not required outside editor) - Tranlsation targets now draw larger when selected - 'Copy from pose asset' now also auto-sets radius for you - Remove spammy warnings for missing poses/curves - Add UPoseAsset::GetNumTracks and ::GetFullPose - Remove unused ExtractionContext from UPoseAsset::GetBaseAnimationPose - Remove bIncludeRefPoseAsNeutralPose option (not really useful since we no longer always normalize weights to 1.0) Change 3287496 on 2017/02/06 by Chad.Garyet fixing busted quotes around defaultvalues Change 3287569 on 2017/02/06 by Mieszko.Zielinski Orion BP fixed after deprecating NavigationSystem's BP API #Orion Change 3287595 on 2017/02/06 by Benn.Gallagher BuildPhysX.Automation: Deploying PhysX & NvCloth Win64 Win32 PS4 libs. Built for new NvCloth upgrade Change 3287598 on 2017/02/06 by Benn.Gallagher NvCloth Upgrade to 21604115 Added Linux+Mac support Change 3287710 on 2017/02/06 by Lukasz.Furman added option to disable navlink polys at the end of generated paths #ue4 Change 3287857 on 2017/02/06 by Benn.Gallagher Fixed NvCloth module files to correctly set up linux and mac hopefully Change 3287894 on 2017/02/06 by Benn.Gallagher Another fix to NvCloth build files, didn't get picked up in VS for some reason. Change 3287917 on 2017/02/06 by Lina.Halper Copy from CharacterRigging to Dev-Framework #code review:Thomas.Sarkanen, Martin.Wilson, James.Golding, Andrew.Rodham Change 3287938 on 2017/02/06 by Thomas.Sarkanen Fix crash opening a media sound wave #jira UE-41582 - Editor crashes when running Automation test Change 3287942 on 2017/02/06 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3287682 Change 3288035 on 2017/02/06 by James.Golding Remove C++ GameMode and pawn classes (replace with floating BP instead) Resave anims to remove Orion refs Add simple AnimBP and map for Mambo testing Change 3288036 on 2017/02/06 by Benn.Gallagher Fix to BuildPhysX task to trigger Mac and Linux builds properly Change 3288125 on 2017/02/06 by Ori.Cohen Change PhysXCommon back to dylib Change 3288127 on 2017/02/06 by Benn.Gallagher Fixed project file identification not working for NvCloth under XCode Change 3288156 on 2017/02/06 by Benn.Gallagher Disable "expansion-to-defined" warning in Linux NvCloth builds Change 3288159 on 2017/02/06 by Lina.Halper potential compile fix for Ocean Editor #code review:Thomas.Sarkanen Change 3288190 on 2017/02/06 by Ori.Cohen Link against static PhysXCommon for mac Change 3288200 on 2017/02/06 by Marc.Audy Fix CIS Change 3288270 on 2017/02/06 by Lina.Halper fix compile error #code review:Thomas.Sarkanen, Marc.Audy Change 3288302 on 2017/02/06 by Thomas.Sarkanen Fixed ensure when deselecting bones in anim BP editor #jira UE-41274 - Ensure when clicking in the viewport of an animation blueprint Change 3288348 on 2017/02/06 by Lina.Halper - Enabled control rig - Changed plugin name to be Control Rig Change 3288490 on 2017/02/06 by Benn.Gallagher Fixes for Mac attempting static links against NvCloth and failing to load dynamic libraries. Worked with MasonS to get Mac editor up and running. Change 3288511 on 2017/02/06 by Lina.Halper compile fix Change 3288513 on 2017/02/06 by Lina.Halper Check in content to work with Change 3288615 on 2017/02/06 by Ori.Cohen Fix skeletal mesh not simulating when using an aggregate. #JIRA UE-41593 Change 3288791 on 2017/02/06 by thomas.sarkanen Exposed transforms to cinematics so they can be animated Change 3288795 on 2017/02/06 by Ori.Cohen Fix lock warnings for physx #JIRA UE-41591 Change 3288817 on 2017/02/06 by Charles.Anderson GDC Arcblade setup tests. Change 3288825 on 2017/02/06 by Lina.Halper Fix build issue of shadow variable Change 3289058 on 2017/02/06 by Ori.Cohen Fix crash when immediate mode constraint generates 0 rows. This is a potentially temporary fix until NVIDIA replies with a better solution. #JIRA UE-41026 Change 3289348 on 2017/02/06 by Lina.Halper fix compile issue Change 3289369 on 2017/02/06 by Lina.Halper Renamed leg control to limb control and will be used for arm/feet. - changed vars. - has unused variables that will be used soon but want to check in so that i don't block content change on BaseHuman. #code review:Thomas.Sakanen Change 3289422 on 2017/02/06 by Lina.Halper Fixed IK sinking issue - or moving #code review:Thomas.Sarkanen Change 3289433 on 2017/02/06 by Lina.Halper Fixed real shadow error Change 3289485 on 2017/02/06 by Lina.Halper fixed build issue Change 3289657 on 2017/02/07 by thomas.sarkanen Added rig bone mapping to Ice's skeletal mesh Change 3289658 on 2017/02/07 by thomas.sarkanen Added ControlRig map with Ice setup to pose Change 3289662 on 2017/02/07 by Thomas.Sarkanen Fixed up static analysis warning Change 3289663 on 2017/02/07 by Thomas.Sarkanen Fixed crash when attempting to bind to skeletal mesh with already-set anim BP Anim instance may not have actually been created when binding, so dont dereference it Change 3289717 on 2017/02/07 by Benn.Gallagher Switch Linux NvCloth to static for Linux builds. Adjust lib directory to match actual directory Change 3289718 on 2017/02/07 by Benn.Gallagher BuildPhysX.Automation: Deploying NvCloth Linux_x86_64-unknown-linux-gnu libs. Change 3289744 on 2017/02/07 by Benn.Gallagher Fixed missing masses causing crash initialising clothing actors #jira UE-41599 Change 3289746 on 2017/02/07 by Danny.Bouimad Adding Some Content for JamesG he wanted some nicer looking Pose driver test files. Change 3289756 on 2017/02/07 by danny.bouimad Changing the asset for JamesG. Change 3289785 on 2017/02/07 by James.Golding Replace old PoseDrive test with Danny's new one Change 3289858 on 2017/02/07 by Lina.Halper fixed issue with undo transaction buffer Change 3289860 on 2017/02/07 by Benn.Gallagher Fixed crash after reimporting a clothing asset with the clothing config open and then changing the confg #jira UE-41655 Change 3289912 on 2017/02/07 by Thomas.Sarkanen Merging using Raven_To_Dev-Framework Originally from CLs 3249471, 3258522, 3260271, 3273791: Sequencer: More work supporting array properties more generically + fixes Change 3289962 on 2017/02/07 by James.Golding Add thickness option to DrawWireDiamond Change 3289963 on 2017/02/07 by James.Golding Add spin option to VectorInputBox Change 3289966 on 2017/02/07 by James.Golding Add weight bar chart to PoseDriver details Stop drawing pose weight text in viewport Fix position targets not drawing larger when selected Change 3290094 on 2017/02/07 by Thomas.Sarkanen Fixed typo in filename (fallout from search and replace) Change 3290119 on 2017/02/07 by Thomas.Sarkanen Manipulators can now have their IK/FK space set on them They are not drawn when the space for the chain that they control is not the same as their setting Also fixed a crash with invalid objects when reloading maps. Change 3290145 on 2017/02/07 by Thomas.Sarkanen CIS fix for fallout from Raven changes #jira UE-41670 - Mac editor fails to compile with PropertyTrackEditor errors Change 3290319 on 2017/02/07 by Marc.Audy Make sound player nodes hard reference the assets unless they are in a chain below a quality node. Change 3290484 on 2017/02/07 by Richard.Hinckley Fixing grammar in popup messages. Change 3290533 on 2017/02/07 by Marc.Audy Make GetAIController BlueprintPure #jira UE-41654 Change 3290624 on 2017/02/07 by Marc.Audy Reorder header to avoid include tool warnings Change 3290697 on 2017/02/07 by Lina.Halper - support FK manipulator being in local space - fixed FK key spamming issue for making blend weight to be not keyable - this creates conflicts with enum #code review: Thomas.Sarkanen Change 3290748 on 2017/02/07 by Ori.Cohen Touch immediate mode file to force physx re-link Change 3290807 on 2017/02/07 by Richard.Hinckley #jira UE-39891 Updates to assist in automatic documentation generation. Change 3290946 on 2017/02/07 by Lina.Halper Fix issue of notify looping. #jira: UE-31463 #Code review:Martin.Wilson Change 3291553 on 2017/02/07 by Lina.Halper Rename/move file(s) - modified mesh mapping controller window to be Control Rig Change 3291571 on 2017/02/07 by Lina.Halper added set up spine option #code review:Thomas.Sarkanen Change 3291581 on 2017/02/07 by Ori.Cohen Temporarily turn off phat immediate mode preview which crashes. Change 3291949 on 2017/02/08 by James.Golding Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3291819 Change 3291966 on 2017/02/08 by Lina.Halper Fix issue with notify looping bug #jira: UE-31463 Change 3292247 on 2017/02/08 by Marc.Audy Clean up bad merge caused by Fortnite integration to main Change 3292326 on 2017/02/08 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3292313 Change 3292409 on 2017/02/08 by Marc.Audy Resubmit FortPawn.cpp with proper code even though perforce doesn't think there is a difference since when you sync it, the contents are wrong. Change 3292481 on 2017/02/08 by Ori.Cohen Fix for convex hull cooking (from Josh.S) #JIRA UE-41656 Change 3292492 on 2017/02/08 by Mieszko.Zielinski Redone replacement of deprecated navigation system's BP functions in Fortnite BPs #Fortnite Change 3292778 on 2017/02/08 by Ori.Cohen Touch physx DDC key for new cooking. #JIRA UE-41656 [CL 3293329 by Marc Audy in Main branch]
2017-02-08 17:53:41 -05:00
return FBox(ForceInit);
}
FVector2D FLevelModel::GetLevelTranslationDelta() const
{
return LevelTranslationDelta;
}
void FLevelModel::SetLevelTranslationDelta(FVector2D InAbsoluteDelta)
{
LevelTranslationDelta = InAbsoluteDelta;
for (auto It = AllChildren.CreateIterator(); It; ++It)
{
(*It)->SetLevelTranslationDelta(InAbsoluteDelta);
}
}
FLinearColor FLevelModel::GetLevelColor() const
{
// Returns Constant color, base classes will override this
// Currently not all base classes have the requisite support, so I've not made it pure virtual.
return FLinearColor::White;
}
void FLevelModel::SetLevelColor(FLinearColor InColor)
{
// Does nothing, base classes will override this
// Currently not all base classes have the requisite support, so I've not made it pure virtual.
}
bool FLevelModel::IsVisibleInCompositionView() const
{
return false;
}
bool FLevelModel::HasKismet() const
{
return (GetLevelObject() != NULL);
}
void FLevelModel::OpenKismet()
{
if (LevelCollectionModel.IsReadOnly())
{
return;
}
ULevel* Level = GetLevelObject();
if (Level == NULL)
{
return;
}
ULevelScriptBlueprint* LevelScriptBlueprint = Level->GetLevelScriptBlueprint();
if (LevelScriptBlueprint)
{
GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->OpenEditorForAsset(LevelScriptBlueprint);
}
else
{
FMessageDialog::Open(EAppMsgType::Ok, NSLOCTEXT("UnrealEd", "UnableToCreateLevelScript", "Unable to find or create a level blueprint for this level.") );
}
}
bool FLevelModel::AttachTo(TSharedPtr<FLevelModel> InParent)
{
if (LevelCollectionModel.IsReadOnly() ||
!IsLoaded() ||
IsPersistent() ||
InParent.IsValid() == false ||
InParent.Get() == this ||
HasDescendant(InParent))
{
return false;
}
TSharedPtr<FLevelModel> CurrentParent = GetParent();
if (CurrentParent.IsValid())
{
CurrentParent->RemoveChild(this->AsShared());
}
Parent = InParent;
CurrentParent = GetParent();
if (CurrentParent.IsValid())
{
CurrentParent->AddChild(this->AsShared());
}
OnParentChanged();
return true;
}
void FLevelModel::OnFilterChanged()
{
FilteredChildren.Empty();
for (const auto& LevelModel : AllChildren)
{
LevelModel->OnFilterChanged();
// Item will pass filtering regardless of filter settings if it has children that passes filtering
if (LevelModel->GetChildren().Num() > 0 || LevelCollectionModel.PassesAllFilters(*LevelModel))
{
FilteredChildren.Add(LevelModel);
}
}
}
const FLevelModelList& FLevelModel::GetChildren() const
{
return FilteredChildren;
}
TSharedPtr<FLevelModel> FLevelModel::GetParent() const
{
return Parent.Pin();
}
void FLevelModel::SetParent(TSharedPtr<FLevelModel> InParent)
{
Parent = InParent;
}
void FLevelModel::RemoveAllChildren()
{
FilteredChildren.Empty();
AllChildren.Empty();
}
void FLevelModel::RemoveChild(TSharedPtr<FLevelModel> InChild)
{
FilteredChildren.Remove(InChild);
AllChildren.Remove(InChild);
}
void FLevelModel::AddChild(TSharedPtr<FLevelModel> InChild)
{
AllChildren.AddUnique(InChild);
if (LevelCollectionModel.PassesAllFilters(*InChild))
{
FilteredChildren.Add(InChild);
}
}
bool FLevelModel::HasAncestor(const TSharedPtr<FLevelModel>& InLevel) const
{
TSharedPtr<FLevelModel> ParentModel = GetParent();
while (ParentModel.IsValid())
{
if (ParentModel == InLevel)
{
return true;
}
ParentModel = ParentModel->GetParent();
}
return false;
}
bool FLevelModel::HasDescendant(const TSharedPtr<FLevelModel>& InLevel) const
{
if (AllChildren.Find(InLevel) != INDEX_NONE)
{
return true;
}
for (auto It = AllChildren.CreateConstIterator(); It; ++It)
{
if ((*It)->HasDescendant(InLevel))
{
return true;
}
}
return false;
}
void FLevelModel::OnDrop(const TSharedPtr<FLevelDragDropOp>& Op)
{
}
bool FLevelModel::IsGoodToDrop(const TSharedPtr<FLevelDragDropOp>& Op) const
{
return false;
}
void FLevelModel::OnLevelAddedToWorld(ULevel* InLevel)
{
UpdateLevelActorsCount();
}
void FLevelModel::OnLevelRemovedFromWorld()
{
UpdateLevelActorsCount();
}
void FLevelModel::BroadcastChangedEvent()
{
ChangedEvent.Broadcast();
}
void FLevelModel::UpdateSimulationStatus(ULevelStreaming* StreamingLevel)
{
SimulationStatus = FSimulationLevelStatus();
// Persistent level always loaded and visible in PIE
if (IsPersistent())
{
SimulationStatus.bLoaded = true;
SimulationStatus.bVisible = true;
return;
}
if (StreamingLevel == nullptr)
{
return;
}
if (StreamingLevel->GetLoadedLevel())
{
SimulationStatus.bLoaded = true;
if (StreamingLevel->GetLoadedLevel()->bIsVisible)
{
SimulationStatus.bVisible = true;
}
}
else if (StreamingLevel->HasLoadRequestPending())
{
SimulationStatus.bLoading = true;
}
}
void FLevelModel::DeselectAllSurfaces()
{
ULevel* Level = GetLevelObject();
if (Level == NULL)
{
return;
}
UModel* Model = Level->Model;
for (int32 SurfaceIndex = 0; SurfaceIndex < Model->Surfs.Num(); ++SurfaceIndex)
{
FBspSurf& Surf = Model->Surfs[SurfaceIndex];
if (Surf.PolyFlags & PF_Selected)
{
Model->ModifySurf(SurfaceIndex, false);
Surf.PolyFlags&= ~PF_Selected;
}
}
}
void FLevelModel::DeselectAllActors()
{
ULevel* Level = GetLevelObject();
if (Level == NULL)
{
return;
}
USelection* SelectedActors = GEditor->GetSelectedActors();
SelectedActors->Modify();
// Deselect all level actors
for (auto It = Level->Actors.CreateIterator(); It; ++It)
{
AActor* CurActor = (*It);
if (CurActor)
{
GEditor->SelectActor(CurActor, false, false);
}
}
}
void FLevelModel::SelectActors(bool bSelect, bool bNotify, bool bSelectEvenIfHidden,
const TSharedPtr<ActorFilter>& Filter)
{
if (LevelCollectionModel.IsReadOnly())
{
return;
}
ULevel* Level = GetLevelObject();
if (Level == NULL || IsLocked())
{
return;
}
GEditor->GetSelectedActors()->BeginBatchSelectOperation();
bool bChangesOccurred = false;
// Iterate over all actors, looking for actors in this level.
for (auto It = Level->Actors.CreateIterator(); It; ++It)
{
AActor* Actor = (*It);
if (Actor)
{
if (Filter.IsValid() && !Filter->PassesFilter(Actor))
{
continue;
}
//exclude the world settings and builder brush from actors selected
const bool bIsWorldSettings = Actor->IsA(AWorldSettings::StaticClass());
const bool bIsBuilderBrush = (Actor->IsA(ABrush::StaticClass()) && FActorEditorUtils::IsABuilderBrush(Actor));
if (bIsWorldSettings || bIsBuilderBrush)
{
continue;
}
bool bNotifyForActor = false;
GEditor->GetSelectedActors()->Modify();
GEditor->SelectActor(Actor, bSelect, bNotifyForActor, bSelectEvenIfHidden);
bChangesOccurred = true;
}
}
GEditor->GetSelectedActors()->EndBatchSelectOperation();
if (bNotify)
{
GEditor->NoteSelectionChange();
}
}
void FLevelModel::ConvertLevelToExternalActors(bool bUseExternal)
{
ULevel* Level = GetLevelObject();
if (Level == nullptr || IsLocked())
{
return;
}
Level->Modify();
Level->ConvertAllActorsToPackaging(bUseExternal);
}
bool FLevelModel::CanConvertLevelToExternalActors(bool bToExternal)
{
ULevel* Level = GetLevelObject();
if (Level == nullptr || IsLocked())
{
return false;
}
UPackage* LevelPackage = Level->GetOutermost();
if (Level->IsUsingExternalActors() == bToExternal
|| LevelPackage == GetTransientPackage()
|| LevelPackage->HasAnyFlags(RF_Transient)
|| Level->HasAnyFlags(RF_Transient)
|| !FPackageName::IsValidLongPackageName(LevelPackage->GetName()))
{
return false;
}
return true;
}
void FLevelModel::UpdateLevelActorsCount()
{
LevelActorsCount = 0;
ULevel* Level = GetLevelObject();
if (Level)
{
// Count the actors contained in these levels
// NOTE: We subtract two here to omit "default actors" in the count (default brush, and WorldSettings)
LevelActorsCount = Level->Actors.Num()-2;
// Count deleted actors
int32 NumDeletedActors = 0;
for (int32 ActorIdx = 0; ActorIdx < Level->Actors.Num(); ++ActorIdx)
{
if (!Level->Actors[ActorIdx])
{
++NumDeletedActors;
}
}
// Subtract deleted actors from the actor count
LevelActorsCount -= NumDeletedActors;
}
UpdateDisplayName();
}
void FLevelModel::UpdateDisplayName()
{
if (IsPersistent())
{
DisplayName = LOCTEXT("PersistentTag", "Persistent Level").ToString();
}
else
{
DisplayName = GetLongPackageName().ToString();
if (!LevelCollectionModel.GetDisplayPathsState())
{
DisplayName = FPackageName::GetShortName(DisplayName);
}
}
if (HasValidPackage())
{
// Append actors count
if (LevelCollectionModel.GetDisplayActorsCountState() && IsLoaded())
{
DisplayName += TEXT(" (");
DisplayName.AppendInt(LevelActorsCount);
DisplayName += TEXT(")");
}
}
else
{
DisplayName+= LOCTEXT("MissingLevelErrorText", " [Missing Level] ").ToString();
}
}
FString FLevelModel::GetLightmassSizeString() const
{
FString MemorySizeString;
ULevel* Level = GetLevelObject();
//if (Level && GetDefault<ULevelBrowserSettings>()->bDisplayLightmassSize)
//{
// // Update metrics
// static const float ByteConversion = 1.0f / 1024.0f;
// float LightmapSize = Level->LightmapTotalSize * ByteConversion;
//
// MemorySizeString += FString::Printf(TEXT( "%.2f" ), LightmapSize);
//}
return MemorySizeString;
}
FString FLevelModel::GetFileSizeString() const
{
FString MemorySizeString;
ULevel* Level = GetLevelObject();
//if (Level && GetDefault<ULevelBrowserSettings>()->bDisplayFileSize)
//{
// // Update metrics
// static const float ByteConversion = 1.0f / 1024.0f;
// float FileSize = Level->GetOutermost()->GetFileSize() * ByteConversion * ByteConversion;
//
// MemorySizeString += FString::Printf(TEXT( "%.2f" ), FileSize);
//}
return MemorySizeString;
}
UClass* FLevelModel::GetStreamingClass() const
{
return nullptr;
}
#undef LOCTEXT_NAMESPACE