Commit Graph

27 Commits

Author SHA1 Message Date
Matt Kuhlenschmidt
a483137720 Added placed cameras to the camera type dropdown menu in the level editor viewport
[CL 2527174 by Matt Kuhlenschmidt in Main branch]
2015-04-27 13:40:02 -04:00
Andrew Rodham
8ff0d8b98b Added config migration path for newer versions of the engine.
Newly installed versions of the engine will now attempt to copy the project-agnostic config settings from a previous engine installation. This happens by way of a versioned manifest that copies old versions when the manifest does not exist, or is a different version. This code path is benign for non-installed versions of the engine (or FPaths::ShouldSaveToUserDir() is false).

EditorGameAgnosticSettings and EditorUserSettings ini paths have been renamed to EditorSettings and EditorPerProjectUserSettings respectively to better convey their purpose. In general, most settings should be saved in EditorSettings (project-agnostic) so that they apply regardless of which project is open. We have some way to go migrating existing settings for this to be the case, however.

Some previously per-project configuration files are now project-agnostic (such as Editor.ini, EditorKeyBindings.ini, and EditorLayout.ini)

GEditor->Access...Settings and GEditor->Get...Settings have been removed in favor of direct access of the CDO through GetMutableDefault<> and GetDefault<> respectively. Global config ini filenames that are not set up are now neither loaded nor saved on build machines, to handle the problem of indeterminate state more generically.

This addresses UETOOL-270 (Most editor preferences should be project-agnostic)

[CL 2517558 by Andrew Rodham in Main branch]
2015-04-20 10:12:55 -04:00
Mikolaj Sieluzycki
a96989f147 Add includes to files to remove the need of including Engine.h.
[CL 2508000 by Mikolaj Sieluzycki in Main branch]
2015-04-10 03:30:54 -04:00
PaulEremeeff
3d878d5a79 PR #996: Fixing PVS-Studio warnings (Contributed by PaulEremeeff)
I have reviewed each change carefully, but it is a large change and I could have missed something! Here is a summary of the types of changes in this CL:
 * Made nullptr checks consistent (the plurality of the changes are of this type)
 * Completed switch statements (IE, switch did not explicitly handle default case, but had unhandled enum entries - this is the second most popular type of fix)
 * Removed unused variables
 * Removed redundant initializations
 * WidgetNavigationCustomization.cpp was fixed by the owner
 * integers converted to floats where result was stored in a float
 * Removed redundent null checks (e.g. before delete statements)
 * Renamed variables to prevent non-obvious shadowing
 * Fixed use of bitwise & when checking for equality to an enum entry (which is often 0)
 * Fixes for some copy paste errors (e.g. FoliageEdMode.cpp)

[CL 2498053 by Dan Oconnor in Main branch]
2015-03-31 20:12:31 -04:00
Richard TalbotWatkin
1d7768ff2b Added 3 new orthographic viewport modes.
#jira UE-1143 - LIVE: Include option to view Orthographic views from both angles Front Back Left Right Top Bottom
#reviewedby Matt.Kuhlenschmidt

[CL 2480276 by Richard TalbotWatkin in Main branch]
2015-03-16 12:50:15 -04:00
Andrew Rodham
fb39a20762 Renamed Actor Locking editor functionality to Actor Pilot
Actor pilots are now initiated from the actor's context menu, rather than an unrelated menu on the viewport. Similarly, pilots can be stopped via the context menu for the actor, or from the viewport toolbar that is visible when a pilot is active.

This addresses UE-1091 - Allow actors to be piloted with the camera in UE4.

[CL 2446881 by Andrew Rodham in Main branch]
2015-02-16 07:13:08 -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
Andrew Rodham
50bfbf7e0b Added Worlds and Level Blueprints to the scene outliner
This change includes a large rework of the scene outliner to make it more expandable and flexible with what data it supports.
Tree items now support visitation to allow for external logic on custom columns etc without having to type check and cast.
Sorting has been overhauled to be more flexible and efficient. It now supports correct lexical comparison for numbers.

[CL 2354514 by Andrew Rodham in Main branch]
2014-11-10 10:09:21 -05:00
Robert Manuszewski
af80979bb7 First phase of deprecating TSubobjectPtr<> replacing TSubobjectPtr properties in the Engine with normal pointers and adding subobject accessors for derived classes/client code.
[CL 2331521 by Robert Manuszewski in Main branch]
2014-10-16 09:02:30 -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
bruce nesbit
0359b039e9 More widget tags for tutorials
Removed unused function prototype

