Commit Graph

92 Commits

Author SHA1 Message Date
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
Michael Schoell 39bf8cba82 Fix for new Blueprints not immediately appearing in the Class Viewer (or Class Picker instances).
#jira UE-7179 - User-created Object Blueprints do not appear as an option when using Create > Class Blueprint
#jira UE-7548 - Cannot Reparent new blueprints in 4.7 and 4.8

[CL 2407759 by Michael Schoell in Main branch]
2015-01-15 15:28:00 -05:00
Steve Robb 0756ef15b9 Delegate comparisons deprecated, lots of other associated code deprecated, and lots of warning fixups:
* Multicast delegate Add* calls now return FDelegateHandles, and Remove* calls are now all deprecated, except for a new Remove function which takes a FDelegateHandle.
* New FConsoleManager::RegisterConsoleVariableSink_Handle and UnregisterConsoleVariableSink_Handle functions which work in terms of FConsoleVariableSinkHandle.
* Timer calls which don't take FTimerHandles are deprecated.
* FTicker::AddTicker now returns an FDelegateHandle and is removed by an overloaded Remove function.
* DEFINE_ONLINE_DELEGATE* macros now define _Handle variants of the Add/Remove functions which return/take handles.
* Various other handle-based registration changes.
* Some unity build fixes.
* Some simplification of delegate code.
* Fixes for lots of existing code to use handle-based registration and unregistration.

#codereview robert.manuszewski

[CL 2400883 by Steve Robb in Main branch]
2015-01-08 09:29:27 -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
Michael Schoell 5c7498d6a3 Pass on editor to correct cases of referencing singular "Blueprint" to be "Class Blueprint" when refering to Class Blueprints.
Changed: Content Browser, Class Viewer, and workflow when generating a Class Blueprint from a selection of actors.

#jira UE-6294 - UI pass in the editor to make sure "Class Blueprint" terminology is used appropriately

[CL 2391117 by Michael Schoell in Main branch]
2014-12-17 10:05:52 -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
Jamie Dale 6b008d0722 Fixed code relying on the version of SWidget::SetToolTipText that took an FString
Made sure everything was using FText rather than FString, and also updated the property editor API to return tooltips as FText rather than FString.

[CL 2373917 by Jamie Dale in Main branch]
2014-12-02 13:48:53 -05:00
Bob Tellez 2e1eace4a5 [AUTOMERGE]
#UE4 Loading the class viewer or class pickers is now 60% faster.

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2370492 by Bob.Tellez on 2014/11/25 21:54:13.

[CL 2370495 by Bob Tellez in Main branch]
2014-11-25 22:01:02 -05:00
Richard TalbotWatkin d9b25b5aa1 Made "Create New Blueprint" in Class Viewer more robust, now invalid names are disallowed.
#jira UE-1234 - BP: Able to give a blueprint a blank name with space characters through the class viewer
#reviewedby Matt.Kuhlenschmidt

[CL 2364637 by Richard TalbotWatkin in Main branch]
2014-11-19 03:23:31 -05:00
Michael Schoell 29f631635f Class Pickers will allow you to type to search and use the arrow keys to navigate without changing focus with the tab key or mouse.
Class Picker or Content Picker is not created when creating a pin of class/object type, instead it is generated when clicking to drop down the combo box.

#jira UE-5358 - BLUEPRINTS: Class picker dropdown (on nodes like GetAllActorsOfClass) should handle arrow keys.

[CL 2360634 by Michael Schoell in Main branch]
2014-11-14 16:08:52 -05:00
Mikolaj Sieluzycki 51f5333986 Prepare cpp files for header cleanup.
#codereview Robert.Manuszewski

[CL 2356864 by Mikolaj Sieluzycki in Main branch]
2014-11-12 04:58:53 -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
Wes Hunt 31e2bb00ac Removed a bunch of stuff from Slate standard include, created SlateBasics.h
* Moved Slate.h into SlateBasics.h and began shifting less commonly used headers into SlateExtras.h.
* Slate.h now simply includes SlateBasics.h and SlateExtras.h.
* Slate.h includes a deprecated warning now to indicate that SlateBasics.h + specific includes should be used instead.
* Moved dozens of inlined functions using Slate widgets into .cpp files to avoid header dependencies.
* All code samples now include SlateBasics.h and SlateExtras.h so future shifts will not break most those projects, but not trigger the deprecation warning of including Slate.h.
#BUN

