Commit Graph

34 Commits

Author SHA1 Message Date
Mikolaj Sieluzycki
c92ca070d1 Move references to UObjects from FCoreDelegates to FCoreUObjectDelegates
TTP #343071 CORE: FCoreDelegates should not have references to UObjects.
#codereview Robert.Manuszewski

[CL 2317144 by Mikolaj Sieluzycki in Main branch]
2014-10-02 06:13:35 -04:00
Bob Tellez
5c22f29f41 UE4: No longer re-applying a text filter to asset view search results when the old filter is the same as the new. This was causing a re-sort when the user loses focus from the search bar in the content browser or asset pickers. Also initialized some uninitialized sorting bools.
[CL 2303459 by Bob Tellez in Main branch]
2014-09-18 21:40:33 -04:00
Jamie Dale
b1076751ff Made FName case-preserving by storing case-variant strings in its string table
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]
2014-09-17 05:24:55 -04:00
Andrew Rodham
c183604f57 Refined text rendering on content browser thumbnails and reverted back to full-width sizing method.
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]
2014-09-16 07:01:27 -04:00
Bob Tellez
d667d45d9b UE4: Asset pickers can now show folders. When showing folders they will ignore the backend filter when determining if they should recursively show assets. Path pickers can now have the path changed after they are spawned. Asset dialogs now show folders like the content browser.
[CL 2298981 by Bob Tellez in Main branch]
2014-09-15 20:43:33 -04:00
Bob Tellez
823b9f8b60 UE4: Removed the "Show only assets in selected folders" editor preference for the Content Browser. This is implied from "Show Folders" and should have been removed when folders were added.
[CL 2298894 by Bob Tellez in Main branch]
2014-09-15 18:38:04 -04:00
Andrew Rodham
058e21069d Asset labels in the content browser can now fill beyond the width of the thumbnails.
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]
2014-09-15 05:59:46 -04:00
Maciej Mroz
c0e02c17d1 ttp 344629 EDITOR: BP: Cannot re-select an asset in a list after removing it from a node
[CL 2295188 by Maciej Mroz in Main branch]
2014-09-12 11:37:48 -04:00
Bob Tellez
2710a2dc51 UE4: Fixed a bug that caused folder names to incorrectly be invalidated during rename or create.
#codereview Benn.Gallagher

[CL 2260978 by Bob Tellez in Main branch]
2014-08-18 12:24:23 -04:00
Bob Tellez
8a8d637e55 [AUTOMERGE]
#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]
2014-08-15 16:14:32 -04:00
Nick Darnell
476eea0d70 Editor - Smaller allowable thumbnail size in the Content Browser. We now also adjust the font size at the lower end of the thumbnail size to make a little more text fit on the lines.
[CL 2244490 by Nick Darnell in Main branch]
2014-08-05 14:00:58 -04:00
Benn Gallagher
a0f01a1ee7 Added animated preview viewports to Persona asset browser tooltips
#codereview martin.wilson

[CL 2226941 by Benn Gallagher in Main branch]
2014-07-22 09:54:58 -04:00
Nick Darnell
add54836d5 CB - When front end filters change, if we were not previously performing a recursive filter, we now perform a full slow refresh in order to populate the data the front end filters operate on. This fixes the issue with front end filters like "In Use By Level" not working until folders are changed.
TTP 341204

#codereview Bob.Tellez

[CL 2198765 by Nick Darnell in Main branch]
2014-07-12 12:59:41 -04:00
Ben Marsh
de9c0853bf Add an toggle for showing plugin content, and disable it by default.
[CL 2124821 by Ben Marsh in Main branch]
2014-07-02 13:18:43 -04:00
Richard TalbotWatkin
f6a7607b30 Fixed renaming assets in the Content Browser. The renamed asset is correctly sorted into position and scrolled into view. Removed the problems with assets being duplicated in the asset view.
#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]
2014-06-30 16:04:21 -04:00
Andrew Brown
97baebcdae Asset View now supports secondary sorting
#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]
2014-06-27 04:30:08 -04:00
Richard TalbotWatkin
6f4abeddc8 Prohibited classes from being dragged into a Collection.
#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]
2014-06-24 01:48:53 -04:00
Bob Tellez
231f2ad165 UE4: Many content browser perf improvements and cleanups.
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]
2014-06-17 19:52:49 -04:00
Richard TalbotWatkin
e743ca8712 Content browser refreshes when package dirty state is updated.
#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]
2014-05-29 17:36:00 -04:00
Bob Tellez
2004035699 UE4: Another small fix caught by static code analysis
[CL 2082556 by Bob Tellez in Main branch]
2014-05-22 19:11:00 -04:00
Bob Tellez
50685c5dff UE4: Fixed a bug where unloaded assets were not dragable in the content browser.
[CL 2075589 by Bob Tellez in Main branch]
2014-05-16 11:12:52 -04:00
Bob Tellez
ee55183e2b UE4: Removed many unnecessary checks in the editor to special-case assets found in umap files.
[CL 2073723 by Bob Tellez in Main branch]
2014-05-14 22:02:10 -04:00
Max Preussner
4664956156 Delegates: Cleaned up abusive/legacy usages of the Delegate API
Please use AddRaw, AddSP, AddUObject, , BindRaw, BindSP, RemoveAll, Unbind etc.

[CL 2068405 by Max Preussner in Main branch]
2014-05-09 14:02:33 -04:00
Michael Noland
1f34ce9e19 Core: Change FCoreDelegates::OnObjectPropertyChanged to take the property change event as an additional parameter
[CL 2066450 by Michael Noland in Main branch]
2014-05-07 22:17:44 -04:00
Phillip Kavan
cc24ba4eeb Remove internal "SKEL_*" classes from the class picker.
- 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]
2014-05-05 01:38:12 -04:00