Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Private/AnimGraphNode_TwoBoneIK.cpp
Marc Audy ef9dbd59d7 Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 3198622)
#rb None
#lockdown Nick.Penwarden

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3182087 on 2016/11/01 by Lina.Halper

	PR #2328: fix morph target weight application order. (Contributed by tmiv)

	- changed order of morphtarget application to be animation and THEN SetMorphTarget
	- made sure you could clear the weight also if SetMorphTarget to be 0.f

	#jira: UE-29999

Change 3182090 on 2016/11/01 by Lina.Halper

	Fix issue where import doesn't display any message when import type hasn't been detected

Change 3182123 on 2016/11/01 by Wes.Hunt

	ensure the EngineAnalytics singleton is not being held onto by someone else during engine shutdown.

Change 3182177 on 2016/11/01 by Lina.Halper

	Fix not being able to modify Joint Target Location in detail panel

	#jira: UE-30900

Change 3182181 on 2016/11/01 by Ben.Zeigler

	Add UGameplayTagsManager::AddNativeGameplayTag to allow registering tags directly from native code. This stops them from being deleteable in the editor, and will register them even if they don't exist elsewhere
	Change internal games to use this to register their native tags. The explicit call to be done adding native tags is not required, it happens on engine post init
	Some header cleanup

Change 3182876 on 2016/11/02 by Danny.Bouimad

	Moving files

Change 3182912 on 2016/11/02 by Thomas.Sarkanen

	Added access to the viewport client from IPersonaViewport

	Allows systems to hook into the state of the client.

	#jira UE-36549 - Need to access the current viewmode in FPersonaMeshDetails

Change 3182927 on 2016/11/02 by Thomas.Sarkanen

	Initially select current asset in the asset family shortcut bar dropdown

	#jira UE-35532 - Animation dropdown submenu doesn't highlight currently selected object, where as the asset browser does

Change 3182970 on 2016/11/02 by Lukasz.Furman

	CIS fix for gameplay debugger
	copy of CL# 3165005

Change 3183123 on 2016/11/02 by Mieszko.Zielinski

	Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4

Change 3183310 on 2016/11/02 by Jurre.deBaare

	Blendspace changes:
	- Moved MarkerSync code from BlendSpaceBase.cpp to BlendSpaceUtilities.h/cpp
	- Re-ordered blendspace.h/cpp
	- const correctness where possible
	- Removed unused code paths
	- Wrapped non-runtime code paths in WITH_EDITOR

	Blendspace editor refactor:
	- Moved element generators into respective AnimationBlendSpaceHelpers.h/cpp
	- New Grid Widget class
	- Simplified Blendspace(1D) editors, most things are handled within SAnimationBlendSpaceBase
	- SBlendSpaceGridWidget handles visualization and UI interaction (modifying blendspace is done through parent SAnimationBlendSpaceBase)

Change 3183344 on 2016/11/02 by James.Golding

	UEFW-181 : Move PhysX vehicle support to a plugin
	- Added FPhysicsDelegates for several useful global physics delegates (OnUpdatePhysXMaterial, OnPhysicsAssetChanged, OnPhysSceneInit, OnPhysSceneTerm)
	- Added OnPhysScenePreTick and OnPhysSceneStep delegates to FPhysScene
	- TireType is now deprecated, just kept in Engine for backwards compat. TireConfig in PhysXVehicles plugin is new structure
	- Added 'ConvertTireTypes' editor console util which creates TireConfig's from TireTypes's (using asset registry) and PhysicalMaterials, and updates any VehicleWheel BPs

Change 3183351 on 2016/11/02 by Ben.Zeigler

	Add utility functions to convert from export text versions of tag and container, which is useful when reading tags out of the asset registry

Change 3183354 on 2016/11/02 by Ben.Zeigler

	Change fortnite to use new GameplayTag functions to parse tags in the asset registry to avoid bad stall while checking mission requirements. This only works once the mission infos have been resaved

Change 3183383 on 2016/11/02 by Thomas.Sarkanen

	Persona camera fixes

	Dont reset the camera all the time when setting skeletal meshes (we only do this the first time now).
	Add shortcuts to focus the camera using 'F' key from the skeleton tree (or anywhere else that wants to). Also add a menu option to the viewport to make this more discoverable.
	Shortcut is now handles by the viewport widget instead of the client (as this is how other viewports handle it).

	#jira UE-36458 - Stop camera from resetting when doing undo or redo in persona animation editor

Change 3183409 on 2016/11/02 by Jon.Nabozny

	#rn Allow MAX_ARRAY_SIZE and MAX_ARRAY_MEMORY from RepLayout to be user configurable.

	#jira UE-35660

Change 3183625 on 2016/11/02 by James.Golding

	Hopeful fix for Mac CIS issue in PhysXVehiclesEditor

Change 3183652 on 2016/11/02 by Ben.Zeigler

	Fix issue where commonly replicated tags didn't work if load from ini was turned off.
	Fix it so gameplay tag tree is always fully sorted alphabetically, instead of only the root tags being sorted.

Change 3183856 on 2016/11/02 by Richard.Hinckley

	#jira UEDOC-4006
	Editing GameMode and GameState documentation (in Framework branch).

