You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Skeletons are no longer dirtied when adding notifies and sync markers from animation timelines. Skeletons can still hold sync markers and notifies, but they are not mandatory and they can all be held in animation assets if required. 'Find References' for notifies and sync markers now launches the find/replace dialog when selected from the animation timeline. Removing notifies and sync markers from the skeleton now does only that. To remove from animations, use the find/replace tab. Updated BP node spawning for anim notifies to use a custom spawner, correctly use the asset registry, apply filtering and context sensitivity and move some of the code out of BlueprintGraph. Added icons to distinguish sync markers/notifies in the editing tab. Updated notify editing tab filtering to allow users to filter items from 'this' skeleton, compatible skeletons or other assets. Additionally fixed up icons for some Persona tabs that were incorrect. #jira UE-204872 #rb jaime.cifuentes, Phillip.Kavan [CL 31168417 by thomas sarkanen in ue5-main branch]
38 lines
1.6 KiB
C++
38 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AnimNotifyEventNodeSpawner.h"
|
|
#include "EditorCategoryUtils.h"
|
|
#include "Styling/AppStyle.h"
|
|
#include "Animation/AnimInstance.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "AnimNotifyEventNodeSpawner"
|
|
|
|
UAnimNotifyEventNodeSpawner* UAnimNotifyEventNodeSpawner::Create(const FSoftObjectPath& InSkeletonObjectPath, FName InNotifyName)
|
|
{
|
|
check(InNotifyName != NAME_None);
|
|
|
|
FString Label = InNotifyName.ToString();
|
|
FString CustomEventName = FString::Printf(TEXT("AnimNotify_%s"), *Label);
|
|
|
|
UAnimNotifyEventNodeSpawner* NodeSpawner = NewObject<UAnimNotifyEventNodeSpawner>(GetTransientPackage());
|
|
NodeSpawner->SkeletonObjectPath = InSkeletonObjectPath;
|
|
NodeSpawner->NodeClass = UK2Node_Event::StaticClass();
|
|
NodeSpawner->CustomEventName = *CustomEventName;
|
|
|
|
FBlueprintActionUiSpec& MenuSignature = NodeSpawner->DefaultMenuSignature;
|
|
MenuSignature.MenuName = FText::Format(LOCTEXT("EventWithSignatureName", "Event {0}"), FText::FromName(NodeSpawner->CustomEventName));
|
|
MenuSignature.Icon = FSlateIcon(FAppStyle::GetAppStyleSetName(), "GraphEditor.Event_16x");
|
|
|
|
auto PostSpawnSetupLambda = [](UEdGraphNode* NewNode, bool /*bIsTemplateNode*/)
|
|
{
|
|
UK2Node_Event* ActorRefNode = CastChecked<UK2Node_Event>(NewNode);
|
|
ActorRefNode->EventReference.SetExternalMember(ActorRefNode->CustomFunctionName, UAnimInstance::StaticClass());
|
|
};
|
|
|
|
NodeSpawner->CustomizeNodeDelegate = UBlueprintNodeSpawner::FCustomizeNodeDelegate::CreateLambda(PostSpawnSetupLambda);
|
|
NodeSpawner->DefaultMenuSignature.Category = FEditorCategoryUtils::GetCommonCategory(FCommonEditorCategory::AnimNotify);
|
|
|
|
return NodeSpawner;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE |