You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3038116 on 2016/07/05 by James.Golding Resave QA-Promotion with new heightfield GUID to fix crash on load (broken DDC in Guildford) Change 3038271 on 2016/07/05 by Lukasz.Furman fixed bug with instanced behavior tree nodes writing over memory of other nodes #jira UE-32789 Change 3038295 on 2016/07/05 by Lukasz.Furman changed behavior tree node injection to modify shared template instead of switching nodes to instanced fixes GC reference chain between AI using the same behavior tree Change 3038504 on 2016/07/05 by Zak.Middleton #ue4 - Fix typo in comment (debugging arrow). github #2352 #jira 30255 Change 3039151 on 2016/07/06 by James.Golding UE-30046 Add bAllowCPUAccess flag to UStaticMesh Change 3039281 on 2016/07/06 by Ori.Cohen Fix attached partially simulating ragdolls not moving with actor. #JIRA UE-32830 Change 3039286 on 2016/07/06 by Benn.Gallagher Fixed crash with large clothing simulation meshes. Extended max verts from ~16k to ~65k and made it so you can no longer force import clothing above the maximum threshold that the vertex buffer is allowed to hold. Change 3039313 on 2016/07/06 by Benn.Gallagher Enabled override of angular joint bias on AnimDynamics Change 3039335 on 2016/07/06 by Ori.Cohen Fixed skeletal mesh components with non simulated root bodies incorrectly detaching from component hierarchy. #JIRA UE-32833 Change 3039412 on 2016/07/06 by Ori.Cohen PR #2382: Bug when setting constraint orientation using axes parameters (Contributed by DaveC79) #JIRA UE-30725 Change 3039799 on 2016/07/06 by Tom.Looman - Renamed SuggestProjectileVelocity_MediumArc to _CustomArc and added support for high/low arcs using float param. (Migrated from Odin) - Fixed bug in override gravity for the suggest projectile velocity functions. Change 3039903 on 2016/07/06 by Ori.Cohen Ensure that skeletal mesh components do NOT teleport unless explicitly asked to. Change 3039932 on 2016/07/06 by Lina.Halper Merging using //Orion/Dev-General_to_//UE4/Dev-Framework serialize crash is always bad, so dupe checkin. Change 3040059 on 2016/07/06 by Ori.Cohen Fix bug where FixedFramerate was only clamping delta times that were above (very slow delta time was not getting changed to the fixed framerate) #JIRA UE-32730 Change 3040203 on 2016/07/06 by Jon.Nabozny Fix scaling multiple selected Actors by changing scale-base translation calculations to local space. #jira UE-32357 Change 3040211 on 2016/07/06 by Ori.Cohen Fix constraints being unselectable in phat when a render mesh is on top #JIRA UE-32479 Change 3040273 on 2016/07/06 by Ori.Cohen Fix vehicle drag adding instead of removing energy when in reverse. #JIRA UE-28957 Change 3040293 on 2016/07/06 by Zak.Middleton #ue4 - Add FMath::ClosestPointOnInfiniteLine() to distinguish it from the (poorly named) ClosestPointOnLine() that actually works on segments. Change 3040325 on 2016/07/06 by Zak.Middleton #ue4 - Avoid checking for "client only" builds when recording demos. It could be a demo recording in standalone. Minor impact to previous optimization. #udn https://udn.unrealengine.com/questions/301595/412-413-regression-in-actorgetnetmode.html Change 3040950 on 2016/07/07 by Thomas.Sarkanen Removed GWorld from FTimerManager Switched LastAssignedHandle to a static member. #jira UE-31485 - Remove GWorld from FTimerManager Change 3041054 on 2016/07/07 by Jon.Nabozny Fix warning about negation operator on FRotator introduced in CL 3040203. Change3041214on 2016/07/07 by Ori.Cohen Fix hit events on skeletal mesh component not respecting the AND between skeletal mesh component and the ragdoll bodies #JIRA UE-29538 Change 3041319 on 2016/07/07 by James.Golding UE-29771 - Rename LocalAtoms to BoneSpaceTransforms - Rename SpaceBases to ComponentSpaceTransforms Change 3041432 on 2016/07/07 by James.Golding UE-30937 Add FindCollisionUV util to GameplayStatics, but only works if you set new bSupportUVFromHitResults flag in PhysicsSettings, as we need to store UV info in the BodySetup. This is kept with the cooked mesh data in the DDC. Also remove PhysicsSettings.h from PhysicalMaterial.h Change 3041434 on 2016/07/07 by James.Golding Improve comment on UStaticMesh::bAllowCPUAccess Change 3041701 on 2016/07/07 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3041498 Change 3041760 on 2016/07/07 by Ori.Cohen Fix bug where turning collision off and on for a welded root body would not re-weld child bodies. #JIRA UE-32438 Change 3041771 on 2016/07/07 by Marc.Audy Add GetParentActor convience accessor Change 3041798 on 2016/07/07 by Marc.Audy Don't double call BeginPlay on ChildActors when loading sublevels (4.12) #jira UE-32772 Change 3041857 on 2016/07/07 by Jon.Nabozny Allow modifying and reading EnableGravity flags on individual bones within a SkeletalMeshComponent via BoneName. #jira UE-32272 Change 3041914 on 2016/07/07 by Marc.Audy Fix mismatch function prototype Change 3042041 on 2016/07/07 by Jon.Nabozny Fix CIS issue introduced by CL 3041857 Change 3042402 on 2016/07/08 by James.Golding Fix CIS after no longer globally including PhysicsSettings.h Change 3042517 on 2016/07/08 by Martin.Wilson Fix root motion when actor and component transforms do not match #jira UE-32944 Change 3043021 on 2016/07/08 by mason.seay Assets for testing poses Change 3043246 on 2016/07/08 by Marc.Audy Eliminate USoundWave::CompressionName Add USoundWave::HasCompressedFormat #jira UE-32546 Change 3044376 on 2016/07/11 by James.Golding - UE-32907 : Change UStaticMesh::GetPhysicsTriMeshData to only return required verts (ie will not return verts of sections with collision disabled) - Add UVInfo mem usage to UBodySetup::GetResourceSize - Remove BodySetup.h from EnginePrivate.h - Remove outdated comment in PhysUtils.cpp Change 3044464 on 2016/07/11 by Ori.Cohen Fix CIS #JIRA UE-33005 Change 3044519 on 2016/07/11 by Ori.Cohen PR #2379: Option to Generate Overlaps for Actor during Level Streaming (Contributed by error454) #JIRA UE-30712 Change 3044774 on 2016/07/11 by Zak.Middleton #ue4 - Fix typos in comments. Change3044854on 2016/07/11 by Mieszko.Zielinski Made AI sight's default trace channel configurable and set it to ECC_Visibility #UE4 #jira UE-32013 Change 3044855 on 2016/07/11 by Mieszko.Zielinski Fixed BB key selectors not being resolved properly in BP implemented nodes #UE4 #jira UE-32458 Change 3044887 on 2016/07/11 by Zak.Middleton #ue4 - Added new Blueprint library math/vector functions: FindClosestPointOnSegment, FindClosestPointOnLine, GetPointDistanceToSegment, GetPointDistanceToLine. - Fixed comments on FindNearestPointsOnLineSegments. - Fixed comments on FMath::PointDistToLine, and renamed "Line" parameter to "Direction". Merge CL 3036162. Change 3044910 on 2016/07/11 by Mieszko.Zielinski Fixed AISense_Sight not reporting any hits on ECC_Visibility channel #UE4 Change 3045144 on 2016/07/11 by Lukasz.Furman exposed pathfollowing's reach test modifier: goal radius as parameter of move request Change 3045174 on 2016/07/11 by Marc.Audy Remove incorrect SetMobility reference from comment #jira UE-30492 Change 3045233 on 2016/07/11 by Marc.Audy Correct function name in warning Change 3045284 on 2016/07/11 by mason.seay Test Assets for pose blending Change 3045342 on 2016/07/11 by Michael.Noland PR #2284: Added PAPER2D_API to FSpriteDrawCallRecord (Contributed by grisevg) #jira UE-29522 Change 3045343 on 2016/07/11 by Michael.Noland PR #2533: Fixed bug that caused the tabs in the Flipbook, Sprite, and CodeProject editors to show the editor name rather than the asset name (Contributed by DevVancouver) #jira UE-32403 Change 3045344 on 2016/07/11 by Michael.Noland Paper2D: Fixed BP-created tile map components being incapable of having collision generated for them (still requires calling SetLayerCollision with rebuild=true or RebuildCollision) Paper2D: Exposed the ability to directly rebuild collision on a UPaperTileMap #jira UE-31632 Change 3045382 on 2016/07/11 by Ori.Cohen Expose mobility filtering query params. Allows users to filter out static mobility for example from scene queries. #JIRA UE-29937 Change 3045529 on 2016/07/11 by Zak.Middleton #ue4 - Improve comment about FFindFloorResult.bBlockingHit, explaining it is a valid blocking hit that was not in penetration. Other conditions can be determined from the HitResult itself. Change 3045601 on 2016/07/11 by Michael.Noland Paper2D: Expose UPaperTileMap and UPaperTileSet as BlueprintType #jira UE-20962 Change 3046039 on 2016/07/12 by Jurre.deBaare Instanced HLOD materials to reduce permutations + compilation time Change 3046147 on 2016/07/12 by Ori.Cohen PR #1615: Traceworldforposition should trace async scene too #JIRA UE-21728 Change 3046180 on 2016/07/12 by Ori.Cohen Introduce a shape complexity project setting #JIRA UE-31159 Change 3046280 on 2016/07/12 by Ori.Cohen Change physics blend weights to only affect rendering data. For effects that require updating physx we recommend using the new physical animation component. #JIRA UE-31525, UE-19252 Change 3046282 on 2016/07/12 by Benn.Gallagher Fix for crash or notify corruption when reverting the "Event" struct in montage notify editor. - Made default slot 0, as a montage should always have at least one slot - Made it impossible to revert the "Event" struct as it contains stuff that shouldn't be reverted. Can still revert its members though #jira UE-32626 Change 3046284 on 2016/07/12 by Benn.Gallagher Fix for crash or notify corruption when reverting the "Event" struct in montage notify editor. - Made default slot 0, as a montage should always have at least one slot - Made it impossible to revert the "Event" struct as it contains stuff that shouldn't be reverted. Can still revert its members though (2nd CL, missed file) #jira UE-32626 Change 3046416 on 2016/07/12 by Jon.Nabozny PR #2512: Change InstancedStaticMesh allow transform update to teleport (Contributed by joelmcginnis) #jira UE32123 Change 3046428 on 2016/07/12 by Michael.Noland Paper2D: Fixed inconsistent lighting on lit grouped sprites (caused by bad normals on any grouped sprites that were rotated away from (0,0,0)) #jira UE-33055 Change 3046429 on 2016/07/12 by Michael.Noland Paper2D: Fixed inconsistent lighting on lit tilemaps in standalone or cooked builds (caused by trying to use the canonical Paper2D tangent basis before it has been initialized) #jira UE-25994 Change 3046475 on 2016/07/12 by Ori.Cohen Added strength multiplyer for physical animation #JIRA UE-33075 Change 3046518 on 2016/07/12 by Ori.Cohen Make sure to refresh contact points when turning simulation on for bodies. #JIRA UE-31286 Change 3046658 on 2016/07/12 by Ori.Cohen Fix the case where setting body blend weight doesn't turn off blend override. Change3046720on 2016/07/12 by Ori.Cohen Added option to allow skeletal mesh simulation to NOT affect component transform. #JIRA UE-33089 Change 3046908 on 2016/07/12 by Ori.Cohen Fix welded body not properly unwelding when in a chain of welded bodies #JIRA UE-32531 Change 3047015 on 2016/07/12 by Lukasz.Furman fixed nested repath requests Change 3047102 on 2016/07/12 by Ori.Cohen Added physics component to content example Change 3047848 on 2016/07/13 by Ori.Cohen Expose transform update mode to phat #JIRA UE-33227 Change 3047853 on 2016/07/13 by Ori.Cohen Update physical animation level and content. Was missing some blueprints Change 3047897 on 2016/07/13 by Ori.Cohen PR #2066: PhysX: Remove copy-paste code from LoadPhysXModules (Contributed by bozaro) #JIRA UE-27102 Change 3048026 on 2016/07/13 by Benn.Gallagher Altered reference gathering for retargetting to consider nodes in the Ubergraph. This catches refrerences as variables in the event graph and default values on event graph pins. #jira UE-23823 Change 3048592 on 2016/07/13 by Marc.Audy Change check when physics state exists but not registered to ensure and add additional logging information. #jira UE-32935 Change 3048790 on 2016/07/13 by Ori.Cohen Fix CIS for shipping physx builds. #JIRA UE-33246 Change 3048801 on 2016/07/13 by Ori.Cohen Update RootBodyTransform when ref skeleton has offset Change 3048891 on 2016/07/13 by Marc.Audy Fix copy paste bug with AudioComponent::SetPitchMultiplier Change 3049549 on 2016/07/14 by Thomas.Sarkanen Prevented stale anim asset references from persisting in wired pins Made sure to clear out the old asset in asset players when pins are made/destroyed. This requires a temporary string reference to the asset in UAnimGraphNode_AssetPlayerBase. Fixed up anim getters to properly use pin-default assets (previously they used the internal asset ptr that was not guaranteed to be in sync). Also fixe dup error messaging to be a bit more helpful when editing transition rules. Fixed up the various animation asset players to correctly display names when the asset is not set internally. Also correctly report compilation errors when pins are connected. Moved FA3NodeOptionalPinManager to new file ane renamed to FAnimBlueprintNodeOptionalPinManager to avoid circular includes. #jira UE-31015 - Asset Pins Keep Reference To Old 'Static' Asset Change 3049576 on 2016/07/14 by Thomas.Sarkanen Fix CIS linker errors Change 3049611 on 2016/07/14 by Benn.Gallagher Fixed "Isolate" checkbox in Persona mesh details not working on sections with clothing assigned (previously disabled drawing for all sections) Fixed "Highlight" checkbox in Persona mesh details not working after Section/Chunk refactor #jira UE-31016 #jira UE-33061 Change 3049663 on 2016/07/14 by Benn.Gallagher CIS fix after Persona render fixes Change 3049794 on 2016/07/14 by Marc.Audy Some cleanup and ensuring ActiveSound adds references to all of its used assets Change 3049823 on 2016/07/14 by Tom.Looman Added Player Connect and Disconnect Multicast Events to GameMode PR #2398: Player Connect and Disconnect Multicast Events (for Plugins) (Contributed by dreckard) Change 3049896 on 2016/07/14 by Ori.Cohen Fix cases where updating welded bodies is causing physx body to ignore the kinematic flag. #JIRA UE-31660 Change 3049921 on 2016/07/14 by Benn.Gallagher PR #2294: Reduce PhysX simulate() memory churn (Contributed by roberttroughton) - Modifications: Per PxScene buffers, 16 byte alignment required for simulate call, skip clothing scenes (unused, we simulate per-actor) #jira UE-29573 Change 3049929 on 2016/07/14 by Zak.Middleton #ue4 - Make GetDefault<T>(UClass*) assert that the class is castable to T. Change 3049956 on 2016/07/14 by Zak.Middleton #ue4 - Back out changelist 3049929 until I fix CastChecked<> compile issue. Change 3049992 on 2016/07/14 by Jon.Nabozny Fix infite jumps when JumpMaxHoldTime is set. Also, allow multi-jumping out of the box. #JIRA: UE-31601 Change 3050017 on 2016/07/14 by James.Golding PR #2412: Make CalcSceneView and GetProjectionData in ULocalPlayer virtual (Contributed by yehaike) Change 3050061 on 2016/07/14 by Zak.Middleton #ue4 - Make GetDefault<T>(UClass*) assert that the class is castable to T. Change 3050254 on 2016/07/14 by Marc.Audy Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 3049614 Change 3050416 on 2016/07/14 by mason.seay Test map and asset for slicing proc meshes Change 3050881 on 2016/07/14 by Zak.Middleton #ue4 - Make FSavedMove_Character::CanCombineWith easier to debug. Consolidate duplicate code to one block. github #2047 Change 3051401 on 2016/07/15 by Thomas.Sarkanen Prevented animation from restarting each time a new section is selected/inspected in the montage editor Preserved playback state when changing section. Added SetWeight function to montage instance as when switching between sections the montage would blend from ref-pose while paused. #jira UE-31014 - Moving Montage Event Unpauses Playback #jira UE-25101 - Improve Montage Replay Usability issue Change 3051717 on 2016/07/15 by Benn.Gallagher Removed call to set sleepVelocityFrameDecayConstant on destructible shapes after advice from Nvidia and investigation by some licensees. Feature was used in the past to better settle piles but now PhysX can handle it fine and by setting it we were causing a hit in island generation. #jira UE-18558 Change 3051729 on 2016/07/15 by Benn.Gallagher Changed enum combo boxes so that they use rich tooltips instead of text tooltips. - They look the same when there isn't a documentation entry for them (Just the enum name) - Enum docs stored in /Shared/Enums/{EnumType} and the excerpt names are just the enum name Change 3051825 on 2016/07/15 by Marc.Audy Display HiddenInGame for SceneComponents except when part of flattened properties in an Actor such as StaticMeshActor #jira UE-29435 Change 3051850 on 2016/07/15 by Marc.Audy Reduce priority of audio thread Add a frame sync to avoid audio thread drifiting behind Change 3051920 on 2016/07/15 by Tom.Looman Added ActorComponent Activate/Deactivate events #JIRA UE-31077 Change 3051923 on 2016/07/15 by Tom.Looman PR #2370: Exposing "OverrideWith" and "CopyProperties" in PlayerState to Blueprint Children (Contributed by eXifreXi) Change 3052038 on 2016/07/15 by Martin.Wilson Possible fix for fortnite crash + ensure incase the situation occurs again #jira UE-33258 Change 3052042 on 2016/07/15 by Jurre.deBaare Copying //Tasks/Framework/DEV-UEFW-21-AlembicImporter to Dev-Framework (//UE4/Dev-Framework) Change 3052171 on 2016/07/15 by Ori.Cohen Improve UI for constraint profiles. Polish UI for physical animation profile. #JIRA UEFW-101, UE-33290 Change 3052243 on 2016/07/15 by Martin.Wilson Pose watching: Ability to draw bones of pose at any point in the anim graph. #jira UE-12181 (originally Epic Friday project) Change 3053202 on 2016/07/18 by Thomas.Sarkanen FAnimInstanceProxy::EvaulateAnimation is now split into two for easier extensibility #jira UE-30107 - Split out part of FAnimInstanceProxy::EvaulateAnimation to allow users to use node evaluate without code duplication Change 3053203 on 2016/07/18 by Thomas.Sarkanen Fixed properties that are fed to skeletal mesh components via construction script not updating when edited Forced skeletal mesh components to re-init their anim instance on reregister when in an editor world (a previous optimization was preventing this). Switched order of RerunConstructionScripts and ReregisterAllComponentsto be in-line with the undo/redo case to prevent edits being a frame out of date. #jira UE-31890 - Variables cast from the Construction Script do not update in AnimBP AnimGraph Change 3053241 on 2016/07/18 by Martin.Wilson Add parent bone space to GetSocketTransform #jira UE-29814 Change 3053270 on 2016/07/18 by Jurre.deBaare PR #2105: Disable creation of array modifiers (Contributed by projectgheist) Change 3053273 on 2016/07/18 by Jurre.deBaare Default ini for asset viewer and HDR images #jira UE-32903 Change 3053527 on 2016/07/18 by Ori.Cohen Fix CIS #JIRA UE-33375 Change 3053620 on 2016/07/18 by Thomas.Sarkanen Socket chooser now has a search box Uses new FTextFilterExpressionEvaluator to filter bones & sockets by name. Search box has focus when the menu appears. #jira UE-23698 - Need a way to search through the Choose Socket or Bone: UI when attaching to a skeletal mesh Change 3053626 on 2016/07/18 by Martin.Wilson Fix crash caused by skeletalmeshcomponent being destroyed during a notify #jira UE-33258 Change 3053761 on 2016/07/18 by Martin.Wilson Mac build compile fix Change 3053858 on 2016/07/18 by Lina.Halper Merging using //UE4/Dev-Framework/_to_//Fortnite/Main/ Fix on crashing recursive asset Change 3053864 on 2016/07/18 by Ori.Cohen Make sure phat UI changes when picking different constraint profiles Change 3053866 on 2016/07/18 by Ori.Cohen Submit content example for constraint profiles Change 3053915 on 2016/07/18 by Lina.Halper The cached animinstance won't refresh until animation is replaced if you open while anim bp is opened This is the fix for that. #jira: UE-32927 Change 3053969 on 2016/07/18 by James.Golding PR #2571: Added a SimEventCallbackFactory (Contributed by NaturalMotionTechnology) Change 3054004 on 2016/07/18 by Ori.Cohen Fix crash in welding when children have no owner component and ensure query only does not get welded by mistake. #jira UE-33333 Change 3054410 on 2016/07/18 by Lina.Halper Fixed issue with moving translation not working with mirrored parent due to inverse position. Changed to Transform. #jira: UE-31521 Change 3054659 on 2016/07/18 by Lina.Halper Fix for retargeting of pose asset - Moved animsequence::retarget to be out to AnimationRuntime - PoseAsset is now using that function to retarget correctly #code review: Martin.Wilson, Ori.Cohen Change 3054777 on 2016/07/18 by Jurre.deBaare Fixing integration blocker, had this fix locally already #jira UE-33427 Change 3056619 on 2016/07/19 by Ori.Cohen Temporarily turn off audio threading due to heap corruption. #JIRA UE-33320 Change 3057770 on 2016/07/20 by Aaron.McLeran Doing sync trace for occlusion if audio thread is enabled #jira UE-33494 Change 3057778 on 2016/07/20 by Aaron.McLeran #jira UE-33494 Fix async line traces from audio thread causing crash (re-enable threaded audio) Change 3057788 on 2016/07/20 by Aaron.McLeran #jira UE-33494 Fix async line traces from audio thread causing crash (re-enable threaded audio) Enabling audio thread (with a capital T for True) Change 3057850 on 2016/07/20 by Ori.Cohen Temporarily turn off audio threading as the feature is still experimental Change 3057876 on 2016/07/20 by Martin.Wilson Fix Graph Linked External Object issue when saving recompressed animations #jira UE-33567 Change 3058371 on 2016/07/20 by Ori.Cohen Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) [CL 3058682 by Ori Cohen in Main branch]
271 lines
8.4 KiB
C++
271 lines
8.4 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "AnimGraphPrivatePCH.h"
|
|
#include "AnimGraphNode_Base.h"
|
|
#include "AnimationGraphSchema.h"
|
|
#include "BlueprintNodeSpawner.h"
|
|
#include "BlueprintActionDatabaseRegistrar.h"
|
|
#include "Animation/AnimInstance.h"
|
|
#include "AnimBlueprintNodeOptionalPinManager.h"
|
|
|
|
/////////////////////////////////////////////////////
|
|
// UAnimGraphNode_Base
|
|
|
|
UAnimGraphNode_Base::UAnimGraphNode_Base(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
}
|
|
|
|
void UAnimGraphNode_Base::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
|
{
|
|
FName PropertyName = (PropertyChangedEvent.Property != NULL) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
|
|
|
|
if ((PropertyName == GET_MEMBER_NAME_CHECKED(FOptionalPinFromProperty, bShowPin)))
|
|
{
|
|
GetSchema()->ReconstructNode(*this);
|
|
}
|
|
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
}
|
|
|
|
void UAnimGraphNode_Base::CreateOutputPins()
|
|
{
|
|
if (!IsSinkNode())
|
|
{
|
|
const UAnimationGraphSchema* Schema = GetDefault<UAnimationGraphSchema>();
|
|
CreatePin(EGPD_Output, Schema->PC_Struct, TEXT(""), FPoseLink::StaticStruct(), /*bIsArray=*/ false, /*bIsReference=*/ false, TEXT("Pose"));
|
|
}
|
|
}
|
|
|
|
void UAnimGraphNode_Base::InternalPinCreation(TArray<UEdGraphPin*>* OldPins)
|
|
{
|
|
// preload required assets first before creating pins
|
|
PreloadRequiredAssets();
|
|
|
|
const UAnimationGraphSchema* Schema = GetDefault<UAnimationGraphSchema>();
|
|
if (const UStructProperty* NodeStruct = GetFNodeProperty())
|
|
{
|
|
// Display any currently visible optional pins
|
|
{
|
|
FAnimBlueprintNodeOptionalPinManager OptionalPinManager(this, OldPins);
|
|
OptionalPinManager.AllocateDefaultPins(NodeStruct->Struct, NodeStruct->ContainerPtrToValuePtr<uint8>(this));
|
|
}
|
|
|
|
// Create the output pin, if needed
|
|
CreateOutputPins();
|
|
}
|
|
}
|
|
|
|
void UAnimGraphNode_Base::AllocateDefaultPins()
|
|
{
|
|
InternalPinCreation(NULL);
|
|
}
|
|
|
|
void UAnimGraphNode_Base::ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins)
|
|
{
|
|
InternalPinCreation(&OldPins);
|
|
}
|
|
|
|
FLinearColor UAnimGraphNode_Base::GetNodeTitleColor() const
|
|
{
|
|
return FLinearColor::Black;
|
|
}
|
|
|
|
UScriptStruct* UAnimGraphNode_Base::GetFNodeType() const
|
|
{
|
|
UScriptStruct* BaseFStruct = FAnimNode_Base::StaticStruct();
|
|
|
|
for (TFieldIterator<UProperty> PropIt(GetClass(), EFieldIteratorFlags::IncludeSuper); PropIt; ++PropIt)
|
|
{
|
|
if (UStructProperty* StructProp = Cast<UStructProperty>(*PropIt))
|
|
{
|
|
if (StructProp->Struct->IsChildOf(BaseFStruct))
|
|
{
|
|
return StructProp->Struct;
|
|
}
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
UStructProperty* UAnimGraphNode_Base::GetFNodeProperty() const
|
|
{
|
|
UScriptStruct* BaseFStruct = FAnimNode_Base::StaticStruct();
|
|
|
|
for (TFieldIterator<UProperty> PropIt(GetClass(), EFieldIteratorFlags::IncludeSuper); PropIt; ++PropIt)
|
|
{
|
|
if (UStructProperty* StructProp = Cast<UStructProperty>(*PropIt))
|
|
{
|
|
if (StructProp->Struct->IsChildOf(BaseFStruct))
|
|
{
|
|
return StructProp;
|
|
}
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
FString UAnimGraphNode_Base::GetNodeCategory() const
|
|
{
|
|
return TEXT("Misc.");
|
|
}
|
|
|
|
void UAnimGraphNode_Base::GetNodeAttributes( TArray<TKeyValuePair<FString, FString>>& OutNodeAttributes ) const
|
|
{
|
|
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Type" ), TEXT( "AnimGraphNode" ) ));
|
|
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Class" ), GetClass()->GetName() ));
|
|
OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Name" ), GetName() ));
|
|
}
|
|
|
|
void UAnimGraphNode_Base::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const
|
|
{
|
|
// actions get registered under specific object-keys; the idea is that
|
|
// actions might have to be updated (or deleted) if their object-key is
|
|
// mutated (or removed)... here we use the node's class (so if the node
|
|
// type disappears, then the action should go with it)
|
|
UClass* ActionKey = GetClass();
|
|
// to keep from needlessly instantiating a UBlueprintNodeSpawner, first
|
|
// check to make sure that the registrar is looking for actions of this type
|
|
// (could be regenerating actions for a specific asset, and therefore the
|
|
// registrar would only accept actions corresponding to that asset)
|
|
if (ActionRegistrar.IsOpenForRegistration(ActionKey))
|
|
{
|
|
UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass());
|
|
check(NodeSpawner != nullptr);
|
|
ActionRegistrar.AddBlueprintAction(ActionKey, NodeSpawner);
|
|
}
|
|
}
|
|
|
|
FText UAnimGraphNode_Base::GetMenuCategory() const
|
|
{
|
|
return FText::FromString(GetNodeCategory());
|
|
}
|
|
|
|
void UAnimGraphNode_Base::GetPinAssociatedProperty(const UScriptStruct* NodeType, UEdGraphPin* InputPin, UProperty*& OutProperty, int32& OutIndex)
|
|
{
|
|
OutProperty = nullptr;
|
|
OutIndex = INDEX_NONE;
|
|
|
|
//@TODO: Name-based hackery, avoid the roundtrip and better indicate when it's an array pose pin
|
|
int32 UnderscoreIndex = InputPin->PinName.Find(TEXT("_"), ESearchCase::CaseSensitive);
|
|
if (UnderscoreIndex != INDEX_NONE)
|
|
{
|
|
FString ArrayName = InputPin->PinName.Left(UnderscoreIndex);
|
|
int32 ArrayIndex = FCString::Atoi(*(InputPin->PinName.Mid(UnderscoreIndex + 1)));
|
|
|
|
if (UArrayProperty* ArrayProperty = FindField<UArrayProperty>(NodeType, *ArrayName))
|
|
{
|
|
OutProperty = ArrayProperty;
|
|
OutIndex = ArrayIndex;
|
|
}
|
|
}
|
|
|
|
// If the array check failed or we have no underscores
|
|
if(OutProperty == nullptr)
|
|
{
|
|
if (UProperty* Property = FindField<UProperty>(NodeType, *(InputPin->PinName)))
|
|
{
|
|
OutProperty = Property;
|
|
OutIndex = INDEX_NONE;
|
|
}
|
|
}
|
|
}
|
|
|
|
FPoseLinkMappingRecord UAnimGraphNode_Base::GetLinkIDLocation(const UScriptStruct* NodeType, UEdGraphPin* SourcePin)
|
|
{
|
|
if (SourcePin->LinkedTo.Num() > 0)
|
|
{
|
|
if (UAnimGraphNode_Base* LinkedNode = Cast<UAnimGraphNode_Base>(FBlueprintEditorUtils::FindFirstCompilerRelevantNode(SourcePin->LinkedTo[0])))
|
|
{
|
|
//@TODO: Name-based hackery, avoid the roundtrip and better indicate when it's an array pose pin
|
|
int32 UnderscoreIndex = SourcePin->PinName.Find(TEXT("_"), ESearchCase::CaseSensitive);
|
|
if (UnderscoreIndex != INDEX_NONE)
|
|
{
|
|
FString ArrayName = SourcePin->PinName.Left(UnderscoreIndex);
|
|
int32 ArrayIndex = FCString::Atoi(*(SourcePin->PinName.Mid(UnderscoreIndex + 1)));
|
|
|
|
if (UArrayProperty* ArrayProperty = FindField<UArrayProperty>(NodeType, *ArrayName))
|
|
{
|
|
if (UStructProperty* Property = Cast<UStructProperty>(ArrayProperty->Inner))
|
|
{
|
|
if (Property->Struct->IsChildOf(FPoseLinkBase::StaticStruct()))
|
|
{
|
|
return FPoseLinkMappingRecord::MakeFromArrayEntry(this, LinkedNode, ArrayProperty, ArrayIndex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (UStructProperty* Property = FindField<UStructProperty>(NodeType, *(SourcePin->PinName)))
|
|
{
|
|
if (Property->Struct->IsChildOf(FPoseLinkBase::StaticStruct()))
|
|
{
|
|
return FPoseLinkMappingRecord::MakeFromMember(this, LinkedNode, Property);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return FPoseLinkMappingRecord::MakeInvalid();
|
|
}
|
|
|
|
void UAnimGraphNode_Base::CreatePinsForPoseLink(UProperty* PoseProperty, int32 ArrayIndex)
|
|
{
|
|
const UAnimationGraphSchema* Schema = GetDefault<UAnimationGraphSchema>();
|
|
UScriptStruct* A2PoseStruct = FA2Pose::StaticStruct();
|
|
|
|
// pose input
|
|
const FString NewPinName = (ArrayIndex == INDEX_NONE) ? PoseProperty->GetName() : FString::Printf(TEXT("%s_%d"), *(PoseProperty->GetName()), ArrayIndex);
|
|
CreatePin(EGPD_Input, Schema->PC_Struct, TEXT(""), A2PoseStruct, /*bIsArray=*/ false, /*bIsReference=*/ false, NewPinName);
|
|
}
|
|
|
|
void UAnimGraphNode_Base::PostProcessPinName(const UEdGraphPin* Pin, FString& DisplayName) const
|
|
{
|
|
if (Pin->Direction == EGPD_Output)
|
|
{
|
|
if (Pin->PinName == TEXT("Pose"))
|
|
{
|
|
DisplayName = TEXT("");
|
|
}
|
|
}
|
|
}
|
|
|
|
bool UAnimGraphNode_Base::CanCreateUnderSpecifiedSchema(const UEdGraphSchema* DesiredSchema) const
|
|
{
|
|
return DesiredSchema->GetClass()->IsChildOf(UAnimationGraphSchema::StaticClass());
|
|
}
|
|
|
|
FString UAnimGraphNode_Base::GetDocumentationLink() const
|
|
{
|
|
return TEXT("Shared/GraphNodes/Animation");
|
|
}
|
|
|
|
void UAnimGraphNode_Base::GetPinHoverText(const UEdGraphPin& Pin, FString& HoverTextOut) const
|
|
{
|
|
if (UAnimationGraphSchema::IsLocalSpacePosePin(Pin.PinType))
|
|
{
|
|
HoverTextOut = TEXT("Animation Pose");
|
|
}
|
|
else if (UAnimationGraphSchema::IsComponentSpacePosePin(Pin.PinType))
|
|
{
|
|
HoverTextOut = TEXT("Animation Pose (Component Space)");
|
|
}
|
|
else
|
|
{
|
|
Super::GetPinHoverText(Pin, HoverTextOut);
|
|
}
|
|
}
|
|
|
|
void UAnimGraphNode_Base::HandleAnimReferenceCollection(UAnimationAsset* AnimAsset, TArray<UAnimationAsset*>& AnimationAssets) const
|
|
{
|
|
if(AnimAsset)
|
|
{
|
|
AnimAsset->HandleAnimReferenceCollection(AnimationAssets);
|
|
}
|
|
}
|