2016-01-07 08:17:16 -05:00
|
|
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "EnvironmentQueryEditorPrivatePCH.h"
|
|
|
|
|
#include "GraphEditorActions.h"
|
|
|
|
|
#include "ScopedTransaction.h"
|
|
|
|
|
#include "EdGraphUtilities.h"
|
|
|
|
|
|
2014-05-29 17:06:50 -04:00
|
|
|
#include "EnvironmentQuery/EnvQuery.h"
|
|
|
|
|
#include "EnvironmentQuery/EnvQueryOption.h"
|
|
|
|
|
#include "EnvironmentQuery/EnvQueryGenerator.h"
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "Toolkits/IToolkitHost.h"
|
|
|
|
|
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructureModule.h"
|
|
|
|
|
#include "Editor/PropertyEditor/Public/PropertyEditorModule.h"
|
|
|
|
|
#include "Editor/PropertyEditor/Public/IDetailsView.h"
|
2014-10-14 22:50:06 -04:00
|
|
|
#include "SDockTab.h"
|
|
|
|
|
#include "GenericCommands.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-10-09 12:34:55 -04:00
|
|
|
#define LOCTEXT_NAMESPACE "EnvironmentQueryEditor"
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
const FName FEnvironmentQueryEditor::EQSUpdateGraphTabId( TEXT( "EnvironmentQueryEditor_UpdateGraph" ) );
|
|
|
|
|
const FName FEnvironmentQueryEditor::EQSPropertiesTabId( TEXT( "EnvironmentQueryEditor_Properties" ) );
|
|
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
void FEnvironmentQueryEditor::RegisterTabSpawners(const TSharedRef<class FTabManager>& InTabManager)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
WorkspaceMenuCategory = InTabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_EnvironmentQueryEditor", "Environment Query Editor"));
|
2014-10-09 12:34:55 -04:00
|
|
|
auto WorkspaceMenuCategoryRef = WorkspaceMenuCategory.ToSharedRef();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
FAssetEditorToolkit::RegisterTabSpawners(InTabManager);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
InTabManager->RegisterTabSpawner( EQSUpdateGraphTabId, FOnSpawnTab::CreateSP(this, &FEnvironmentQueryEditor::SpawnTab_UpdateGraph) )
|
2014-03-14 14:13:41 -04:00
|
|
|
.SetDisplayName( NSLOCTEXT("EnvironmentQueryEditor", "Graph", "Graph") )
|
2014-10-09 12:34:55 -04:00
|
|
|
.SetGroup(WorkspaceMenuCategoryRef)
|
|
|
|
|
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "GraphEditor.EventGraph_16x"));
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
InTabManager->RegisterTabSpawner( EQSPropertiesTabId, FOnSpawnTab::CreateSP(this, &FEnvironmentQueryEditor::SpawnTab_Properties) )
|
2014-03-14 14:13:41 -04:00
|
|
|
.SetDisplayName( NSLOCTEXT("EnvironmentQueryEditor", "PropertiesTab", "Details" ) )
|
2014-10-09 12:34:55 -04:00
|
|
|
.SetGroup(WorkspaceMenuCategoryRef)
|
|
|
|
|
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Details"));
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
void FEnvironmentQueryEditor::UnregisterTabSpawners(const TSharedRef<class FTabManager>& InTabManager)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
FAssetEditorToolkit::UnregisterTabSpawners(InTabManager);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
InTabManager->UnregisterTabSpawner( EQSPropertiesTabId );
|
|
|
|
|
InTabManager->UnregisterTabSpawner( EQSUpdateGraphTabId );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEnvironmentQueryEditor::InitEnvironmentQueryEditor( const EToolkitMode::Type Mode, const TSharedPtr< class IToolkitHost >& InitToolkitHost, UEnvQuery* InScript )
|
|
|
|
|
{
|
2015-03-09 05:40:56 -04:00
|
|
|
SelectedNodesCount = 0;
|
2014-03-14 14:13:41 -04:00
|
|
|
Query = InScript;
|
|
|
|
|
check(Query != NULL);
|
|
|
|
|
|
|
|
|
|
TSharedRef<FTabManager::FLayout> StandaloneDefaultLayout = FTabManager::NewLayout( "Standalone_EnvironmentQuery_Layout" )
|
|
|
|
|
->AddArea
|
|
|
|
|
(
|
|
|
|
|
FTabManager::NewPrimaryArea() ->SetOrientation(Orient_Vertical)
|
|
|
|
|
->Split
|
|
|
|
|
(
|
|
|
|
|
FTabManager::NewStack()
|
|
|
|
|
->SetSizeCoefficient(0.1f)
|
|
|
|
|
->AddTab(GetToolbarTabId(), ETabState::OpenedTab)
|
|
|
|
|
->SetHideTabWell( true )
|
|
|
|
|
)
|
|
|
|
|
->Split
|
|
|
|
|
(
|
|
|
|
|
FTabManager::NewSplitter() ->SetOrientation(Orient_Horizontal)
|
|
|
|
|
->Split
|
|
|
|
|
(
|
|
|
|
|
FTabManager::NewStack()
|
|
|
|
|
->SetSizeCoefficient(0.7f)
|
|
|
|
|
->AddTab( EQSUpdateGraphTabId, ETabState::OpenedTab )
|
|
|
|
|
)
|
|
|
|
|
->Split
|
|
|
|
|
(
|
|
|
|
|
FTabManager::NewStack()
|
|
|
|
|
->SetSizeCoefficient(0.3f)
|
|
|
|
|
->AddTab( EQSPropertiesTabId, ETabState::OpenedTab )
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const bool bCreateDefaultStandaloneMenu = true;
|
|
|
|
|
const bool bCreateDefaultToolbar = true;
|
|
|
|
|
FAssetEditorToolkit::InitAssetEditor( Mode, InitToolkitHost, FEnvironmentQueryEditorModule::EnvironmentQueryEditorAppIdentifier, StandaloneDefaultLayout, bCreateDefaultStandaloneMenu, bCreateDefaultToolbar, Query );
|
|
|
|
|
|
|
|
|
|
FEnvironmentQueryEditorModule& EnvironmentQueryEditorModule = FModuleManager::LoadModuleChecked<FEnvironmentQueryEditorModule>( "EnvironmentQueryEditor" );
|
|
|
|
|
AddMenuExtender(EnvironmentQueryEditorModule.GetMenuExtensibilityManager()->GetAllExtenders(GetToolkitCommands(), GetEditingObjects()));
|
|
|
|
|
|
|
|
|
|
RegenerateMenusAndToolbars();
|
|
|
|
|
|
|
|
|
|
// Update BT asset data based on saved graph to have correct data in editor
|
|
|
|
|
TSharedPtr<SGraphEditor> UpdateGraphEditor = UpdateGraphEdPtr.Pin();
|
|
|
|
|
if (UpdateGraphEditor.IsValid() && UpdateGraphEditor->GetCurrentGraph() != NULL)
|
|
|
|
|
{
|
|
|
|
|
//let's find root node
|
|
|
|
|
UEnvironmentQueryGraph* EQSGraph = Cast<UEnvironmentQueryGraph>(UpdateGraphEditor->GetCurrentGraph());
|
|
|
|
|
EQSGraph->UpdateAsset();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FName FEnvironmentQueryEditor::GetToolkitFName() const
|
|
|
|
|
{
|
|
|
|
|
return FName("Environment Query");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FText FEnvironmentQueryEditor::GetBaseToolkitName() const
|
|
|
|
|
{
|
|
|
|
|
return NSLOCTEXT("EnvironmentQueryEditor", "AppLabel", "EnvironmentQuery");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString FEnvironmentQueryEditor::GetWorldCentricTabPrefix() const
|
|
|
|
|
{
|
|
|
|
|
return NSLOCTEXT("EnvironmentQueryEditor", "WorldCentricTabPrefix", "EnvironmentQuery ").ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FLinearColor FEnvironmentQueryEditor::GetWorldCentricTabColorScale() const
|
|
|
|
|
{
|
|
|
|
|
return FLinearColor( 0.0f, 0.0f, 0.2f, 0.5f );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Create new tab for the supplied graph - don't call this directly, call SExplorer->FindTabForGraph.*/
|
|
|
|
|
TSharedRef<SGraphEditor> FEnvironmentQueryEditor::CreateGraphEditorWidget(UEdGraph* InGraph)
|
|
|
|
|
{
|
|
|
|
|
check(InGraph != NULL);
|
|
|
|
|
|
|
|
|
|
// Create the appearance info
|
|
|
|
|
FGraphAppearanceInfo AppearanceInfo;
|
2015-01-07 09:52:40 -05:00
|
|
|
AppearanceInfo.CornerText = NSLOCTEXT("EnvironmentQueryEditor", "AppearanceCornerText", "ENVIRONMENT QUERY");
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
SGraphEditor::FGraphEditorEvents InEvents;
|
|
|
|
|
InEvents.OnSelectionChanged = SGraphEditor::FOnSelectionChanged::CreateSP(this, &FEnvironmentQueryEditor::OnSelectedNodesChanged);
|
2015-02-23 10:30:16 -05:00
|
|
|
|
|
|
|
|
CreateCommandList();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// Make title bar
|
|
|
|
|
TSharedRef<SWidget> TitleBarWidget =
|
|
|
|
|
SNew(SBorder)
|
|
|
|
|
.BorderImage( FEditorStyle::GetBrush( TEXT("Graph.TitleBackground") ) )
|
|
|
|
|
.HAlign(HAlign_Fill)
|
|
|
|
|
[
|
|
|
|
|
SNew(SHorizontalBox)
|
|
|
|
|
+SHorizontalBox::Slot()
|
|
|
|
|
.HAlign(HAlign_Center)
|
|
|
|
|
.FillWidth(1.f)
|
|
|
|
|
[
|
|
|
|
|
SNew(STextBlock)
|
|
|
|
|
.Text(NSLOCTEXT("EnvironmentQueryEditor", "TheQueryGraphLabel", "Query Graph"))
|
|
|
|
|
.TextStyle( FEditorStyle::Get(), TEXT("GraphBreadcrumbButtonText") )
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// Make full graph editor
|
|
|
|
|
return SNew(SGraphEditor)
|
|
|
|
|
.AdditionalCommands(GraphEditorCommands)
|
|
|
|
|
.Appearance(AppearanceInfo)
|
|
|
|
|
.TitleBar(TitleBarWidget)
|
|
|
|
|
.GraphToEdit(InGraph)
|
|
|
|
|
.GraphEvents(InEvents);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TSharedRef<SDockTab> FEnvironmentQueryEditor::SpawnTab_UpdateGraph( const FSpawnTabArgs& Args )
|
|
|
|
|
{
|
|
|
|
|
check( Args.GetTabId().TabType == EQSUpdateGraphTabId );
|
2015-03-09 05:40:56 -04:00
|
|
|
UEnvironmentQueryGraph* MyGraph = Cast<UEnvironmentQueryGraph>(Query->EdGraph);
|
2014-03-14 14:13:41 -04:00
|
|
|
if (Query->EdGraph == NULL)
|
|
|
|
|
{
|
2015-03-09 05:40:56 -04:00
|
|
|
MyGraph = NewObject<UEnvironmentQueryGraph>(Query, NAME_None, RF_Transactional);
|
2014-03-14 14:13:41 -04:00
|
|
|
Query->EdGraph = MyGraph;
|
|
|
|
|
|
|
|
|
|
// let's read data from BT script and generate nodes
|
|
|
|
|
const UEdGraphSchema* Schema = Query->EdGraph->GetSchema();
|
|
|
|
|
Schema->CreateDefaultNodesForGraph(*Query->EdGraph);
|
2015-03-09 05:40:56 -04:00
|
|
|
|
|
|
|
|
MyGraph->OnCreated();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MyGraph->OnLoaded();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2015-03-09 05:40:56 -04:00
|
|
|
MyGraph->Initialize();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
TSharedRef<SGraphEditor> UpdateGraphEditor = CreateGraphEditorWidget(Query->EdGraph);
|
|
|
|
|
UpdateGraphEdPtr = UpdateGraphEditor; // Keep pointer to editor
|
|
|
|
|
|
|
|
|
|
return SNew(SDockTab)
|
|
|
|
|
.Label( NSLOCTEXT("EnvironmentQueryEditor", "UpdateGraph", "Update Graph") )
|
|
|
|
|
.TabColorScale( GetTabColorScale() )
|
|
|
|
|
[
|
|
|
|
|
UpdateGraphEditor
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedRef<SDockTab> FEnvironmentQueryEditor::SpawnTab_Properties(const FSpawnTabArgs& Args)
|
|
|
|
|
{
|
|
|
|
|
check( Args.GetTabId() == EQSPropertiesTabId );
|
|
|
|
|
|
|
|
|
|
CreateInternalWidgets();
|
|
|
|
|
|
|
|
|
|
TSharedRef<SDockTab> SpawnedTab = SNew(SDockTab)
|
|
|
|
|
.Icon( FEditorStyle::GetBrush("SoundClassEditor.Tabs.Properties") )
|
|
|
|
|
.Label( NSLOCTEXT("EnvironmentQueryEditor", "SoundClassPropertiesTitle", "Details" ) )
|
|
|
|
|
[
|
|
|
|
|
DetailsView.ToSharedRef()
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return SpawnedTab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEnvironmentQueryEditor::OnSelectedNodesChanged(const TSet<class UObject*>& NewSelection)
|
|
|
|
|
{
|
|
|
|
|
TArray<UObject*> Selection;
|
|
|
|
|
|
2015-02-23 15:58:14 -05:00
|
|
|
SelectedNodesCount = NewSelection.Num();
|
|
|
|
|
if (NewSelection.Num())
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
for(TSet<class UObject*>::TConstIterator SetIt(NewSelection);SetIt;++SetIt)
|
|
|
|
|
{
|
2016-06-16 11:54:44 -04:00
|
|
|
UEnvironmentQueryGraphNode* GraphNode = Cast<UEnvironmentQueryGraphNode>(*SetIt);
|
2014-03-14 14:13:41 -04:00
|
|
|
if (GraphNode)
|
|
|
|
|
{
|
|
|
|
|
if (GraphNode->IsA(UEnvironmentQueryGraphNode_Root::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
Selection.Add(GraphNode);
|
|
|
|
|
}
|
|
|
|
|
else if (GraphNode->IsA(UEnvironmentQueryGraphNode_Option::StaticClass()))
|
|
|
|
|
{
|
|
|
|
|
UEnvQueryOption* QueryOption = Cast<UEnvQueryOption>(GraphNode->NodeInstance);
|
|
|
|
|
if (QueryOption)
|
|
|
|
|
{
|
|
|
|
|
Selection.Add(QueryOption->Generator);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Selection.Add(GraphNode->NodeInstance);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Selection.Num() == 1)
|
|
|
|
|
{
|
|
|
|
|
DetailsView->SetObjects(Selection);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DetailsView->SetObject(NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEnvironmentQueryEditor::CreateInternalWidgets()
|
|
|
|
|
{
|
|
|
|
|
FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>( "PropertyEditor" );
|
2015-01-26 17:14:50 -05:00
|
|
|
const FDetailsViewArgs DetailsViewArgs( false, false, true, FDetailsViewArgs::ObjectsUseNameArea, false );
|
2014-03-14 14:13:41 -04:00
|
|
|
DetailsView = PropertyEditorModule.CreateDetailView( DetailsViewArgs );
|
|
|
|
|
DetailsView->SetObject( NULL );
|
|
|
|
|
DetailsView->OnFinishedChangingProperties().AddSP(this, &FEnvironmentQueryEditor::OnFinishedChangingProperties);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEnvironmentQueryEditor::SaveAsset_Execute()
|
|
|
|
|
{
|
|
|
|
|
// modify BT asset
|
|
|
|
|
TSharedPtr<SGraphEditor> UpdateGraphEditor = UpdateGraphEdPtr.Pin();
|
|
|
|
|
if (UpdateGraphEditor.IsValid() && UpdateGraphEditor->GetCurrentGraph() != NULL)
|
|
|
|
|
{
|
|
|
|
|
//let's find root node
|
|
|
|
|
UEnvironmentQueryGraph* EdGraph = Cast<UEnvironmentQueryGraph>(UpdateGraphEditor->GetCurrentGraph());
|
|
|
|
|
EdGraph->UpdateAsset();
|
|
|
|
|
}
|
|
|
|
|
// save it
|
|
|
|
|
IEnvironmentQueryEditor::SaveAsset_Execute();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEnvironmentQueryEditor::OnFinishedChangingProperties(const FPropertyChangedEvent& PropertyChangedEvent)
|
|
|
|
|
{
|
|
|
|
|
if (PropertyChangedEvent.Property)
|
|
|
|
|
{
|
|
|
|
|
FGraphPanelSelectionSet CurrentSelection = GetSelectedNodes();
|
|
|
|
|
if (CurrentSelection.Num() == 1)
|
|
|
|
|
{
|
|
|
|
|
for (FGraphPanelSelectionSet::TConstIterator It(CurrentSelection); It; ++It)
|
|
|
|
|
{
|
|
|
|
|
UEnvironmentQueryGraphNode_Test* TestNode = Cast<UEnvironmentQueryGraphNode_Test>(*It);
|
2015-02-23 10:30:16 -05:00
|
|
|
UEnvironmentQueryGraphNode_Option* ParentNode = TestNode ? Cast<UEnvironmentQueryGraphNode_Option>(TestNode->ParentNode) : nullptr;
|
|
|
|
|
|
|
|
|
|
if (ParentNode)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-02-23 10:30:16 -05:00
|
|
|
ParentNode->CalculateWeights();
|
2014-03-14 14:13:41 -04:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-09 12:34:55 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|