Change 3183902 on 2016/11/02 by Mieszko.Zielinski

	Fixed EQS debug drawing not showing item labels #UE4

	Proper implementation of CL#3183899

	#jira UE-38122

Change 3183996 on 2016/11/02 by Jon.Nabozny

	Fix DefaultMaxRepArrayMemory value to be UINT16_MAX (65535). Was previously set to 64 * 1024 = 65536.

Change 3184129 on 2016/11/02 by Ben.Zeigler

	#jira UE-38022 Move GameplayAbilities to a plugin.
	Remove GameplayAbilitiesEditorEnabled ini setting, instead enable the "GameplayAbilities" plugin in your uproject if you want abilities, it's disabled by default
	#jira UE-6947 Remove GameplayAbilityBlueprintGeneratedClass as it's not needed and was only being used half the time
	#jira UE-19427 Fix incorrect usage of WorldContextObject in ability tasks to instead be OwningAbility, as it would crash if used on anything other than a gameplay ability object

Change 3184130 on 2016/11/02 by Ben.Zeigler

	Internal game fixups for moving gameplayabilities to a plugin

Change 3184469 on 2016/11/02 by Ben.Zeigler

	Change abilities plugin to be more obviously unsupported

Change 3184565 on 2016/11/02 by dan.reynolds

	AEOverview update with HRTF test map

Change 3184800 on 2016/11/03 by Thomas.Sarkanen

	Added "Show Selected and Parents" to bone display options

	Also fixed mis-named menu section.

	#jira UE-35375 - Add 'selected bone and parents' option to Persona viewport

Change 3184810 on 2016/11/03 by James.Golding

	Remove WoflPlat PhysX 3.3 and Apex 1.3 files

Change 3184817 on 2016/11/03 by Thomas.Sarkanen

	Added facial animation support

	Added curve table to sound wave (internal or external). Added UI support for manipulating these.

	Improved curve table editor.
	- Editor can now display curves as well as tables.
	- Sparse keys are now properly supported (where keys are not presnet at some times in some curves).

	Added curve source interface.
	Added external curve node. This allows any component or actor (BP or native) that implements ICurveSourceInterface to drive curves.
	Added new audio component that can also provide curves. This handles the preroll delay (approx 0.4 seconds, depending on audio) so the mouth can open before audio is played.

	Added bulk importer plugin.
	This imports audio & FBX files and builds cuirve data into SoundWave assets.
	- Adapted exisitng FBX curve import slightly to use FRichCurves rather than FFloatCurves.
	- Added new support for importing curves to a curve table.

	Added preview of audio to Persona.
	- Added display, filtering and playback of sound waves from the anim sequence browser.
	- Audio playback with curves routed to animation now works with anim blueprints and pose assets (as we need a pose asset to preview poses!)
	- Persona now uses an Actor rather than disparate components.
	- Added overrides for AddComponent and RemoveComponent to make sure actor is hooked up correctly.
	- Preview scene can now be manipulated by plugins etc. using a delegate when it is created.
	- Single anim instance has been slightly re-worked to do its update and evaluate logic inside of a local anim node. This allows derived classes to build functionality up component-wise by adding new nodes to the 'graph'.

	#jira UEFW-7 - Routing Sound Curves to AnimBP
	#jira UEFW-5 - Support importing curves
	#jira UE-37950 - Spawn preview actor in animation editor

Change 3184837 on 2016/11/03 by James.Golding

	PR #2896: Fix FVehicleAnimInstanceProxy::PreUpdate not calling FFAnimInstanceProxy's PreUpdate (Contributed by DenizPiri)
	#jira UE-37978

Change 3184847 on 2016/11/03 by Thomas.Sarkanen

	Fixed editor shutdown crash

	Dont try to save config when UObjects are all gone.

Change 3184853 on 2016/11/03 by James.Golding

	Stop Engine module linking against PhysX vehicle lib, link that into PhysXVehicles plugin instead.

Change 3184884 on 2016/11/03 by Thomas.Sarkanen

	Anim Blueprint thread safety is now checked in the compiler

	Added new metadata keys for classes and functions to describe their thread safety.
	Added extra warnings in the anim BP compiler based around these new keys to help people catch suspect thread usage.
	Expanded the compiler erorr reporting to allow for extra rich message tokens to be appended (for documentation etc.).
	Improved BP error reporting: Now we display the actual node name instead of CallFunction_0 etc.
	CVar forcing multithreaded update is now defaulted to off. Projects now by default enable it but can more easily opt-out.

	#doc Added link to new section of AnimGraph page, which may benefit from images etc.

	#jira UE-28283 - Look into expanding the system to determine what nodes we allow to run on worker threads.

Change 3184886 on 2016/11/03 by Thomas.Sarkanen

	Content fixes for anim BP thread safety warnings

	Ocean:
	Random Float node is unsafe (uses rand() unde rthe hood) so replaced with Random Stream.

	Odin:
	Flying Bot accessed the character blueprint inside some transitions. Cached the value in the event graph instead.

	Fortnite:
	Disable threaded update for a number of anim BPs as they were using unsafe calls when using CopyPoseFromMesh