[CL 2286231 by bruce nesbit in Main branch]
2014-09-05 10:00:26 -04:00
Mikolaj Sieluzycki
cfaf45ac58 Header cleanup: Engine module, public headers.
[CL 2265766 by Mikolaj Sieluzycki in Main branch]
2014-08-21 06:03:00 -04:00
Martin Mittring
0fcf9ab32a * cleaner UI - what is a showflag, what is not
[CL 2230377 by Martin Mittring in Main branch]
2014-07-24 15:16:00 -04:00
Michael Noland
0bfdf2a8f8 Editor: Fix typo of "Orthographic"
Integrate CL# 2124151 from 4.3 to Main

[CL 2124154 by Michael Noland in Main branch]
2014-07-02 07:32:07 -04:00
Andrew Rodham
7055102044 Locking a viewport to a camera actor now correctly uses the camera's properties
I've made a few changes here to make the code more consistent for the various ways of using a viewport to view an actor's position:
    * Camera properties are now taken off any UCameraComponent, not specifically limited to ACameraActors.
    * Calling FLevelEditorViewportClient::SetActorLock will now lock the viewport to the specified actor. If the actor has a camera component the viewport will inherit this camera's properties. The locked actor will also move with the viewport position if in perspective mode (as before).
    * ControllingActor and PostProcessingActor have been removed from FLevelEditorViewportClient. Both were used for PIP camera previews which now work by locking a viewport to their desired camera.
    * The inheriting of camera properties is controlled by the viewport "Camera View" setting shown on the quick settings viewport toolbar under the "Lock Viewport to Actor sub-menu.

This addresses TTP#337559 - feature request - improve viewport functionality for locking to camera

Reviewed by Chris Wood, Matt Kuhlenschmidt

[CL 2113995 by Andrew Rodham in Main branch]
2014-06-23 10:25:08 -04:00
Andrew Rodham
ba3528c9d4 Made it possible for asset editors to maintain their own FEditorModeTools lists
Breaking changes include:
    * Rename of GEditorModeTools -> GLevelEditorModeTools to signify that it applies only to the level editor modes
    * Addition of FEditorModeRegistry, responsible for managing and creating new editor modes. Modes are no longer registered with an instance of the mode, instead with a mode factory that is able to create a new mode of that type.
    * Editor modes now operate on FEditorViewportClients rather than FLevelEditorViewportClients
    * Added ability to specify an FEditorModeTools when creating an FEditorViewport

Moved component vizualiser manager handling outside of individual editor modes, and into FLevelEditorViewportClient. This should make it easier to transplant in future.

This work addresses TTP#334640 - EDITOR: Investigate making editor modes a per-'editor' concept

Reviewed by Michael Noland, Matt Kuhlenschmidt

[CL 2109245 by Andrew Rodham in Main branch]
2014-06-18 10:16:16 -04:00
Andrew Brown
7076c7b0bd Moved Stats sub menu entry from viewport's Show menu to the \\/ menu
#ttp 337844 - Editor: Move new stats menu to first drop down arrow next to "Show Stats" rather than show flags

#branch UE4

#change Moved FillShowMenu and FillShowStatsSubMenus functions so they could be more accessible

reviewed by Thomas.Sarkanen

[CL 2109062 by Andrew Brown in Main branch]
2014-06-18 05:50:11 -04:00
Jaroslaw Palczynski
ebce413232 UE4 Refactoring. Changed OVERRIDE and FINAL macros to keywords override and final.
[CL 2104397 by Jaroslaw Palczynski in Main branch]
2014-06-13 06:14:46 -04:00
James Golding
7e7a2e6473 More Engine.h trimming (EdGraph headers, BoneMaskFilter, Breakpoint, LevelScriptBP, ClipPAdEntry, CodecMovie, DestructibleFractureSettings, DeviceProfile)
[CL 2085606 by James Golding in Main branch]
2014-05-29 17:11:10 -04:00
Andrew Rodham
8c08120774 Added folder filtering support to the scene outliner
This allows the filtering of any actors that are part of the specified folder.

This addresses TTP#331604 - EDITOR: Scene Outliner: Folders will appear in the drop down when you try to move them, and TTP#331640 - EDITOR: Scene Outliner: In the 'Move to Folder" sub menu the "Create New" tooltip is incorrect

Also fixed not being able to move attached actors to a folder

Reviewed by Matt Kuhlenschmidt

[CL 2058587 by Andrew Rodham in Main branch]
2014-04-29 05:59:53 -04:00
Andrew Brown
b145f1d79e Simple and Group Stat Exec commands can now be triggered from the level viewport Show menu directly.
#ttp 306334 - ROCKET: TASK: PUNTABLE: Stats: FN: Make diagnostic stats discoverable and available in the UI (don't require console to toggle)

#branch UE4

