Commit Graph

386 Commits

Author SHA1 Message Date
joe kirchoff
fc49b3b34f Fix C4855: implicit capture of 'this' via '[=]' is deprecated in '/std:c++20'
#rnx

[CL 26110412 by joe kirchoff in ue5-main branch]
2023-06-19 19:55:34 -04:00
han chu
e2f901b594 The problem:
When the level is locked, CanSelectElement evaluates to true, causing Unreal Engine to crash in the following two scenarios:
1. After locking the level, the user clicks on an ISM
2. After locking the level, the user drags the remaining gizmo on an ISM

The cause:
1. FSMInstanceElementLevelEditorSelectionCustomization::CanSelectElement evaluates to true because GEdSelectionLock seems always be false
2. DeselectAllActors in SetLocked does not recursively deselect the ISM components

The fix:
1. Determine whether the owner level is lockedin FSMInstanceElementLevelEditorSelectionCustomization::CanSelectElement
2. Use the typed element selection APIs to clear the current level's selection

#jira UE-181821
#rb

[CL 26000790 by han chu in ue5-main branch]
2023-06-14 20:05:51 -04:00
luc eygasier
6c58a2bbcb Reworks landscape property sharing and override.
Adds LandscapeInherited and LandscapeOverridable meta tag to mark shared properties.
Enforce synchronicity between shared properties when editing and loading ALandscape and LandscapeStreamingProxy.
Modifies ALandscapeProxy detail panel to reflect how the properties are shared.

#jira UE-173875, FORT-600500
#rb Jonathan.Bard
#lockdown Marc.Audy

[CL 25992337 by luc eygasier in ue5-main branch]
2023-06-14 16:03:16 -04:00
Steve Robb
700a0a53fb Fixed calls to FMemory::Memswap with compile-time sizes.
#rb robert.manuszewski
#jira none
#preflight 646f38bd1417daba1e57bd2a

[CL 25619819 by Steve Robb in ue5-main branch]
2023-05-25 09:07:23 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
patrick enfedaque
dc5865c2f9 Fix Level Instance Editing Level not showing up in Current Level drop down
- Edited Level Instance LevelStreaming now part of the LevelCollectionModel
- Add a IsUserManaged() virtual to LevelStreaming to limit the actions that can be done on some LevelStreaming classes
- LevelInstanceEditorLevelStreaming overrides IsUserManaged() to return false

#rb richard.malo
#preflight 644fad875875c7d4b4c0b3bf
#rnx

[CL 25284134 by patrick enfedaque in ue5-main branch]
2023-05-01 11:02:43 -04:00
kirill zorin
a469aafd78 Update callsites to prepare for upcoming TArray/TArrayView<TObjectPtr<...>> restrictions
#rb zousar.shaker
#rb devin.doucette
#rb steve.robb
#rb robert.manuszewski
#rb saam.barati
#preflight 643f4c09a35280ed4f53ccb3

[CL 25100071 by kirill zorin in ue5-main branch]
2023-04-18 22:39:29 -04:00
jonathan bard
35de19ef92 Reverts 24760838 (FixupSharedData removes duplicates Landscape Material, aiming to reuse the parent lanscape properties), 24823203 (Delayed PostLoad mechanism to resolve Parent Landscape Actor loading dependency issues).
#rb Jonathan.Bard
#preflight

[CL 24876529 by jonathan bard in ue5-main branch]
2023-03-31 15:16:50 -04:00
luc eygasier
933ced6e1f LandscapeStreamingProxies' FixupSharedData now removes Materials being the same as the parent LandscapeActor.
GetSharedProperties now only copies material when explicitely specified.
Moves ValidateCombinationMaterial calling code to PostRegisterAllComponents since GetLandscapeMaterial will need the ALandscape link to be valid.
Adds assert to ALandscapeStreamingProxy::GetLandscapeMaterial to enforce the method is not used during postload (to be sure we can always get the parent actor).
Fixes Landscape material assignment in WP.

#jira UE-173875, FORT-499487
#preflight 641b4de225389270b7f984cf
#rb Jonathan.Bard

[CL 24761556 by luc eygasier in ue5-main branch]
2023-03-23 10:24:57 -04:00
jordan hoffmann
5abf21121d [BugFix] Modified actors are not diff'ing correctly with one file per actor
#rb dan.oconnor
#rb francis.hurteau

[CL 24451087 by jordan hoffmann in ue5-main branch]
2023-02-28 16:07:32 -05:00
patrick enfedaque
7cfda97f01 Remove deprecated LevelPartition code (unrelated to WorldPartition)
#rb sebastien.lussier
#preflight 63e507983938a64e389c1ad9

[CL 24106079 by patrick enfedaque in ue5-main branch]
2023-02-09 16:15:41 -05:00
Patrick Boutot
6a2863234b Deprecate arrays from SColorPicker. Memstomp was fixed with 23672712. This CL removed the posibility of creating a new memstomp
#jira UE-173303
#rb daren.cheng
#preflight 63c6034bd040694ab82f3970

[CL 23736262 by Patrick Boutot in ue5-main branch]
2023-01-17 07:24:54 -05:00
Andrew Rodham
4ff7bab147 Slate: Initial phase of FVector2D deprecation
- Expanded FDeprecateSlateVector2D to provide structs for parameters, return types and member variables that use FVector2f, while still allowing conversion to/from FVector2d with optional per-module deprecation mechanisms.
  - Many of the high-traffic SlateCore types like FSlateBrush, FGeometry and FSlateLayoutTransform have been converted to use these deprecation mechanisms.
  - Some legacy FGeometry::ToPaintGeometry and MakeChild overloads have been explicitly deprecated since they cause ambiguous overloads with FSlateLayoutTransform if it were to support implicit construction.
  - Deprecated ULocalPlayer::GetPixelBoundingBox and GetPixelPoint to prefer FVector2f for OptionalAllotedSize parameter since this parameter is expected to come from FGeometry
  - Exposed FVector2f members to blueprints