Change 3184894 on 2016/11/03 by Thomas.Sarkanen

	Fix Mac CIS

Change 3184951 on 2016/11/03 by Thomas.Sarkanen

	Fix CIS warning on clang platforms

Change 3185176 on 2016/11/03 by James.Golding

	Hopeful fix for building PhysXVehicles plugin for mac

Change 3185289 on 2016/11/03 by Alex.Delesky

	#jira UE-37773 - Updating the Gameplay Tags UI to allow for the following:

	-Addition of a tag with comments and a specific INI location
	-An "Add Subtag" button that will allow the user to create a tag underneath a specified parent that autofills most of the information (parent name and location) for the new tag
	-A dropdown menu to allow for additional actions to be performed on a tag (rename, delete, search for references)
	-Comments for gameplay tags now show up in the tooltip forthe tag rather than the tag name if one had been specified
	-Shows a tree in the Project Settings window when viewing the gameplay tag list instead of an array

Change 3185331 on 2016/11/03 by Marc.Audy

	Remove duplicated condition from if

Change 3185426 on 2016/11/03 by James.Golding

	Another attempt at fixing mac builds of PhysXVehicles plugin

Change 3185487 on 2016/11/03 by James.Golding

	- Remove TireType assets from templates/sample, add TireConfigs instead
	- Make deprecated vehicle vars visible (but not editable), to help converting content
	- Change icon for PhysX vehicle plugin

Change 3185520 on 2016/11/03 by James.Golding

	Trying yet again to fix Mac CIS!

Change 3185542 on 2016/11/03 by Ben.Zeigler

	#jira UE-34086
	Commit modified version of PR #2665 to allow overriding crouch behavior in subclasses of CharacterMovementComponent

	#jira UE-35652
	Fix crouch behavior to not change capsule until after uncroach check, to avoid causing unnecessary physics side effects
	Also had to set the TeleportPhysics flag in this case, so add code to remember if a teleport was attempted during a deferred movement, and then apply that flag during EndScopedMovementUpdate

Change 3185570 on 2016/11/03 by Marc.Audy

	Protect against theoretical crash introduced in CL# 2049861 if CreatePackage returns null.
	Remove some autos

Change 3185749 on 2016/11/03 by dan.reynolds

	AEOverview test map addition: testing Virtual Voice

Change 3185946 on 2016/11/03 by dan.reynolds

	AEOverview tweaks - clarified success conditions for Streaming Spam and Streaming Priority maps

Change 3185972 on 2016/11/03 by Lina.Halper

	Fix issue with offset of attachment getting messed up because parent doesn't tick the animation correctly when opening level from Content Browser

	#jira: UE-31890
	#code review: Thomas.Sarkanen

Change 3186043 on 2016/11/03 by Alex.Delesky

	#jira UE-37773 - Fixing some of the gameplay tags UI based on feedback

	-Right-aligned input fields for the AddNewGameplayTag and RenameGameplayTag widgets
	-Added a divider to the GameplayTag widget that will appear when the AddNewGameplayTag widget is visible
	-Tags with comments will now display both their name and their comment in tooltips

Change 3186207 on 2016/11/03 by Alex.Delesky

	#jira UE-37773 - The Gameplay Tags widget in the project browser will no longer display the disabled checkboxes and disabled text for the tag names

Change 3186321 on 2016/11/03 by Dan.Reynolds

	Removed deprecated test asset (BP_ProceduralSoundWaveTest)

Change 3186740 on 2016/11/04 by Thomas.Sarkanen

	Removed FPersona and supporting classes

	Also removed UMorphTarget's asset type actions (as it was nearly empty and we dont use them as assets any more).

	#jira UEFW-222 - Remove FPersona

Change 3186741 on 2016/11/04 by Thomas.Sarkanen

	Fix non-unity builds

Change 3186755 on 2016/11/04 by Thomas.Sarkanen

	Prevent adding keys to read-only curves in curve tables

	Lock off the shift-LMB shortcut to add keys

	#jira UE-38210 - Crash trying to add a key to a curve table in curve view

Change 3186798 on 2016/11/04 by James.Golding

	UE-37503 - Add FHitResult output to K2_LineTraceComponent

Change 3186800 on 2016/11/04 by James.Golding

	- Remove deprecated collision functions in KismetSystemLibrary
	- Remove _NEW from collision function names, add redirectors
	- Add debug draw options (TraceColor, TraceHitColor, DrawTime) to shape traces, to match line traces (UE-35941)

Change 3186989 on 2016/11/04 by James.Golding

	Fix CIS fail in Fortnte

Change 3187081 on 2016/11/04 by Wes.Hunt

	EngineAnalytics::Shutdown now checks to see if the Analytics pointer is null OR unique before ensuring. #jira UE-38125

Change 3187135 on 2016/11/04 by Jurre.deBaare

	Fix for incorrect framework version in blendspace serialization code.

Change 3187682 on 2016/11/04 by Ben.Zeigler

	#jira UE-38289 Fix crash when replicated tag array is empty

Change 3188113 on 2016/11/05 by Mieszko.Zielinski

	Removed a bunch of deprecated AI module functions #UE4

	Cut-off point at v4.10

