Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Private/AnimGraphNode_StateMachineBase.cpp

777 lines
29 KiB
C++
Raw Permalink Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "AnimGraphNode_StateMachineBase.h"
#include "EdGraph/EdGraph.h"
#include "Kismet2/BlueprintEditorUtils.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "Kismet2/Kismet2NameValidators.h"
#include "AnimationGraph.h"
#include "AnimationStateMachineGraph.h"
#include "AnimationStateMachineSchema.h"
#include "AnimGraphNode_StateMachine.h"
Copying //UE4/Dev-AnimPhys to //UE4/Dev-Main (Source: //UE4/Dev-AnimPhys @ 3624379) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3536809 by Ben.Marsh Fixing case of files in "iOS" directory, pt 1. Change 3536814 by Ben.Marsh Fixing case of files in "iOS" directory, pt 2. Change 3596207 by Thomas.Sarkanen Copying //Tasks/UE4/Dev-UEAP-29-PhATUpgrade to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3590250 PhAT Upgrade #jira UEAP-29 - New PhysicsAsset editor Changelists from task stream: Change 3380649 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Initial pass at allowing viewports to be extended more easily, still plenty TOD, but just unearthing this old shelf and getting it working. This gets the Persona skeleton tree and viewport into PhAT, without any PhAT functionality added. Change 3380685 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Renaming PhAT files to PhysicsAssetEditor Change 3380749 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rename PhAT -> PhysicsAssetEditor Change 3380832 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up PhAT to Physics Asset Editor Change 3380884 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Reverted some over-zealous renaming Change 3380970 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked ISkeletonTreeBuilder interface to make way for actually making a derived class of it Added the ability to hide filter menus to skeleton tree Change 3381017 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added new physics asset skeleton tree builder Change 3384407 on 2017/04/07 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Skeleton tree extensions to support physics assets Only started this work - still much to do Change 3384460 on 2017/04/07 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged persona viewport menus Change 3392222 on 2017/04/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed body/constraint modes. Added graph editor Added edit mode - moved viewport client code over Got PhAT skel mesh rendering in viewport Change 3392268 on 2017/04/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Increased hit proxy priority to improve selection Change 3401648 on 2017/04/20 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Skeleton tree gets bodies & shapes back. Selection works in graph, now displaying the correct constraint in the detials panel. Still need to add selection from viewport. Added multi-select to bone proxy customization Re-tweaked editor layout Change 3403701 on 2017/04/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selection sync work. Customization of anim viewport menus. Context menus for physics asset items, as well as masking of various context menu items via settings. Change 3405246 on 2017/04/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Started more work on viewport menu extensions, but need to refactor the toolbar system to use actual multiboxes. Up next! Change 3405274 on 2017/04/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen More viewport menu fixups (plus deleting duplicate functionality). Change 3409155 on 2017/04/26 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Got simulation working again - as we switched to the debug skel mesh comp, the normal tick path didnt work for post-blend physics (it tried to flip the buffer too early). Also tweaked debug skel mesh comp root motion consumption code to not reset transfor every frame if we are not using root motion. Cleaned up unused files & code Change 3410814 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Allow extensibility of viewport menu bars Slate changes: Allow menu bars to optionally specify an icon to use. This is intended to allow us to move viewport tool/menu bars over to use multibox, with all the attendant features and extension points. Allow menu bars to optionally invert-on-hover. Allow styling of menus to affect closed appearance of menu header. Previously only NoBorder was used. Adjusted core styling of menu bar elements. Other changes: Adjusted padding for various UI elements to preserve previoud behavior. Adjusted SAnimViewportToolbar to use the new menu bar builder. Exposed SEditorViewportViewMenu so that it can be used in a standard menu bar. Change 3410816 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added extension point to viewport menu bar Change 3410818 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Getting sim working again Moved over to using preview instance so we share functionality with Persona editors. Added time dilation options to persona preview scene. Removed PhAT specific recording functionality (it is in the viewport now). Change 3410840 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Recreate physics state on edit, not sim start This allows velocity to be inherited when simulation is started Change 3410863 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moving viewport to continually-invalidated one like animation editors Fixed crash in non-extended viewport toolbars Change 3410936 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Bodies start off non-expanded Selection now synced between viewport and graph Constraint selection in graph not works on the first try Change 3410943 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added missing icon Change 3410966 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed shape listing from graph nodes Change 3411013 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Double click on body node recenters graph Fixed graph disappearing on right-click Change 3411111 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevented cursor getting swallowed in sim mode Change 3411126 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed overlapping text Change 3411213 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Node layout now takes dimensions into account Change 3411320 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash opening Persona editors Renamed file Change 3411327 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaks to profiles menu Change 3420822 on 2017/05/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Profiles can now be edited in their own details panel Existing customizations folded into the new panel Tweaks to toolbar Added the ability for the persona details panel to have extra top/bottom content added Change 3420832 on 2017/05/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Add profile control to context menus Also delete old unused code Change 3422651 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Toolbar trimmed down & re-ordered Body/constraint ops moved to context menus Apply physmat now a context-menu option with an asset picker Change 3422654 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed extra warning dialog when auto-creating bodies Changed title of new asset dialog to "auto-create bodies" Change 3422680 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix "simulate selected" As we dont re-init the physics state each time we start simulating, our tweaked physics type was never applied. We now manually do this in the editor. Change 3422937 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Replaced EKCollisionPrimitiveType with EAggCollisionShape::Type Fixed up selection so body selection works & tree seleciton is properly synced with viewport Added recursion guard to selection delegate handlers. Removed vestigial instance property editing support (no longer needed). Removed unused old tree support code Change 3423034 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added constraints to tree Change 3423318 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix bone proxiies stopping updating after initial viewport selection Change 3424993 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up selection issues when creating new bodies Added constraint context menu Change 3424998 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved icons to central location Change 3425445 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Customized filtering of the skeleton tree Hide constraints by defualt Added option to hide parents when filtering (so the vertical space is nto wasted, but some idea of hierarchy is preserved). BREAKING CHANGE: changed skeleton tree filtering API to add args & removed bWillFilter bool. Change 3425488 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3425303 Change 3427886 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved physics sim options to viewport menu (so seleciton changing is not required to change them) Moved physics-related rendering options to show menu We no longer switch to sim options when nothing is selected. During simulation we now disable the details panel Constraint scaling now works correctly (rather than just scaling the screen size limit that axes only are rendered) Change 3428040 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Small fixes based on feedback: Exposed Mirror tool to menus Exposed constraint quick actions to menus Added edit condition to Position & Velocity strength for physical animation Fixed up some tooltips & display names Change 3428143 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Defaulted to constraints as points Change 3428216 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Request from Nick D: Update in-level primitive transforms immediately, rather than on mouse up. We only do this for non-convex primitives however, to avoid re-cooking meshes. Change 3430326 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaks to rendering of constraints and shapes to allow for better seleciton & interaction with editor widgets. Slightly increased point-constraint rendering size and added crosshair cursor to constraints Change 3430327 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed object-reuse issue in skeleton tree items with sanem names (use a GUID instead) Change 3430391 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed duplicate time dilation (can just use viewport menu!) Change 3430419 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup post-merge Prevent crash by attaching to root component in the correct place Add IWYU include for TArrayView Remove more unused code Change 3430443 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix constraint/body selection one final time Move constraint drawing to SDPG_World (apart from point mode) Remove depth offset in material Change 3430495 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Enabling/disabling collision between bodies is now clearer Menu items are now enabled and disabled correctly depending on collision state Tooltip reflects what actually gets done when the operation is enacted Also corrected a few functions that still reference constraint & body mode Change 3430553 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added enable/disable collision with all Change 3432386 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Color code graph items based on current profile Change 3432401 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Color code tree items too Change 3432418 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Bone selection & manipulation now possible - allows for pose setup before simulation Item expansion now expands leaf nodes when selecting - helps with constraint selection etc. Change 3432427 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix compile error Color code according to simulated/kinematic status Change 3432428 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen File i missed Change 3432540 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added physics asset factory so physics assets can be created form the "new asset" menu. Skeletal mesh is picked then a defualt asset is generated Change 3432556 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Improve interactions with bones & bodies Clear bone selection when selecting bodies/constraints Always hide gizmo in simulate Change 3432703 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused selection lock feature Fixed selection working incorrectly with details panel closed Change 3434710 on 2017/05/11 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selection improvements Multiselect in tree now only selects non-collapsed tree elements Selection API revamped in shared data, so multiselect of constraints can work correctly (they appear more than once in the tree, so the preivous single-point-of-access API was insufficent). Change 3489030 on 2017/06/14 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3488994 Change 3491459 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup post-merge issues Change 3491486 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Simulation now works in a simlar way to the level editor Only on 'simulate' button, which controls repeating the last simulation (be it selected or not). Options are on a dropdown. Change 3491529 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed selection color of wireframe drawing (this broke ages ago!) Fixed initialized environment color/intensity Change 3491537 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked materials so they dont repend on seperate translucency (which is optional, and disabled currently) Change 3491791 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix crash when simulating selected new bodies Make sure we recreate physics state appropriately (it used to be done on simulation start, so wasnt needed each time) Change 3494359 on 2017/06/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Select all is now a menu option Context menu pops when right-clicking nothing now too Menu no longer grows enormous when multiple types of objects are selected Change 3494373 on 2017/06/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Enlarged constraint rendering size Show constraints (rather than points) by default Change 3511708 on 2017/06/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics Assets now appear in the asset family shortcut bar Physics Assets now render thumbnails Skeleton tree can now work in 'picker' mode Constraints can now be created manually in the graph, tree and viewport Fixed double-click and mousewheel not working right sometimes Change 3513121 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed clicks incorrectly selecting bones in simulate mode Change 3513160 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics Asset config is now loaded/saved Fixed antoher corner case with viewport clicks in sim Change 3513540 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved body creation params over to a details panel & settings object Moved initial creation dialog over to use the new system too Change 3513591 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Renamed shapes and constraints in the tree view Change 3513752 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Constraints are now not filtered by default Change 3513797 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selecting constraints now shows them (and the bodies involved) in the graph Change 3513859 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed "Show Kinematic Bodies" We now always show kinematic status in simulate mode Change 3515732 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen PhAT rendering settings are now persisted across sessions. Access to sim/edit settings is now not gated on state of the editor. Sim/edit settings are always both available. Added editable opacity to collision rendering. Change 3515735 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen New materials with opacity parameter Change 3515757 on 2017/06/29 by thomas.sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Re-saved materials Change 3515759 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added ability to only show selected bodies as solid Change 3515812 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix focus 'F' shortcut sometimes not working Change 3515984 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix a bunch of selection issues with the graph not keeping in sync Change 3517456 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3516853 Change 3517514 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed disappearing convex meshes on simulate Also fixes crash in thumbnail rendering Change 3517556 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled selection on mesh. Fixes selection issues. Also made the hit proxy use a crosshair when over bodies, for easier selection Change 3517642 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added body/body collision buttons back to the main toolbar Fixed solid body drawing using the wrong material when no bodies are selected Change 3517828 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix delete shortcut not working when tree is focused Change 3517927 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Integrated per-bone primitive generation with the new tab method Removed context menu item for bones (fixes duplicate popup) Fixed undo/redo not working for regenerating all bodies Change 3519931 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled body regeneration when simulation is running Fixed up tab icons Change 3519978 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Preview mesh is now set like every other Persona editor (via toolbar picker of via preview scene settings) Animation picker removed from toolbar (we use the preview scene settings for this now) Fixed profiles tab icon Change 3519982 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Show attached assets in tree Change 3519995 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix broken multi-selection of bone proxies Change 3532799 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed code that prevented parts of the UI (like simulation) from working in PIE Removed graph overlays & added "PHYSICS" label Change 3532837 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed arrows from graph Fixed dragging off constraints/input pins/bodies in constraint-created graphs Constraint names now include both bodies Change 3532880 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Switched from colors to icons in the skeleton tree Removed bold fonts Change 3532907 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Layout fixes Added border around generate button in tools panel Removed skeleton tree header in contexts where it is not needed Change 3532932 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added slow task dialog for body generation Change 3532992 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged context menus to be not so huge Change 3533134 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged menus some more Change 3533135 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Colorized details customization of swing/twist items Change 3533174 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Auto-open assets when creating from skeletal mesh Tweaked tooltip on suggestion from Nick D Change 3535652 on 2017/07/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed mirroring changes not showing up straight away Change 3535731 on 2017/07/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved over to Persona-style floor adjustment Change 3539689 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked tooltips for filtering items Change 3539693 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added "deselect all" option (Esc) Change 3539731 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Graph selection tweaks Selected bodies in the viewport/tree are now also selected in the graph. Selection outline is now matched to the graph outline instead of using default outline. Pin allocation no longer happens twice Change 3539750 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Switched simulate shortcut to Alt+Enter Avoids conflict with clobal PIS/SIE shortcuts Change 3539933 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Minor body regeneration refactor Label for tools tab button is dynamic depending on selection context Generation setttings are now re-used by creation dialog too Added in per-bone and per-body regeneration menu items. Bone regeneration now deletes the old body(s) instead of aborting Change 3543884 on 2017/07/19 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Resetting animation to default now correctly applies the animation Change 3544101 on 2017/07/19 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up physics asset editor's use of debug skel mesh component This broke post-merge from Dev-AnimPhys. Kinda hacky, but we need to double-flip the buffers in this case as we want to force non-threaded work AND also wait on the physics tick group to complete (to blend in physics). This also requires making ShouldBlendPhysicsBones protected, otherwise the buffers are never flipped in the non=simulating case (before simulation is enabled in the physics asset editor). Change 3547893 on 2017/07/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved code to add/remove/assign/unassign profiles to details customization Also allowed dupication again (via the menu) Allows correct naming of new profiles as before (as this is handled in PostEdit) #jira UE-47448 - Deleting profiles in Physics Asset Editor does not update the current profile #jira UE-47514 - Unable to duplicate profiles in Physics Asset Editor #jira UE-47384 - New profiles in Physics Asset Editor are all named the same #jira UE-47375 - Physics Asset Editor 'None' current profile Delete option is available #jira UE-47378 - Current Profile name boxes in Physics Asset Editor are size limited and overlap buttons if too long #jira UE-47374 - Physics Asset Editor 'None' current profile text box is editable but doesn't save Change 3547925 on 2017/07/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevented ctrl+selection of constraints from re-selecting Avoided defered broadcast of seleciton event from the graph #jira UE-47515 - Ctrl + click and Shift + click does not remove constraints from skeleton tree in Physics Asset Editor Change 3550332 on 2017/07/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed bodies incorrectly simulating outside of 'simulate' mode Forced all bodies to be non-simulated when simulation is disabled. Also removed non-functioning motor menu options & disabled more menu options when simulating #jira UE-47579 - Entire mesh rotates uncontrollably after rotating a simulated body in Physics Asset Editor Change 3550355 on 2017/07/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash when failing to create a physics asset with multi convex hull #jira UE-47590 - Crash when New Physics Asset window is closed with no asset being created Change 3558007 on 2017/07/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed typo that disabled editability of profile names incorrectly #jira UE-47374 - Physics Asset Editor 'None' current profile text box is editable but doesn't save Change 3566157 on 2017/08/01 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash when opening a physics asset with a deleted preview skeletal mesh Now assigns default mesh as before If the mesh is then reset, the asset editor must be re-opened as the skeleton will have changed underneath it. #jira UE-47918 - Crash when opening certain Physics Assets Change 3568327 on 2017/08/02 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevent "set bodies below" from improperly enabling simulation on bodies #jira UE-47752 - Set all bodies below to simulated causes the viewport to simulate those bodies immediately in Physics Asset Editor Change 3570436 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics assets with simulated bodies no longer simulate when first opened #jira UE-48000 - Physics assets with simulated bodies begin simulating when first opened Change 3570470 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix excessive gravity crash when actors pop out of the world Also restrict gravity to non NaN-causing levels. #jira UE-48002 - Crash when mesh falls out of world due to high gravity simulation in Physics Asset Editor Change 3570717 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3570581 Change 3570781 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix merge issues Change 3587760 on 2017/08/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed delegate for skeleton tree context menu extension, now uses an empty section Change 3589915 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added comments to bone proxy & physics asset editor shared data Removed unused variables Change 3589976 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed constraint 'all positions' rendering Removed empty override of unregister tab spawners Change 3589983 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix crash when setting skeletal mesh Toast is not displayed when the skeleton is changed as well as the skeletal mesh. Toolkit was getting invalidated as setting the preview mesh to a different skeleton ends up restarting the sub-editor #jira UE-48196 - Crash when changing preview mesh of Physics Asset and applying Change 3589990 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics asset selection color now uses editor settings Change 3589994 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused functions Change 3589997 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Commented SetBodiesBelowPhysicsType as per code review Change 3590007 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled physical material menu in simulate Change 3590130 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused code Commented a few functions Re-instated preview mesh selection Removed delegate allowing viewport client class creation Change 3590154 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Remove unused code Change 3590197 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3589965 Change 3590250 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup merge errors Change 3596227 by Jonathan.Poncelet Fixed physics substepping interpolation using the wrong starting value. #jira UE-48150 Physics Substepping doesn't have the same effect from 4.15 to 4.16 Change 3596241 by Jonathan.Poncelet Fixed cloth not being drawn correctly in the editor, due to bounds not being computed accurately. #jira UE-48243 Clothing disappears during cloth paint mode once you navigate to a section far from the origin Change 3596247 by Thomas.Sarkanen Fixup CIS errors post PhAT Upgrade merge Change 3596250 by Thomas.Sarkanen More CIS fixes Change 3596255 by Benn.Gallagher Fixed compilation errors when nativizing animation blueprints that use subinstances #jira UE-46522 Change 3596256 by Benn.Gallagher Fixed orphaned sub anim instance pins hanging around #jira UE-46545 Change 3596257 by Benn.Gallagher Fixed skel surf particles being misplaced when clothing was active. And fixed particles spawning on disabled cloth proxy sections. #jira UE-48045 Change 3596258 by Benn.Gallagher Hide mass override when selecting skeletal meshes. Mass overrides are taken from physics asset and will be ignored on the component so it makes no sense to have this visible #jira UE-47755 Change 3596259 by Benn.Gallagher Fixed mismatch between paint values and view values for clothing tools #jira UE-48110 Change 3596260 by Benn.Gallagher Stopped property context menus killing the whole window stack when an item is clicked #jira UE-48158 Change 3596261 by Thomas.Sarkanen One last Mac CIS fix (hopefully) Change 3596308 by Benn.Gallagher Removed outdated references to APEX in clothing example map. Change 3596360 by Martin.Wilson Fixing inconsistent animation entries in blueprint context menu (displaying differently depending on whether the asset is loaded) + Cache correct tooltip when asset isn't loaded #jira UE-48452 Change 3596459 by Benn.Gallagher Fixed anim curves not correctly being updated to post process instances. Change made to curve update in Dev-General fixed main and sub instances but missed post process instances. #jira UE-47567 Change 3596967 by Aaron.McLeran Adding setting default reverb send level in audio settings. Change 3596974 by Ethan.Geller Merge in fix from Christopher Oliver Change 3597243 by Aaron.McLeran Checking in missing files. Change 3597686 by Ethan.Geller Fix warnings/errors from CL 3597452 Change 3597846 by Ethan.Geller Fix errors, take 2 Change 3598290 by Ethan.Geller Panning Angle Issue Change 3598412 by Ethan.Geller Change Core.h header to CoreMinimal.h, fix warnings Change 3599797 by Jurre.deBaare LODs from Merge Actor tool have bad normals #jira UE-47129 #fix normals weren't wrong but user was complaining about the lightmap resolution behaviour, so added a new feature that calculates the lightmap resolution according to: 1) Summing all lightmap pixel counts for each mesh component being merged 2) Calculating fitting texture dimension by taking square root of the total pixels Change 3599863 by Lina.Halper PR #3919: rename flag 'DEPERCATED_PHYSBLEND_UPDATES_PHYSX' to 'DEPRECATED_PHYSBLEND_UPDATES_PHYSX' to fix the typo (Contributed by aziot) Change 3599883 by Jurre.deBaare HLOD: update outliner tooltip when UE docs arrive #jira UE-20352 Change 3599944 by Martin.Wilson Smart name refactor - Remove guids entirely - Remove automatic fix up - Simplify smart name mapping container - Make animations deterministic for cooking #jira UEAP-264 Change 3600133 by Benn.Gallagher Fixed crash shutting down editor with active cloth paint tab, as mode manager was being used unsafely. #jira UE-48612 Change 3600166 by Benn.Gallagher Fixed cloth paint gradient allowing invalid values #jira UE-48114 Change 3600719 by Lina.Halper PR #3894: PlayMontage node bug Fix (Contributed by ArCorvus) Change 3601668 by Jurre.deBaare Improve BlendSpace preview pin dragging controls #fix Click and drag now also works for the preview pin which should allign it with other pins on the grid and makes the preview functionality more discoverable #misc Also added tooltips on the grid to make the functionality more discoverable #jira UE-43011 Change 3601669 by Jurre.deBaare No easy way to tell which Blend Sample in the blend graph matches up to which Blend Sample in the Asset Details panel #fix I've added the SampleIndex to the names to make it easier recognizing which one is which #jira UE-46892 Change 3601731 by Benn.Gallagher Fixed cloth paint falloff to actually calculate falloff, and take brush strength into account. #jira UE-48329 Change 3601897 by Lina.Halper fixing issue with sequencer reinitialization #jira: UE-48556 Change 3602339 by Benn.Gallagher Fixed comment/tooltip typo Change 3602502 by Benn.Gallagher Fixed clothing gradient tool renderer not showing selected points when camera was moving #jira UE-48331 Change 3602664 by Ethan.Geller Unshelved fixes from Dev-VR Change 3602726 by Lina.Halper Back out revision 3 from //UE4/Dev-AnimPhys/QAGame/QAGame.uproject #jira: UE-48700 Change 3603011 by Lina.Halper Fix build error Change 3604139 by Benn.Gallagher Restricted painter processing to no longer attempt painting while in simulation previews in cloth paint mode. #jira UE-47960 Change 3604284 by Benn.Gallagher Fixed crashes in physics asset editor and skeletal mesh editor when the preview scene clears out the preview mesh while clothing is running #jira UE-48687 Change 3604612 by Lina.Halper Fix curve issue from automation test - It was actual bug. Change 3604614 by Lina.Halper - Fix crash with macro anim notify - Make sure macro anim notify doesn't show up in the menu #jira: UE-45036 Change 3604725 by Lina.Halper fixed issue with opening state machine from anim graph #jira: UE-48726 Change 3604971 by Aaron.McLeran #jira UE-48738 Launching Oculus Rift without -VR plays audio in the oculus rift. Bringing fix from 4.17 to Dev-AnimPhys Change 3605787 by Aaron.McLeran Adding ability to pass in an optional owner in PlaySound2D and PlaySoundAtLocation BP calls - This is necessary in order to use the sound concurrency "limit by owner" feature Change 3606851 by Jurre.deBaare UE4Editor Static Analysis Win64 - Warning fix Change 3607022 by Lina.Halper Fix static analysis warning Change 3607229 by Jurre.deBaare RemoveAllCurveData should not allow removing data from the Skeleton #jira UE-48107 Change 3607660 by Martin.Wilson Live link client can run in cooked builds too #jira UEAP-306 Change 3607668 by Ethan.Geller #jira UE-48792 fix null dereference case in audiodevice.cpp Change 3607734 by Lina.Halper LOD linking to curve - consolidated to one param - curve eval option - for long time, looking at why morphtarget wasn't working on LOD 1, later realized it was due to simplified :( - fixed to make sure param to clear is always checking with default value - this is correct behavior and it's not too bad for perf because internally the default value is also in the TMap - flipped meaning to align with bAllowCurveEvaluation - also fixed issue with orion cooking - where transform curves are added as normal curves #jira: UE-37996, UE-48782 Change 3607859 by Martin.Wilson Missed files from live link editor checkin Change 3607958 by Martin.Wilson Redo Jurre's changes from CL 3607229 (were removed by CL 3607734) Change 3608566 by Ethan.Geller change include to avoid header conflicts on Linux Change 3609074 by Ethan.Geller Take 2: Fix capitalization on include, fix Linux build. Change 3610024 by Lina.Halper Fix issue with material editor crashing due to missing load module of AdvancedPreviewScene - we used to load advanced preview setting by persona module - this has been moved to persona tool kit, and now all other modules are crashing - If we want to do it for tool kit, we have to make sure all other editor's loading should change also. #jira: UE-48809 Change 3610081 by Jurre.deBaare Animations can't be set on blend samples from the dropdown #fix Skeleton asset registry tag now includes 'AssetTypeName' PathToAsset, so replacing compare with contains #jira UE-48746 Change 3610088 by Jurre.deBaare Editor crashes if you CtrlZ several times after adding animations to a 1D blendspace #fix removed the hacky OnObjectPropertyChanged and tied the refresh into propertyhandles instead #misc found out of sync widget values due to incorrect encapsulation inside of lambdas #jira UE-48741 Change 3610862 by Ethan.Geller Fix submix effects for situations where number of input channels does not equal output channels Change 3611346 by Aaron.McLeran Using audio thread platform affinity mask for audio render thread. Change 3613297 by Ethan.Geller Simple delay submix Change 3614435 by Martin.Wilson CIS fix Change 3614482 by Martin.Wilson Store root motion on anim instance instead of proxy to avoid thread safety stalls #jira UE-46896 Change 3614483 by Martin.Wilson Evaluate curves in anim offsets #jira UE-47119 Change 3614495 by Jurre.deBaare Reimport alembic file with new source option does not automatically tick any tracks #fix If no tracks are set to import, reset them all to do so (we're assuming here the user is importing something completely different, and we wouldn't want her to import an empty animation either) #jira UE-46141 Change 3614645 by Thomas.Sarkanen Fixed physics assets not simulating when BlockAll was globally overridden Persona viewport was overriding the collision profile back to BlockAll, which projects can override. Setting to the internal PhysicsActor profile prevents this, as it used to in PhAT #jira UE-48591 - Physics assets not simulating correctly in Orion Change 3614683 by Lina.Halper Fixed crash when modifying default physicsasset #jira: UE-48844 Change 3614721 by Jurre.deBaare Vertex painting on skeletal meshes bound by physics asset #fix Now try and find intersecting triangle if we do hit the mesh bounds, but not any physics bodies #jira UE-48004 Change 3614730 by Thomas.Sarkanen Fixed crash when regenerating multi convex hulls from zero-vert bones We handled this in the single convex hull case, but multi did not. #jira UE-48780 - Editor crashes if you regenerate a box body to a complex hull body Change 3614763 by Jurre.deBaare Moving over: HLOD crash when dragging and dropping actors into their own cluster in the HLOD outliner - ALODActor #jira UE-48249 #fix ensure that we nullptr check the static mesh as a LODActor can be reset to have a null static mesh Change 3615029 by Lina.Halper Fix issue with highlight #jira: UE-48855 Change 3617593 by Thomas.Sarkanen Fixed crash when regenerating large amounts of bodies We were overflowing the PhysX shape limit for aggregates - this refers to shapes, not bodies, it seems #jira UE-48606 - Crash when adding new multi convex hull body to bone on skeleton that already has multi convex hull bodies Change 3617609 by Jonathan.Poncelet Fixed crash that could occur when opening a physics asset and deleting bones. #jira UE-48971 Editor crashes if you clear a preview mesh on a physics asset and delete the bones when reopening it Change 3617723 by Thomas.Sarkanen Prevented actors & components of anim preview scenes (and the preview scenes themselves) from persisting after editors are shut down Fixed up 2 locations where the persona toolkit was being held onto by a strong ptr (cloth paint and new PhAT). This should stop the preview scene from persisting. Moved AddToRoot pattern used for anim preview scene to FGCObject #jira UE-47227 - [CrashReport] UE4Editor_Persona!TSharedPtr<IEditableSkeleton,0>::ToSharedRef() [sharedpointer.h:794] #jira UE-47717 - SkelMesh Editor creates preview World, but it never gets destroyed Change 3617818 by Benn.Gallagher Final v1 UX changes for clothing tool, and removed experimental flag Change 3617937 by Jurre.deBaare Default bounds for Alembic skel-mesh are too large #fix bounds was initialised to zero and +-ed which meant that it would always include (0,0,0) and enlarge the bounds #jira UE-47139 Change 3618187 by Ethan.Geller Implement Audiomixer in HTML5 Change 3618188 by Lina.Halper Fix issue with highlight in persona #jira: UE-49020 Change 3618229 by Lina.Halper Fix crash on exit when modify is causing it to serialize again in the middle of tear down #jira: UE-48025 Change 3618248 by Lina.Halper fix issue by workaround where clamp is not happening with allowspin is false #jira: UE-47001 Change 3618289 by Aaron.McLeran Removing audio format types we're not using for simplicity Change 3618291 by Martin.Wilson Fix duplicate of curve name appearing in list when renaming #jira UE-49041 Change 3618390 by Aaron.McLeran Removing a case for DTYPE_Xenon since this is never used. Change 3618425 by Martin.Wilson Keep notify UI up to data across multiple editors when adding notifies to an animation #jira UE-48104 Change 3619023 by Aaron.McLeran Removing DTYPE_Xenon from XAudio2Buffer.cpp since it's not used Change 3619129 by Aaron.McLeran Source bus feature. - New architectural feature for audio mixer that allows audio sources to route to other audio sources. - Buses can be routed to each other - Buses have a duration which can be set in bus asset - Buses can choose between mono and stereo channels - Sources can send to buses and also toggle to *only* output to buses (and bypass submixing) - Will allow persistent source effects on different source audio, while also maintaining 3d spatialization capabilities. Lots of future features will build on this change: 3d audio-volume-based submixing, sidechaining, environment reflections, diagetic microphones, etc. - Some engine changes and optimizations: - Format conversion to float is done in async workers for decode vs the render callback - Procedural sound waves can opt to output only float vs int16 PCM data (avoids a format conversion in audio mixer) - Apply master attenuation at the final output vs per-source - Fixed code that performs fade in/fade out for smooth startup and shutdown. - Moved FSourceParam to FParam into DSP utility so others can use it. - Some engine fixes: - Audio spat plugins that are external sends will not send audio to default/base submix. But will also allow their audio to be panned and sent to submix sends (e.g. reverb) so external HRTF rendering can also get reverb effects, etc. - Fixed an issue with pause - Fixed an issue with the final source buffer in a source voice not getting properly rendered and causing discontinuties - Fixed an issue with WorldID not getting set for listeners TODO: - fill out source bus details panel customization to hide USoundBase params which aren't relevant to source buses Change 3619159 by Ethan.Geller #jira UE-48950 fix steam audio crash on editor exit Change 3619555 by Jonathan.Poncelet Fixed constraint debug drawing arrows in the physics asset editor being too large. #jira UE-48863 Limited constraints and free constraints are much larger on screen Change 3619574 by Thomas.Sarkanen Fixed debug link for animation blueprints not persisting when changing preview mesh Anim instance is no longer re-created all the time when setting skeletal mesh, so we need to re-init the preview instance and re-set the linked skeletal mesh component manually when the mesh changes. #jira UE-46642 - Switching Preview mesh when you've selected an AnimBP breaks the link between the AnimBP and PIE session Change 3619586 by Thomas.Sarkanen Fixed physics asset shortcut not working correctly in certain circumstances FBox was using uninitialized memory #jira UE-49034 - Pressing F to focus on a physics body focuses on the area in between the root and the physics body and not the selected body Change 3619640 by Thomas.Sarkanen Assets with no preview mesh now no longer allow access to other skeleton's physics assets in their shortcut bars Unified the skeleton/mesh search code between FPersonaAssetFamily and FPersonaToolkit, so they bot *look* for a compatible skeletal mesh if one was not found on the asset (but still dont set it automatically). #jira UE-49038 - If you open a skeleton or an animation it won't open persona with the correct physics asset in the quick switch bar Change 3619644 by James.Golding Change FBodyInstance::InstanceBodyIndex back to int32 (need to support ISMC with many instances) #jira UE-47652 Change 3619654 by Martin.Wilson Fix removing a curve when it isn't used on any animations #jira UE-49048 Change 3619771 by Thomas.Sarkanen Make sure the physics asset editor floor has collision, regardless of what BlockAll does #jira UE-49088 - PhysicsAsset Editor Floor should not depend on BlockAll config Change 3619803 by Jonathan.Poncelet Fixed localization warnings caused by duplicate keys. #jira UE-48580 //UE4/Main: Step "Build Engine Localization" has completed with 4 Warnings Change 3619813 by Jurre.deBaare Baked bones using a pose animation are rotated in the wrong direction #fix root bone transform wasn't being taken into account while generating final bone transforms #misc added debug logging for future work #jira UE-47362 Change 3619830 by Jurre.deBaare Biased Texture Size option is not functioning when Merging Actors #fix Fixed up material baking setup after refactoring, now sets correct texture sizes again according to texture sizing type, this will be removed in the long term anyhow #misc Found a bug in material rendering if previous render size < current render size it would not set the viewport size/projection matrix correctly which broke the material bake #jira UE-48108 Change 3619859 by Thomas.Sarkanen Fixed HLOD selection sphere persisting on undo/redo Removed HLOD selection actors when the outliner is refreshed #jira UE-47032 - HLOD Cluster radius sphere remains in level if you move an actor in a cluster and then undo the movement. Change 3619871 by Martin.Wilson Calculate root motion over the correct segment times, not the track times #jira UE-43719 Change 3619898 by Thomas.Sarkanen Improve UI feedback around bounds/in-game bounds in animation editor viewports Tooltip for in-game bounds is now more detailed In-game bounds cannot be selected if bounds is not also selected #jira UE-47958 - Bound vs In-game Bound in Viewport Show menu in Physics Asset Editor is confusing Change 3619908 by Thomas.Sarkanen Fixed tooltip for PhysicsType #jira UE-48421 - Incorrect tooltip for Physics Type Change 3620014 by Jurre.deBaare Only the first mesh bake material property in the array can be set to diffuse, diffuse cannot be selected on the other array elements #fix Changed the way the restriction is setup and retrieve the UMaterialOptions from the details view instead of GetDefault<> #misc Also added more delegates to ensure the restriction is up to date #jira UE-46980 Change 3620104 by Jurre.deBaare HLOD doesn't support renaming in levels #fix ensure that during renaming of UWorld we also rename the HLOD assets into their respective new HLOD package outer #jira UE-48072 Change 3620151 by Thomas.Sarkanen Undo/redo now correctly affects animation preview scene settings Preview scene desc is now transactional & state is correctly set up on undo/redo according to the current preview scene desc #jira UE-47816 - Undoing setting the animation mode to Refrence pose doesn't update the UI Change 3620152 by Thomas.Sarkanen Exposed LOD menu in PhAT This allows auto LOD to be optionaly selected. It was hidden and we forced to LOD 0 before. We still default to forcing LOD 0 to preserve the old behavior. #jira UE-47970 - LODs not working in Physics Asset Editor Change 3620177 by Benn.Gallagher PR #3696: Fix for USkinnedMeshComponent::GetCPUSkinnedVertices() (Contributed by Koderz) Change 3620250 by Jurre.deBaare HLOD assets left in HLOD folder when clusters are deleted #fix some added lifetime management for HLOD assets, keeping list of 'stale' HLOD assets which if not Undo-ed will either be deleted when LODActor is saved, or marked PendingKill when LODActor is destroyed #jira UE-47450 Change 3620273 by James.Golding PR #3908: Removing duplicated forward declation (Contributed by celsodantas) #jira UE-48530 Change 3620274 by James.Golding PR #3909: Removing unnecessary conditional (Contributed by celsodantas) #jira UE-48531 Change 3620275 by James.Golding Add icon for destruction plugin Change 3620401 by Ethan.Geller #jira UE-47684 Remove SDL dependencies from Win64 Change 3620586 by Jurre.deBaare Linux CIS fix Change 3620660 by Martin.Wilson Fixes for state machines getting reinitialized in situations that users don't want them to. -Added option to state machine to allow it to skip reinitialization when it becomes relevant -Added option to slot nodes to keep source pose relevant while montage slot is playing. #jira UE-43578 Change 3620665 by Aaron.McLeran Making source buses only show relevant source bus data. - hiding sound wave categories that aren't relevant to source buses Change 3621087 by Ethan.Geller #jira UE-49000 implement device change listener to ensure we are properly handling when audio is disabled. Change 3621144 by Aaron.McLeran #jira UE-49147 #jira UE-49145 Fixing concurrency and volume stats Change 3621148 by Aaron.McLeran Fixing typo Change 3621180 by Ethan.Geller #jira UE-49151 Fix for browser preview on bus only sounds Change 3621421 by Ethan.Geller #jira UE-49165 Fix real time audio slider. Change 3621604 by Ethan.Geller #jira UE-44847 fix iOS panning algorithm on non-audio mixer Change 3621626 by Lina.Halper Fix issue with anim montage displaying when selecting animation #jira: UE-48749 Change 3621813 by Thomas.Sarkanen Fixing undo/redo of bone modifications in Physics Asset Editor (and others) Bone proxy objects now get recycled (instead of the pool constantly growing) as their names are stable and unique. Fixed broken skeleton tree RTTI (so selection persistance now works correctly on undo/redo again) We no longer force a re-selection on phyiscs asset changes (the tree takes care of that anyway). #jira UE-47862 - Undoing Bone transformations in Physics Asset Editor does not work Change 3621831 by Jurre.deBaare Crash fix for Material baking when trying to analyse a MP_MAX material property #jira UE-49172 Change 3621936 by Thomas.Sarkanen Fixed CIS error from merge Change 3621937 by Thomas.Sarkanen Fix merge issue with API change in USynthComponent Change 3622173 by Thomas.Sarkanen Fixed ortho viewports being bright white in sub-editors Preview scenes in general are responsible by default for the background color. Advanced preview scenes now use background color from settings. Previously only te animation editors did this. #jira UE-48841 - The background of the orthographic viewports is bright white Change 3622730 by Ethan.Geller #jira UE-49182 UE-49198 UE-49201 Fix for channel mismatch in procedural sound waves, remove singleton behavior for MMNotificationClient. CL by Aaron.McLeran Change 3622759 by Ethan.Geller #jira 49170 reduce static analysis warnings for audiodevice.cpp Change 3622901 by Benn.Gallagher Bumped PhysX DDC key after change in Orion caused verify failures Change 3623458 by Aaron.McLeran #jira UE-49204 Delores monologue cut short in Odin elevator Change 3623667 by Aaron.McLeran #jira UE-49204 UE-49243 Delores monologue cut short in Odin elevator Change 3623752 by Aaron.McLeran #jira UE-49247 Sound Source Bus Properties Are Inappropriate Fixing issues with new source bus uobject so properties show up appropriately. Change 3624058 by Ben.Marsh Fix stale module being enumerated when running UE4Editor-Cmd.exe, causing warning when running incremental automated tests. Module and version manifest filenames are derived from the executable filename, so when running the executable compiled for the console subsystem, we need to strip the -Cmd suffix from the executable name to find the correct path. Change 3624193 by Ethan.Geller #jira UE-49170 Static analysis fix, take 2 Change 3354003 by Thomas.Sarkanen Back out changelist 3353914 Change 3355932 by Thomas.Sarkanen Back out changelist 3354003 Reinstating merge from Main: Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3353839 Change 3477632 by Jurre.deBaare Automated test content and ground truths for Actor Merging and Material baking functionality Change 3491464 by Jurre.deBaare Updated automation content for MergeActor behaviour Change 3587878 by Thomas.Sarkanen Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3587489 Change 3597452 by Ethan.Geller #jira UEAP-304, UEAP-280, UEAP-281: Major structural refactor of Audio Plugin interfaces, Oculus Audio plugin, Steam Audio Plugin. Introduction of Sony Audio3D plugin. Change 3602935 by Lina.Halper Allow curve evaluation to be controlled by users #jira: UE-46446 Change 3606120 by Ethan.Geller Move Tap Delay Submix to Synthesis library, modify tap delay API Change 3621830 by Thomas.Sarkanen Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3621691 Change 3622807 by Ethan.Geller #jira UE-49201 Fixing volume issues Issue is that these platforms weren't using the proper public function and an audio mixer refactor changed how volume is calculated to seperate out distance attenuation vs other volume gains. [CL 3624383 by Thomas Sarkanen in Main branch]
2017-09-04 04:17:46 -04:00
#include "Kismet2/KismetEditorUtilities.h"
#include "AnimBlueprintCompiler.h"
#include "AnimStateNode.h"
#include "AnimStateTransitionNode.h"
#include "AnimGraphNode_TransitionResult.h"
#include "AnimGraphNode_StateResult.h"
#include "AnimStateEntryNode.h"
#include "AnimationStateGraph.h"
#include "AnimationTransitionGraph.h"
#include "AnimationCustomTransitionGraph.h"
#include "AnimGraphNode_SequencePlayer.h"
#include "AnimStateConduitNode.h"
#include "AnimGraphNode_LinkedAnimGraphBase.h"
#include "AnimGraphNode_RandomPlayer.h"
#include "AnimGraphNode_TransitionPoseEvaluator.h"
#include "AnimGraphNode_CustomTransitionResult.h"
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
#include "AnimBlueprintExtension_StateMachine.h"
#include "IAnimBlueprintGeneratedClassCompiledData.h"
#include "IAnimBlueprintCompilationContext.h"
#include "Animation/AnimNode_Inertialization.h"
#include "AnimStateAliasNode.h"
/////////////////////////////////////////////////////
// FAnimStateMachineNodeNameValidator
class FAnimStateMachineNodeNameValidator : public FStringSetNameValidator
{
public:
FAnimStateMachineNodeNameValidator(const UAnimGraphNode_StateMachineBase* InStateMachineNode)
: FStringSetNameValidator(FString())
{
TArray<UAnimGraphNode_StateMachineBase*> Nodes;
UAnimationGraph* StateMachine = CastChecked<UAnimationGraph>(InStateMachineNode->GetOuter());
StateMachine->GetNodesOfClassEx<UAnimGraphNode_StateMachine, UAnimGraphNode_StateMachineBase>(Nodes);
for (auto Node : Nodes)
{
if (Node != InStateMachineNode)
{
Names.Add(Node->GetStateMachineName());
}
}
// Include the name of animation layers
UBlueprint* Blueprint = FBlueprintEditorUtils::FindBlueprintForGraphChecked(StateMachine);
if (Blueprint)
{
UClass* TargetClass = *Blueprint->SkeletonGeneratedClass;
if (TargetClass)
{
IAnimClassInterface* AnimClassInterface = IAnimClassInterface::GetFromClass(TargetClass);
for (const FAnimBlueprintFunction& AnimBlueprintFunction : AnimClassInterface->GetAnimBlueprintFunctions())
{
if (AnimBlueprintFunction.Name != UEdGraphSchema_K2::GN_AnimGraph)
{
Names.Add(AnimBlueprintFunction.Name.ToString());
}
}
}
}
}
};
/////////////////////////////////////////////////////
// UAnimGraphNode_StateMachineBase
#define LOCTEXT_NAMESPACE "A3Nodes"
UAnimGraphNode_StateMachineBase::UAnimGraphNode_StateMachineBase(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
FLinearColor UAnimGraphNode_StateMachineBase::GetNodeTitleColor() const
{
return FLinearColor(0.8f, 0.8f, 0.8f);
}
FText UAnimGraphNode_StateMachineBase::GetTooltipText() const
{
return LOCTEXT("StateMachineTooltip", "Animation State Machine");
}
FText UAnimGraphNode_StateMachineBase::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
if ((TitleType == ENodeTitleType::MenuTitle || TitleType == ENodeTitleType::ListView) && (EditorStateMachineGraph == nullptr))
{
return LOCTEXT("AddNewStateMachine", "State Machine");
}
else if (EditorStateMachineGraph == nullptr)
{
if (TitleType == ENodeTitleType::FullTitle)
{
return LOCTEXT("NullStateMachineFullTitle", "Error: No Graph\nState Machine");
}
else
{
return LOCTEXT("ErrorNoGraph", "Error: No Graph");
}
}
else if (TitleType == ENodeTitleType::FullTitle)
{
if (CachedFullTitle.IsOutOfDate(this))
{
FFormatNamedArguments Args;
Args.Add(TEXT("Title"), FText::FromName(EditorStateMachineGraph->GetFName()));
// FText::Format() is slow, so we cache this to save on performance
CachedFullTitle.SetCachedText(FText::Format(LOCTEXT("StateMachineFullTitle", "{Title}\nState Machine"), Args), this);
}
return CachedFullTitle;
}
return FText::FromName(EditorStateMachineGraph->GetFName());
}
FText UAnimGraphNode_StateMachineBase::GetMenuCategory() const
{
return LOCTEXT("StateMachineCategory", "Animation|State Machines");
}
void UAnimGraphNode_StateMachineBase::PostPlacedNewNode()
{
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
Super::PostPlacedNewNode();
// Create a new animation graph
check(EditorStateMachineGraph == NULL);
EditorStateMachineGraph = CastChecked<UAnimationStateMachineGraph>(FBlueprintEditorUtils::CreateNewGraph(this, NAME_None, UAnimationStateMachineGraph::StaticClass(), UAnimationStateMachineSchema::StaticClass()));
check(EditorStateMachineGraph);
EditorStateMachineGraph->OwnerAnimGraphNode = this;
// Find an interesting name
TSharedPtr<INameValidatorInterface> NameValidator = FNameValidatorFactory::MakeValidator(this);
FBlueprintEditorUtils::RenameGraphWithSuggestion(EditorStateMachineGraph, NameValidator, TEXT("New State Machine"));
// Initialize the anim graph
const UEdGraphSchema* Schema = EditorStateMachineGraph->GetSchema();
Schema->CreateDefaultNodesForGraph(*EditorStateMachineGraph);
// Add the new graph as a child of our parent graph
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2868852 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2821607 on 2016/01/08 by Mieszko.Zielinski Added a way to limit amount of information logged by vlog by discarding logs from classes from outside of class whitelist #UE4 This feature was followed by refactoring of functions taking FVisualLogEntry pointers to use references instead. #rb Lukasz.Furman #codereview John.Abercrombie Change 2828384 on 2016/01/14 by Mieszko.Zielinski Back out of visual log refactor done as part of CL#2821607 #UE4 Change 2855722 on 2016/02/04 by Zak.Middleton #ue4 - Expose PrimitiveComponent GetCollisionEnabled(), IsCollisionEnabled(), IsQueryCollisionEnabled(), IsPhysicsCollisionEnabled() functions to blueprints. #rb Daniel.Broder, Ori.Cohen #codereview Bob.Tellez #jira UE-26411 Change 2855737 on 2016/02/04 by James.Golding Add test AssetUserData C++ class to QAGame Change 2855739 on 2016/02/04 by James.Golding PR #1858 : Add abstract and editinlinenew to AssetUserData class, so derived classes can be added to assets via details panel https://github.com/EpicGames/UnrealEngine/pull/1858 #github 1858 #jira UE-24494 #rb thomas.sarkanen Change 2855842 on 2016/02/04 by James.Golding UE-23968 : Add clamping to Friction, Restitution, Density and RaiseMassToPower properties of PhysicalMaterial #codereview ori.cohen #rb thomas.sarkanen Change 2855843 on 2016/02/04 by James.Golding PR #1984 : Add 'AssetUserData' support to AnimationAsset/Texture https://github.com/EpicGames/UnrealEngine/pull/1984 #github 1984 #jira UE-25913 #rb thomas.sarkanen Change 2855844 on 2016/02/04 by James.Golding UE-23176 Fix incorrect clamping in GenerateKDopAsSimpleCollision() which could cause degenerate hulls Also don't 'nudge' kdops if there are other primitives present, will offset from mesh we were fitting around #rb thomas.sarkanen Change 2855850 on 2016/02/04 by Benn.Gallagher Update required LOD bones when associating a cloth chunk that uses bones that aren't weighted to that LOD #rb Martin.Wilson Change 2856409 on 2016/02/04 by Zak.Middleton #ue4 - Change LogSpawn warnings to normal logs for cases that are common and valid during gameplay (failed due to collision at the target location, or failed because it is destroyed in the process of spawning, ie projectile spawned in a target). #codereview Jeff.Farris Change 2857018 on 2016/02/05 by Benn.Gallagher Fixes for various anim graph related subgraph issues/crashes #rb Ben.Cosh Change 2857193 on 2016/02/05 by Lukasz.Furman extended crowd agent interface to handle avoidance groups #ue4 UE-24823 #1896 Change 2857200 on 2016/02/05 by Lukasz.Furman fixed memory leak in CrowdManager #ue UE-26516 #2026 #codereview Mieszko.Zielinski Change 2857417 on 2016/02/05 by Lina.Halper Add keyword for animation functions Change 2858854 on 2016/02/08 by Benn.Gallagher Fixed pose evaluator customizations being processed at the wrong time which caused properties to always be re-added even if removed from the details panel, causing duplicated entries. #jira UE-8421 #rb Lina.Halper Change 2858855 on 2016/02/08 by Benn.Gallagher Fixed blendspace players only reporting normalized time when using a time getter in an anim graph transition. #rb Lina.Halper Change 2859159 on 2016/02/08 by Aaron.McLeran UE-25586 Fix for reporting audio memory usage - Realtime decompressed sounds that have CachedRealtimeFirstBuffers need to report the compressed asset size Change 2859192 on 2016/02/08 by Laurent.Delayen Removed check disallowing cooked additive animations from using AnimationRelative and AnimationScale retargeting modes (on the root bone or editor). Skip AnimationRelative retargeting for baked additive animations since it gets cancelled out during the additive creation process. #rb martin.wilson #codereview lina.halper Change 2859238 on 2016/02/08 by Lina.Halper Git pull request #1895 Change 2859239 on 2016/02/08 by Lina.Halper Git pull request #1813 Change 2859453 on 2016/02/08 by Aaron.McLeran [CL 2868856 by Marc Audy in Main branch]
2016-02-16 13:35:21 -05:00
UEdGraph* ParentGraph = GetGraph();
if(ParentGraph->SubGraphs.Find(EditorStateMachineGraph) == INDEX_NONE)
{
ParentGraph->Modify();
ParentGraph->SubGraphs.Add(EditorStateMachineGraph);
}
}
UObject* UAnimGraphNode_StateMachineBase::GetJumpTargetForDoubleClick() const
{
// Open the state machine graph
return EditorStateMachineGraph;
}
Copying //UE4/Dev-AnimPhys to //UE4/Dev-Main (Source: //UE4/Dev-AnimPhys @ 3624379) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 3536809 by Ben.Marsh Fixing case of files in "iOS" directory, pt 1. Change 3536814 by Ben.Marsh Fixing case of files in "iOS" directory, pt 2. Change 3596207 by Thomas.Sarkanen Copying //Tasks/UE4/Dev-UEAP-29-PhATUpgrade to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3590250 PhAT Upgrade #jira UEAP-29 - New PhysicsAsset editor Changelists from task stream: Change 3380649 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Initial pass at allowing viewports to be extended more easily, still plenty TOD, but just unearthing this old shelf and getting it working. This gets the Persona skeleton tree and viewport into PhAT, without any PhAT functionality added. Change 3380685 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Renaming PhAT files to PhysicsAssetEditor Change 3380749 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rename PhAT -> PhysicsAssetEditor Change 3380832 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up PhAT to Physics Asset Editor Change 3380884 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Reverted some over-zealous renaming Change 3380970 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked ISkeletonTreeBuilder interface to make way for actually making a derived class of it Added the ability to hide filter menus to skeleton tree Change 3381017 on 2017/04/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added new physics asset skeleton tree builder Change 3384407 on 2017/04/07 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Skeleton tree extensions to support physics assets Only started this work - still much to do Change 3384460 on 2017/04/07 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged persona viewport menus Change 3392222 on 2017/04/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed body/constraint modes. Added graph editor Added edit mode - moved viewport client code over Got PhAT skel mesh rendering in viewport Change 3392268 on 2017/04/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Increased hit proxy priority to improve selection Change 3401648 on 2017/04/20 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Skeleton tree gets bodies & shapes back. Selection works in graph, now displaying the correct constraint in the detials panel. Still need to add selection from viewport. Added multi-select to bone proxy customization Re-tweaked editor layout Change 3403701 on 2017/04/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selection sync work. Customization of anim viewport menus. Context menus for physics asset items, as well as masking of various context menu items via settings. Change 3405246 on 2017/04/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Started more work on viewport menu extensions, but need to refactor the toolbar system to use actual multiboxes. Up next! Change 3405274 on 2017/04/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen More viewport menu fixups (plus deleting duplicate functionality). Change 3409155 on 2017/04/26 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Got simulation working again - as we switched to the debug skel mesh comp, the normal tick path didnt work for post-blend physics (it tried to flip the buffer too early). Also tweaked debug skel mesh comp root motion consumption code to not reset transfor every frame if we are not using root motion. Cleaned up unused files & code Change 3410814 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Allow extensibility of viewport menu bars Slate changes: Allow menu bars to optionally specify an icon to use. This is intended to allow us to move viewport tool/menu bars over to use multibox, with all the attendant features and extension points. Allow menu bars to optionally invert-on-hover. Allow styling of menus to affect closed appearance of menu header. Previously only NoBorder was used. Adjusted core styling of menu bar elements. Other changes: Adjusted padding for various UI elements to preserve previoud behavior. Adjusted SAnimViewportToolbar to use the new menu bar builder. Exposed SEditorViewportViewMenu so that it can be used in a standard menu bar. Change 3410816 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added extension point to viewport menu bar Change 3410818 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Getting sim working again Moved over to using preview instance so we share functionality with Persona editors. Added time dilation options to persona preview scene. Removed PhAT specific recording functionality (it is in the viewport now). Change 3410840 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Recreate physics state on edit, not sim start This allows velocity to be inherited when simulation is started Change 3410863 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moving viewport to continually-invalidated one like animation editors Fixed crash in non-extended viewport toolbars Change 3410936 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Bodies start off non-expanded Selection now synced between viewport and graph Constraint selection in graph not works on the first try Change 3410943 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added missing icon Change 3410966 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed shape listing from graph nodes Change 3411013 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Double click on body node recenters graph Fixed graph disappearing on right-click Change 3411111 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevented cursor getting swallowed in sim mode Change 3411126 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed overlapping text Change 3411213 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Node layout now takes dimensions into account Change 3411320 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash opening Persona editors Renamed file Change 3411327 on 2017/04/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaks to profiles menu Change 3420822 on 2017/05/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Profiles can now be edited in their own details panel Existing customizations folded into the new panel Tweaks to toolbar Added the ability for the persona details panel to have extra top/bottom content added Change 3420832 on 2017/05/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Add profile control to context menus Also delete old unused code Change 3422651 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Toolbar trimmed down & re-ordered Body/constraint ops moved to context menus Apply physmat now a context-menu option with an asset picker Change 3422654 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed extra warning dialog when auto-creating bodies Changed title of new asset dialog to "auto-create bodies" Change 3422680 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix "simulate selected" As we dont re-init the physics state each time we start simulating, our tweaked physics type was never applied. We now manually do this in the editor. Change 3422937 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Replaced EKCollisionPrimitiveType with EAggCollisionShape::Type Fixed up selection so body selection works & tree seleciton is properly synced with viewport Added recursion guard to selection delegate handlers. Removed vestigial instance property editing support (no longer needed). Removed unused old tree support code Change 3423034 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added constraints to tree Change 3423318 on 2017/05/04 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix bone proxiies stopping updating after initial viewport selection Change 3424993 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up selection issues when creating new bodies Added constraint context menu Change 3424998 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved icons to central location Change 3425445 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Customized filtering of the skeleton tree Hide constraints by defualt Added option to hide parents when filtering (so the vertical space is nto wasted, but some idea of hierarchy is preserved). BREAKING CHANGE: changed skeleton tree filtering API to add args & removed bWillFilter bool. Change 3425488 on 2017/05/05 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3425303 Change 3427886 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved physics sim options to viewport menu (so seleciton changing is not required to change them) Moved physics-related rendering options to show menu We no longer switch to sim options when nothing is selected. During simulation we now disable the details panel Constraint scaling now works correctly (rather than just scaling the screen size limit that axes only are rendered) Change 3428040 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Small fixes based on feedback: Exposed Mirror tool to menus Exposed constraint quick actions to menus Added edit condition to Position & Velocity strength for physical animation Fixed up some tooltips & display names Change 3428143 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Defaulted to constraints as points Change 3428216 on 2017/05/08 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Request from Nick D: Update in-level primitive transforms immediately, rather than on mouse up. We only do this for non-convex primitives however, to avoid re-cooking meshes. Change 3430326 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaks to rendering of constraints and shapes to allow for better seleciton & interaction with editor widgets. Slightly increased point-constraint rendering size and added crosshair cursor to constraints Change 3430327 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed object-reuse issue in skeleton tree items with sanem names (use a GUID instead) Change 3430391 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed duplicate time dilation (can just use viewport menu!) Change 3430419 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup post-merge Prevent crash by attaching to root component in the correct place Add IWYU include for TArrayView Remove more unused code Change 3430443 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix constraint/body selection one final time Move constraint drawing to SDPG_World (apart from point mode) Remove depth offset in material Change 3430495 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Enabling/disabling collision between bodies is now clearer Menu items are now enabled and disabled correctly depending on collision state Tooltip reflects what actually gets done when the operation is enacted Also corrected a few functions that still reference constraint & body mode Change 3430553 on 2017/05/09 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added enable/disable collision with all Change 3432386 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Color code graph items based on current profile Change 3432401 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Color code tree items too Change 3432418 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Bone selection & manipulation now possible - allows for pose setup before simulation Item expansion now expands leaf nodes when selecting - helps with constraint selection etc. Change 3432427 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix compile error Color code according to simulated/kinematic status Change 3432428 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen File i missed Change 3432540 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added physics asset factory so physics assets can be created form the "new asset" menu. Skeletal mesh is picked then a defualt asset is generated Change 3432556 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Improve interactions with bones & bodies Clear bone selection when selecting bodies/constraints Always hide gizmo in simulate Change 3432703 on 2017/05/10 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused selection lock feature Fixed selection working incorrectly with details panel closed Change 3434710 on 2017/05/11 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selection improvements Multiselect in tree now only selects non-collapsed tree elements Selection API revamped in shared data, so multiselect of constraints can work correctly (they appear more than once in the tree, so the preivous single-point-of-access API was insufficent). Change 3489030 on 2017/06/14 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3488994 Change 3491459 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup post-merge issues Change 3491486 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Simulation now works in a simlar way to the level editor Only on 'simulate' button, which controls repeating the last simulation (be it selected or not). Options are on a dropdown. Change 3491529 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed selection color of wireframe drawing (this broke ages ago!) Fixed initialized environment color/intensity Change 3491537 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked materials so they dont repend on seperate translucency (which is optional, and disabled currently) Change 3491791 on 2017/06/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix crash when simulating selected new bodies Make sure we recreate physics state appropriately (it used to be done on simulation start, so wasnt needed each time) Change 3494359 on 2017/06/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Select all is now a menu option Context menu pops when right-clicking nothing now too Menu no longer grows enormous when multiple types of objects are selected Change 3494373 on 2017/06/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Enlarged constraint rendering size Show constraints (rather than points) by default Change 3511708 on 2017/06/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics Assets now appear in the asset family shortcut bar Physics Assets now render thumbnails Skeleton tree can now work in 'picker' mode Constraints can now be created manually in the graph, tree and viewport Fixed double-click and mousewheel not working right sometimes Change 3513121 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed clicks incorrectly selecting bones in simulate mode Change 3513160 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics Asset config is now loaded/saved Fixed antoher corner case with viewport clicks in sim Change 3513540 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved body creation params over to a details panel & settings object Moved initial creation dialog over to use the new system too Change 3513591 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Renamed shapes and constraints in the tree view Change 3513752 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Constraints are now not filtered by default Change 3513797 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Selecting constraints now shows them (and the bodies involved) in the graph Change 3513859 on 2017/06/28 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed "Show Kinematic Bodies" We now always show kinematic status in simulate mode Change 3515732 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen PhAT rendering settings are now persisted across sessions. Access to sim/edit settings is now not gated on state of the editor. Sim/edit settings are always both available. Added editable opacity to collision rendering. Change 3515735 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen New materials with opacity parameter Change 3515757 on 2017/06/29 by thomas.sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Re-saved materials Change 3515759 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added ability to only show selected bodies as solid Change 3515812 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix focus 'F' shortcut sometimes not working Change 3515984 on 2017/06/29 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix a bunch of selection issues with the graph not keeping in sync Change 3517456 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3516853 Change 3517514 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed disappearing convex meshes on simulate Also fixes crash in thumbnail rendering Change 3517556 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled selection on mesh. Fixes selection issues. Also made the hit proxy use a crosshair when over bodies, for easier selection Change 3517642 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added body/body collision buttons back to the main toolbar Fixed solid body drawing using the wrong material when no bodies are selected Change 3517828 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix delete shortcut not working when tree is focused Change 3517927 on 2017/06/30 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Integrated per-bone primitive generation with the new tab method Removed context menu item for bones (fixes duplicate popup) Fixed undo/redo not working for regenerating all bodies Change 3519931 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled body regeneration when simulation is running Fixed up tab icons Change 3519978 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Preview mesh is now set like every other Persona editor (via toolbar picker of via preview scene settings) Animation picker removed from toolbar (we use the preview scene settings for this now) Fixed profiles tab icon Change 3519982 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Show attached assets in tree Change 3519995 on 2017/07/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix broken multi-selection of bone proxies Change 3532799 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed code that prevented parts of the UI (like simulation) from working in PIE Removed graph overlays & added "PHYSICS" label Change 3532837 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed arrows from graph Fixed dragging off constraints/input pins/bodies in constraint-created graphs Constraint names now include both bodies Change 3532880 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Switched from colors to icons in the skeleton tree Removed bold fonts Change 3532907 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Layout fixes Added border around generate button in tools panel Removed skeleton tree header in contexts where it is not needed Change 3532932 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added slow task dialog for body generation Change 3532992 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged context menus to be not so huge Change 3533134 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Rearranged menus some more Change 3533135 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Colorized details customization of swing/twist items Change 3533174 on 2017/07/12 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Auto-open assets when creating from skeletal mesh Tweaked tooltip on suggestion from Nick D Change 3535652 on 2017/07/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed mirroring changes not showing up straight away Change 3535731 on 2017/07/13 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved over to Persona-style floor adjustment Change 3539689 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Tweaked tooltips for filtering items Change 3539693 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added "deselect all" option (Esc) Change 3539731 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Graph selection tweaks Selected bodies in the viewport/tree are now also selected in the graph. Selection outline is now matched to the graph outline instead of using default outline. Pin allocation no longer happens twice Change 3539750 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Switched simulate shortcut to Alt+Enter Avoids conflict with clobal PIS/SIE shortcuts Change 3539933 on 2017/07/17 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Minor body regeneration refactor Label for tools tab button is dynamic depending on selection context Generation setttings are now re-used by creation dialog too Added in per-bone and per-body regeneration menu items. Bone regeneration now deletes the old body(s) instead of aborting Change 3543884 on 2017/07/19 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Resetting animation to default now correctly applies the animation Change 3544101 on 2017/07/19 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed up physics asset editor's use of debug skel mesh component This broke post-merge from Dev-AnimPhys. Kinda hacky, but we need to double-flip the buffers in this case as we want to force non-threaded work AND also wait on the physics tick group to complete (to blend in physics). This also requires making ShouldBlendPhysicsBones protected, otherwise the buffers are never flipped in the non=simulating case (before simulation is enabled in the physics asset editor). Change 3547893 on 2017/07/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Moved code to add/remove/assign/unassign profiles to details customization Also allowed dupication again (via the menu) Allows correct naming of new profiles as before (as this is handled in PostEdit) #jira UE-47448 - Deleting profiles in Physics Asset Editor does not update the current profile #jira UE-47514 - Unable to duplicate profiles in Physics Asset Editor #jira UE-47384 - New profiles in Physics Asset Editor are all named the same #jira UE-47375 - Physics Asset Editor 'None' current profile Delete option is available #jira UE-47378 - Current Profile name boxes in Physics Asset Editor are size limited and overlap buttons if too long #jira UE-47374 - Physics Asset Editor 'None' current profile text box is editable but doesn't save Change 3547925 on 2017/07/21 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevented ctrl+selection of constraints from re-selecting Avoided defered broadcast of seleciton event from the graph #jira UE-47515 - Ctrl + click and Shift + click does not remove constraints from skeleton tree in Physics Asset Editor Change 3550332 on 2017/07/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed bodies incorrectly simulating outside of 'simulate' mode Forced all bodies to be non-simulated when simulation is disabled. Also removed non-functioning motor menu options & disabled more menu options when simulating #jira UE-47579 - Entire mesh rotates uncontrollably after rotating a simulated body in Physics Asset Editor Change 3550355 on 2017/07/24 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash when failing to create a physics asset with multi convex hull #jira UE-47590 - Crash when New Physics Asset window is closed with no asset being created Change 3558007 on 2017/07/27 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed typo that disabled editability of profile names incorrectly #jira UE-47374 - Physics Asset Editor 'None' current profile text box is editable but doesn't save Change 3566157 on 2017/08/01 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed crash when opening a physics asset with a deleted preview skeletal mesh Now assigns default mesh as before If the mesh is then reset, the asset editor must be re-opened as the skeleton will have changed underneath it. #jira UE-47918 - Crash when opening certain Physics Assets Change 3568327 on 2017/08/02 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Prevent "set bodies below" from improperly enabling simulation on bodies #jira UE-47752 - Set all bodies below to simulated causes the viewport to simulate those bodies immediately in Physics Asset Editor Change 3570436 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics assets with simulated bodies no longer simulate when first opened #jira UE-48000 - Physics assets with simulated bodies begin simulating when first opened Change 3570470 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix excessive gravity crash when actors pop out of the world Also restrict gravity to non NaN-causing levels. #jira UE-48002 - Crash when mesh falls out of world due to high gravity simulation in Physics Asset Editor Change 3570717 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3570581 Change 3570781 on 2017/08/03 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix merge issues Change 3587760 on 2017/08/15 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed delegate for skeleton tree context menu extension, now uses an empty section Change 3589915 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Added comments to bone proxy & physics asset editor shared data Removed unused variables Change 3589976 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixed constraint 'all positions' rendering Removed empty override of unregister tab spawners Change 3589983 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fix crash when setting skeletal mesh Toast is not displayed when the skeleton is changed as well as the skeletal mesh. Toolkit was getting invalidated as setting the preview mesh to a different skeleton ends up restarting the sub-editor #jira UE-48196 - Crash when changing preview mesh of Physics Asset and applying Change 3589990 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Physics asset selection color now uses editor settings Change 3589994 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused functions Change 3589997 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Commented SetBodiesBelowPhysicsType as per code review Change 3590007 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Disabled physical material menu in simulate Change 3590130 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Removed unused code Commented a few functions Re-instated preview mesh selection Removed delegate allowing viewport client class creation Change 3590154 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Remove unused code Change 3590197 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Merge-Thomas.Sarkanen Merging //UE4/Dev-AnimPhys to Dev-UEAP-29-PhATUpgrade (//Tasks/UE4/Dev-UEAP-29-PhATUpgrade) @ CL 3589965 Change 3590250 on 2017/08/16 by Thomas.Sarkanen@Dev-UEAP-29-PhATUpgrade-Thomas.Sarkanen Fixup merge errors Change 3596227 by Jonathan.Poncelet Fixed physics substepping interpolation using the wrong starting value. #jira UE-48150 Physics Substepping doesn't have the same effect from 4.15 to 4.16 Change 3596241 by Jonathan.Poncelet Fixed cloth not being drawn correctly in the editor, due to bounds not being computed accurately. #jira UE-48243 Clothing disappears during cloth paint mode once you navigate to a section far from the origin Change 3596247 by Thomas.Sarkanen Fixup CIS errors post PhAT Upgrade merge Change 3596250 by Thomas.Sarkanen More CIS fixes Change 3596255 by Benn.Gallagher Fixed compilation errors when nativizing animation blueprints that use subinstances #jira UE-46522 Change 3596256 by Benn.Gallagher Fixed orphaned sub anim instance pins hanging around #jira UE-46545 Change 3596257 by Benn.Gallagher Fixed skel surf particles being misplaced when clothing was active. And fixed particles spawning on disabled cloth proxy sections. #jira UE-48045 Change 3596258 by Benn.Gallagher Hide mass override when selecting skeletal meshes. Mass overrides are taken from physics asset and will be ignored on the component so it makes no sense to have this visible #jira UE-47755 Change 3596259 by Benn.Gallagher Fixed mismatch between paint values and view values for clothing tools #jira UE-48110 Change 3596260 by Benn.Gallagher Stopped property context menus killing the whole window stack when an item is clicked #jira UE-48158 Change 3596261 by Thomas.Sarkanen One last Mac CIS fix (hopefully) Change 3596308 by Benn.Gallagher Removed outdated references to APEX in clothing example map. Change 3596360 by Martin.Wilson Fixing inconsistent animation entries in blueprint context menu (displaying differently depending on whether the asset is loaded) + Cache correct tooltip when asset isn't loaded #jira UE-48452 Change 3596459 by Benn.Gallagher Fixed anim curves not correctly being updated to post process instances. Change made to curve update in Dev-General fixed main and sub instances but missed post process instances. #jira UE-47567 Change 3596967 by Aaron.McLeran Adding setting default reverb send level in audio settings. Change 3596974 by Ethan.Geller Merge in fix from Christopher Oliver Change 3597243 by Aaron.McLeran Checking in missing files. Change 3597686 by Ethan.Geller Fix warnings/errors from CL 3597452 Change 3597846 by Ethan.Geller Fix errors, take 2 Change 3598290 by Ethan.Geller Panning Angle Issue Change 3598412 by Ethan.Geller Change Core.h header to CoreMinimal.h, fix warnings Change 3599797 by Jurre.deBaare LODs from Merge Actor tool have bad normals #jira UE-47129 #fix normals weren't wrong but user was complaining about the lightmap resolution behaviour, so added a new feature that calculates the lightmap resolution according to: 1) Summing all lightmap pixel counts for each mesh component being merged 2) Calculating fitting texture dimension by taking square root of the total pixels Change 3599863 by Lina.Halper PR #3919: rename flag 'DEPERCATED_PHYSBLEND_UPDATES_PHYSX' to 'DEPRECATED_PHYSBLEND_UPDATES_PHYSX' to fix the typo (Contributed by aziot) Change 3599883 by Jurre.deBaare HLOD: update outliner tooltip when UE docs arrive #jira UE-20352 Change 3599944 by Martin.Wilson Smart name refactor - Remove guids entirely - Remove automatic fix up - Simplify smart name mapping container - Make animations deterministic for cooking #jira UEAP-264 Change 3600133 by Benn.Gallagher Fixed crash shutting down editor with active cloth paint tab, as mode manager was being used unsafely. #jira UE-48612 Change 3600166 by Benn.Gallagher Fixed cloth paint gradient allowing invalid values #jira UE-48114 Change 3600719 by Lina.Halper PR #3894: PlayMontage node bug Fix (Contributed by ArCorvus) Change 3601668 by Jurre.deBaare Improve BlendSpace preview pin dragging controls #fix Click and drag now also works for the preview pin which should allign it with other pins on the grid and makes the preview functionality more discoverable #misc Also added tooltips on the grid to make the functionality more discoverable #jira UE-43011 Change 3601669 by Jurre.deBaare No easy way to tell which Blend Sample in the blend graph matches up to which Blend Sample in the Asset Details panel #fix I've added the SampleIndex to the names to make it easier recognizing which one is which #jira UE-46892 Change 3601731 by Benn.Gallagher Fixed cloth paint falloff to actually calculate falloff, and take brush strength into account. #jira UE-48329 Change 3601897 by Lina.Halper fixing issue with sequencer reinitialization #jira: UE-48556 Change 3602339 by Benn.Gallagher Fixed comment/tooltip typo Change 3602502 by Benn.Gallagher Fixed clothing gradient tool renderer not showing selected points when camera was moving #jira UE-48331 Change 3602664 by Ethan.Geller Unshelved fixes from Dev-VR Change 3602726 by Lina.Halper Back out revision 3 from //UE4/Dev-AnimPhys/QAGame/QAGame.uproject #jira: UE-48700 Change 3603011 by Lina.Halper Fix build error Change 3604139 by Benn.Gallagher Restricted painter processing to no longer attempt painting while in simulation previews in cloth paint mode. #jira UE-47960 Change 3604284 by Benn.Gallagher Fixed crashes in physics asset editor and skeletal mesh editor when the preview scene clears out the preview mesh while clothing is running #jira UE-48687 Change 3604612 by Lina.Halper Fix curve issue from automation test - It was actual bug. Change 3604614 by Lina.Halper - Fix crash with macro anim notify - Make sure macro anim notify doesn't show up in the menu #jira: UE-45036 Change 3604725 by Lina.Halper fixed issue with opening state machine from anim graph #jira: UE-48726 Change 3604971 by Aaron.McLeran #jira UE-48738 Launching Oculus Rift without -VR plays audio in the oculus rift. Bringing fix from 4.17 to Dev-AnimPhys Change 3605787 by Aaron.McLeran Adding ability to pass in an optional owner in PlaySound2D and PlaySoundAtLocation BP calls - This is necessary in order to use the sound concurrency "limit by owner" feature Change 3606851 by Jurre.deBaare UE4Editor Static Analysis Win64 - Warning fix Change 3607022 by Lina.Halper Fix static analysis warning Change 3607229 by Jurre.deBaare RemoveAllCurveData should not allow removing data from the Skeleton #jira UE-48107 Change 3607660 by Martin.Wilson Live link client can run in cooked builds too #jira UEAP-306 Change 3607668 by Ethan.Geller #jira UE-48792 fix null dereference case in audiodevice.cpp Change 3607734 by Lina.Halper LOD linking to curve - consolidated to one param - curve eval option - for long time, looking at why morphtarget wasn't working on LOD 1, later realized it was due to simplified :( - fixed to make sure param to clear is always checking with default value - this is correct behavior and it's not too bad for perf because internally the default value is also in the TMap - flipped meaning to align with bAllowCurveEvaluation - also fixed issue with orion cooking - where transform curves are added as normal curves #jira: UE-37996, UE-48782 Change 3607859 by Martin.Wilson Missed files from live link editor checkin Change 3607958 by Martin.Wilson Redo Jurre's changes from CL 3607229 (were removed by CL 3607734) Change 3608566 by Ethan.Geller change include to avoid header conflicts on Linux Change 3609074 by Ethan.Geller Take 2: Fix capitalization on include, fix Linux build. Change 3610024 by Lina.Halper Fix issue with material editor crashing due to missing load module of AdvancedPreviewScene - we used to load advanced preview setting by persona module - this has been moved to persona tool kit, and now all other modules are crashing - If we want to do it for tool kit, we have to make sure all other editor's loading should change also. #jira: UE-48809 Change 3610081 by Jurre.deBaare Animations can't be set on blend samples from the dropdown #fix Skeleton asset registry tag now includes 'AssetTypeName' PathToAsset, so replacing compare with contains #jira UE-48746 Change 3610088 by Jurre.deBaare Editor crashes if you CtrlZ several times after adding animations to a 1D blendspace #fix removed the hacky OnObjectPropertyChanged and tied the refresh into propertyhandles instead #misc found out of sync widget values due to incorrect encapsulation inside of lambdas #jira UE-48741 Change 3610862 by Ethan.Geller Fix submix effects for situations where number of input channels does not equal output channels Change 3611346 by Aaron.McLeran Using audio thread platform affinity mask for audio render thread. Change 3613297 by Ethan.Geller Simple delay submix Change 3614435 by Martin.Wilson CIS fix Change 3614482 by Martin.Wilson Store root motion on anim instance instead of proxy to avoid thread safety stalls #jira UE-46896 Change 3614483 by Martin.Wilson Evaluate curves in anim offsets #jira UE-47119 Change 3614495 by Jurre.deBaare Reimport alembic file with new source option does not automatically tick any tracks #fix If no tracks are set to import, reset them all to do so (we're assuming here the user is importing something completely different, and we wouldn't want her to import an empty animation either) #jira UE-46141 Change 3614645 by Thomas.Sarkanen Fixed physics assets not simulating when BlockAll was globally overridden Persona viewport was overriding the collision profile back to BlockAll, which projects can override. Setting to the internal PhysicsActor profile prevents this, as it used to in PhAT #jira UE-48591 - Physics assets not simulating correctly in Orion Change 3614683 by Lina.Halper Fixed crash when modifying default physicsasset #jira: UE-48844 Change 3614721 by Jurre.deBaare Vertex painting on skeletal meshes bound by physics asset #fix Now try and find intersecting triangle if we do hit the mesh bounds, but not any physics bodies #jira UE-48004 Change 3614730 by Thomas.Sarkanen Fixed crash when regenerating multi convex hulls from zero-vert bones We handled this in the single convex hull case, but multi did not. #jira UE-48780 - Editor crashes if you regenerate a box body to a complex hull body Change 3614763 by Jurre.deBaare Moving over: HLOD crash when dragging and dropping actors into their own cluster in the HLOD outliner - ALODActor #jira UE-48249 #fix ensure that we nullptr check the static mesh as a LODActor can be reset to have a null static mesh Change 3615029 by Lina.Halper Fix issue with highlight #jira: UE-48855 Change 3617593 by Thomas.Sarkanen Fixed crash when regenerating large amounts of bodies We were overflowing the PhysX shape limit for aggregates - this refers to shapes, not bodies, it seems #jira UE-48606 - Crash when adding new multi convex hull body to bone on skeleton that already has multi convex hull bodies Change 3617609 by Jonathan.Poncelet Fixed crash that could occur when opening a physics asset and deleting bones. #jira UE-48971 Editor crashes if you clear a preview mesh on a physics asset and delete the bones when reopening it Change 3617723 by Thomas.Sarkanen Prevented actors & components of anim preview scenes (and the preview scenes themselves) from persisting after editors are shut down Fixed up 2 locations where the persona toolkit was being held onto by a strong ptr (cloth paint and new PhAT). This should stop the preview scene from persisting. Moved AddToRoot pattern used for anim preview scene to FGCObject #jira UE-47227 - [CrashReport] UE4Editor_Persona!TSharedPtr<IEditableSkeleton,0>::ToSharedRef() [sharedpointer.h:794] #jira UE-47717 - SkelMesh Editor creates preview World, but it never gets destroyed Change 3617818 by Benn.Gallagher Final v1 UX changes for clothing tool, and removed experimental flag Change 3617937 by Jurre.deBaare Default bounds for Alembic skel-mesh are too large #fix bounds was initialised to zero and +-ed which meant that it would always include (0,0,0) and enlarge the bounds #jira UE-47139 Change 3618187 by Ethan.Geller Implement Audiomixer in HTML5 Change 3618188 by Lina.Halper Fix issue with highlight in persona #jira: UE-49020 Change 3618229 by Lina.Halper Fix crash on exit when modify is causing it to serialize again in the middle of tear down #jira: UE-48025 Change 3618248 by Lina.Halper fix issue by workaround where clamp is not happening with allowspin is false #jira: UE-47001 Change 3618289 by Aaron.McLeran Removing audio format types we're not using for simplicity Change 3618291 by Martin.Wilson Fix duplicate of curve name appearing in list when renaming #jira UE-49041 Change 3618390 by Aaron.McLeran Removing a case for DTYPE_Xenon since this is never used. Change 3618425 by Martin.Wilson Keep notify UI up to data across multiple editors when adding notifies to an animation #jira UE-48104 Change 3619023 by Aaron.McLeran Removing DTYPE_Xenon from XAudio2Buffer.cpp since it's not used Change 3619129 by Aaron.McLeran Source bus feature. - New architectural feature for audio mixer that allows audio sources to route to other audio sources. - Buses can be routed to each other - Buses have a duration which can be set in bus asset - Buses can choose between mono and stereo channels - Sources can send to buses and also toggle to *only* output to buses (and bypass submixing) - Will allow persistent source effects on different source audio, while also maintaining 3d spatialization capabilities. Lots of future features will build on this change: 3d audio-volume-based submixing, sidechaining, environment reflections, diagetic microphones, etc. - Some engine changes and optimizations: - Format conversion to float is done in async workers for decode vs the render callback - Procedural sound waves can opt to output only float vs int16 PCM data (avoids a format conversion in audio mixer) - Apply master attenuation at the final output vs per-source - Fixed code that performs fade in/fade out for smooth startup and shutdown. - Moved FSourceParam to FParam into DSP utility so others can use it. - Some engine fixes: - Audio spat plugins that are external sends will not send audio to default/base submix. But will also allow their audio to be panned and sent to submix sends (e.g. reverb) so external HRTF rendering can also get reverb effects, etc. - Fixed an issue with pause - Fixed an issue with the final source buffer in a source voice not getting properly rendered and causing discontinuties - Fixed an issue with WorldID not getting set for listeners TODO: - fill out source bus details panel customization to hide USoundBase params which aren't relevant to source buses Change 3619159 by Ethan.Geller #jira UE-48950 fix steam audio crash on editor exit Change 3619555 by Jonathan.Poncelet Fixed constraint debug drawing arrows in the physics asset editor being too large. #jira UE-48863 Limited constraints and free constraints are much larger on screen Change 3619574 by Thomas.Sarkanen Fixed debug link for animation blueprints not persisting when changing preview mesh Anim instance is no longer re-created all the time when setting skeletal mesh, so we need to re-init the preview instance and re-set the linked skeletal mesh component manually when the mesh changes. #jira UE-46642 - Switching Preview mesh when you've selected an AnimBP breaks the link between the AnimBP and PIE session Change 3619586 by Thomas.Sarkanen Fixed physics asset shortcut not working correctly in certain circumstances FBox was using uninitialized memory #jira UE-49034 - Pressing F to focus on a physics body focuses on the area in between the root and the physics body and not the selected body Change 3619640 by Thomas.Sarkanen Assets with no preview mesh now no longer allow access to other skeleton's physics assets in their shortcut bars Unified the skeleton/mesh search code between FPersonaAssetFamily and FPersonaToolkit, so they bot *look* for a compatible skeletal mesh if one was not found on the asset (but still dont set it automatically). #jira UE-49038 - If you open a skeleton or an animation it won't open persona with the correct physics asset in the quick switch bar Change 3619644 by James.Golding Change FBodyInstance::InstanceBodyIndex back to int32 (need to support ISMC with many instances) #jira UE-47652 Change 3619654 by Martin.Wilson Fix removing a curve when it isn't used on any animations #jira UE-49048 Change 3619771 by Thomas.Sarkanen Make sure the physics asset editor floor has collision, regardless of what BlockAll does #jira UE-49088 - PhysicsAsset Editor Floor should not depend on BlockAll config Change 3619803 by Jonathan.Poncelet Fixed localization warnings caused by duplicate keys. #jira UE-48580 //UE4/Main: Step "Build Engine Localization" has completed with 4 Warnings Change 3619813 by Jurre.deBaare Baked bones using a pose animation are rotated in the wrong direction #fix root bone transform wasn't being taken into account while generating final bone transforms #misc added debug logging for future work #jira UE-47362 Change 3619830 by Jurre.deBaare Biased Texture Size option is not functioning when Merging Actors #fix Fixed up material baking setup after refactoring, now sets correct texture sizes again according to texture sizing type, this will be removed in the long term anyhow #misc Found a bug in material rendering if previous render size < current render size it would not set the viewport size/projection matrix correctly which broke the material bake #jira UE-48108 Change 3619859 by Thomas.Sarkanen Fixed HLOD selection sphere persisting on undo/redo Removed HLOD selection actors when the outliner is refreshed #jira UE-47032 - HLOD Cluster radius sphere remains in level if you move an actor in a cluster and then undo the movement. Change 3619871 by Martin.Wilson Calculate root motion over the correct segment times, not the track times #jira UE-43719 Change 3619898 by Thomas.Sarkanen Improve UI feedback around bounds/in-game bounds in animation editor viewports Tooltip for in-game bounds is now more detailed In-game bounds cannot be selected if bounds is not also selected #jira UE-47958 - Bound vs In-game Bound in Viewport Show menu in Physics Asset Editor is confusing Change 3619908 by Thomas.Sarkanen Fixed tooltip for PhysicsType #jira UE-48421 - Incorrect tooltip for Physics Type Change 3620014 by Jurre.deBaare Only the first mesh bake material property in the array can be set to diffuse, diffuse cannot be selected on the other array elements #fix Changed the way the restriction is setup and retrieve the UMaterialOptions from the details view instead of GetDefault<> #misc Also added more delegates to ensure the restriction is up to date #jira UE-46980 Change 3620104 by Jurre.deBaare HLOD doesn't support renaming in levels #fix ensure that during renaming of UWorld we also rename the HLOD assets into their respective new HLOD package outer #jira UE-48072 Change 3620151 by Thomas.Sarkanen Undo/redo now correctly affects animation preview scene settings Preview scene desc is now transactional & state is correctly set up on undo/redo according to the current preview scene desc #jira UE-47816 - Undoing setting the animation mode to Refrence pose doesn't update the UI Change 3620152 by Thomas.Sarkanen Exposed LOD menu in PhAT This allows auto LOD to be optionaly selected. It was hidden and we forced to LOD 0 before. We still default to forcing LOD 0 to preserve the old behavior. #jira UE-47970 - LODs not working in Physics Asset Editor Change 3620177 by Benn.Gallagher PR #3696: Fix for USkinnedMeshComponent::GetCPUSkinnedVertices() (Contributed by Koderz) Change 3620250 by Jurre.deBaare HLOD assets left in HLOD folder when clusters are deleted #fix some added lifetime management for HLOD assets, keeping list of 'stale' HLOD assets which if not Undo-ed will either be deleted when LODActor is saved, or marked PendingKill when LODActor is destroyed #jira UE-47450 Change 3620273 by James.Golding PR #3908: Removing duplicated forward declation (Contributed by celsodantas) #jira UE-48530 Change 3620274 by James.Golding PR #3909: Removing unnecessary conditional (Contributed by celsodantas) #jira UE-48531 Change 3620275 by James.Golding Add icon for destruction plugin Change 3620401 by Ethan.Geller #jira UE-47684 Remove SDL dependencies from Win64 Change 3620586 by Jurre.deBaare Linux CIS fix Change 3620660 by Martin.Wilson Fixes for state machines getting reinitialized in situations that users don't want them to. -Added option to state machine to allow it to skip reinitialization when it becomes relevant -Added option to slot nodes to keep source pose relevant while montage slot is playing. #jira UE-43578 Change 3620665 by Aaron.McLeran Making source buses only show relevant source bus data. - hiding sound wave categories that aren't relevant to source buses Change 3621087 by Ethan.Geller #jira UE-49000 implement device change listener to ensure we are properly handling when audio is disabled. Change 3621144 by Aaron.McLeran #jira UE-49147 #jira UE-49145 Fixing concurrency and volume stats Change 3621148 by Aaron.McLeran Fixing typo Change 3621180 by Ethan.Geller #jira UE-49151 Fix for browser preview on bus only sounds Change 3621421 by Ethan.Geller #jira UE-49165 Fix real time audio slider. Change 3621604 by Ethan.Geller #jira UE-44847 fix iOS panning algorithm on non-audio mixer Change 3621626 by Lina.Halper Fix issue with anim montage displaying when selecting animation #jira: UE-48749 Change 3621813 by Thomas.Sarkanen Fixing undo/redo of bone modifications in Physics Asset Editor (and others) Bone proxy objects now get recycled (instead of the pool constantly growing) as their names are stable and unique. Fixed broken skeleton tree RTTI (so selection persistance now works correctly on undo/redo again) We no longer force a re-selection on phyiscs asset changes (the tree takes care of that anyway). #jira UE-47862 - Undoing Bone transformations in Physics Asset Editor does not work Change 3621831 by Jurre.deBaare Crash fix for Material baking when trying to analyse a MP_MAX material property #jira UE-49172 Change 3621936 by Thomas.Sarkanen Fixed CIS error from merge Change 3621937 by Thomas.Sarkanen Fix merge issue with API change in USynthComponent Change 3622173 by Thomas.Sarkanen Fixed ortho viewports being bright white in sub-editors Preview scenes in general are responsible by default for the background color. Advanced preview scenes now use background color from settings. Previously only te animation editors did this. #jira UE-48841 - The background of the orthographic viewports is bright white Change 3622730 by Ethan.Geller #jira UE-49182 UE-49198 UE-49201 Fix for channel mismatch in procedural sound waves, remove singleton behavior for MMNotificationClient. CL by Aaron.McLeran Change 3622759 by Ethan.Geller #jira 49170 reduce static analysis warnings for audiodevice.cpp Change 3622901 by Benn.Gallagher Bumped PhysX DDC key after change in Orion caused verify failures Change 3623458 by Aaron.McLeran #jira UE-49204 Delores monologue cut short in Odin elevator Change 3623667 by Aaron.McLeran #jira UE-49204 UE-49243 Delores monologue cut short in Odin elevator Change 3623752 by Aaron.McLeran #jira UE-49247 Sound Source Bus Properties Are Inappropriate Fixing issues with new source bus uobject so properties show up appropriately. Change 3624058 by Ben.Marsh Fix stale module being enumerated when running UE4Editor-Cmd.exe, causing warning when running incremental automated tests. Module and version manifest filenames are derived from the executable filename, so when running the executable compiled for the console subsystem, we need to strip the -Cmd suffix from the executable name to find the correct path. Change 3624193 by Ethan.Geller #jira UE-49170 Static analysis fix, take 2 Change 3354003 by Thomas.Sarkanen Back out changelist 3353914 Change 3355932 by Thomas.Sarkanen Back out changelist 3354003 Reinstating merge from Main: Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3353839 Change 3477632 by Jurre.deBaare Automated test content and ground truths for Actor Merging and Material baking functionality Change 3491464 by Jurre.deBaare Updated automation content for MergeActor behaviour Change 3587878 by Thomas.Sarkanen Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3587489 Change 3597452 by Ethan.Geller #jira UEAP-304, UEAP-280, UEAP-281: Major structural refactor of Audio Plugin interfaces, Oculus Audio plugin, Steam Audio Plugin. Introduction of Sony Audio3D plugin. Change 3602935 by Lina.Halper Allow curve evaluation to be controlled by users #jira: UE-46446 Change 3606120 by Ethan.Geller Move Tap Delay Submix to Synthesis library, modify tap delay API Change 3621830 by Thomas.Sarkanen Merging //UE4/Dev-Main to Dev-AnimPhys (//UE4/Dev-AnimPhys) @ CL 3621691 Change 3622807 by Ethan.Geller #jira UE-49201 Fixing volume issues Issue is that these platforms weren't using the proper public function and an audio mixer refactor changed how volume is calculated to seperate out distance attenuation vs other volume gains. [CL 3624383 by Thomas Sarkanen in Main branch]
2017-09-04 04:17:46 -04:00
void UAnimGraphNode_StateMachineBase::JumpToDefinition() const
{
if (UObject* HyperlinkTarget = GetJumpTargetForDoubleClick())
{
FKismetEditorUtilities::BringKismetToFocusAttentionOnObject(HyperlinkTarget);
}
}
void UAnimGraphNode_StateMachineBase::DestroyNode()
{
UEdGraph* GraphToRemove = EditorStateMachineGraph;
EditorStateMachineGraph = NULL;
Super::DestroyNode();
if (GraphToRemove)
{
UBlueprint* Blueprint = GetBlueprint();
GraphToRemove->Modify();
FBlueprintEditorUtils::RemoveGraph(Blueprint, GraphToRemove, EGraphRemoveFlags::Recompile);
}
}
void UAnimGraphNode_StateMachineBase::PostPasteNode()
{
Super::PostPasteNode();
if(EditorStateMachineGraph)
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2868852 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2821607 on 2016/01/08 by Mieszko.Zielinski Added a way to limit amount of information logged by vlog by discarding logs from classes from outside of class whitelist #UE4 This feature was followed by refactoring of functions taking FVisualLogEntry pointers to use references instead. #rb Lukasz.Furman #codereview John.Abercrombie Change 2828384 on 2016/01/14 by Mieszko.Zielinski Back out of visual log refactor done as part of CL#2821607 #UE4 Change 2855722 on 2016/02/04 by Zak.Middleton #ue4 - Expose PrimitiveComponent GetCollisionEnabled(), IsCollisionEnabled(), IsQueryCollisionEnabled(), IsPhysicsCollisionEnabled() functions to blueprints. #rb Daniel.Broder, Ori.Cohen #codereview Bob.Tellez #jira UE-26411 Change 2855737 on 2016/02/04 by James.Golding Add test AssetUserData C++ class to QAGame Change 2855739 on 2016/02/04 by James.Golding PR #1858 : Add abstract and editinlinenew to AssetUserData class, so derived classes can be added to assets via details panel https://github.com/EpicGames/UnrealEngine/pull/1858 #github 1858 #jira UE-24494 #rb thomas.sarkanen Change 2855842 on 2016/02/04 by James.Golding UE-23968 : Add clamping to Friction, Restitution, Density and RaiseMassToPower properties of PhysicalMaterial #codereview ori.cohen #rb thomas.sarkanen Change 2855843 on 2016/02/04 by James.Golding PR #1984 : Add 'AssetUserData' support to AnimationAsset/Texture https://github.com/EpicGames/UnrealEngine/pull/1984 #github 1984 #jira UE-25913 #rb thomas.sarkanen Change 2855844 on 2016/02/04 by James.Golding UE-23176 Fix incorrect clamping in GenerateKDopAsSimpleCollision() which could cause degenerate hulls Also don't 'nudge' kdops if there are other primitives present, will offset from mesh we were fitting around #rb thomas.sarkanen Change 2855850 on 2016/02/04 by Benn.Gallagher Update required LOD bones when associating a cloth chunk that uses bones that aren't weighted to that LOD #rb Martin.Wilson Change 2856409 on 2016/02/04 by Zak.Middleton #ue4 - Change LogSpawn warnings to normal logs for cases that are common and valid during gameplay (failed due to collision at the target location, or failed because it is destroyed in the process of spawning, ie projectile spawned in a target). #codereview Jeff.Farris Change 2857018 on 2016/02/05 by Benn.Gallagher Fixes for various anim graph related subgraph issues/crashes #rb Ben.Cosh Change 2857193 on 2016/02/05 by Lukasz.Furman extended crowd agent interface to handle avoidance groups #ue4 UE-24823 #1896 Change 2857200 on 2016/02/05 by Lukasz.Furman fixed memory leak in CrowdManager #ue UE-26516 #2026 #codereview Mieszko.Zielinski Change 2857417 on 2016/02/05 by Lina.Halper Add keyword for animation functions Change 2858854 on 2016/02/08 by Benn.Gallagher Fixed pose evaluator customizations being processed at the wrong time which caused properties to always be re-added even if removed from the details panel, causing duplicated entries. #jira UE-8421 #rb Lina.Halper Change 2858855 on 2016/02/08 by Benn.Gallagher Fixed blendspace players only reporting normalized time when using a time getter in an anim graph transition. #rb Lina.Halper Change 2859159 on 2016/02/08 by Aaron.McLeran UE-25586 Fix for reporting audio memory usage - Realtime decompressed sounds that have CachedRealtimeFirstBuffers need to report the compressed asset size Change 2859192 on 2016/02/08 by Laurent.Delayen Removed check disallowing cooked additive animations from using AnimationRelative and AnimationScale retargeting modes (on the root bone or editor). Skip AnimationRelative retargeting for baked additive animations since it gets cancelled out during the additive creation process. #rb martin.wilson #codereview lina.halper Change 2859238 on 2016/02/08 by Lina.Halper Git pull request #1895 Change 2859239 on 2016/02/08 by Lina.Halper Git pull request #1813 Change 2859453 on 2016/02/08 by Aaron.McLeran [CL 2868856 by Marc Audy in Main branch]
2016-02-16 13:35:21 -05:00
{
// Add the new graph as a child of our parent graph
UEdGraph* ParentGraph = GetGraph();
if(ParentGraph->SubGraphs.Find(EditorStateMachineGraph) == INDEX_NONE)
{
ParentGraph->SubGraphs.Add(EditorStateMachineGraph);
}
for (UEdGraphNode* GraphNode : EditorStateMachineGraph->Nodes)
{
GraphNode->CreateNewGuid();
GraphNode->PostPasteNode();
GraphNode->ReconstructNode();
}
// Find an interesting name
TSharedPtr<INameValidatorInterface> NameValidator = FNameValidatorFactory::MakeValidator(this);
FBlueprintEditorUtils::RenameGraphWithSuggestion(EditorStateMachineGraph, NameValidator, EditorStateMachineGraph->GetName());
//restore transactional flag that is lost during copy/paste process
EditorStateMachineGraph->SetFlags(RF_Transactional);
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2868852 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2821607 on 2016/01/08 by Mieszko.Zielinski Added a way to limit amount of information logged by vlog by discarding logs from classes from outside of class whitelist #UE4 This feature was followed by refactoring of functions taking FVisualLogEntry pointers to use references instead. #rb Lukasz.Furman #codereview John.Abercrombie Change 2828384 on 2016/01/14 by Mieszko.Zielinski Back out of visual log refactor done as part of CL#2821607 #UE4 Change 2855722 on 2016/02/04 by Zak.Middleton #ue4 - Expose PrimitiveComponent GetCollisionEnabled(), IsCollisionEnabled(), IsQueryCollisionEnabled(), IsPhysicsCollisionEnabled() functions to blueprints. #rb Daniel.Broder, Ori.Cohen #codereview Bob.Tellez #jira UE-26411 Change 2855737 on 2016/02/04 by James.Golding Add test AssetUserData C++ class to QAGame Change 2855739 on 2016/02/04 by James.Golding PR #1858 : Add abstract and editinlinenew to AssetUserData class, so derived classes can be added to assets via details panel https://github.com/EpicGames/UnrealEngine/pull/1858 #github 1858 #jira UE-24494 #rb thomas.sarkanen Change 2855842 on 2016/02/04 by James.Golding UE-23968 : Add clamping to Friction, Restitution, Density and RaiseMassToPower properties of PhysicalMaterial #codereview ori.cohen #rb thomas.sarkanen Change 2855843 on 2016/02/04 by James.Golding PR #1984 : Add 'AssetUserData' support to AnimationAsset/Texture https://github.com/EpicGames/UnrealEngine/pull/1984 #github 1984 #jira UE-25913 #rb thomas.sarkanen Change 2855844 on 2016/02/04 by James.Golding UE-23176 Fix incorrect clamping in GenerateKDopAsSimpleCollision() which could cause degenerate hulls Also don't 'nudge' kdops if there are other primitives present, will offset from mesh we were fitting around #rb thomas.sarkanen Change 2855850 on 2016/02/04 by Benn.Gallagher Update required LOD bones when associating a cloth chunk that uses bones that aren't weighted to that LOD #rb Martin.Wilson Change 2856409 on 2016/02/04 by Zak.Middleton #ue4 - Change LogSpawn warnings to normal logs for cases that are common and valid during gameplay (failed due to collision at the target location, or failed because it is destroyed in the process of spawning, ie projectile spawned in a target). #codereview Jeff.Farris Change 2857018 on 2016/02/05 by Benn.Gallagher Fixes for various anim graph related subgraph issues/crashes #rb Ben.Cosh Change 2857193 on 2016/02/05 by Lukasz.Furman extended crowd agent interface to handle avoidance groups #ue4 UE-24823 #1896 Change 2857200 on 2016/02/05 by Lukasz.Furman fixed memory leak in CrowdManager #ue UE-26516 #2026 #codereview Mieszko.Zielinski Change 2857417 on 2016/02/05 by Lina.Halper Add keyword for animation functions Change 2858854 on 2016/02/08 by Benn.Gallagher Fixed pose evaluator customizations being processed at the wrong time which caused properties to always be re-added even if removed from the details panel, causing duplicated entries. #jira UE-8421 #rb Lina.Halper Change 2858855 on 2016/02/08 by Benn.Gallagher Fixed blendspace players only reporting normalized time when using a time getter in an anim graph transition. #rb Lina.Halper Change 2859159 on 2016/02/08 by Aaron.McLeran UE-25586 Fix for reporting audio memory usage - Realtime decompressed sounds that have CachedRealtimeFirstBuffers need to report the compressed asset size Change 2859192 on 2016/02/08 by Laurent.Delayen Removed check disallowing cooked additive animations from using AnimationRelative and AnimationScale retargeting modes (on the root bone or editor). Skip AnimationRelative retargeting for baked additive animations since it gets cancelled out during the additive creation process. #rb martin.wilson #codereview lina.halper Change 2859238 on 2016/02/08 by Lina.Halper Git pull request #1895 Change 2859239 on 2016/02/08 by Lina.Halper Git pull request #1813 Change 2859453 on 2016/02/08 by Aaron.McLeran [CL 2868856 by Marc Audy in Main branch]
2016-02-16 13:35:21 -05:00
}
}
FString UAnimGraphNode_StateMachineBase::GetStateMachineName()
{
return (EditorStateMachineGraph != NULL) ? *(EditorStateMachineGraph->GetName()) : TEXT("(null)");
}
TSharedPtr<class INameValidatorInterface> UAnimGraphNode_StateMachineBase::MakeNameValidator() const
{
return MakeShareable(new FAnimStateMachineNodeNameValidator(this));
}
FString UAnimGraphNode_StateMachineBase::GetDocumentationLink() const
{
return TEXT("Shared/GraphNodes/AnimationStateMachine");
}
void UAnimGraphNode_StateMachineBase::OnRenameNode(const FString& NewName)
{
FBlueprintEditorUtils::RenameGraph(EditorStateMachineGraph, NewName);
}
BlendSpace 2.0: Blendspace Graph Node Added a new animation graph node that hosts its own UBlendSpaceBase. Modified UBlendSpaceBase to allow for pose links to be evaluated as the sample points. The new blend space graphs can be spawned from existing UBlendSpace and UBlendSpace1D assets, or they can be created from scratch, or they can be converted from existing blendspace player nodes via the context menu. Fixed anim node conversion functions so that their transactions work correctly. Updated FBlueprintEditorUtils::IsGraphNameUnique to allow it to work with any object as the outer, not just UBlueprint. UBlueprint still has a special case for functions and events. This is to support GenerateUniqueGraphName within a scope (e.g. an outer graph). Formalized the concept of 'node sub-graphs' (as well as the composite node pattern a little). Previously a number of known node types that contained sub-graphs (e.g. UK2Node_Composite) had special case logic for dealing with node/graph deletion etc. Now any node can opt into this behaviour via the GetSubGraphs() override. Added status bar readouts for the blendspace grid, so we dont have to stuff the prompts into the tooltip any more. Moved anim BP related APIs out of FBlueprintEditor. They are always used via FAnimationBlueprintEditor. Refactored graph title bar widget creation out into a function to allow other document tab factories to create it. Altered breadcrumb trail click callbacks and SMyBlueprint::ExecuteAction to always JumpToHyperLink rather than calling OpenDocument directly. This allows unknown (to FBlueprintEditor) document types that reference objects to be correctly jumped to using the breadcrumb trail. Derived asset editors (i.e. FAnimationBlueprintEditor) can intercept the JumpToHyperlink call to ensure that the correct document is presented (i.e. the correct tab payload is generated). Instead of making yet another bunch of duplicated code for handling the various alpha blend options, refactored this into FAnimGraphNodeAlphaOptions (for editor code) and FAnimNodeAlphaOptions (for runtime code). Added OnCopyTermDefaultsToDefaultObject for per-node copying of default values from editor node to runtime node, rather than another special-case in the compiler. #rb Jurre.deBaare,Phillip.Kavan [CL 15177316 by Thomas Sarkanen in ue5-main branch]
2021-01-25 08:43:19 -04:00
TArray<UEdGraph*> UAnimGraphNode_StateMachineBase::GetSubGraphs() const
{
return TArray<UEdGraph*>( { EditorStateMachineGraph } );
}
void UAnimGraphNode_StateMachineBase::OnProcessDuringCompilation(IAnimBlueprintCompilationContext& InCompilationContext, IAnimBlueprintGeneratedClassCompiledData& OutCompiledData)
{
struct FMachineCreator
{
public:
// A transition node with a state alias as source may have multiple transitions belonging to the same node. The referenced aliased state to differentiates them during compilation.
using FUniqueTransition = TPair<UAnimStateTransitionNode*, UAnimStateNodeBase*>;
int32 MachineIndex;
TMap<UAnimStateNodeBase*, int32> StateIndexTable;
TMultiMap<int32, int32> StateIndexToStateAliasNodeIndices;
TArray<const UAnimStateAliasNode*> StateAliasNodes;
TMap<FUniqueTransition, int32> TransitionIndexTable;
UAnimGraphNode_StateMachineBase* StateMachineInstance;
TArray<FBakedAnimationStateMachine>& BakedMachines;
IAnimBlueprintGeneratedClassCompiledData& CompiledData;
IAnimBlueprintCompilationContext& CompilationContext;
public:
FMachineCreator(UAnimGraphNode_StateMachineBase* InStateMachineInstance, int32 InMachineIndex, TArray<FBakedAnimationStateMachine>& InBakedMachines, IAnimBlueprintCompilationContext& InCompilationContext, IAnimBlueprintGeneratedClassCompiledData& InCompiledData)
: MachineIndex(InMachineIndex)
, StateMachineInstance(InStateMachineInstance)
, BakedMachines(InBakedMachines)
, CompiledData(InCompiledData)
, CompilationContext(InCompilationContext)
{
FStateMachineDebugData& MachineInfo = GetMachineSpecificDebugData();
MachineInfo.MachineIndex = MachineIndex;
MachineInfo.MachineInstanceNode = CompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimGraphNode_StateMachineBase>(InStateMachineInstance);
StateMachineInstance->GetNode().StateMachineIndexInClass = MachineIndex;
FBakedAnimationStateMachine& BakedMachine = GetMachine();
BakedMachine.MachineName = StateMachineInstance->EditorStateMachineGraph->GetFName();
BakedMachine.InitialState = INDEX_NONE;
}
FBakedAnimationStateMachine& GetMachine()
{
return BakedMachines[MachineIndex];
}
FStateMachineDebugData& GetMachineSpecificDebugData()
{
UAnimationStateMachineGraph* SourceGraph = CompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimationStateMachineGraph>(StateMachineInstance->EditorStateMachineGraph);
return CompiledData.GetAnimBlueprintDebugData().StateMachineDebugData.FindOrAdd(SourceGraph);
}
int32 FindState(UAnimStateNodeBase* StateNode)
{
if (int32* pResult = StateIndexTable.Find(StateNode))
{
return *pResult;
}
return INDEX_NONE;
}
int32 FindOrAddState(UAnimStateNodeBase* StateNode)
{
if (int32* pResult = StateIndexTable.Find(StateNode))
{
return *pResult;
}
else
{
FBakedAnimationStateMachine& BakedMachine = GetMachine();
const int32 StateIndex = BakedMachine.States.Num();
StateIndexTable.Add(StateNode, StateIndex);
new (BakedMachine.States) FBakedAnimationState();
UAnimStateNodeBase* SourceNode = CompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimStateNodeBase>(StateNode);
GetMachineSpecificDebugData().NodeToStateIndex.Add(SourceNode, StateIndex);
GetMachineSpecificDebugData().StateIndexToNode.Add(StateIndex, SourceNode);
if (UAnimStateNode* SourceStateNode = Cast<UAnimStateNode>(SourceNode))
{
CompiledData.GetAnimBlueprintDebugData().StateGraphToNodeMap.Add(SourceStateNode->BoundGraph, SourceStateNode);
}
return StateIndex;
}
}
void AddStateAliasTransitionMapping(UAnimStateAliasNode* AliasNode, const FStateMachineDebugData::FStateAliasTransitionStateIndexPair& TransitionStateIndexPair)
{
UAnimStateAliasNode* SourceNode = CompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimStateAliasNode>(AliasNode);
GetMachineSpecificDebugData().StateAliasNodeToTransitionStatePairs.Add(SourceNode, TransitionStateIndexPair);
}
int32 FindOrAddTransition(FUniqueTransition UniqueTransition)
{
if (int32* pResult = TransitionIndexTable.Find(UniqueTransition))
{
return *pResult;
}
else
{
FBakedAnimationStateMachine& BakedMachine = GetMachine();
const int32 TransitionIndex = BakedMachine.Transitions.Num();
TransitionIndexTable.Add(UniqueTransition, TransitionIndex);
new (BakedMachine.Transitions) FAnimationTransitionBetweenStates();
UAnimStateTransitionNode* TransitionNode = UniqueTransition.Get<0>();
UAnimStateTransitionNode* SourceTransitionNode = CompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimStateTransitionNode>(TransitionNode);
GetMachineSpecificDebugData().NodeToTransitionIndex.Add(SourceTransitionNode, TransitionIndex);
CompiledData.GetAnimBlueprintDebugData().TransitionGraphToNodeMap.Add(SourceTransitionNode->BoundGraph, SourceTransitionNode);
if (SourceTransitionNode->CustomTransitionGraph != NULL)
{
CompiledData.GetAnimBlueprintDebugData().TransitionBlendGraphToNodeMap.Add(SourceTransitionNode->CustomTransitionGraph, SourceTransitionNode);
}
return TransitionIndex;
}
}
void Validate()
{
FBakedAnimationStateMachine& BakedMachine = GetMachine();
// Make sure there is a valid entry point
if (BakedMachine.InitialState == INDEX_NONE)
{
CompilationContext.GetMessageLog().Warning(*LOCTEXT("NoEntryNode", "There was no entry state connection in @@").ToString(), StateMachineInstance);
BakedMachine.InitialState = 0;
}
else
{
// Make sure the entry node is a state and not a conduit
if (BakedMachine.States[BakedMachine.InitialState].bIsAConduit && !StateMachineInstance->GetNode().bAllowConduitEntryStates)
{
UEdGraphNode* StateNode = GetMachineSpecificDebugData().FindNodeFromStateIndex(BakedMachine.InitialState);
CompilationContext.GetMessageLog().Error(*LOCTEXT("BadStateEntryNode",
"A conduit (@@) cannot be used as the entry node for a state machine. To enable this, check the 'Allow conduit entry states' checkbox for StateMachine. Warning, if a valid entry state cannot be found at runtime then this will generate a reference pose!"
).ToString(), StateNode);
}
}
}
};
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
UAnimBlueprintExtension_StateMachine* Extension = UAnimBlueprintExtension::GetExtension<UAnimBlueprintExtension_StateMachine>(GetAnimBlueprint());
check(Extension);
if (EditorStateMachineGraph == NULL)
{
InCompilationContext.GetMessageLog().Error(*LOCTEXT("BadStateMachineNoGraph", "@@ does not have a corresponding graph").ToString(), this);
return;
}
TMap<UAnimGraphNode_TransitionResult*, int32> AlreadyMergedTransitionList;
TArray<FBakedAnimationStateMachine>& BakedStateMachines = OutCompiledData.GetBakedStateMachines();
const int32 MachineIndex = BakedStateMachines.AddDefaulted();
FMachineCreator Oven(this, MachineIndex, BakedStateMachines, InCompilationContext, OutCompiledData);
// Map of states that contain a single player node (from state root node index to associated sequence player)
TMap<int32, UObject*> SimplePlayerStatesMap;
// Process all the states/transitions
for (auto StateNodeIt = EditorStateMachineGraph->Nodes.CreateIterator(); StateNodeIt; ++StateNodeIt)
{
UEdGraphNode* Node = *StateNodeIt;
if (UAnimStateNodeBase* StateNodeBase = Cast<UAnimStateNodeBase>(Node))
{
StateNodeBase->ValidateNodeDuringCompilation(InCompilationContext.GetMessageLog());
}
if (UAnimStateEntryNode* EntryNode = Cast<UAnimStateEntryNode>(Node))
{
// Handle the state graph entry
FBakedAnimationStateMachine& BakedMachine = Oven.GetMachine();
if (BakedMachine.InitialState != INDEX_NONE)
{
InCompilationContext.GetMessageLog().Error(*LOCTEXT("TooManyStateMachineEntryNodes", "Found an extra entry node @@").ToString(), EntryNode);
}
else if (UAnimStateAliasNode* AliasState = Cast<UAnimStateAliasNode>(EntryNode->GetOutputNode()))
{
InCompilationContext.GetMessageLog().Error(*LOCTEXT("AliasAsEntryState", "An alias (@@) cannot be used as the entry node for a state machine").ToString(), AliasState);
}
else if (UAnimStateNodeBase* StartState = Cast<UAnimStateNodeBase>(EntryNode->GetOutputNode()))
{
BakedMachine.InitialState = Oven.FindOrAddState(StartState);
}
else
{
InCompilationContext.GetMessageLog().Warning(*LOCTEXT("NoConnection", "Entry node @@ is not connected to state").ToString(), EntryNode);
}
}
else if (UAnimStateNode* StateNode = Cast<UAnimStateNode>(Node))
{
const int32 StateIndex = Oven.FindOrAddState(StateNode);
FBakedAnimationState& BakedState = Oven.GetMachine().States[StateIndex];
if (StateNode->BoundGraph != NULL)
{
BakedState.StateName = StateNode->BoundGraph->GetFName();
BakedState.StartNotify = OutCompiledData.FindOrAddNotify(StateNode->StateEntered);
BakedState.EndNotify = OutCompiledData.FindOrAddNotify(StateNode->StateLeft);
BakedState.FullyBlendedNotify = OutCompiledData.FindOrAddNotify(StateNode->StateFullyBlended);
BakedState.bIsAConduit = false;
BakedState.bAlwaysResetOnEntry = StateNode->bAlwaysResetOnEntry;
// Process the inner graph of this state
if (UAnimGraphNode_StateResult* AnimGraphResultNode = CastChecked<UAnimationStateGraph>(StateNode->BoundGraph)->GetResultNode())
{
InCompilationContext.ValidateGraphIsWellFormed(StateNode->BoundGraph);
AnimGraphResultNode->Node.SetStateIndex(StateIndex);
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
BakedState.StateRootNodeIndex = Extension->ExpandGraphAndProcessNodes(StateNode->BoundGraph, AnimGraphResultNode, InCompilationContext, OutCompiledData);
// See if the state consists of a single sequence player node, and remember the index if so
for (UEdGraphPin* TestPin : AnimGraphResultNode->Pins)
{
if ((TestPin->Direction == EGPD_Input) && (TestPin->LinkedTo.Num() == 1))
{
if (UAnimGraphNode_SequencePlayer* SequencePlayer = Cast<UAnimGraphNode_SequencePlayer>(TestPin->LinkedTo[0]->GetOwningNode()))
{
SimplePlayerStatesMap.Add(BakedState.StateRootNodeIndex, InCompilationContext.GetMessageLog().FindSourceObject(SequencePlayer));
}
}
}
}
else
{
BakedState.StateRootNodeIndex = INDEX_NONE;
InCompilationContext.GetMessageLog().Error(*LOCTEXT("StateWithNoResult", "@@ has no result node").ToString(), StateNode);
}
}
else
{
BakedState.StateName = NAME_None;
InCompilationContext.GetMessageLog().Error(*LOCTEXT("StateWithBadGraph", "@@ has no bound graph").ToString(), StateNode);
}
// If this check fires, then something in the machine has changed causing the states array to not
// be a separate allocation, and a state machine inside of this one caused stuff to shift around
checkSlow(&BakedState == &(Oven.GetMachine().States[StateIndex]));
}
else if (UAnimStateConduitNode* ConduitNode = Cast<UAnimStateConduitNode>(Node))
{
const int32 StateIndex = Oven.FindOrAddState(ConduitNode);
FBakedAnimationState& BakedState = Oven.GetMachine().States[StateIndex];
BakedState.StateName = ConduitNode->BoundGraph ? ConduitNode->BoundGraph->GetFName() : TEXT("OLD CONDUIT");
BakedState.bIsAConduit = true;
if (ConduitNode->BoundGraph != NULL)
{
if (UAnimGraphNode_TransitionResult* EntryRuleResultNode = CastChecked<UAnimationTransitionGraph>(ConduitNode->BoundGraph)->GetResultNode())
{
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
BakedState.EntryRuleNodeIndex = Extension->ExpandGraphAndProcessNodes(ConduitNode->BoundGraph, EntryRuleResultNode, InCompilationContext, OutCompiledData);
}
}
// If this check fires, then something in the machine has changed causing the states array to not
// be a separate allocation, and a state machine inside of this one caused stuff to shift around
checkSlow(&BakedState == &(Oven.GetMachine().States[StateIndex]));
}
else if (UAnimStateAliasNode* StateAliasNode = Cast<UAnimStateAliasNode>(Node))
{
Oven.StateAliasNodes.Add(StateAliasNode);
}
}
int32 NumStateAlias = Oven.StateAliasNodes.Num();
for (auto AliasIndex = 0; AliasIndex < NumStateAlias; ++AliasIndex)
{
const UAnimStateAliasNode* StateAliasNode = Oven.StateAliasNodes[AliasIndex];
auto MapAlias = [&](const UAnimStateNodeBase* StateNode)
{
if (StateNode)
{
if (int32* StateIndexPtr = Oven.StateIndexTable.Find(StateNode))
{
Oven.StateIndexToStateAliasNodeIndices.Add(*StateIndexPtr, AliasIndex);
}
}
};
if (StateAliasNode->bGlobalAlias)
{
for (auto StateNodeIt = Oven.StateIndexTable.CreateConstIterator(); StateNodeIt; ++StateNodeIt)
{
MapAlias(StateNodeIt->Key);
}
}
else
{
for (auto StateNodeWeakIt = StateAliasNode->GetAliasedStates().CreateConstIterator(); StateNodeWeakIt; ++StateNodeWeakIt)
{
MapAlias(StateNodeWeakIt->Get());
}
}
}
// Process transitions after all the states because getters within custom graphs may want to
// reference back to other states, which are only valid if they have already been baked
for (auto StateNodeIt = Oven.StateIndexTable.CreateIterator(); StateNodeIt; ++StateNodeIt)
{
UAnimStateNodeBase* StateNode = StateNodeIt.Key();
const int32 StateIndex = StateNodeIt.Value();
FBakedAnimationState& BakedState = Oven.GetMachine().States[StateIndex];
// Add indices to all player and layer nodes
TArray<UEdGraph*> GraphsToCheck;
BlendSpace 2.0: Blendspace Graph Node Added a new animation graph node that hosts its own UBlendSpaceBase. Modified UBlendSpaceBase to allow for pose links to be evaluated as the sample points. The new blend space graphs can be spawned from existing UBlendSpace and UBlendSpace1D assets, or they can be created from scratch, or they can be converted from existing blendspace player nodes via the context menu. Fixed anim node conversion functions so that their transactions work correctly. Updated FBlueprintEditorUtils::IsGraphNameUnique to allow it to work with any object as the outer, not just UBlueprint. UBlueprint still has a special case for functions and events. This is to support GenerateUniqueGraphName within a scope (e.g. an outer graph). Formalized the concept of 'node sub-graphs' (as well as the composite node pattern a little). Previously a number of known node types that contained sub-graphs (e.g. UK2Node_Composite) had special case logic for dealing with node/graph deletion etc. Now any node can opt into this behaviour via the GetSubGraphs() override. Added status bar readouts for the blendspace grid, so we dont have to stuff the prompts into the tooltip any more. Moved anim BP related APIs out of FBlueprintEditor. They are always used via FAnimationBlueprintEditor. Refactored graph title bar widget creation out into a function to allow other document tab factories to create it. Altered breadcrumb trail click callbacks and SMyBlueprint::ExecuteAction to always JumpToHyperLink rather than calling OpenDocument directly. This allows unknown (to FBlueprintEditor) document types that reference objects to be correctly jumped to using the breadcrumb trail. Derived asset editors (i.e. FAnimationBlueprintEditor) can intercept the JumpToHyperlink call to ensure that the correct document is presented (i.e. the correct tab payload is generated). Instead of making yet another bunch of duplicated code for handling the various alpha blend options, refactored this into FAnimGraphNodeAlphaOptions (for editor code) and FAnimNodeAlphaOptions (for runtime code). Added OnCopyTermDefaultsToDefaultObject for per-node copying of default values from editor node to runtime node, rather than another special-case in the compiler. #rb Jurre.deBaare,Phillip.Kavan [CL 15177316 by Thomas Sarkanen in ue5-main branch]
2021-01-25 08:43:19 -04:00
TArray<UEdGraph*> SubGraphs = StateNode->GetSubGraphs();
GraphsToCheck.Append(SubGraphs);
for(UEdGraph* SubGraph : SubGraphs)
{
SubGraph->GetAllChildrenGraphs(GraphsToCheck);
}
TArray<UAnimGraphNode_LinkedAnimGraphBase*> LinkedAnimGraphNodes;
TArray<UAnimGraphNode_AssetPlayerBase*> AssetPlayerNodes;
TArray<UAnimGraphNode_RandomPlayer*> AssetRandomPlayerPlayerNodes;
for (UEdGraph* ChildGraph : GraphsToCheck)
{
ChildGraph->GetNodesOfClass(AssetPlayerNodes);
ChildGraph->GetNodesOfClass(AssetRandomPlayerPlayerNodes);
ChildGraph->GetNodesOfClass(LinkedAnimGraphNodes);
}
for (UAnimGraphNode_AssetPlayerBase* Node : AssetPlayerNodes)
{
if (int32* IndexPtr = OutCompiledData.GetAnimBlueprintDebugData().NodeGuidToIndexMap.Find(Node->NodeGuid))
{
BakedState.PlayerNodeIndices.Add(*IndexPtr);
}
}
for (UAnimGraphNode_RandomPlayer* Node : AssetRandomPlayerPlayerNodes)
{
if (int32* IndexPtr = OutCompiledData.GetAnimBlueprintDebugData().NodeGuidToIndexMap.Find(Node->NodeGuid))
{
BakedState.PlayerNodeIndices.Add(*IndexPtr);
}
}
for (UAnimGraphNode_LinkedAnimGraphBase* Node : LinkedAnimGraphNodes)
{
if (int32* IndexPtr = OutCompiledData.GetAnimBlueprintDebugData().NodeGuidToIndexMap.Find(Node->NodeGuid))
{
BakedState.LayerNodeIndices.Add(*IndexPtr);
}
}
// Handle all the transitions out of this node
TArray<class UAnimStateTransitionNode*> TransitionList;
// Add aliased state transitions to transition list
TArray<int32> StateAliasIndices;
Oven.StateIndexToStateAliasNodeIndices.MultiFind(StateIndex, StateAliasIndices);
for (const int32 AliasIndex : StateAliasIndices)
{
// Let the final transition list do the sort.
Oven.StateAliasNodes[AliasIndex]->GetTransitionList(TransitionList, /*bWantSortedList=*/ false);
}
StateNode->GetTransitionList(/*out*/ TransitionList, /*bWantSortedList=*/ true);
for (auto TransitionIt = TransitionList.CreateIterator(); TransitionIt; ++TransitionIt)
{
UAnimStateTransitionNode* TransitionNode = *TransitionIt;
const int32 TransitionIndex = Oven.FindOrAddTransition(FMachineCreator::FUniqueTransition(TransitionNode, StateNode));
FAnimationTransitionBetweenStates& BakedTransition = Oven.GetMachine().Transitions[TransitionIndex];
BakedTransition.CrossfadeDuration = TransitionNode->CrossfadeDuration;
BakedTransition.StartNotify = OutCompiledData.FindOrAddNotify(TransitionNode->TransitionStart);
BakedTransition.EndNotify = OutCompiledData.FindOrAddNotify(TransitionNode->TransitionEnd);
BakedTransition.InterruptNotify = OutCompiledData.FindOrAddNotify(TransitionNode->TransitionInterrupt);
BakedTransition.BlendMode = TransitionNode->BlendMode;
BakedTransition.CustomCurve = TransitionNode->CustomBlendCurve;
BakedTransition.BlendProfile = TransitionNode->BlendProfile;
BakedTransition.LogicType = TransitionNode->LogicType;
UAnimStateNodeBase* PreviousState = StateNode;
UAnimStateNodeBase* NextState = TransitionNode->GetNextState();
UAnimStateAliasNode* NextAliasNode = Cast<UAnimStateAliasNode>(NextState);
if (NextAliasNode)
{
NextState = NextAliasNode->GetAliasedState();
}
if ((PreviousState != nullptr) && (NextState != nullptr))
{
const int32 PreviousStateIndex = Oven.FindState(PreviousState);
const int32 NextStateIndex = Oven.FindState(NextState);
if (NextAliasNode)
{
Oven.AddStateAliasTransitionMapping(NextAliasNode, { TransitionIndex, NextStateIndex });
}
if (TransitionNode->Bidirectional)
{
InCompilationContext.GetMessageLog().Warning(*LOCTEXT("BidirectionalTransWarning", "Bidirectional transitions aren't supported yet @@").ToString(), TransitionNode);
}
BakedTransition.PreviousState = PreviousStateIndex;
BakedTransition.NextState = NextStateIndex;
}
if((BakedTransition.PreviousState == INDEX_NONE) || (BakedTransition.NextState == INDEX_NONE))
{
InCompilationContext.GetMessageLog().Error(*LOCTEXT("BogusTransition", "@@ is incomplete, without a previous or next state").ToString(), TransitionNode);
}
// Validate the blend profile for this transition - incase the skeleton of the node has
// changed or the blend profile no longer exists.
TransitionNode->ValidateBlendProfile();
FBakedStateExitTransition& Rule = *new (BakedState.Transitions) FBakedStateExitTransition();
UAnimStateNodeBase* TransitionPrevNode = TransitionNode->GetPreviousState();
if (UAnimStateAliasNode* PrevAliasNode = Cast<UAnimStateAliasNode>(TransitionPrevNode))
{
Rule.bDesiredTransitionReturnValue = PrevAliasNode->bGlobalAlias ? true : PrevAliasNode->GetAliasedStates().Contains(StateNode);
Oven.AddStateAliasTransitionMapping(PrevAliasNode, { TransitionIndex, StateIndex });
}
else
{
Rule.bDesiredTransitionReturnValue = (TransitionPrevNode == StateNode);
}
Rule.TransitionIndex = TransitionIndex;
if (UAnimGraphNode_TransitionResult* TransitionResultNode = CastChecked<UAnimationTransitionGraph>(TransitionNode->BoundGraph)->GetResultNode())
{
if (int32* pIndex = AlreadyMergedTransitionList.Find(TransitionResultNode))
{
Rule.CanTakeDelegateIndex = *pIndex;
}
else
{
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
Rule.CanTakeDelegateIndex = Extension->ExpandGraphAndProcessNodes(TransitionNode->BoundGraph, TransitionResultNode, InCompilationContext, OutCompiledData, TransitionNode);
AlreadyMergedTransitionList.Add(TransitionResultNode, Rule.CanTakeDelegateIndex);
}
if (TransitionNode->bAutomaticRuleBasedOnSequencePlayerInState)
{
if (UAnimationTransitionGraph* TransGraph = Cast<UAnimationTransitionGraph>(TransitionNode->BoundGraph))
{
if (UAnimGraphNode_TransitionResult* ResultNode = TransGraph->GetResultNode())
{
if (UEdGraphPin* CanExecPin = ResultNode->FindPin(TEXT("bCanEnterTransition")))
{
if (CanExecPin->LinkedTo.Num() > 0)
{
InCompilationContext.GetMessageLog().Note(*LOCTEXT("TransitionWithAutomaticRuleBased", "@@ has an automatic Rule Based Transition that will override graph exit rule.").ToString(), TransitionNode);
}
}
}
}
}
}
else
{
Rule.CanTakeDelegateIndex = INDEX_NONE;
InCompilationContext.GetMessageLog().Error(*LOCTEXT("TransitionWithNoResult", "@@ has no result node").ToString(), TransitionNode);
}
// Handle automatic time remaining rules
Rule.bAutomaticRemainingTimeRule = TransitionNode->bAutomaticRuleBasedOnSequencePlayerInState;
Rule.AutomaticRuleTriggerTime = TransitionNode->AutomaticRuleTriggerTime;
Rule.SyncGroupNameToRequireValidMarkersRule = TransitionNode->SyncGroupNameToRequireValidMarkersRule;
// Handle custom transition graphs
Rule.CustomResultNodeIndex = INDEX_NONE;
if (UAnimationCustomTransitionGraph* CustomTransitionGraph = Cast<UAnimationCustomTransitionGraph>(TransitionNode->CustomTransitionGraph))
{
TArray<UEdGraphNode*> ClonedNodes;
if (CustomTransitionGraph->GetResultNode())
{
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
Rule.CustomResultNodeIndex = Extension->ExpandGraphAndProcessNodes(TransitionNode->CustomTransitionGraph, CustomTransitionGraph->GetResultNode(), InCompilationContext, OutCompiledData, nullptr, &ClonedNodes);
}
// Find all the pose evaluators used in this transition, save handles to them because we need to populate some pose data before executing
TArray<UAnimGraphNode_TransitionPoseEvaluator*> TransitionPoseList;
for (auto ClonedNodesIt = ClonedNodes.CreateIterator(); ClonedNodesIt; ++ClonedNodesIt)
{
UEdGraphNode* Node = *ClonedNodesIt;
if (UAnimGraphNode_TransitionPoseEvaluator* TypedNode = Cast<UAnimGraphNode_TransitionPoseEvaluator>(Node))
{
TransitionPoseList.Add(TypedNode);
}
}
Rule.PoseEvaluatorLinks.Empty(TransitionPoseList.Num());
for (auto TransitionPoseListIt = TransitionPoseList.CreateIterator(); TransitionPoseListIt; ++TransitionPoseListIt)
{
UAnimGraphNode_TransitionPoseEvaluator* TransitionPoseNode = *TransitionPoseListIt;
Rule.PoseEvaluatorLinks.Add( InCompilationContext.GetAllocationIndexOfNode(TransitionPoseNode) );
}
}
}
}
Oven.Validate();
}
void UAnimGraphNode_StateMachineBase::GetOutputLinkAttributes(FNodeAttributeArray& OutAttributes) const
{
for (const UEdGraphNode* Node : EditorStateMachineGraph->Nodes)
{
if (const UAnimStateTransitionNode* TransitionNode = Cast<UAnimStateTransitionNode>(Node))
{
if(TransitionNode->LogicType == ETransitionLogicType::TLT_Inertialization)
{
OutAttributes.Add(UE::Anim::IInertializationRequester::Attribute);
break;
}
}
}
}
Anim node data/compiler refactor Per-node constant data is now held on a generated struct as part of sparse class data. Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class. The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements. Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data. Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants. Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link. Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future. Moved property access into Engine module & removed event support from it - this was never used. Reworked property access compilation API a little - construction/lifetime was a bit confusing previously. Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few. Patched the following nodes to use the new data approach: - Asset players (sequences, blendspaces, aim offsets) - Blend lists - Ref poses - Roots #rb Jurre.deBaare, Martin.Wilson, Keith.Yerex [CL 16090510 by Thomas Sarkanen in ue5-main branch]
2021-04-22 04:57:09 -04:00
void UAnimGraphNode_StateMachineBase::GetRequiredExtensions(TArray<TSubclassOf<UAnimBlueprintExtension>>& OutExtensions) const
{
OutExtensions.Add(UAnimBlueprintExtension_StateMachine::StaticClass());
}
#undef LOCTEXT_NAMESPACE