Skip to content

Commit

Permalink
Show/Hide class pin
Browse files Browse the repository at this point in the history
  • Loading branch information
muit committed Dec 5, 2019
1 parent 8592bec commit 2b971a9
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 101 deletions.
4 changes: 2 additions & 2 deletions ActionsExtension.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 9,
"VersionName": "1.0a",
"Version": 10,
"VersionName": "1.1",
"FriendlyName": "Actions Extension",
"Description": "A plugin that adds asynchronous tasks called Actions to UE4",
"Category": "Piperift",
Expand Down
3 changes: 2 additions & 1 deletion Source/Actions/Public/ActionLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ACTIONS_API UActionLibrary : public UBlueprintFunctionLibrary
public:

UFUNCTION(BlueprintCallable, Category = Action, meta = (DisplayName = "Create Action", BlueprintInternalUseOnly = "true", DefaultToSelf = "Owner", WorldContext = "Owner"))
static UAction* CreateAction(UObject* Owner, const TSubclassOf<UAction> Type, bool bAutoActivate = false) {
static UAction* CreateAction(UObject* Owner, const TSubclassOf<UAction> Type, bool bAutoActivate = false)
{
return UAction::Create(Owner, Type.Get(), bAutoActivate);
}
};
3 changes: 2 additions & 1 deletion Source/Editor/Private/Nodes/ActionNodeHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void FActionNodeHelpers::SetNodeFunc(UEdGraphNode* NewNode, bool /*bIsTemplateNo
UK2Node_Action* ActionNode = CastChecked<UK2Node_Action>(NewNode);
if (ClassPtr.IsValid())
{
ActionNode->PrestatedClass = ClassPtr.Get();
ActionNode->bShowClass = false;
ActionNode->ActionClass = ClassPtr.Get();
}
}

Expand Down
13 changes: 13 additions & 0 deletions Source/Editor/Private/Nodes/ActionReflection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@ bool ActionReflection::GetVisibleProperties(UClass* Class, FActionProperties& Ou
return true;
}

bool FActionProperties::operator==(const FActionProperties& Other) const
{
if (Variables.Num() != Other.Variables.Num() ||
SimpleDelegates.Num() != Other.SimpleDelegates.Num() ||
ComplexDelegates.Num() != Other.ComplexDelegates.Num())
{
return false;
}

return Equals<FVariableActionProperty>(Variables, Other.Variables)
&& Equals<FDelegateActionProperty>(SimpleDelegates, Other.SimpleDelegates)
&& Equals<FDelegateActionProperty>(ComplexDelegates, Other.ComplexDelegates);
}
14 changes: 1 addition & 13 deletions Source/Editor/Private/Nodes/ActionReflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,7 @@ struct FActionProperties
TSet<FDelegateActionProperty> ComplexDelegates;


bool operator==(const FActionProperties& Other) const
{
if (Variables.Num() != Other.Variables.Num() ||
SimpleDelegates.Num() != Other.SimpleDelegates.Num() ||
ComplexDelegates.Num() != Other.ComplexDelegates.Num())
{
return false;
}

return Equals<FVariableActionProperty>(Variables, Other.Variables)
&& Equals<FDelegateActionProperty>(SimpleDelegates, Other.SimpleDelegates)
&& Equals<FDelegateActionProperty>(ComplexDelegates, Other.ComplexDelegates);
}
bool operator==(const FActionProperties& Other) const;
bool operator!=(const FActionProperties& Other) const { return !operator==(Other); }

private:
Expand Down
Loading

0 comments on commit 2b971a9

Please sign in to comment.