Change 3188119 on 2016/11/05 by Mieszko.Zielinski

	Deprecated AI functionality removal fallout fixes #UE4

Change 3188121 on 2016/11/05 by Mieszko.Zielinski

	PR #2883: Added a Cone EQS Generator (Contributed by orfeasel)

	Did some massaging on change.

	#jira UE-37685

Change 3188122 on 2016/11/05 by Mieszko.Zielinski

	Bumped EnvQueryGenerator_Cone.AlignedPointsDistance's default value up to 100, which makes a bit more sense #UE4

Change 3188442 on 2016/11/07 by James.Golding

	Check in trace debug draw test map

Change 3188463 on 2016/11/07 by james.cobbett

	Submitting Pose Snapshot test map and asset

Change 3188618 on 2016/11/07 by Thomas.Sarkanen

	Expanded pose snapshot system

	Allows poses to be stored in variables.
	Split FPoseSnapshot from FAnimInstanceProxy and made it a BlueprintType USTRUCT.
	Added modes to FAnimNode_PoseSnapshot so that we can either use the named pose or a FPoseSnapshot variable pin.
	Moved pose snapshot code into USkeletalMeshComponent as it doesnt need to be on the proxy any more.

	#jira UEFW-242 - Caching poses to a Blueprint variable (and an anim node to use it with)

Change 3188619 on 2016/11/07 by Thomas.Sarkanen

	Moved "NoResetToDefaults" to the correct metadata section in ObjectMacros.h

Change 3188642 on 2016/11/07 by Thomas.Sarkanen

	Added new test for pose variables

Change 3188716 on 2016/11/07 by Ben.Zeigler

	#jira UE-38294 Fix bad error message when adding new DefaultGameplayTags.ini file

Change 3189020 on 2016/11/07 by dan.reynolds

	Added a test map for Audio Volume Ambient Zone test for Play Sound at Location

	AVOverviewAZPlaySoundAtLocation

Change 3189188 on 2016/11/07 by Jon.Nabozny

	Fix edge cases / alternate IPv6 formats in IPAddressBSDIPv6::SetIp.

	#jira UE-36607

Change 3189199 on 2016/11/07 by Jon.Nabozny

	Flag UActorComponent, USceneComponent, and UPrimitiveComponent UFUNCTIONS as UnsafeDuringActorConstruction="true" if they
	modify unreplicated properties, require use of the PhysScene, or otherwise indicate poor design.

	#jira UE-33038

Change 3189271 on 2016/11/07 by Aaron.McLeran

	UEFW-224 Refectoring UnrealEd code to move all audio related editing code to a new AudioEditor module

	- Fixups for removals
	- Several bug fixes for sound classes

Change 3189450 on 2016/11/07 by Aaron.McLeran

	Fixes for facial animation playback progress

	- Creating a per-source PlaybackTime which can be used to get a fairly accurate playback percentage function for all platforms.
	- Allowing platforms to override to get a "sample accurate" playback time for platforms that are able.

Change 3189507 on 2016/11/07 by Wes.Hunt

	* Deprecated GetUniqueDeviceId. Use GetDeviceId now instead. #jira AN-820
	  * Added warnings to each implementation of GetDeviceId as to what API it uses, and what cert requirements may be placed on it.
	* Deprecated all platform independent usages of GetMacAddress and related functions.  #jira AN-820  #jira AN-802
	* Deprecated GetMachineId. Use GetLoginId now instead. #jira AN-811
	* Update usages of MachineID throughout CrashReporter code. Left MachineId and LoginId as available attributes.
	* Removed LocalPlayer requirement for setting the Analytics UserId in internal products. Removed fallbacks for seting UserId for internal products. #jira AN-814 #jira AN-808
	* Removed GetUniqueDeviceId code from LauncherInstaller.
	* Removed redundant MachineID and AccountID from Editor.ProgramStarted analytics event.
	* Removed DeviceID from SessionStart analytics event.

	#FYI: justin.sargent, Chris.Wood, Wes.Fudala
	* Justin, reminder that FPortalRpcResponderFactory::Create will need to start using GetLoginID instead of MacAddress for IPC identifiers.
	* Chris, look over CRP code to ensure that I didn't destroy some vital bit of necessary connection with the MachineId->LoginId name change. Both values are used, and for now, they both return the same thing.
	* Wes, we didn't need GetUnqiueDeviceId attribute in BeginSession, as no one ever uses it, so I just removed it.

Change 3190032 on 2016/11/08 by Wes.Hunt

	Fix a few places I forgot to deprecate regarding GetMacAddress.

Change 3190107 on 2016/11/08 by Wes.Hunt

	Another attempt to remove deprecation warning in CIS. Apparently removing the warning for a const string initialized via a consrtuctor with a deprecated function is somewhat tricky. Still not sure why it works on my machine either way.

Change 3190326 on 2016/11/08 by Aaron.McLeran

	Fixing CIS build warning

Change 3190495 on 2016/11/08 by Jon.Nabozny

	Fix OSSNull server / session filtering to better match SessionSettings and online OSS. Make MCP, Steam, and Null LAN queries more consistent.

	#jira UE-37512