#change
DECLARE_STATS_GROUP û Added additional param GroupCategory, for subfolder use in the UI. Fixedup all Stats Group usage so the category is now propagated through where it needs to be.
Currently all Group stats have the Category æAdvancedÆ, and all engine stats have the Category æSimpleÆ û this is just to differentiate them for now, better categories will come along in future.
Modified FindOrAddMetaData as it now broadcasts a delegate (via a TaskGraph) whenever a new stat meta data is added û this was needed as not all the stat groups are æregisteredÆ when the level viewports are created (they are drip loaded), so the viewports need to listen for any additions thereafter...
GroupDescription is displayed as a tooltip in the UI for the stat entry and we may want to localize these.
RenderStats & RenderGroupedWithHierarchy: Modified so that it now takes the viewport that it should render to as a param (which is also used to determine if each stat should be visible).
Removed StatsEnabled delegate in favour of StatCheckEnabled, StatEnabled, StatDisabled, StatDisableAll for more finite usage and feedback when toggling them.
Modified FHUDGroupManager HandleCommand It now uses the new delegates to work out whether it needs to enable or disable for the current viewport, so itÆs more involved than a simple toggle, itÆs more ôis the stat enabled for the current viewport, and is it enabled for any viewportö delegate querying so it can react accordingly.

Added struct FSimpleStatFuncs: Which contains info on each æSimple StatÆ such as; name, category, description, renderfunc, togglefunc and the side of the viewport it should be rendered to
ExecSimpleStat û Calls Exec for a registered Simple Stat, ensuring the correct viewport is set
IsSimpleStat û Checks to see if a stat is a registered Simple Stat or not
SetSimpleStat û Sets the state of a specified Simple Stats
SetSimpleStats - Sets the state of the specified Simple Stats
RenderSimpleStats û Renders the Simple Stats if they are enabled, and have Render functions assigned.
Each Exec function had the code it executes which itÆs toggled and rendered into functions

Added FStatUnitData & FStatHitchesData: Moved all the globals/static variables used when enabling Stat Unit/Hitches into a struct as itÆs now used by multiple viewports and they needed their own copies. Also moved their draw functions here too.

FSceneViewport:
SwapStatCommands û Exchanges the enabled stats between two viewports, this is so when PIEing the stats which were enabled on the Level Viewport (if playing in active viewport only) get transposed to the Game Viewport, and then restored when PIE ends.
SEditorViewport:
ToggleStatCommand û Called when a stat is enabled/disabled from the UI
IsStatCommandVisible û Checks to see if a stat command should appear as visible in the UI
SEditorViewportViewMenu:
GenerateViewMenuContent û Made protected and virtual so it could be called externally.
FLevelViewportCommands: Added the code needed to generate commands for each of the Stat menu entries, however because not all stats are registered when this happens, it also creates some delegates to listen out for others that are registered later
Destructor û Needed to reset delegates
HandleNewGroupStat û Creates the new group stat commands
HandleNewStat û Creates the new stat command
FindStatIndex û Looks for where a stat should be inserted in the menu in order to maintain alphabetical order
SLevelViewport:
Modified the code so that the states of all the SimpleStats are saved so they can be restored next time the editor is ran (previously just handled FPS).
OnFloatingButtonClicked û Called whenever any of the level viewports floating buttons are clicked in order to correctly set the ælastÆ viewport global
OnToggleAllStatCommands û Called when the user selects æHide AllÆ from the viewport.
ToggleStatCommand û Called when the user selects any other stat option from the viewport.
BindStatCommand û Used to bind the menu action to the command name (used by delegate)

Added SLevelEditorViewportViewMenu (extends SEditorViewportViewMenu), and overrode GenerateViewMenuContent so that OnFloatingButtonClicked can be called whenever the menu is clicked on. This is also called during GenerateOptionsMenu, GenerateCameraMenu, GenerateShowMenu & OnToggleMaximize
Added global ptr GStatProcessingViewportClient (sim to Current, Last) used to keep track of which viewport the stat should be applied too (only valid within the scope of the Exec call).

