46 Commits

Author SHA1 Message Date
mikko mononen
348099ee47 StateTree: Fix active instance data access when during selection.
#rb Mieszko.Zielinski
#lockdown julien.marchand

[CL 32544383 by mikko mononen in 5.4 branch]
2024-03-27 11:10:54 -04:00
mikko mononen
e669bb6cd9 StateTree: Added property references (get pointer to a property based on binding)
- Added FStateTreePropertyRef which allows to get pointer to bindable output properties in the StateTree
- This will eventually supercede FStateTreeStructRef

[CL 30563615 by mikko mononen in ue5-main branch]
2024-01-11 04:24:45 -05:00
mikko mononen
a500b14b6a StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29884503 by mikko mononen in ue5-main branch]
2023-11-22 04:08:33 -05:00
grant medine
74338326da [Backout] - CL29805076
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29810071 by grant medine in ue5-main branch]
2023-11-17 11:42:17 -05:00
mikko mononen
72c488d0cf StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29805087 by mikko mononen in ue5-main branch]
2023-11-17 07:41:08 -05:00
juan portillo
540c283bcc [StateTree]
Added test for "next selectable" transition type

#rb Mikko.Mononen
#jira UE-198276

[CL 28853257 by juan portillo in ue5-main branch]
2023-10-17 16:41:19 -04:00
yoan stamant
1e3df2603b [StateTree] Added deferred stop and validation for reentrant calls to Start/Stop/Tick.
#rb mikko.mononen

[CL 28133788 by yoan stamant in ue5-main branch]
2023-09-22 09:53:34 -04:00
mikko mononen
391e15d1d9 StateTree: Changed bindings to not derefernce soft objects during copy
[CL 27518455 by mikko mononen in ue5-main branch]
2023-08-31 08:03:46 -04:00
yoan stamant
3110bb501b On behalf of mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Improved reconciling property names when they change
- Added PropertyGuid to FStateTreePropertyPathSegment to allow reconsile changed Blueprint class and User Defined Struct property names
- Changed FStateTreePropertyPath to optionally handle property redirects and BP/UDS name changes
- Renamed UpdateInstanceStructsFromValue to UpdateSegmentsFromValue to better reflect the use
- Improved State Tree editor bindings to update when BP/UDS properties are changed

#jira UE-184193, UE-168168

[CL 26148754 by yoan stamant in ue5-main branch]
2023-06-21 10:25:47 -04:00
mikko mononen
866e20fbf7 [Backout] - CL26143160
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Improved reconciling property names when they change
- Added PropertyGuid to FStateTreePropertyPathSegment to allow reconsile changed Blueprint class and User Defined Struct property names
- Changed FStateTreePropertyPath to optionally handle property redirects and BP/UDS name changes
- Renamed UpdateInstanceStructsFromValue to UpdateSegmentsFromValue to better reflect the use
- Improved State Tree editor bindings to update when BP/UDS properties are changed

#jira UE-184193, UE-168168

[CL 26145857 by mikko mononen in ue5-main branch]
2023-06-21 08:49:48 -04:00
mikko mononen
0b159c4cd2 StateTree: Improved reconciling property names when they change
- Added PropertyGuid to FStateTreePropertyPathSegment to allow reconsile changed Blueprint class and User Defined Struct property names
- Changed FStateTreePropertyPath to optionally handle property redirects and BP/UDS name changes
- Renamed UpdateInstanceStructsFromValue to UpdateSegmentsFromValue to better reflect the use
- Improved State Tree editor bindings to update when BP/UDS properties are changed

#jira UE-184193, UE-168168

[CL 26143169 by mikko mononen in ue5-main branch]
2023-06-21 04:10:57 -04:00
mikko mononen
717ebca643 State Tree: Fix handling of subtree completion transitions.
[CL 25926321 by mikko mononen in ue5-main branch]
2023-06-12 07:34:11 -04:00
mikko mononen
0308e0f04a StateTree: Fixed and improved transition status reporting
- Allow to specify the completion status and terminal state when calling Stop() on State Tree exection context
- Global task's execution status directly translates to stree state on global EnterState (previously could just fail)
- Report terminal state transitions for global tasks (allows to use same task erro handling on states and global)
- Tie global task exection to the tree status, global tasks get ExitState() when transitioning to terminal state
- RequestTransition() was errorneuously reporting TreeRunStatus (instead of LastTickStatus) in Transition.CurrentRunStatus, this made it impossible to detect failed transitions on ExitState()

#preflight 647dae328b08a8b7939102ab

[CL 25789064 by mikko mononen in ue5-main branch]
2023-06-05 06:33:07 -04:00
mikko mononen
719a4fbc1d State Tree: Add specific state and status when the tree is stopped.
#preflight 645b86a32d27fa25b342163d