Change 3190566 on 2016/11/08 by Martin.Wilson

	Remove warning on Least Destructive (was incorrectly applied to least destructive due to legacy reasons)

	#jira UE-27323

Change 3190631 on 2016/11/08 by Martin.Wilson

	Fix notify validation not triggering when using set time/set frame context menu options

	#jira UE-37857

Change 3190666 on 2016/11/08 by Martin.Wilson

	Add info about anim instance to additive warning

	#jira UE-35930

Change 3191290 on 2016/11/09 by Thomas.Sarkanen

	Fix skeleton tree selection disappearing when filtering changes

	Note: Copying //Tasks/UE4/Dev-UEFW132-PhATUpgrade to Dev-Framework (//UE4/Dev-Framework)

	Split SSkeletonTree into multiple files
	Items now derive from the common base class ISkeletonTreeItem.
	New skeleton tree item RTTI added modlled on the drag/drop RTTI.
	Filtering is now performed independently of tree building. Filtering and building are more extensible (more of this to come).
	Item selection is now preserved on filter change.
	Filtering now (optionally) keeps the hierarchy in place.

	#jira UE-31017 - Skeleton Selection is Lost When Changing Filters

Change 3191325 on 2016/11/09 by Thomas.Sarkanen

	Fix clang CIS

Change 3191344 on 2016/11/09 by Thomas.Sarkanen

	More clang CIS fixes

Change 3191345 on 2016/11/09 by Thomas.Sarkanen

	CIS fix: Missed another enum fwd declaration

Change 3191374 on 2016/11/09 by Thomas.Sarkanen

	Remove 4.11 deprecated functions from animation systems

	Also deprecate NativeUpdateAnimation_WorkerThread as users should no longer be calling this function (it is not run on worker threads anyways).

	#jira UE-35748 - Clean up 4.11 Deprecated functions

Change 3191375 on 2016/11/09 by Thomas.Sarkanen

	Fixup Orion hero instance after deprecation

Change 3191739 on 2016/11/09 by Marc.Audy

	PhysX Vehicle plugin needs to be loaded with -game as well, so it must be Developer, not Editor.

Change 3191827 on 2016/11/09 by Marc.Audy

	Raw Input plugin allowing support of steering wheels and flightsticks
	#jira UEFW-237

Change 3191828 on 2016/11/09 by Ben.Zeigler

	#jira UE-38384 Comment cleanup for gameplay tag library

Change 3191889 on 2016/11/09 by Ben.Zeigler

	#jira UE-38294 Fix issues with trying to set not-yet-written settings files as writable and add them to source control
	If a settings file does not yet exist on disk, also try adding to source control after writing it

Change 3191911 on 2016/11/09 by Marc.Audy

	Enable raw input plugin and configure for use with the Logitech G920 all vehicle templates and vehicle game.
	#jira UEFW-237

Change 3191915 on 2016/11/09 by Marc.Audy

	Provide useful tooltips for raw input setting properties
	#jira UEFW-237

Change 3192039 on 2016/11/09 by dan.reynolds

	AEOverview Update

	- Added a map for checking multi-channel file playback: AEOverviewMultichannel.umap

	- Incorporated AVOverviewAZPlaySoundAtLocation test into the AEOverviewMain submap list temporarily for testing purposes

Change 3192059 on 2016/11/09 by Martin.Wilson

	Fix montage thumbnail rendering with ref pose

	#jira UE-35578

Change 3192065 on 2016/11/09 by Martin.Wilson

	Widen bone reference widget to give a better view of the name and added full name to tooltip

	#jira UE-36264

Change 3192217 on 2016/11/09 by Martin.Wilson

	Auto selected current bone when opening bone reference tree

	#Jira UE-36264

Change 3192332 on 2016/11/09 by Marc.Audy

	Fix RawInput compiling when WITH_EDITOR is false
	#jira UE-38433

Change 3193061 on 2016/11/10 by Thomas.Sarkanen

	Marked facial animation plugin & component as experimental/beta

Change 3193072 on 2016/11/10 by Martin.Wilson

	Correct reference skeleton fix up order

Change 3193112 on 2016/11/10 by Danny.Bouimad

	Pesudo hair asset usintphat for testing

Change 3193243 on 2016/11/10 by Martin.Wilson

	Fix removal of USkeleton bone tree entries

	#Jira UE-37363

Change 3193249 on 2016/11/10 by Marc.Audy

	Raw input compile fixes:
	Fix additional not with_editor compile issues
	Fix static analysis warnings
	#jira UE-38433

Change 3193558 on 2016/11/10 by Martin.Wilson

	Move "Number of Curves" label creation to attribute so that it updates dynamically

	#jira UE-26767

Change 3193664 on 2016/11/10 by Marc.Audy

	PR #2919: Fixed Comment Typo in ActorComponent.cpp (Contributed by KumaKing)
	#jira UE-38436

Change 3193719 on 2016/11/10 by Lukasz.Furman

	fixed vertical jitter in replicated NavWalking movement
	#jira UE-33260

Change 3193802 on 2016/11/10 by Marc.Audy

	Remove some autos, fix NULL to nullptr, call GetWorld just once

