Files
UnrealEngineUWP/Engine/Source/Editor/Cascade/Private/CascadeModule.cpp

88 lines
2.8 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CascadeModule.h"
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 "Modules/ModuleManager.h"
#include "ParticleHelper.h"
#include "Particles/ParticleSystemComponent.h"
#include "ICascade.h"
#include "Cascade.h"
const FName CascadeAppIdentifier = FName(TEXT("CascadeApp"));
class FCascade;
/*-----------------------------------------------------------------------------
FCascadeModule
-----------------------------------------------------------------------------*/
class FCascadeModule : public ICascadeModule
{
public:
/** Constructor, set up console commands and variables **/
FCascadeModule()
{
}
/** Called right after the module DLL has been loaded and the module object has been created */
virtual void StartupModule() override
{
MenuExtensibilityManager = MakeShareable(new FExtensibilityManager);
ToolBarExtensibilityManager = MakeShareable(new FExtensibilityManager);
Copying //UE4/Orion-Staging to //UE4/Main (Origin //Orion/Dev-General @ 2861092) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2861045 on 2016/02/09 by Marcus.Wassmer Fix debug editor crash from async compute creating commands when it shouldn't. #rb none #test debug editor Change 2861030 on 2016/02/09 by Michael.Noland Engine: Added support for debugging safe zones (visualization on any platform and simulation on platforms that don't natively provide safe zone information) r.DebugSafeZone.Mode controls the debug visualization overlay (0..2, default 0) - 0: Do not display the safe zone overlay - 1: Display the overlay for the title safe zone - 2: Display the overlay for the action safe zone r.DebugSafeZone.OverlayAlpha controls how opaque the debug visualization overlay is (0..1, default 0.3) On platforms that don't natively support safe zones, you can simulate a safe zone for quick/easy testing in the editor: - r.DebugSafeZone.TitleRatio controls the title safe zone margins returned in FDisplayMetrics - r.DebugActionZone.ActionRatio controls the action safe zone margins returned in FDisplayMetrics - These both range from 0..1, and default to 1 indicating 100% of the display is safe. A typical test value would be 0.9 #codereview josh.adams #rb marcus.wassmer #tests Tested on Win64 uncooked and PS4 cooked (front-end and game) Change 2860923 on 2016/02/09 by Andrew.Grant Fix client warning about HTTPChunkInstaller module not existing #rb none #tests ran Win64 client Change 2860852 on 2016/02/09 by Daniel.Wright Fixed crash enabling capsule direct shadows in BP #rb Nick.Penwarden #tests Editor Change 2860842 on 2016/02/09 by Marcus.Wassmer MallocLeakDetection proxy #rb Steve.Robb #test PS4/PC testing all commands. Change 2860744 on 2016/02/09 by Josh.Markiewicz #UE4 - fixed possible crash when refresh auth with invalid response #rb sam.zamani #tests login flow #codereview justin.sargent, joe.wilcox, pter.knepley, ben.zeigler Change 2860739 on 2016/02/09 by Laurent.Delayen Sync Markers - Reset SyncGroups every frame. - ::GetSyncGroupPosition() makes sure there is a valid MarkerSyncContext. => Fixes SyncGroup returning 'valid' positions for TransitionLeaders that were not in between sync markers. #rb martin.wilson #codereview lina.halper #tests new riftmage and kurohane networked in PIE Change 2860736 on 2016/02/09 by Daniel.Lamb Fixed issue with iterative cook on the fly invalidating cooked content all the time. #rb Marcus.Wassmer #test Cook on the fly iterative ps4 Change 2860598 on 2016/02/09 by Joe.Graf Simple log category change to match existing log messages in LoadMap #rb: n/a #test: loading, cooking, game Change 2860559 on 2016/02/09 by Zak.Middleton #orion - Add flag to AIController to control whether it copies the Pawn rotation to ControlRotation if there is no focus point. #rb Lukasz.Furman #tests PIE ded server AI with lanes Change 2860462 on 2016/02/09 by Marc.Audy Build system improvements * Added details to Empty manifest file save error * Removed redundent pseudo-dependencies from -showdependency output * Monolithic Kinds now a set and branch hacker can specify kind not to build #rb Ben.Marsh #tests Preflight Change 2860434 on 2016/02/09 by David.Ratti NaN checks: -Targeting mode checks in orion code -Changed the AActor::SetTransform NaN check so that the logging is included in the NaN ensure (rather than getting cut off from the log afterwards). #rb FrankG #tests golden path vs bots Change 2860390 on 2016/02/09 by Michael.Trepka Adjust 3D rendering resolution so that it stays approximately the same when user switches display modes #rb none #tests Tested editor build on PC Change 2860364 on 2016/02/09 by Justin.Sargent Removed unused editor-only functions causing compiler errors when compiling the game. #rb keli #tests none Change 2860242 on 2016/02/09 by Justin.Sargent Made a number of DialogueWave quality of life improvements to the editor and specifically SoundCue editing. New right-click option on SoundWaves to create a DialogueWave [CL 2863630 by Andrew Grant in Main branch]
2016-02-11 14:39:50 -05:00
UParticleSystemComponent::OnSystemPreActivationChange.AddStatic(&FCascade::OnComponentActivationChange);
}
/** Called before the module is unloaded, right before the module object is destroyed. */
virtual void ShutdownModule() override
{
MenuExtensibilityManager.Reset();
ToolBarExtensibilityManager.Reset();
}
virtual TSharedRef<ICascade> CreateCascade(const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, UParticleSystem* ParticleSystem) override
{
TSharedRef<FCascade> NewCascade(new FCascade());
NewCascade->InitCascade(Mode, InitToolkitHost, ParticleSystem);
CascadeToolkits.Add(&*NewCascade);
return NewCascade;
}
virtual void CascadeClosed(FCascade* CascadeInstance) override
{
CascadeToolkits.Remove(CascadeInstance);
}
virtual void RefreshCascade(UParticleSystem* ParticleSystem) override
{
for (int32 Idx = 0; Idx < CascadeToolkits.Num(); ++Idx)
{
if (CascadeToolkits[Idx]->GetParticleSystem() == ParticleSystem)
{
CascadeToolkits[Idx]->ForceUpdate();
}
}
}
virtual void ConvertModulesToSeeded(UParticleSystem* ParticleSystem) override
{
//Have to reset all existing component using this system.
FParticleResetContext ResetCtx;
ResetCtx.AddTemplate(ParticleSystem);
FCascade::ConvertAllModulesToSeeded( ParticleSystem );
}
/** Gets the extensibility managers for outside entities to extend static mesh editor's menus and toolbars */
virtual TSharedPtr<FExtensibilityManager> GetMenuExtensibilityManager() override { return MenuExtensibilityManager; }
virtual TSharedPtr<FExtensibilityManager> GetToolBarExtensibilityManager() override { return ToolBarExtensibilityManager; }
private:
TSharedPtr<FExtensibilityManager> MenuExtensibilityManager;
TSharedPtr<FExtensibilityManager> ToolBarExtensibilityManager;
/** List of open Cascade toolkits */
TArray<FCascade*> CascadeToolkits;
};
IMPLEMENT_MODULE(FCascadeModule, Cascade);