#ttp 340613 - FIXIF: EDITOR:ANALYTICS: Static Mesh Editor Instrumentation Pass
#branch UE4
#added Added analytics for various static mesh editor usage, making sure not to spam events when spinboxes are used and only report when the value actually changes.
#added Added analytics whenever an asset is reimported (if via an editor, the editor will then report that it was it that did the reimporting)
reviewed by Thomas.Sarkanen
[CL 2229618 by Andrew Brown in Main branch]
#ttp 340526 - Static mesh editor: changing the static meshes normals setting from "import normals" to "compute normals" doesn't change the mesh until the user reimports the asset
#branch UE4
#add Added button to reimport based on the current import options (no button will appear if there are no options to modify)
#change Modified import options so they get marked as dirty until they are reimported (button will be unclickable unless they are)
reviewed by Thomas.Sarkanen
[CL 2217535 by Andrew Brown in Main branch]
#ttp 339600 - Move static mesh stat info out of canvas and into StaticMeshEditor Slate UI
#branch UE4
#proj Editor.EditorStyle, Editor.StaticMeshEditor
#add Added a parameter to the StaticMeshEditorViewportClient to pass in a weak ptr to the viewport widget which owns it. This is so that, on Draw calls, we can update one of its child Slate widgets.
#add Created a struct SStaticMeshEditorViewport::FOverlayTextItem which represents one item of overlay text, and a method SStaticMeshEditorViewport::PopulateOverlayText() which populates the Slate SVerticalBox in the SOverlay with these text blocks.
#add Created a couple of new SlateEditorStyles - shadowed text (normal), and shadowed text (error).
#change Changed FStaticMeshEditorViewportClient::DrawCanvas() to populate an FOverlayTextItem array and call PopulateOverlayText on the owning widget to update the overlay widget.
#reviewedby Chris.Wood
[CL 2169037 by Richard TalbotWatkin in Main branch]
#ttp 338927 - EDITOR: Static Mesh: Unable to duplicate collision primitives with hotkey
#branch UE4
#change W input was getting swallowed by the input to switch between widget maninpulation types - converted this over to use the UICommands that are setup
reviewed by Thomas.Sarkanen
[CL 2111775 by Andrew Brown in Main branch]
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]
#ttp 334968 - TOOLS FEATURE: Add primitive collision inside the static mesh editor
#branch UE4
#change
GenerateSimpleCollision funcs now return true if any collision was built
Moved Prompt to build collision into a func (to remove duplicate code), and modified so that the options are Yes=Replace, No=Add-To, Cancel = Cancel.
Added CalcBoundingSphyl code which is loosely based on the Sphere code in that it finds the best axis to align the sphyl with (but locally rotates so it can treat the Z axis as length, regardless). It they finds the radius to best enclose the Sphyl (same as Sphere, but 2D). Then it increase the length of the Sphyl until that encapsulates all the remaining points.
Replace instances of AddZeroed with Add(FKTypeElem()) so that the vtable would be created correctly if a base struct was introduced.
Moved PhysX code which scales the Elems from ModifyPrimitiveSize to their own struct func (ScaleElem) so that it could be used elsewhere.
Added new struct FPrimData which contains the PrimType and PrimIndex so we can look the corresponding collision Elem up in our BodySetup. The static mesh editor session which is open for a particular static mesh keeps track of these using the following:
IsPrimValid û Checks to see if the prim data could be valid
HasSelectedPrims û Returns true if there are any selected prims
IsSelectedPrim û Check to see if the prim data is selected
AddSelectedPrim û Adds prim data to our selection
RemoveSelectedPrim û Removes prim data from our selection
RemoveInvalidPrism - Removes any prims which are no longer valid from the selection
ClearSelectedPrims û Removes all the prim data from our selection
DuplicateSelectedPrims û Duplicates the selected prims
TranslateSelectedPrims - Translates the selected prims by a specified amount
RotateSelectedPrims - Rotates the selected prims by a specified amount
ScaleSelectedPrims - Scales the selected prims by a specified amount
CalcSelectedPrimsAABB - Calculates the bounding box of the selected prims
DeleteSelectedPrims û Deletes the selected prims
GetLastSelectedPrimTransform û Gets the transform of the last prim which was added to the selection.
GetPrimTransform - Gets the transform of a specified prim
SetPrimTransform - Sets the transform of a specified prim
Added placeholder calls to begin/end transaction where itÆs needed whenever the bodysetup prims are modified.
Added new Static Mesh Editor menu option to create a capsule/sphyl
Added dedicated collision toggle flag to the Static Mesh Editor so we could manage our own handling of the draw functions in order to inject hit proxies where needed so we can test when theyÆve been clicked on in the viewport.
Widget now works when selecting collision Elems. Space toggles the manipulation method.
SelectedPrims can be trans/rot/scaled using the editor widget.
Prims can be duplicated or deleted either using menu entries or keyboard shortcuts. Alt+drag is also supported for duplication.
ProcessClick was updated so that whenever a new selection type is clicked on the previous types are deselected (sockets, prims, edges), and other code location were updated to clear the selected prims where appropriate.
Modified OnFocusViewportToSelection so that it also focuses on the selected elems too
Modified SetSelectedSocket so that when passing NULL it deselects all the sockets
[CL 2104326 by Andrew Brown in Main branch]
* Provides mid-range stable AO for dynamic rigid meshes
* Movable sky lights are now supported, and distance field AO is used for shadowing Movable sky lighting from dynamic scenes
* Static meshes are preprocessed into signed distance field volumes at mesh build time when the r.AllowMeshDistanceFieldRepresentations project setting is enabled
* Non-uniform scaling does not work with this method (mirroring is fine), animating through world position offset also causes artifacts as the two representations diverge
* Occlusion is computed along cones to reduce over-shadowing, object distance fields are operated on directly (no hierarchy) to obtain enough resolution to prevent leaking, visibility traces are done with cone stepping to allow better parallelization, and shading is done adaptively in space and time using the surface cache.
[CL 2093556 by Daniel Wright in Main branch]
#ttp 335786 Lighting: Assigning a Material in the Staticmesh editor unbuilds lighting on placed meshes
reviewer Thomas.Sarkanen
[CL 2093124 by Andrew Copland in Main branch]
Milestone 4
-Added support for grouping devices based off MachineName, Platform, OSVersion, Model, GPU, CPU, RAM, or RenderMode.
-Added a graphical test result section to show relative times between instances.
[CL 2076099 by kevin hamilton in Main branch]
Automation: Milestone 3 and fixes for milestone 2
-Added new EditorShot command to take editor screenshots
-Made the ExterialTool options use the dierctory picker
-Fixed a bug with the StaticMeshEditor test if the tutorial pops up
-StaticMeshUV test now uses async package loading
-Added a display every Nth screenshot to the screenshot compre tab
-Added support to disable screenshots or request full size ones
-Changed the screenshots so they save to the game directory even if you run the frontend by itself
-Added screenshot support for the load all maps tests
[CL 2071712 by kevin hamilton in Main branch]
#ttp 319896 - Skeletalmesh/Staticmesh LOD refactoring: Part 1 (Refactor Static Meshes to use ScreenSize rather than distance)
#branch UE4
#change Removed LOD Distances and added ScreenSize for Static Meshes
[CL 2065408 by Benn Gallagher in Main branch]
#proj core
#branch UE4
#summary Rename Trunc, Round, Floor, Ceil to TruncToInt, RoundToInt, FloorToInt, CeilToInt. Added *ToFloat versions. Repeated for FGenericPlatformMath and all derived classes for all platforms wherever applicable. Corrected comment in Fractional and added Frac() which does HLSL-style fractional (x - floor(x)). Checked for compilation on all projects (with cooking levels wherever applicable). Didn't change Fractional to Frac, this will be done in second commit.
#codereview robert.manuszewski
[CL 2064306 by Mikolaj Sieluzycki in Main branch]
Other Updates:
- The WidgetReflector is now in its own module as well. It will be converted to a plug-in later.
- The Public API of both Slate and SlateCore has largely been reorganized for better discoverabilty. More cleanup work is needed.
- Added a lot of missing API documentation and fixed existing ones. More and better documentation is needed.
- Removed dead code, fixed a couple things I stubled upon, and conformed to coding guidelines (NULL vs nullptr, line breaks, etc.)
Upgrade Notes:
- The Slate Remote Server is currently disabled - will be re-enabled shortly!
- If your module previously had a module dependency to 'Slate', it now also needs a PrivateModuleDependency to 'SlateCore' in its Build.cs file.
- If your module exposes in any of its Public header files types that are now declared in SlateCore, it needs a PublicModuleDependency to 'SlateCore'
- The ToolTip property type on SWidget has changed from SToolTip to IToolTip; change local variables to TSharedPtr<IToolTip> instead of TSharedPtr<SToolTip> where needed
- IToolTip is not a widget. If you need access to the actual widget that represents the tool tip, use IToolTip::AsWidget(); If you need access to the tool tip's content, use IToolTip::GetContentWidget()
Troubleshooting:
- After syncing to this changelist you may have to clean your /Engine/Intermediate/Build/ directory and rebuild your entire project
- If in your project you are getting linker errors for unresolved types that are now declared in SlateCore, you may be missing a dependency to 'SlateCore'
- If in the Engine code you are getting linker errors for unresolved types that are now declared in SlateCore, you may need to rebuild the entire Engine
[CL 2057118 by Max Preussner in Main branch]
#ttp 333283 - EDITOR: Static Mesh will disappear when changing the Z axis from 0 to any other number while using the Build Scale tool
#branch UE4
#proj Editor.StaticMeshEditor
#change Trapped inputs close to zero in FMeshBuildSettingsLayout::OnBuildScale*Changed and rejected them.
#reviewedby Chris.Wood
[CL 2056448 by Richard TalbotWatkin in Main branch]
TTP# 332724 - Regression: EDITOR: Texture: CRASH: Reimporting a texture that is not a power of two results in a crash
Reimporting a non-power of 2 texture would cause a modal dialog to open, causing the texture editor viewport to be ticked for render while the texture was still being reimported. This lead to a crash due to the texture having no resource allocated.
The rendering in the texture editor is now disabled while a reimport takes place.
I also moved the Pre/PostReimport delegates from FAssetEditorToolkit to FReimportManager to ensure that all reimport cases are caught (eg, reimporting from the Content Browser while an asset editor is open).
ReviewedBy Thomas.Sarkanen, Max.Preussner
[CL 2056305 by Jamie Dale in Main branch]
Merging //depot/Partners/Zombie/UE4-iOS/... to //depot/UE4/...
Milestone 1 and 2 combined (CL# 2047358 to 2055524)
-Run external tools
-Repeat tests N times
-Visual difference for editor vs game tests
-Static mesh UV test
-Editor window screenshots
-Automation test presets
-Static mesh editor test
[CL 2055603 by kevin hamilton in Main branch]