Commit Graph

51 Commits

Author SHA1 Message Date
Ben Marsh
9e4c2ae0a5 Use the exposed IPlugin interface to get plugin content folders rather than querying it separately.
[CL 2524929 by Ben Marsh in Main branch]
2015-04-24 16:37:21 -04:00
Andrew Rodham
5194f5cfc0 Fixed some windows not gaining focus when opened
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]
2015-04-22 10:34:02 -04:00
Dan Oconnor
15c50b5a5d Fixes for warnings found by PVS-Studio, these have been modified from PR#996
[CL 2500335 by Dan Oconnor in Main branch]
2015-04-02 16:32:47 -04:00
Saul Abreu
79a26091bf Fixed behavior on FString::ParseIntoArray (muliple delimiters overload) functionality to support optionally culling empty strings. Greatly simplified implementation logic. Output parameter now properly named and taken by reference.
#codereview Steve.Robb, Robert.Manuszewski

[CL 2466824 by Saul Abreu in Main branch]
2015-03-02 15:51:37 -05:00
Matthew Griffin
67572b1473 [INTEGRATE] Change 2442108 by Nick.Darnell@Nick.Darnell_Dev on 2015/02/11 14:40:03
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]
2015-02-17 10:13:40 -05:00
Matthew Griffin
1dd374c609 [INTEGRATE] Change 2435465 by Nick.Darnell@Nick.Darnell_Dev on 2015/02/06 10:42:44
Editor - Adjusting the minimum allowed thumbnail size in the content browser's asset view.

[CL 2446741 by Matthew Griffin in Main branch]
2015-02-16 04:36:07 -05:00
Matthew Griffin
b72d8c4683 [INTEGRATE] Change 2432062 by Jamie.Dale@Pitbull_JDaleReleases on 2015/02/04 13:56:41
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]
2015-02-09 11:42:01 -05:00
Jamie Dale
c42d4755ab Made the warning text in SAssetView HitTestInvisible so that it doesn't block summoning the context menu
UE-6644 - HitTestInvisible doesn't work properly with SRichTextBlock

[CL 2425517 by Jamie Dale in Main branch]
2015-01-30 06:42:59 -05:00
Richard TalbotWatkin
31ebe4ede7 Increased the time that the quick jump text in the Content Browser remains active before being reset.
#jira UE-8338 - Text from in Content Browser search disappears quickly

[CL 2425321 by Richard TalbotWatkin in Main branch]
2015-01-30 03:09:39 -05:00
Ben Marsh
ae35a3ccbc [INTEGRATE] Change 2415343 by Jamie.Dale@Pitbull_JDaleReleases on 2015/01/22 11:08:02
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]
2015-01-26 19:05:41 -05:00
Jamie Dale
55c3728d11 Added support for showing game and engine classes in the Content Browser
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]
2015-01-16 15:39:47 -05:00
Jamie Dale
a569f6b356 Fixed code relying on SLATE_TEXT_ATTRIBUTE for STextBlock.
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]
2015-01-07 09:52:40 -05:00
Dan Hertzka
c042ddcb94 ---- Merging with SlateDev 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]
2014-12-17 16:07:57 -05:00
Richard TalbotWatkin
a1d257da96 Added tooltip support to content browser header row columns. Added AssetRegistryTagMetadata class to Editor builds, for reporting additional tag information.
#jira UE-1009 - NUXF-387 Useful Tooltips for content browser columns

[CL 2390838 by Richard TalbotWatkin in Main branch]
2014-12-17 02:15:38 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Matt Kuhlenschmidt
d647c8f5ed Fix cases of constant FName recreation in the editor which is affecting performance
[CL 2363352 by Matt Kuhlenschmidt in Main branch]
2014-11-18 09:57:20 -05:00
Chris Gagnon
0e6d657c3d Refactor to unify keyboard and controller input and focus.
Native controller navigation support.

[CL 2345039 by Chris Gagnon in Main branch]
2014-10-30 12:29:36 -04:00
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