-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow Traits are now stored locally for every user #199
base: 5.x
Are you sure you want to change the base?
Flow Traits are now stored locally for every user #199
Conversation
Yes, this is intended behavior. It would serialize the That's why blueprints only save "a breakpoint was placed here", but not an "Enabled" state. Thus I cannot accept change in this form. I would gladly take it in, if you would find a way to keep this state as local, user-specific data. Not as information serialized to the game asset itself. |
Thanks for your quick response! |
Moved traits from UFlowGraphNode to UFlowGraphEditorSettings, which is using config EditorPerProjectUserSettings, so now traits will not be part of an asset. I decided to store them per node, as it was previously. Also enum EFlowTraitType was added to leave possibility to easily add new trait in future. Previously it was enough to add new UFlowGraphNode member Tested scenarios:
|
|
||
// It can represent any trait added on the specific node instance, i.e. breakpoint | ||
USTRUCT() | ||
struct FLOW_API FFlowPinTrait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved FFlowPinTrait to UFlowDebuggerSubsystem as it is used only in Editor module and represents only debug feature
|
||
// It can represent any trait added on the specific node instance, i.e. breakpoint | ||
USTRUCT() | ||
struct FLOWEDITOR_API FFlowDebugTrait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed FFlowPinTrait to FFlowDebugTrait to better show purpose of this struct. Can rename back if needed)
TArray<FFlowDebugTrait> NodeTraits; | ||
|
||
UPROPERTY() | ||
TArray<FFlowDebugTrait> PinTraits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store as TArray and not as TMap<FGuid, TArray< FFlowDebugTrait >> (where Key is Guid of Pin), because usually there will be very small amount of traits, and I think TArray would be better choice as all its elements are small and grouped in the same memory, so it is more cache-friendly.
static void ToggleTrait(const UEdGraphPin* OwnerPin, EFlowTraitType Type); | ||
|
||
/** Sets the hit flag for the all OwnerNode's traits */ | ||
static TArray<EFlowTraitType> SetAllTraitsHit(const UFlowGraphNode* OwnerNode, bool bHit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to return bitmask here? I doubt that in future there will be over 32/64 trait types
Hi, please grab the latest changes as this change has merge conflicts with just accepted Flow AddOns. |
# Conflicts: # Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp # Source/FlowEditor/Public/Graph/Widgets/SFlowGraphNode.h
Updated! |
Breakpoints state (node and pins) was not serialized and after launching editor all breakpoints was disabled.