[CL 2329610 by Wes Hunt in Main branch]
2014-10-14 22:50:06 -04:00
Dan Hertzka f3092790eb Window menu refactor & polish
- Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes.

- Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely.

- Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category.

- Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly.

- Added & updated lots of icons! (those missing will be TTP'd)

- The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability.

- Unreal frontend options were also moved into a context menu within the General section

- Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category

- Undo history now under Edit menu

[CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
Michael Schoell 8b42640766 Class viewer will now display unloaded Blutility, UMG, and GameplayAbility Blueprints.
#ttp 348359 - UE4: Gameplay Ability Blueprint classes do not show up in the Class Viewer picker

[CL 2318871 by Michael Schoell in Main branch]
2014-10-03 15:01:19 -04:00
Maciej Mroz 29aa1cb83b Class Viewer gives actual information (about Placeable flag) for unloaded assets.
OnlyPlaceable metadata added. Indicates whether only placeable classes should be shown in the class picker.
More robust AGameMode::PreInitializeComponents

ttp345655 CRITICAL: CRASH: BLUEPRINT: adding GameMode blueprint as a child actor

[CL 2295026 by Maciej Mroz in Main branch]
2014-09-12 08:04:14 -04:00
Robert Manuszewski 26ec212687 HotReload: Better fix for old hot-reload classes in the class viewer
#ttp 345524: HotReload: Strange temporary class names are visible in Placement Browser's "All Classes" list after a HotReload

[CL 2293652 by Robert Manuszewski in Main branch]
2014-09-11 08:53:26 -04:00
Robert Manuszewski 615612d729 Making sure old classes are not visible in the class picker after hot-reload.
#ttp 345524: HotReload: Strange temporary class names are visible in Placement Browser's "All Classes" list after a HotReload

#change Marked old classes as transient, made sure they're not in root set
#change Made sure class picker rejects transient UClass objects

[CL 2292085 by Robert Manuszewski in Main branch]
2014-09-10 02:53:04 -04:00
Mike Fricker b678b51efd Added editor notification when automatic hot reload completes
[CL 2264535 by Mike Fricker in Main branch]
2014-08-20 13:58:31 -04:00
Robert Manuszewski 8498aae74f Hot-reload from IDE
#change UBT: Added support for hot-reload when UBT is called from IDE and the current target is curring
#change Added support for hot-reload from VS to the engine
#change Refactored hot-reload functionality to a separarte module
#change Added hot-reload analytics events

[CL 2255801 by Robert Manuszewski in Main branch]
2014-08-14 03:37:01 -04:00
Michael Trepka 3293117f09 More fixes for Clang warnings
[CL 2238624 by Michael Trepka in Main branch]
2014-07-31 15:43:08 -04:00
Michael Trepka 62e7793fa0 Another batch of fixes for Clang compile warnings
[CL 2237490 by Michael Trepka in Main branch]
2014-07-30 16:16:46 -04:00
Marc Audy 143c66c4cf Only Actors should be considered placeable
[CL 2237327 by Marc Audy in Main branch]
2014-07-30 14:41:25 -04:00
Andrew Brown 0879ca0738 Class viewer no longer crashes when it finds zero results.
#ttp 341701 - MAIN: EDITOR: CRASH: Editor crashes when searching for a nonexistant reparent class

#branch UE4

#change Very timing specific, the crash actually occurs (in the example) between pressing 's' then 'd' as the 's' search sets bPendingSetExpansionStates to true, then before it can refresh the list the search is updated with 'd' which will result in zero matches, however the bPendingSetExpansionStates flag is still set to true so it tries to expand something that isn't there. This change just resets the flag whenever the list is refreshed.

#change Also modified the code so it doesn't do the 'Find' if it doesn't need to, and threw in a check incase this happens again.

reviewed by Richard.TalbotWatkin

[CL 2229638 by Andrew Brown in Main branch]
2014-07-24 04:43:44 -04:00