[CL 25403433 by mikko mononen in ue5-main branch]
2023-05-10 09:30:13 -04:00
mikko mononen
51aa286c45 State Tree: Added new selection behaviors for states
- Added selection behavior None (not selectable)
- Added selection behavior TryEnterState (enters the specific state, does not consider child states)
- Added selection behavior TryFollowTransitions (follows transitions when state is tried to be selected)
- Brushed up a bit the state representation in editor (added icons, cleaned up layout)

#preflight 6436843df12d5de705595942

[CL 25005118 by mikko mononen in ue5-main branch]
2023-04-12 07:59:16 -04:00
mikko mononen
364a52e761 StateTree: Fix indentation handling in FStateTreeCompiler::CreateConditions() which lead to a crash an uncorrect handling of nested expressions.
#preflight 642c08ba6a37fb35e91bfd64

[CL 24908918 by mikko mononen in ue5-main branch]
2023-04-04 08:25:50 -04:00
mikko mononen
c828983bd3 State Tree: fix delayed transitions
- Fixed bug where delayed transitions from events were not triggered properly.

#preflight 6410735f5819afacafa78ce4

[CL 24635553 by mikko mononen in ue5-main branch]
2023-03-14 10:40:47 -04:00
mikko mononen
69fc0b5edc StateTree: Sort property bindings based on layout.
- the bindings sent to the compiler are in order they were created
- sort the bindings so that e.g. copying and array and a speciific array item will first copy the earliest property (array) and then the rest (specific item)

#rb Mieszko.Zielinski
#preflight 63ef2b42500c05a624aff988

[CL 24278616 by mikko mononen in ue5-main branch]
2023-02-17 04:00:32 -05:00
mikko mononen
34a1e22051 StateTree: Allow to bind to deep property paths (including arrays and instanced struct/object)
- refactored the property binding representation, editor binding shave now more structure, and removed intermediate representation
- added functionality to resolve property paths agains a known value
- added instanced struct and object indirection types
- added editor functionality to allow to bind to further than first level of properties
- refactored editor tree traversal, allow to access values too
- simplified statetree node ui
- requires to recompile trees, bumped version

#rb Mieszko.Zielinski
#preflight 63e6204ff15c83b79312aca5

[CL 24117094 by mikko mononen in ue5-main branch]
2023-02-10 07:22:48 -05:00
mikko mononen
88b7fae0e7 StateTree: fix eval & global task dataviews after UpdateInstanceData.
#jira UE-176091
#rb Mieszko.Zielinski
#preflight 63e49a5004684547086aa714

[CL 24094032 by mikko mononen in ue5-main branch]
2023-02-09 04:20:59 -05:00
henrik karlsson
9a1d5b1ad4 [Engine/Plugins]
* Ran IWYU on ~170 plugins to remove includes not needed. Public api still keep old includes inside #if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2

#preflight 63d09351574ab9cae4670216
#rb none

[CL 23844750 by henrik karlsson in ue5-main branch]
2023-01-25 02:42:36 -05:00
mikko mononen
e2fd3455a9 StateTree: Allow tasks to request transitions
- Added ability for tasks to request transitions
- Added buffered transition requests
- Added callback method to FStateTreeTaskBase which is called during transition triggering
- Allow FStateTreeStateLink to be added to tasks and conditions (resolved automatically during compile)

#jira UE-174250
#preflight 63ca7ee8977c62635603afcb

[CL 23815873 by mikko mononen in ue5-main branch]
2023-01-23 12:48:04 -05:00
henrik karlsson
9183978e29 [Engine/Plugins]
* Removed includes (using IWYU) in private files

#preflight 63c79978ac35a0e9dabbe408
#rb none

[CL 23770038 by henrik karlsson in ue5-main branch]
2023-01-19 00:48:07 -05:00
mikko mononen
e450d18a9f StateTree Fixes and Improvements
- Use hierarchical GamplayTag match when matchin transition event tags
- When returning succeed/failed fomr a subtree, handle it as if the linked state was completed
- Call Stop() before initializing the instance data on Start() to avoid the instance data to be overritten by Stop()
- Early out Stop() if the tree is not running
- Fixed failed transition not setting OutTransition.CurrentActiveStates correctly

#preflight 637e12ee8b12eb83a71bb694

[CL 23248889 by mikko mononen in ue5-main branch]
2022-11-23 09:22:14 -05:00
mikko mononen
2c797f2adb StateTree: Changed completion transitions to trigger at the state that was first completed.
- record the first completed state on EnterState() and TickTasks()
- returning succeeded on any node in EnterState() now behaves the same as returning succeeded on Tick()

#rb Mieszko.Zielinski
#preflight 637caf2df514e1ded9f280e4

[CL 23233890 by mikko mononen in ue5-main branch]
2022-11-22 08:13:54 -05:00