FViewportClient:
Moved global ESoundShowFlags enum list into this class.
FCommonViewportClient:
Destructor û Needed to reset GStatProcessingViewportClient
FLevelEditorViewportClient
SetCurrentViewport û moved code responsible for setting the global æcurrentÆ viewport ptr into a func
SetLastKeyViewport û moved the code responsible for settings the global ælastÆ viewport ptr into a func
UGameViewportClient:
Destructor û Needed to cleanup delegate usage.
FViewportClient & FLevelEditorViewportClient & UGameViewportClient*
GetStatUnitData û The viewports copy of the variables needed when running the Stat Unit Exec
GetStatHitchesData û The viewports copy of the variables needed when running the Stat Hitches Exec
GetEnabledStats û Gets a list of all the stats which are enabled for the viewport
SetEnabledStats û Sets a list of all the stats which should be enabled for the viewport
IsStatEnabled û Checks to see if a specific stat is enabled for the viewport
SetStatEnabled û Sets a specifics stats state to enabled or disabled
GetSoundShowFlags û Gets which flags are enabled for the Stat Sounds Exec
SetSoundShowFlags û Sets which flags are enabled for the Stat Sounds Exec
HandleViewportStatCheckEnabled (delegate) û checks to see if a specific stat is enabled on this viewport
HandleViewportStatEnabled (delegate) û enables a specific stat for the viewport
HandleViewportStatDisabled (delegate) û disables a specific stat for the viewport
HandleViewportStatDisableAll (delegate) û disables all stats for the viewport
*FViewportClient has dummy virtual funcs and LevelEditor/Game both have the same implementations, the only differences is the GameViewports member variables are static so that the stat info persists between runs.

FLevelEditorViewportInstanceSettings deprecated bShowFPS in favour of an EnabledStats array (so we can track the state of all stats, not just FPS).
Added new config var bSaveSimpleStats: if enabled, restores previously enabled level viewport simple stats the next time the editor runs (defaults to false).

Modified FillShowFlagMenu so that thereÆs just one func and you specify where (if any) youÆd like a separator to occur.
Added FillShowStatsSubMenus so that menus can be generated which have submenus
Added the Stats sub menu to the View menu

Modified Execs so that the GStatProcessingViewportClient is set to the correct default viewport (if it wasnÆt specified), and clears again after itÆs been processed
HandleStatCommand now takes World and ViewportClient as params too û needed when Execs enabled other Execs so the world/viewport persists.
SetAverageUnitTimes û Added as a Setter func for GetAverageUnitTimes (moved code out of Stat Unit renderer and modified so that it only updates once per frame).

Stripped out all unneeded globals

[CL 2058522 by Andrew Brown in Main branch]
2014-04-29 04:04:27 -04:00
Chris Wood
59cfc2f249 #ttp 323891 - EDITOR: Viewport Layouts: Please add a 1x1 viewport preset layout option
#branch UE4
#proj Editor.LevelEditor
#summary Added 1x1 viewport layout and tidied the margins in the layout menu

#add Added FLevelViewportLayout::bIsMaximizeSupported and public getter IsMaximizeSupported(). This is set on the new one-pane layout to block the maximize command/button.
#add LevelViewportConfigurationNames::OnePane - new named layout config.
#add FLevelViewportCommands::ViewportConfig_OnePane - new layout command.
#change FLevelViewportLayout::InitCommonLayoutFromString() - will never start a layout maximised if bIsMaximizeSupported is false.
#change FLevelViewportLayout::SaveCommonLayoutString() - will never save a layout maximised if bIsMaximizeSupported is false.
#change FLevelViewportLayout::MaximizeViewport() - checks that bIsMaximizeSupported is true as it should never be called on a layout that doesn't support it.
#add SlateEditorStyle - added brushes for one pane option in the viewport layout menu.
#add SLevelViewportToolBar::GenerateViewportConfigsMenu() - new section for one pane layouts with the one pane button in it.
#change  SLevelViewportToolBar::GenerateViewportConfigsMenu() - fixed the layout margins by setting the label visibility to collapsed instead of passing an empty string as the label.
#add Binding new ViewportConfig_OnePane command SLevelViewport::BindViewCommands to OnSetViewportConfiguration().
#change SLevelViewport::GetMaximizeToggleVisibility() & OnToggleMaximize - check IsMaximizeSupported() on the parent layout and always collapses the maximize button when it isn't supported.
#add FLevelViewportTabContent::ConstructViewportLayoutByTypeName() - added LevelViewportConfigurationNames::OnePane.
#add New icon image for one pane button in the menu - ViewportLayout_OnePane.png
#add New layout class FLevelViewportLayoutOnePane - based on other layouts but simpler because it only contains one pane and therefore no splitters.

reviewedby Thomas.Sarkanen, Max.Preussner

[CL 2048729 by Chris Wood in Main branch]
2014-04-23 19:20:45 -04:00
Andrew Rodham
3f8bb98d1c Added ability to extend the default context menu in the scene outliner
This tidys up some logic and duplication between the level editor viewport context menu and the scene outliner, since the level viewport menu can now extend the scene outliner, rather than having to duplicate its functionality. The ability to completely override the menu still remains by way of an override delegate.
#reviewedby Matt.Kuhlenschmidt

[CL 2038566 by Andrew Rodham in Main branch]
2014-04-23 16:39:22 -04:00
UnrealBot
db494a6e69 Engine source (Main branch up to CL 2037954) 2014-04-02 18:09:23 -04:00