Commit Graph

116 Commits

Author SHA1 Message Date
Dan Hertzka
4f9868cf79 - Added a few icons to the path context menu. More are on the way.
[CL 2324527 by Dan Hertzka in Main branch]
2014-10-09 17:17:09 -04:00
Dan Hertzka
7d053de086 Asset context menu refactor & polish
- Duplicate now works properly in the asset view.

- Consolidated common asset actions into the asset context menu and removed the duplicate code from all asset type actions that had implemented them. The affected actions are Edit, Reimport, Find in Explorer, and Open in External Editor. The latter three actions are only visible for imported assets.

- Added IsImportedAsset() and GetSourceFilePaths() to IAssetTypeActions for use by the context menu.

- Compressed the bottom matter on the context menu by removing section headers and compressing Source Control options into a sub-menu (when connected, otherwise there's just a "connect" menu entry).

- Added lots of icons! (The missing ones are TTP'd)

- Fixed FAssetEditorManager::OpenEditorForAssets to work in a useful fashion. IAssetTypeActions::OpenAssetEditor() already took in a UObject array, so it is up to the class's asset type actions to decide how to handle editing multiple assets. (It appeared to be before, but wasn't really).

- Removed the "Details" option from the context menu (since it's redundant when there's a guaranteed "Edit" option)

- Consolidated all skeleton-related actions into AnimationEditorUtils and removed the duplicate code from FAssetTypeActions_SkeletalMesh and FAssetTypeActions_Skeleton

- Compressed the Paper2D sprite options for textures into a submenu

- Renamed "New" to "Create" in content browser

[CL 2324288 by Dan Hertzka in Main branch]
2014-10-09 12:35:10 -04:00
Andrew Rodham
4ad1b987fc Improved progress reporting in the editor
FScopedSlowTask has been refactored to better allow for nesting of slow operations. This allows us to cascade nested scopes and provide accurate feedback on slow tasks. FScopedSlowTasks now work together when nested inside sub functions. Break up long functions that contain calls to multiple nested FScopedSlowTasks with FScopedSlowTask::EnterProgressFrame().

Example Usage:
void DoSlowWork()
{
    FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work..."));
    // Optionally make this show a dialog if not already shown
    Progress.MakeDialog();

    // Indicate that we are entering a frame representing 1 unit of work
    Progress.EnterProgressFrame(1.f);

    // DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately.
    DoFirstThing();

    Progress.EnterProgressFrame(1.f);
    DoSecondThing();
}

This addresses TTP#338602 - NEEDS REVIEW: Editor progress bars nearly always just show 100%, don't offer useful indication of progress

[CL 2322391 by Andrew Rodham in Main branch]
2014-10-08 04:42:34 -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
Martin Wilson
e46a398252 Fix Persona Asset browser filter arrow colour
#TTP 344422 - PERSONA: Asset Browser Filters arrow is inconsistent

[CL 2308499 by Martin Wilson in Main branch]
2014-09-24 13:55:46 -04:00
Andrew Rodham
eb9b5bb254 Enum values on asset tooltips are not more readable
Enum prefixes are no longer displayed, and CamelCaseEnums are now space-separated.
This addresses TTP#345449 - NUX:Content Browser: NUX: Tooltips for Materials and Textures have weird acronyms all over them

[CL 2305503 by Andrew Rodham in Main branch]
2014-09-22 09:47:11 -04:00
Marc Audy
b9e437c510 Remove UFactory::ValidGameNames, any such factory should not be in shared code
[CL 2304891 by Marc Audy in Main branch]
2014-09-21 20:34:09 -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
7de1efd741 UE4: Fixed a bug that caused text filters in Content Browser widgets to lose their source text when toggling whether they should include the class name or not.
[CL 2299027 by Bob Tellez in Main branch]
2014-09-15 22:18:53 -04:00
Bob Tellez
991715117f UE4: Dirty world packages are now properly discovered. The content browser now saves dirty world packages when clicking the save button on the browser.
[CL 2299012 by Bob Tellez in Main branch]
2014-09-15 21:53:58 -04:00
Bob Tellez
edd14e912e UE4: The name field of the save-asset-as dialog is now focused and selected initially after opening.
[CL 2298998 by Bob Tellez in Main branch]
2014-09-15 21:28:40 -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
Matt Kuhlenschmidt
fb76f6393e Fix constant FName initialization in places that execute often
[CL 2294154 by Matt Kuhlenschmidt in Main branch]
2014-09-11 16:48:17 -04:00
Bob Tellez
2e157a8324 UE4: Clicking on a folder in any SPathView in the editor will now prioritize discovering assets in that folder. Also fixed a performance problem when discovering paths in the project initially.
[CL 2291316 by Bob Tellez in Main branch]
2014-09-09 16:00:20 -04:00
Dan Hertzka
3cd562b7ea Content Browser fixes:
- Folder hotkeys (rename, delete) work properly in path view
- Deleting and renaming folders in asset view doesn't reset the asset view scope
- Deleting the open folder returns scope to the Game folder (no longer disables "New" and "Import")

[CL 2286985 by Dan Hertzka in Main branch]
2014-09-05 18:34:43 -04:00
bruce nesbit
d60a5de509 Converted widget .Tag instances for tutorials to use MetaData
[CL 2286138 by bruce nesbit in Main branch]
2014-09-05 07:39:52 -04:00
Bob Tellez
3511f61578 UE4: Added support for removing dynamic mount points. Added more information to the OnContentPathMounted delegate as well.
[CL 2283325 by Bob Tellez in Main branch]
2014-09-03 15:23:12 -04:00
Bob Tellez
24ff3ce891 [AUTOMERGE]
#UE4 You can now use the level "Save As..." dialog to overwrite existing levels. If they are in memory, they will be unloaded before proceeding.

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2280588 by Bob.Tellez on 2014/09/01 13:20:53.

[CL 2280595 by Bob Tellez in Main branch]
2014-09-01 13:25:23 -04:00
James Golding
695a0df1ef Rename 'Create Copy' to 'Duplicate' in Content Browser
#codereview matt.kuhlenschmidt

[CL 2280530 by James Golding in Main branch]
2014-09-01 12:05:21 -04:00
Jamie Dale
4819f62b3e Converted STextBlock to use an FTextLayout
This solves a wrapping issue where STextBlock would incorrectly consume new-line characters when wrapping, as well as allowing it to use custom wrapping behavior (eg, CamelCase wrapping for asset names in the content browser).

This change also implements FString -> FText passthrough for SLATE_TEXT_ATTRIBUTE (it was previously performing FText -> FString passthrough, however this didn't fit well with the fact that FText has a more efficient method of comparing whether a bound text attribute has changed (see FTextSnapshot), so can quickly work out that the FTextLayout doesn't need updating).

This change adds FTextBlockLayout to handle the text layout cache for text block types (STextBlock and SRichTextBlock) and serves a dual purpose of moving the duplicated caching logic into a single place, as well as hiding it from the widget (so allowing the cache to mutate, even when called from immutable widget functions).

This change also increases the unification between the STextBlock and SRichTextBlock construction parameters, by allowing STextBlock to specify a Justification, Margin, and LineHeightPercentage, and allowing SRichTextBlock to specify its HighlightText as an attribute.

ReviewedBy Nick.Atamas, Justin.Sargent

[CL 2280351 by Jamie Dale in Main branch]
2014-09-01 06:28:16 -04:00