On mac, window activation is not guaranteed syncronously when a window is created, thus any code that opened a window, then immediately opened some focus-sensitive operation, may fail.
I've fixed up three of the most common cases (SAssetView::ItemScrolledIntoView, STextEntryPopup and STextComboPopup) so they register an active tick to focus the widget when the window gains focus (optionally controllable from the .AutoFocus() argument)
This addresses UE-12929.
[CL 2521062 by Andrew Rodham in Main branch]
UE-9651 - Editor - Change the setting name for the thumbnail size so that everyone gets the newer, better default value.
[CL 2448702 by Matthew Griffin in Main branch]
Improved and unified the folder drag and drop validation in the Content Browser
UE-9025 - User gets green check mark when trying to move class into content folder
The Content Browser folder drag and drop validation had not been updated to handle class folders. This meant that it was possible to crash the editor by dragging class folders around, and also meant that you were given misinformation when trying to copy a class around.
I've unified all the duplicated logic from SPathView, SAssetView, SAssetTreeItem, and SAssetViewItem into utility functions inside a new DragDropHandler in the Content Browser. This class correctly validates that you can only interact with assets and asset paths, but doesn't outright prevent you being able to include classes and class paths in your drag operations (it just warns you about them, and the strips them out of the drop lists).
[CL 2438229 by Matthew Griffin in Main branch]
Made the Content Browser filters work with C++ classes
UE-7184 - Show game c++ classes and engine c++ classes in the content browser
You can now filter on the "C++ Class" type, and the asset view no longer shows you all assets when you have a filter applied but only class paths selected.
[CL 2419541 by Ben Marsh in Main branch]
UE-7184 - Show game c++ classes and engine c++ classes in the content browser
The Content Browser now has extra entries for "Game C++ Classes" and "Engine C++ Classes" (with "Game" and "Engine" being renamed to "Game Content" and "Engine Content" respectively). These new folders serve as hosts for the list of available C++ modules, with each module internally mirroring the folder structure on disk.
For example:
- Game C++ Classes
- ShooterGame
- Classes
- Bots
- ShooterBot
- ShooterAIController
- [...]
- [...]
The Content Browser allows you to navigate and search these classes like you can with assets, and provides convenient access to either edit an existing class, or create a new class (either within a selected folder, or derived from a selected class).
As the Content Browser only shows you known UClass types, any new classes need to be compiled into a loaded module before they will appear. This means that adding a new class will now automatically hot-reload your target module. Should you prefer to handle building and loading your modules manually, you can disable the automatic hot-reload via "Editor Settings" -> "Miscellaneous" -> "Hot Reload" -> "Automatically Hot Reload New Classes" (see UEditorUserSettings::bAutomaticallyHotReloadNewClasses).
[CL 2409386 by Jamie Dale in Main branch]
UETOOL-213 - Minimize Slate FString -> FText conversion (remove SLATE_TEXT_ATTRIBUTE)
This fixes any editor/engine specific code that was passing text to Slate as FString rather than FText.
[CL 2399803 by Jamie Dale in Main branch]
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
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]