Change 3193809 on 2016/11/10 by Marc.Audy

	Fix Mac CIS compile error
	#jira UE-38501

Change 3194053 on 2016/11/10 by Aaron.McLeran

	Fixed crash on shutdown when using audio mixer

	- Switching audio mixer to use a runnable thread rather than async tasks
	- Fixed issue where audio buffers weren't taking ownership of wave data

Change 3194057 on 2016/11/10 by Aaron.McLeran

	Adjusting channel mapping code to better support standard down-mixing for 2D multi-channel files.

	- Added support for 8 channel source files.

Change 3194070 on 2016/11/10 by Aaron.McLeran

	Fixing stupid compile error

Change 3194779 on 2016/11/11 by Jon.Nabozny

	Fixed UnsafeDuringActorConstruction tag on USceneComponent::GetPhysicsVolume.
	Missed the '=true' portion.

Change 3194967 on 2016/11/11 by Mieszko.Zielinski

	PR #2920: Bug Fix: fix pasting Behavior Tree nodes with decorators in wrong position (Contributed by BrettKercher)

	#jira UE-38443
	#jira UE-30906

Change 3195741 on 2016/11/11 by Ben.Zeigler

	#UE-38539 Stop Orion from reinitializing it's native tag dictionary when reloading menu, this was just slow before but now ensures

Change 3196655 on 2016/11/14 by Marc.Audy

	Remove pointless remove/adds from Odin DefaultEngine.ini.
	This also fixes the duplicate redirector of AnimNode_WheelHandler as the version in BaseEngine.ini has been changed where it points to
	#jira UE-38562

Change 3196678 on 2016/11/14 by Lukasz.Furman

	pass on gameplay debugger's EQS category
	copy of CL# 3195071, 3195152, 3196617 with local fixes

Change 3196700 on 2016/11/14 by Ben.Zeigler

	#jira UE-38539 Move where orion tags are initialized to earlier in the startup for all loading flows

Change 3196719 on 2016/11/14 by Thomas.Sarkanen

	Added extra output to anim BP compiler when a blueprint function call is used

	This allows us to give more info to users when unsafe things (like blueprint functions) are used.

Change 3196799 on 2016/11/14 by Jurre.deBaare

	Fix for blendspace tooltip crash
	#fix Check before dereferencing animation ptr on samples :)

Change 3196971 on 2016/11/14 by Lukasz.Furman

	replaced hardcoded value for pathfollowing's focal point distance with a parameter
	#ue4

Change 3196994 on 2016/11/14 by Marc.Audy

	Slightly improve performance of boolean check

Change 3197768 on 2016/11/14 by dan.reynolds

	AEOverview Stage 2 WIP

	- Added Command Line auto sub-level loading (-AELoadMap=MapName01,MapName02,etc.) or sub-level categories auto loading (-AELoadCat=AE,SC,STRM,AV,etc.)

	- Added Categorization menu to Main staging map to help sorting maps by category

	- Changed menu to be dynamically loaded from editable Data Structure Arrays, so all the menu information is loaded dynamically.

Change 3197782 on 2016/11/14 by dan.reynolds

	AEOverview Stage 2 WIP - fixed misnamed sub-level reference, cleaned up some of the BP

Change 3197801 on 2016/11/14 by dan.reynolds

	AEOverviewMain Stage 2 WIP:

	- Added Select All Buttom to select all loaded menu items

Change 3197988 on 2016/11/15 by Thomas.Sarkanen

	Add the ability to use incompatible meshes with snapshots

	We now use a name-based mapping to copy local poses to the correct bones in the hierarchy, similar to CopyPoseFromMesh.
	No access to UObjects (components or meshes) is performed on worker threads. Bone names are all cached on the game thread when needed and used on worker threads.

	#jira UE-38413 - Pose snapshot cannot be used across meshes with different hierarchies

Change 3198062 on 2016/11/15 by Thomas.Sarkanen

	Disabled threaded update on various anim blueprints to remove cook warnings

	#jira UE-38537 - Cooking FortniteGame results in warnings

Change 3198071 on 2016/11/15 by Thomas.Sarkanen

	Fix default values not being available to change post anim BP compilation

	Make sure we re-select with force refresh on so the details panel is rebuilt even if the objects are the same (as the customization relies upon it).

	#jira UE-38518 - Animation Blueprint: Default values cannot be changed after compiling if node is currently selected

Change 3198082 on 2016/11/15 by Jurre.deBaare

	CRASH If the Vertical Axis of a blendspace is set to 0 segments when an animation is on the blendspace the editor crashes
	#fix UI and ClampMin to 1
	#jira UE-38587

Change 3198138 on 2016/11/15 by Thomas.Sarkanen

	Expose montage functions to Blueprint

	Made sure to flag appropriate functions as not thread safe.
	Also const-corrected a few functions that should be.

	Github #2918: Blueprint Callable Montage Set/Get Position
	#jira UE-38391 - GitHub 2918 : Blueprint Callable Montage Set/Get Position

Change 3198141 on 2016/11/15 by Jurre.deBaare

	Crash from generated Merged Actor with no created lightmap UV
	#fix Always flag UV channel 0 to be occupied
	#jira UE-38520

