Commit Graph

27 Commits

Author SHA1 Message Date
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
sebastian nordgren
e9f37a7a0b Added the owning struct name to EditCondition error messages to make it easier to find which property is breaking.
#review-19646989 @lauren.barnes
#preflight 624d9f5f7d2eea4e18f1e9fa

[CL 19847710 by sebastian nordgren in ue5-main branch]
2022-04-21 08:45:12 -04:00
matija kecman
4373d015fd Report EditCondition errors to the Output Log
#rb sebastian.nordgren
#rnx
#preflight 61af4d2d353890ce23ef5360

#ROBOMERGE-AUTHOR: matija.kecman
#ROBOMERGE-SOURCE: CL 18393881 in //UE5/Release-5.0/... via CL 18393892
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18393895 by matija kecman in ue5-release-engine-test branch]
2021-12-07 07:31:28 -05:00
sebastian nordgren
3ae17ebfe9 Removed unnecessary typename retrieval in EditConditionParser.
Added comment clarifying intent in EditConditionContext.

#rb paul.chipchase
#preflight 61406534b5a4fa0001f2e4ff

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 17516578 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17516584 by sebastian nordgren in ue5-release-engine-test branch]
2021-09-15 03:14:53 -04:00
sebastian nordgren
37c57c392b Fixed EditCondition enum comparisons failing due to looking up the value pointer from the UnderlyingNumericProperty instead of the Property.
#rb trivial
#preflight 613af4e729a16e0001120cb4

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 17481240 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17481246 by sebastian nordgren in ue5-release-engine-test branch]
2021-09-10 11:10:30 -04:00
sebastian nordgren
00d54f18db Added missing null checks in GetEnumValue that were causing FEditConditionContext to dereference null when deleting a struct from an array.
Moved WeakPtr null check first in all Get*Value, as it's the cheapest one to perform.

Added const to several FComplexPropertyNode functions that were const in all but practice, and to their callsites in FEditConditionContext.

AlreadyLogged was storing just a null pointer, and thus only logging the first field that was found to be missing per session.

#jira UE-117661
#rb paul.chipchase
#preflight 6135f87a1a52e2000135a32b

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 17437832 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17437846 by sebastian nordgren in ue5-release-engine-test branch]
2021-09-06 08:35:51 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
robert manuszewski
b7568cc694 Fix for UE-90683: You can no longer delete conflicting variables
Refactored FindField into FindUField and FindFProperty to avoid confusion caused by the fact that FindField<UField> will no longer return FProperties.

#jira UE-90683
#rb Steve.Robb
#tests Basic editor functionality test, cooked and ran PC client and server, bot soak tests for two hours

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 12190998 in //UE4/Release-4.25/... via CL 12190999
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v661-12148976)

[CL 12191300 by robert manuszewski in Main branch]
2020-03-15 10:33:45 -04:00
JeanMichel Dignard
70d074639f Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx

[CL 10906274 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 13:26:18 -05:00
jeanmichel dignard
2ce7666d2d Copying //UE4/Dev-Core [at] 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

#ROBOMERGE-OWNER: jeanmichel.dignard
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 10708666 in //UE4/Main/...
#ROBOMERGE-BOT: TOOLS (Main -> Dev-Tools-Staging) (v626-10872990)

[CL 10898071 by jeanmichel dignard in Dev-Tools-Staging branch]
2020-01-07 15:54:23 -05:00
ryan durand
627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
sebastian nordgren
04ca6be793 EditConditions no longer crash when their parent object gets deleted from under them, eg. when editing a blueprint CDO and then compiling.
#jira UE-81793

#rb paul.chipchase

Source: 9581009 (//UE4/Dev-Editor)

#ROBOMERGE-SOURCE: CL 9743423 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v542-9736015)

[CL 9743429 by sebastian nordgren in Main branch]
2019-10-22 06:01:06 -04:00
sebastian nordgren
2b39033c94 EditConditions no longer crash when their parent object gets deleted from under them, eg. when editing a blueprint CDO and then compiling.
#jira UE-81793

#rb paul.chipchase

[CL 9581009 by sebastian nordgren in Dev-Editor branch]
2019-10-15 04:32:11 -04:00
sebastian nordgren
cf86a119f9 EditCondition now supports bitflags that use enums. Eg. MyIntProperty & MyEnum::Flag (and negation by tacking on == false).
Flags must be enums with integral values. Powers of two are not checked for to allow for the use of combinations of flags, eg. Foo = 1, Bar = 2, FooAndBar = Foo | Bar.

#rb chris.gagnon

[CL 9580343 by sebastian nordgren in Dev-Editor branch]
2019-10-15 03:46:06 -04:00
sebastian nordgren
5a26ba3922 Added handling of UObject pointers to edit conditions to enable equality, inequality and nullptr checks of UObject pointers in the form of: MyProperty != nullptr, or MyProperty == OtherProperty.
#rb chris.gagnon

[CL 9533510 by sebastian nordgren in Dev-Editor branch]
2019-10-10 10:08:16 -04:00
Chris Gagnon
8ab0638182 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.24
#rb none

[CL 9325047 by Chris Gagnon in Main branch]
2019-10-01 20:41:42 -04:00
Chris Gagnon
79fcc1f394 Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor) Prep for main copy up.
#rb none

[CL 9324846 by Chris Gagnon in Dev-Editor branch]
2019-10-01 20:19:12 -04:00
Marc Audy
74745ce73b Fix 2019 compile errors as a result of the very badly HasNodeFlags
#rb
#rnx

[CL 8975193 by Marc Audy in Dev-Framework branch]
2019-09-23 10:36:19 -04:00
Fred Kimberley
23619b8516 Added a sidecar data structure to hold data that is constant for all members of the same class. This data will now be stored per class instead of being stored per instance. This can result in substantial memory savings for classes that have many instances and constant data. Good candidates for identify this type of data are member variables that are marked as EditDefaultsOnly and BlueprintReadOnly.
#rb Michael.Noland
#jira UE-80589

[CL 8899817 by Fred Kimberley in Dev-Framework branch]
2019-09-19 15:39:36 -04:00
sebastian nordgren
3e067f8aae EditConditions applied to containers containing structs now correctly apply to the structs' members as well.
This issue was occurring because the wrong parent node was being used to resolve the memory in which the value resided. FEditConditionContext now resolves the edit condition's parent correctly to the array's parent node, because we do not support nested containers at this time.

#jira UE-80461

#rb paul.chipchase

[CL 8818851 by sebastian nordgren in Dev-Editor branch]
2019-09-18 10:35:25 -04:00
Marc Audy
278eda75dd Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 7234503
#rb
#rnx

[CL 7263339 by Marc Audy in Dev-Framework branch]
2019-07-10 13:47:03 -04:00
sebastian nordgren
179ab0e7b9 Removed unnecessary check.
#rb none

#jira UE-76245

#robomerge UE4-Main

[CL 6988026 by sebastian nordgren in Dev-Editor branch]
2019-06-14 06:08:09 -04:00
sebastian nordgren
4c86ec2917 Fixed crash when using Merge Actors with Replace Source Actors enabled.
Edit conditions are now correctly applied to fields of nested structs.

#jira UE-76079

#rb chris.gagnon

#fyi jamie.dale

#robomerge UE4-Main

[CL 6969280 by sebastian nordgren in Dev-Editor branch]
2019-06-13 10:10:27 -04:00