TTP #343071 CORE: FCoreDelegates should not have references to UObjects.
#codereview Robert.Manuszewski
[CL 2317144 by Mikolaj Sieluzycki in Main branch]
This is controlled by the macro "WITH_CASE_PRESERVING_NAME", which is currently just set to "WITH_EDITORONLY_DATA" so that it works in editor builds (and UHT).
Added an extra NAME_INDEX entry to FName to store a second string table index for a case-variant string. The previous Index value (now called ComparisonIndex) is still used for comparison purposes (as FNames are still case-insensitive).
The Init process for an FName now works like this:
1) It will find or add a string table entry for the given string (not matching case) - this entry index is stored in ComparisonIndex.
2) It will then compare the string table entry string against the given string (matching case) to see if it also needs to add a case-variant entry for the FName.
3) If it does, it finds or adds a second string table entry (matching case) for the string - this entry index is stored in DisplayIndex.
Hard-coded FNames (those listed in UnrealNames.h) do not support case-variants (due to existing network replication rules for hard-coded FNames), so they skip steps 2 and 3.
I added FMinimalName, which is the same size as FName was previously. This shouldn't really be used (and as such, is deliberately awkward to make/use) as it loses the case-preserving behaviour of FName, however it was required for some things (like stats) that had a hard-coded upper limit on FName size.
I added FScriptName, which always contains the extra display index (even when WITH_CASE_PRESERVING_NAME is disabled). This is used by Blueprint bytecode, as the types used by Blueprint bytecode must be a consistent size between all build configurations.
Other changes:
- Fixed up any places that were passing an Index into the FName constructor which was supposed to take an EName.
- Some places were doing this to make the number unique when replicating an object, but this was losing the case-variant information, so I had to fix them.
- FName will now assert if the EName constructor is used with an value outside the range of hard-coded FNames.
- Ensured that assets, actors, and blueprint components could all be renamed in a way that only changed their case, and that these changes were correctly persisted.
- Added FLinkerNamePairKeyFuncs and TLinkerNameMapKeyFuncs for use with TSet and TMap.
- These allow ULinkerSave and ULinkerLoad to correctly write out case-variants for FNames, and also fixes an issue where the linker would erroneously write out duplicate string table entries for FNames which had a different number (causing package bloat).
- Bumped VER_MIN_SCRIPTVM_UE4 so that all Blueprint bytecode is recompiled using FScriptName.
ReviewedBy Robert.Manuszewski, Gil.Gribb
[CL 2300730 by Jamie Dale in Main branch]
Tiny text is now using a lighter font with a better hinting algorithm, and is centrally justified.
We want to minimise waste of horizontal space, so content browser thumbnails now fill the width of the content browser once again.
[CL 2299335 by Andrew Rodham in Main branch]
The font has also been reduced in size to reduce the amount of wrapping on asset labels at small sizes.
Also polished the asset borders and shadows.
This addresses TTP 345457 and 345452.
[CL 2297910 by Andrew Rodham in Main branch]
#UE4 Moved rename verification logic to ContentBrowserUtils to be used by other Content Browser code.
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2258236 by Bob.Tellez on 2014/08/15 14:41:11.
[CL 2258262 by Bob Tellez in Main branch]
#ttp 339563 - ContentBrowser: Renaming assets sometimes displays 2 assets with same name
#ttp 339737 - CRASH: EDITOR: Editor crashing when changing names of several assets one after another
#branch UE4
#proj Editor.ContentBrowser
#change Changed SAssetView::ProcessRecentlyAddedAssets to note if any filtered asset items have been added while iterating through the FilteredRecentlyAddedAssets list, and if so to perform a quick refresh at the end (so that the view is refreshed, and a sort is forced).
#change In SAssetView::OnAssetRemoved, remove AssetData from the RecentlyAddedAssets list if it is there.
#change In SAssetView::ProcessRecentlyAddedAssets, when we add something to the AssetItems list, also add it to the ExistingObjectPaths set so that duplicate items aren't added to the FilteredAssetItems list. When filtering newly added assets, always process them in the same tick.
#change Added RequestAddNewAssetsImmediately, to override the delay in adding newly added items (used by Rename so that the effects are instant).
#reviewedby Bob.Tellez, Max.Preussner
[CL 2122077 by Richard TalbotWatkin in Main branch]
#UDN: Feature suggestion; Content browser can sort by a second column
#branch UE4
#change
Added two new images for secondary sort ascending and descending.
(Updated styles where needed).
Added new enum EColumnSortPriority: currently only lists Primary and Secondary, but can easily accommodate more*.
(FOnSortModeChanged was modified to also have the priority as a param, fixedup existing usage).
SHeaderRow now also has a SortPriority attribute to specify the SortMode order
(Defaults to Primary if unused).
Modified TUniquePtr so that assigning one from another worked correctly.
(Reviewed by Steve Robb).
SAssetView is the only table that has been modified, so far, to take advantage of the secondary sort. SetMajorityAssetType has been updated to correctly filter out all those sorts which are no longer relevant and bump the priority of the remaining sorts to fill in the ægapsÆ made by non-longer-relevant ones.
FAssetViewSortManager has been overhauled to take SortPriority into consideration when sortingà
Firstly, duplicate comparison structs were removed in favour of single structs which have æascendingÆ as a paramà any remaining duplicate code was removed in favour of an inherited usage. The base struct has an array of æfurther methodsÆ to employ in the result of a tie. Should a tie occur the ænextÆ comparison is done, and so on until itÆs not a tie or we run out of comparisons to perform.*
The manager defaults to having no secondary sort, so it relies on the interface thatÆs using it to provide it.
Whenever a column is assign the code makes sure that itÆs not already assigned to another column and corrects the order to take this into account.
Fixed a bug in FCompareFAssetItemByTagNumericalAscending comparing A with A (instead of B).
Various optimizations to the sort to descrease times
*The only places æSecondaryÆ is referred to in code is in GetSortingBrush (so it can display the correct icon for the sort), and OnTitleClicked (so it can set to correct sort based on input). The sorting code itself has no concept as to a secondary sort, it can support any number of sorting levels so if in future a tertiary (or more) is added, it is only these two function which should need updating as the sort will automatically accommodate it.
reviewed by Thomas.Sarkanen, Bob.Tellez
[CL 2119201 by Andrew Brown in Main branch]
#ttp 339146 - EDITOR: Content Browser: Can't delete classes from collections
#branch UE4
#proj Editor.ContentBrowser
#add Added extra checks in SAssetView::OnDrop and SAssetView::OnDragOver to prevent class assets from being added to Collections.
#reviewedby Chris.Wood
[CL 2114885 by Richard TalbotWatkin in Main branch]
Removed all FAssetPickerConfig options that were not used by anything.
Package dirty refreshes are now managed entirely by FFrontendFilter_Modified, and only apply while the filter is enabled.
List refreshes have once again been split into SLOW source item refreshes and FAST frontend refreshes. Only use the slow refresh when source items change!
Replaced some usage of RemoveAt with RemoveAtSwap when appropriate. A lot of this code is very performance sensitive.
Text filtering is now done via a FFrontendFilter.
Consolidated the "show other developers" filter into a single FFrontendFilter.
There is no such thing as "Dynamic Filters" anymore. Only FrontendFilters.
#codereview Matt.Kuhlenschmidt
[CL 2108677 by Bob Tellez in Main branch]
#ttp 334481 - Regression: EDITOR: Content Browser: If you have the modified filter enabled and then save a modified asset, the asset is still visible in the browser
#branch UE4
#proj Editor.ContentBrowser
#add SAssetView registers a delegate with UPackage::PackageDirtyStateUpdatedEvent so that it can be refreshed.
#reviewedby Chris.Wood, Max.Preussner
[CL 2088030 by Richard TalbotWatkin in Main branch]
- Modified FKismetEditorUtilities::CanCreateBlueprintFromClass() to return false if the input class is a BP skeleton class.
- Modified FKismetEditorUtilities::IsClassABlueprintSkeleton() to incorporate the alternative class flags check in case the SkeletonGeneratedClass has not yet been loaded during serialization.
- Replaced individual occurrences of the alternative class flags skeleton class check with FKismetEditorUtilities::IsClassABlueprintSkeleton() instead (for consistency and per discussion).
[CL 2063239 by Phillip Kavan in Main branch]