#jira none
#rb Andy.Davidson, Dave.Jones, Vincent.Gauthier, Patrick.Boutot
#preflight 63bc6fd068068a8bd6027c9f

[CL 23631073 by Andrew Rodham in ue5-main branch]
2023-01-10 14:46:43 -05:00
aditya ravichandran
f8b7ee5555 Replace any instances of "Source Control" with "Revision Control" in text in the Editor
#rb JeanMichel.Dignard, Robb.Surridge
#preflight 637d180efa348e8480e8837e

[CL 23250808 by aditya ravichandran in ue5-main branch]
2022-11-23 11:57:50 -05:00
patrick enfedaque
75a64561ab - One File Per Actor + Folder Objects: No longer experimental
- Remove support on single actor packaging mode

#rb jeanfrancois.dube, richard.malo
#preflight 637e224cf514e1ded96d62fd

[CL 23249350 by patrick enfedaque in ue5-main branch]
2022-11-23 09:59:16 -05:00
jonathan bard
08e482fca9 Added support for landscape material instances (per-component MICs) for Nanite landscape:
* Refactored ExportToRawMesh function to allow exporting one mesh section per component
* Implemented support for UV mappings usually provided by the landscape vertex factory in the non-Nanite case (as per the LandscapeLayerCoords material expression + others)
* For Nanite landscape materials, the relevant UV channels are :
** Texcoords0-2 : TerrainCoordMapping_XY, TerrainCoordMapping_XZ, TerrainCoordMapping_YZ (note : TerrainCoordMapping_XZ doesn't work ATM because texcoords1 seems to be a special case...)
** Texcoords3 : WeightmapUV
** Texcoords4 : LightmapUV (not implemented by ExportToRawMesh yet and not supported by Nanite meshes ATM : max 4 UV channels)
** Texcoords5 : HeightmapUV (implemented by ExportToRawMesh but not supported by Nanite meshes ATM : max 4 UV channels)
* Nanite landscape meshes now have 1 polygroup per component, with the proper landscape material instance being assigned to it
* Since Nanite meshes are capped at 64 meshes per section, Nanite landscape mesh will now fail to build on proxies sporting more than this amount of components. This is a first implementation and can be fixed later by adding as many Nanite landscape components as needed
* Implemented some missing virtual overrides on FLandscapeMaterialResource leading to landscape material instances potentially being used for non-landscape usages (hair, etc.)
* Fixed LandscapeNaniteComponent not being attached to the root component (and the mesh being exported in world space coordinates), leading to it not following when moving the  actor
* Added NaniteLODIndex property in ALandscape to be able to tweak the LOD level used when generating the Nanite meshes. It's mostly a debug feature to test the LODLevel > 0 landscape mesh export and to accelerate the Nanite landscape mesh generation since you usually want Nanite to be the most defined mesh possible
* All Nanite landscape meshes will be auto-invalidated by this change

#rb roey.borsteinas, graham.wihlidal
#preflight 6365e2a2882365b8590525ac
#lockdown marc.audy

[CL 23069843 by jonathan bard in ue5-main branch]
2022-11-09 21:04:18 -05:00
henrik karlsson
4a5e13525d Fixed non-unity non-pch compile errors
#preflight skipped
#rb none

[CL 22788359 by henrik karlsson in ue5-main branch]
2022-10-26 16:22:34 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
bryan sefcik
8cc129f2b6 IWYU Pass 1 - Engine/Source/Editor/...
#jira
#preflight 6306736ac85b7fef22be7751

[CL 21558583 by bryan sefcik in ue5-main branch]
2022-08-24 22:45:13 -04:00
jamie dale
cd2c04fbed Adding additional includes in preparation for removing a global include
#preflight skip
#rb none
#rnx

#ROBOMERGE-OWNER: jamie.dale
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 21283042 via CL 21286016 via CL 21286060 via CL 21286134
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21291490 by jamie dale in ue5-main branch]
2022-08-09 12:54:53 -04:00
bryan sefcik
435d89dea4 Manually updated a few files in Engine/Source/Editor/... to include some headers that were found to be missing after running IWYU.
#preflight 62cdac5084556536d0e57c64

[CL 21058996 by bryan sefcik in ue5-main branch]
2022-07-12 13:45:01 -04:00
jordan hoffmann
490bccda39 [Feature] blueprint diff node outlines colored by diff state
#jira UE-150555
#rb aditya.ravichandran
#preflight 62a38ead2558795127e232d0

[CL 20600224 by jordan hoffmann in ue5-main branch]
2022-06-10 14:52:59 -04:00
Andrew Davidson
8d844cd4a6 Improve support for an extended WORLD_MAX
#rb various, trivial
#preflight 62a1cb46f73a01bd981b9978

[CL 20573655 by Andrew Davidson in ue5-main branch]
2022-06-09 07:03:13 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
jonathan bard
6115839c10 Prevent crash when unloading a World Composition level whose package cannot be unloaded because there's at least one reference to it preventing the world to be garbage-collected. This test allows the WorldBrowser to survive until the GCObjectReferencer can run and display the actual reason preventing garbage collection (via a fatal error)
#rb patrick.enfedaque
#jira UE-150092
#preflight 6284fb021f474f0660ecbf70

[CL 20260747 by jonathan bard in ue5-main branch]
2022-05-18 10:22:02 -04:00