Node colours are now driven by combo input assets, and overridden by the combo action if a colour is set there.
This commit is contained in:
@@ -84,16 +84,6 @@ void UEdComboActionGraphNode::AutowireNewNode(UEdGraphPin* FromPin)
|
||||
|
||||
FLinearColor UEdComboActionGraphNode::GetBackgroundColor() const
|
||||
{
|
||||
// Getting Node colour based on the Settings if any found, otherwise use this logic
|
||||
if (UComboActionGraphEditorSettings *GraphEditorSettings = GetMutableDefault<UComboActionGraphEditorSettings>())
|
||||
{
|
||||
FLinearColor ReturnColour;
|
||||
if (GraphEditorSettings->FindNodeBackgroundColourOverride(this->ComboActionGraphNode->GetClass(), ReturnColour))
|
||||
{
|
||||
return ReturnColour;
|
||||
}
|
||||
}
|
||||
|
||||
return this->ComboActionGraphNode ? this->ComboActionGraphNode->GetBackgroundColor() : FLinearColor::Black;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,56 +117,6 @@ bool FComboActionSearchManager::QueryGraphNode(const FComboActionSearchFilter &S
|
||||
return bContainsSearchString;
|
||||
}
|
||||
|
||||
bool FComboActionSearchManager::QueryNodeDecorators(const FComboActionSearchFilter &SearchFilter, const FComboActionDecorator &InDecorator, const TSharedPtr<FComboActionSearchResult> &OutParentNode, int32 DecoratorIndex, FName DecoratorMemberName) const
|
||||
{
|
||||
if (SearchFilter.SearchString.IsEmpty() || !OutParentNode.IsValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool bContainsSearchString = false;
|
||||
|
||||
if (InDecorator.DecoratorType == nullptr) return false;
|
||||
|
||||
// Search by Decorator Name
|
||||
if (InDecorator.DecoratorType->GetName().Contains(SearchFilter.SearchString))
|
||||
{
|
||||
bContainsSearchString = true;
|
||||
|
||||
FString DecoratorName = InDecorator.DecoratorType->GetClass()->GetName();
|
||||
// Format Name
|
||||
{
|
||||
if (DecoratorName.Contains(TEXT("_GEN_VARIABLE")))
|
||||
{
|
||||
DecoratorName.ReplaceInline(TEXT("_GEN_VARIABLE"), TEXT(""));
|
||||
}
|
||||
if(DecoratorName.EndsWith(TEXT("_C")) && DecoratorName.StartsWith(TEXT("Default__")))
|
||||
{
|
||||
DecoratorName.RightChopInline(9);
|
||||
DecoratorName.LeftChopInline(2);
|
||||
}
|
||||
if (DecoratorName.EndsWith(TEXT("_C")))
|
||||
{
|
||||
DecoratorName.LeftChopInline(2);
|
||||
}
|
||||
}
|
||||
|
||||
const FText Category = FText::Format
|
||||
(
|
||||
LOCTEXT("DecoratorName", "Node Decorator: {0} at Index: {1}"),
|
||||
FText::FromString(DecoratorName), FText::AsNumber(DecoratorIndex)
|
||||
);
|
||||
MakeChildTextNode
|
||||
(
|
||||
OutParentNode,
|
||||
FText::FromString(DecoratorName),
|
||||
Category,
|
||||
Category.ToString()
|
||||
);
|
||||
}
|
||||
|
||||
return bContainsSearchString;
|
||||
}
|
||||
|
||||
bool FComboActionSearchManager::QuerySingleAction(const FComboActionSearchFilter &SearchFilter, const UComboActionGraph *InAction, TSharedPtr<FComboActionSearchResult> &OutParentNode)
|
||||
{
|
||||
if (SearchFilter.SearchString.IsEmpty() || !OutParentNode.IsValid() || !IsValid(InAction))
|
||||
|
||||
@@ -36,15 +36,6 @@ public:
|
||||
*/
|
||||
bool QueryGraphNode(const FComboActionSearchFilter &SearchFilter, const UEdComboActionGraphNode *InGraphNode, const TSharedPtr<class FComboActionSearchResult> &OutParentNode) const;
|
||||
|
||||
bool QueryNodeDecorators
|
||||
(
|
||||
const FComboActionSearchFilter &SearchFilter,
|
||||
const FComboActionDecorator &InDecorator,
|
||||
const TSharedPtr<class FComboActionSearchResult> &OutParentNode,
|
||||
int32 DecoratorIndex,
|
||||
FName DecoratorMemberName
|
||||
) const;
|
||||
|
||||
/**
|
||||
* Searches for InSearchString in the InAction. Adds the result as a child of OutParentNode.
|
||||
* @return True if found anything matching the InSearchString
|
||||
|
||||
Reference in New Issue
Block a user