Change 3198420 on 2016/11/15 by Thomas.Sarkanen

	Move thread-safety check flags to the UAnimBlueprint

	Then have the compiler propogate the flags to the CDO. Prevents issues where the old CDO wasnt propgated during compile-on-load.
	Also move blueprint usage warning flag into the UAnimBlueprint too, as these suffer from the same issues.

	#jira UE-38537 - Cooking FortniteGame results in warnings

Change 3198485 on 2016/11/15 by Thomas.Sarkanen

	Properly fix compile-on-load/cook warnings about anim blueprint thread safety

	Content only re-save.

	#jira UE-38537 - Cooking FortniteGame results in warnings

Change 3198622 on 2016/11/15 by Ben.Zeigler

	#jira UE-38632 Fix blueprint warning, was calling SetActive from construction script which is no longer allowed. This was being used for an editor-only debug feature

[CL 3198987 by Marc Audy in Main branch]
2016-11-15 15:29:41 -05:00

199 lines
8.3 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "AnimGraphPrivatePCH.h"
#include "AnimGraphNode_TwoBoneIK.h"
#include "DebugRenderSceneProxy.h"
#include "AnimNodeEditModes.h"
#include "AnimationCustomVersion.h"
// for customization details
#include "../../PropertyEditor/Public/PropertyHandle.h"
#include "../../PropertyEditor/Public/DetailLayoutBuilder.h"
#include "../../PropertyEditor/Public/DetailCategoryBuilder.h"
#include "../../PropertyEditor/Public/DetailWidgetRow.h"
#include "../../PropertyEditor/Public/IDetailPropertyRow.h"
#define LOCTEXT_NAMESPACE "A3Nodes"
/////////////////////////////////////////////////////
// FTwoBoneIKDelegate
class FTwoBoneIKDelegate : public TSharedFromThis<FTwoBoneIKDelegate>
{
public:
void UpdateLocationSpace(class IDetailLayoutBuilder* DetailBuilder)
{
if (DetailBuilder)
{
DetailBuilder->ForceRefreshDetails();
}
}
};
TSharedPtr<FTwoBoneIKDelegate> UAnimGraphNode_TwoBoneIK::TwoBoneIKDelegate = NULL;
/////////////////////////////////////////////////////
// UAnimGraphNode_TwoBoneIK
UAnimGraphNode_TwoBoneIK::UAnimGraphNode_TwoBoneIK(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
FText UAnimGraphNode_TwoBoneIK::GetControllerDescription() const
{
return LOCTEXT("TwoBoneIK", "Two Bone IK");
}
FText UAnimGraphNode_TwoBoneIK::GetTooltipText() const
{
return LOCTEXT("AnimGraphNode_TwoBoneIK_Tooltip", "The Two Bone IK control applies an inverse kinematic (IK) solver to a 3-joint chain, such as the limbs of a character.");
}
FText UAnimGraphNode_TwoBoneIK::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
if ((TitleType == ENodeTitleType::ListView || TitleType == ENodeTitleType::MenuTitle) && (Node.IKBone.BoneName == NAME_None))
{
return GetControllerDescription();
}
// @TODO: the bone can be altered in the property editor, so we have to
// choose to mark this dirty when that happens for this to properly work
else //if (!CachedNodeTitles.IsTitleCached(TitleType, this))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());
Args.Add(TEXT("BoneName"), FText::FromName(Node.IKBone.BoneName));
// FText::Format() is slow, so we cache this to save on performance
if (TitleType == ENodeTitleType::ListView || TitleType == ENodeTitleType::MenuTitle)
{
CachedNodeTitles.SetCachedTitle(TitleType, FText::Format(LOCTEXT("AnimGraphNode_IKBone_ListTitle", "{ControllerDescription} - Bone: {BoneName}"), Args), this);
}
else
{
CachedNodeTitles.SetCachedTitle(TitleType, FText::Format(LOCTEXT("AnimGraphNode_IKBone_Title", "{ControllerDescription}\nBone: {BoneName}"), Args), this);
}
}
return CachedNodeTitles[TitleType];
}
void UAnimGraphNode_TwoBoneIK::CopyNodeDataToPreviewNode(FAnimNode_Base* InPreviewNode)
{
FAnimNode_TwoBoneIK* TwoBoneIK = static_cast<FAnimNode_TwoBoneIK*>(InPreviewNode);
// copies Pin values from the internal node to get data which are not compiled yet
TwoBoneIK->EffectorLocation = Node.EffectorLocation;
TwoBoneIK->JointTargetLocation = Node.JointTargetLocation;
}
void UAnimGraphNode_TwoBoneIK::CopyPinDefaultsToNodeData(UEdGraphPin* InPin)
{
if (InPin->GetName() == GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, EffectorLocation))
{
GetDefaultValue(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, EffectorLocation), Node.EffectorLocation);
}
else if (InPin->GetName() == GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, JointTargetLocation))
{
GetDefaultValue(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, JointTargetLocation), Node.JointTargetLocation);
}
}
void UAnimGraphNode_TwoBoneIK::CustomizeDetails(class IDetailLayoutBuilder& DetailBuilder)
{
// initialize just once
if (!TwoBoneIKDelegate.IsValid())
{
TwoBoneIKDelegate = MakeShareable(new FTwoBoneIKDelegate());
}
EBoneControlSpace Space = Node.EffectorLocationSpace;
const FString TakeRotationPropName = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, bTakeRotationFromEffectorSpace));
const FString MaintainEffectorPropName = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, bMaintainEffectorRelRot));
const FString EffectorBoneName = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, EffectorSpaceBoneName));
const FString EffectorLocationPropName = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, EffectorLocation));
if (Space == BCS_BoneSpace || Space == BCS_ParentBoneSpace)
{
IDetailCategoryBuilder& IKCategory = DetailBuilder.EditCategory("IK");
IDetailCategoryBuilder& EffectorCategory = DetailBuilder.EditCategory("EndEffector");
TSharedPtr<IPropertyHandle> PropertyHandle;
PropertyHandle = DetailBuilder.GetProperty(*TakeRotationPropName, GetClass());
EffectorCategory.AddProperty(PropertyHandle);
PropertyHandle = DetailBuilder.GetProperty(*MaintainEffectorPropName, GetClass());
EffectorCategory.AddProperty(PropertyHandle);
PropertyHandle = DetailBuilder.GetProperty(*EffectorBoneName, GetClass());
EffectorCategory.AddProperty(PropertyHandle);
}
else // hide all properties in EndEffector category
{
TSharedPtr<IPropertyHandle> PropertyHandle = DetailBuilder.GetProperty(*EffectorLocationPropName, GetClass());
DetailBuilder.HideProperty(PropertyHandle);
PropertyHandle = DetailBuilder.GetProperty(*TakeRotationPropName, GetClass());
DetailBuilder.HideProperty(PropertyHandle);
PropertyHandle = DetailBuilder.GetProperty(*MaintainEffectorPropName, GetClass());
DetailBuilder.HideProperty(PropertyHandle);
PropertyHandle = DetailBuilder.GetProperty(*EffectorBoneName, GetClass());
DetailBuilder.HideProperty(PropertyHandle);
}
Space = Node.JointTargetLocationSpace;
bool bPinVisibilityChanged = false;
const FString JointTargetSpaceBoneName = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, JointTargetSpaceBoneName));
const FString JointTargetLocation = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, JointTargetLocation));
if (Space == BCS_BoneSpace || Space == BCS_ParentBoneSpace)
{
IDetailCategoryBuilder& IKCategory = DetailBuilder.EditCategory("IK");
IDetailCategoryBuilder& EffectorCategory = DetailBuilder.EditCategory("JointTarget");
TSharedPtr<IPropertyHandle> PropertyHandle;
PropertyHandle = DetailBuilder.GetProperty(*JointTargetSpaceBoneName, GetClass());
EffectorCategory.AddProperty(PropertyHandle);
}
else // hide all properties in JointTarget category except for JointTargetLocationSpace
{
TSharedPtr<IPropertyHandle> PropertyHandle = DetailBuilder.GetProperty(*JointTargetSpaceBoneName, GetClass());
DetailBuilder.HideProperty(PropertyHandle);
}
const FString EffectorLocationSpace = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, EffectorLocationSpace));
const FString JointTargetLocationSpace = FString::Printf(TEXT("Node.%s"), GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_TwoBoneIK, JointTargetLocationSpace));
// refresh UIs when bone space is changed
TSharedRef<IPropertyHandle> EffectorLocHandle = DetailBuilder.GetProperty(*EffectorLocationSpace, GetClass());
if (EffectorLocHandle->IsValidHandle())
{
FSimpleDelegate UpdateEffectorSpaceDelegate = FSimpleDelegate::CreateSP(TwoBoneIKDelegate.Get(), &FTwoBoneIKDelegate::UpdateLocationSpace, &DetailBuilder);
EffectorLocHandle->SetOnPropertyValueChanged(UpdateEffectorSpaceDelegate);
}
TSharedRef<IPropertyHandle> JointTragetLocHandle = DetailBuilder.GetProperty(*JointTargetLocationSpace, GetClass());
if (JointTragetLocHandle->IsValidHandle())
{
FSimpleDelegate UpdateJointSpaceDelegate = FSimpleDelegate::CreateSP(TwoBoneIKDelegate.Get(), &FTwoBoneIKDelegate::UpdateLocationSpace, &DetailBuilder);
JointTragetLocHandle->SetOnPropertyValueChanged(UpdateJointSpaceDelegate);
}
}
FEditorModeID UAnimGraphNode_TwoBoneIK::GetEditorMode() const
{
return AnimNodeEditModes::TwoBoneIK;
}
void UAnimGraphNode_TwoBoneIK::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
Ar.UsingCustomVersion(FAnimationCustomVersion::GUID);
const int32 CustomAnimVersion = Ar.CustomVer(FAnimationCustomVersion::GUID);
if (CustomAnimVersion < FAnimationCustomVersion::RenamedStretchLimits)
{
// fix up deprecated variables
Node.StartStretchRatio = Node.StretchLimits_DEPRECATED.X;
Node.MaxStretchScale = Node.StretchLimits_DEPRECATED.Y;
}
}
#undef LOCTEXT_NAMESPACE