Reverting some perf optimizations that were resulting in stale node text (have to figure out when to clear the cached text).

TTP #346788

[CL 2308590 by Mike Beach in Main branch]
This commit is contained in:
Mike Beach
2014-09-24 14:15:13 -04:00
committed by UnrealBot
parent 3beb0cd5f6
commit 7b8425fc04
24 changed files with 84 additions and 23 deletions

View File

@@ -36,7 +36,10 @@ FText UAnimGraphNode_BlendListByEnum::GetNodeTitle(ENodeTitleType::Type TitleTyp
{
return LOCTEXT("AnimGraphNode_BlendListByEnum_TitleError", "ERROR: Blend Poses (by missing enum)");
}
else if (CachedNodeTitle.IsOutOfDate())
// @TODO: don't know enough about this node type to comfortably assert that
// the BoundEnum won't change after the node has spawned... until
// then, we'll leave this optimization off
else //if (CachedNodeTitle.IsOutOfDate())
{
FFormatNamedArguments Args;
Args.Add(TEXT("EnumName"), FText::FromString(BoundEnum->GetName()));

View File

@@ -34,7 +34,9 @@ FText UAnimGraphNode_BlendSpaceEvaluator::GetNodeTitle(ENodeTitleType::Type Titl
return LOCTEXT("BlendSpaceEvaluator_NONE_Title", "(None)\nBlendspace Evaluator");
}
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
const FText BlendSpaceName = FText::FromString(Node.BlendSpace->GetName());

View File

@@ -36,7 +36,9 @@ FText UAnimGraphNode_BlendSpacePlayer::GetNodeTitle(ENodeTitleType::Type TitleTy
return LOCTEXT("BlendspacePlayer_NONE_Title", "(None)\nBlendspace Player");
}
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
const FText BlendSpaceName = FText::FromString(Node.BlendSpace->GetName());

View File

@@ -22,7 +22,9 @@ FText UAnimGraphNode_BoneDrivenController::GetNodeTitle(ENodeTitleType::Type Tit
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDesc"), GetControllerDescription());

View File

@@ -29,7 +29,9 @@ FText UAnimGraphNode_CopyBone::GetNodeTitle(ENodeTitleType::Type TitleType) cons
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -34,7 +34,9 @@ FText UAnimGraphNode_LookAt::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -34,7 +34,9 @@ FText UAnimGraphNode_ModifyBone::GetNodeTitle(ENodeTitleType::Type TitleType) co
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -28,7 +28,9 @@ FText UAnimGraphNode_RotationMultiplier::GetNodeTitle(ENodeTitleType::Type Title
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -36,7 +36,9 @@ FText UAnimGraphNode_RotationOffsetBlendSpace::GetNodeTitle(ENodeTitleType::Type
return LOCTEXT("RotationOffsetBlend_NONE_Title", "(None)\nAimOffset");
}
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
const FText BlendSpaceName = FText::FromString(Node.BlendSpace->GetName());

View File

@@ -55,7 +55,10 @@ FText UAnimGraphNode_SaveCachedPose::GetNodeTitle(ENodeTitleType::Type TitleType
{
return LOCTEXT("NewSaveCachedPose", "New Save cached pose...");
}
else if (CachedNodeTitle.IsOutOfDate())
// @TODO: don't know enough about this node type to comfortably assert that
// the CacheName won't change after the node has spawned... until
// then, we'll leave this optimization off
else //if (CachedNodeTitle.IsOutOfDate())
{
FFormatNamedArguments Args;
Args.Add(TEXT("NodeTitle"), FText::FromString(CacheName));

View File

@@ -48,7 +48,10 @@ FText UAnimGraphNode_SequenceEvaluator::GetNodeTitle(ENodeTitleType::Type TitleT
{
return LOCTEXT("EvaluateSequence_TitleNONE", "Evaluate (None)");
}
else if (CachedNodeTitle.IsOutOfDate())
// @TODO: don't know enough about this node type to comfortably assert that
// the CacheName won't change after the node has spawned... until
// then, we'll leave this optimization off
else //if (CachedNodeTitle.IsOutOfDate())
{
const FText SequenceName = FText::FromString(Node.Sequence->GetName());

View File

@@ -81,7 +81,9 @@ FText UAnimGraphNode_SequencePlayer::GetNodeTitle(ENodeTitleType::Type TitleType
{
return LOCTEXT("SequenceNullTitle", "Play (None)");
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
if(SyncGroup.GroupName == NAME_None)
{

View File

@@ -39,7 +39,9 @@ FText UAnimGraphNode_Slot::GetNodeTitle(ENodeTitleType::Type TitleType) const
return LOCTEXT("SlotNodeTitle_NoName", "(No slot name)\nSlot");
}
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("SlotName"), FText::FromName(Node.SlotName));

View File

@@ -29,7 +29,9 @@ FText UAnimGraphNode_SpringBone::GetNodeTitle(ENodeTitleType::Type TitleType) co
{
return GetControllerDescription();
}
else if(!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -76,7 +76,10 @@ FText UAnimGraphNode_StateMachineBase::GetNodeTitle(ENodeTitleType::Type TitleTy
}
else if (TitleType == ENodeTitleType::FullTitle)
{
if (CachedFullTitle.IsOutOfDate())
// @TODO: don't know enough about this node type to comfortably assert that
// the EditorStateMachineGraph won't change after the node has
// spawned... until then, we'll leave this optimization off
//if (CachedFullTitle.IsOutOfDate())
{
FFormatNamedArguments Args;
Args.Add(TEXT("Title"), FText::FromName(EditorStateMachineGraph->GetFName()));

View File

@@ -29,7 +29,9 @@ FText UAnimGraphNode_Trail::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -52,7 +52,9 @@ FText UAnimGraphNode_TwoBoneIK::GetNodeTitle(ENodeTitleType::Type TitleType) con
{
return GetControllerDescription();
}
else if (!CachedNodeTitles.IsTitleCached(TitleType))
// @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))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ControllerDescription"), GetControllerDescription());

View File

@@ -25,7 +25,10 @@ FText UAnimGraphNode_UseCachedPose::GetTooltipText() const
FText UAnimGraphNode_UseCachedPose::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
if (CachedNodeTitle.IsOutOfDate())
// @TODO: don't know enough about this node type to comfortably assert that
// the NameOfCache won't change after the node has spawned... until
// then, we'll leave this optimization off
//if (CachedNodeTitle.IsOutOfDate())
{
FFormatNamedArguments Args;
Args.Add(TEXT("CachePoseName"), FText::FromString(NameOfCache));