Commit Graph

39 Commits

Author SHA1 Message Date
mikko mononen
00ae9d4fac StateTree: Change StateTree editor transition display to reflect the execution logic
- The execution logic will transition to Root if no state is found, change editor to reflet that
- Change viewmodel from ref to ptr to make it optional (allows to reuse the row for non-editing purposes)

[CL 30315165 by mikko mononen in ue5-main branch]
2023-12-14 02:55:56 -05:00
christopher waters
86af3ce99d Fixing various header only compile errors.
[CL 30138626 by christopher waters in ue5-main branch]
2023-12-05 17:55:30 -05:00
mikko mononen
965459a538 StateTree: Fix Mac compiler not being able to figure out implicit cast from TObjectPtr<> to UObject
[CL 30073495 by mikko mononen in ue5-main branch]
2023-12-04 03:46:59 -05:00
mikko mononen
16962d6a2f StateTree: Added Linked Asset state type, which allows to link another asset as subtree.
- Added LinkedAsset State Tree State Type
- Allow to pick nested tree asset on LinkedAsset states
- Changed how linked state params are accessed using ParentFrame
- Added temporary instance data
- Temporaries are kept around until state selection
- Create temp instance data during state selection for state parameters (allows to create enter conditions based on subtree state params)
- Instantiate and Start linked State Trees global tasks and evaluators during state selection
- Matching temporary instances created during state selection are moved to instance data on state change (rest are discarded)
- Per node instance data is looked up just once, and FStateTreeExecutionContext::GetInstanceData() only serves the specific instance data.

#rb Mieszko.Zielinski, Yoan.StAmant

[CL 30012308 by mikko mononen in ue5-main branch]
2023-11-30 07:03:20 -05:00
juan portillo
09c6561997 [StateTree]
Added "Next Selectable State" transition option which is similar to "Next State" but the difference is that if the next state fails to be selected (i.e. enter condition failed), then instead of going back up the hierarchy, it will try to select the next sibling until it finds one that is selectable or if it reached the end of the sibling list.

#rb Mikko.Mononen
#jira UE-198276

[CL 28852004 by juan portillo in ue5-main branch]
2023-10-17 16:15:53 -04:00
juan portillo
7b64d540dc State Tree:
- Added Themes, which change the coloring of both States and Tasks (tasks showing up a bit darker)

#rb Mikko.Mononen
#jira UE-196534

[CL 28231539 by juan portillo in ue5-main branch]
2023-09-26 11:50:26 -04:00
yoan stamant
fb4de53169 On behalf of mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Fixed ID clash when duplicating transitions, plus misc editor fixes
- Fix duplicate state
- Fix creating new node IDs when a whole transitions is duplicated
- Fixed state ID leaking into state names, when ID debug display is on
- Fixed updating the state tree view when task type is changed

[FYI] yoan.stamant

[CL 26149038 by yoan stamant in ue5-main branch]
2023-06-21 10:32:41 -04:00
mikko mononen
37b01a1b20 [Backout] - CL26145152
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Fixed ID clash when duplicating transitions, plus misc editor fixes
- Fix duplicate state
- Fix creating new node IDs when a whole transitions is duplicated
- Fixed state ID leaking into state names, when ID debug display is on
- Fixed updating the state tree view when task type is changed

[FYI] yoan.stamant

[CL 26145795 by mikko mononen in ue5-main branch]
2023-06-21 08:45:02 -04:00
mikko mononen
dbda318952 StateTree: Fixed ID clash when duplicating transitions, plus misc editor fixes
- Fix duplicate state
- Fix creating new node IDs when a whole transitions is duplicated
- Fixed state ID leaking into state names, when ID debug display is on
- Fixed updating the state tree view when task type is changed

[FYI] yoan.stamant

[CL 26145413 by mikko mononen in ue5-main branch]
2023-06-21 08:18:32 -04:00
yoan stamant
7d4961a65f [StateTreeDebugger]
- added option to disable state transitions
- added state transition breakpoints
- fixed scrubbing not using the right time (analysis time instead of world simulation time) when hitting a breakpoint
- fixed new instance auto selection on record when previous selection is a stale subtrack
- added console variable `statetree.displayitemids` to display states, tasks and transitions Ids in the StateTreeEditor (details view and state treeview)
#rb mikko.mononen

[CL 26128077 by yoan stamant in ue5-main branch]
2023-06-20 13:49:25 -04:00
yoan stamant
869839957a [StateTreeDebugger] breakpoint improvements
- added support for breakpoint when exiting state (was only when entering)
- added support for breakpoint when entering or exiting a task
- state breakpoints can be added from contextual menu in the TreeView or from the Debug options in the details panel
- task breakpoints can be added from the Debug options in the details panel
- added feedback labels in the details panel for states and tasks with breakpoints
#rb mikko.mononen

[CL 26016378 by yoan stamant in ue5-main branch]
2023-06-15 11:38:28 -04:00
mikko mononen
976fe6cc34 StateTree: Display state links from tasks as transitions.
[CL 25973982 by mikko mononen in ue5-main branch]
2023-06-14 06:17:56 -04:00
yoan stamant
dfdc26f0d4 [StateTree] added possibility to disable States and Tasks. Also possible to force condition result to true/false.
#jira UE-187154
#rb mikko.mononen

[CL 25796491 by yoan stamant in ue5-main branch]
2023-06-05 13:12:19 -04:00
yoan stamant
4aa4f9b1e7 [StateTree] fixed circular pointer dependency preventing proper cleanup when closing the StateTree asset editor.
#rb mikko.mononen
#rb mieszko.zielinski
#preflight 645906806c35ad81e6196519

[CL 25373066 by yoan stamant in ue5-main branch]
2023-05-08 13:32:14 -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
yoan stamant
8c35447677 [StateTree] trivial changes from review
#rnx
#rb trivial
#preflight skip

[CL 24655890 by yoan stamant in ue5-main branch]
2023-03-15 11:59:44 -04:00
mikko mononen
6784d5ed0a StateTree: collapse instead of hide invisible breakpoints
#rb trivial
[FYI] Yoan.StAmant
#preflight 64118431af3fc352925c62f7

[CL 24652145 by mikko mononen in ue5-main branch]
2023-03-15 06:18:57 -04:00
yoan stamant
64c8dca7cb [StateTreeDebugger]
Initial version of the debugger
- currently compiled by StateTreeModule and StateTreeEditorModule using WITH_STATETREE_DEBUGGER
- currently not exposed to UI by StateTree settings 'bUseDebugger'
- in this version only one instance per asset can be debugged
- using Trace services to read events generated by statetree instances.
- can connect to any traces (Editor, Client, Server) as long as the compiled statetree matches
#rb mieszko.zielinski
#preflight 641088a30e1f02786b509663

[CL 24639409 by yoan stamant in ue5-main branch]
2023-03-14 13:35:46 -04:00
mikko mononen
178c534688 State Tree: Copy and paste State Tree states.
- Refactored State Tree style to follow more recent style pattern
- Added code to ensure that State Tree states outers are always the parent state (fixes issues with FCustomizableTextObjectFactory)
- Added support for Cut/Copy/Paste of state tree states (across State Trees)
- Improved reporting of bad bindings and state links (compiler & UI)

#rb Mieszko.Zielinski
#preflight 6401b6e4aa00423335918e9d

[CL 24499706 by mikko mononen in ue5-main branch]
2023-03-03 11:22:29 -05:00
marc audy
b608402db7 [Backout] - CL24461256 to resolve nonunity errors
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
State Tree: Copy and paste State Tree states.
- Refactored State Tree style to follow more recent style pattern
- Added code to ensure that State Tree states outers are always the parent state (fixes issues with FCustomizableTextObjectFactory)
- Added support for Cut/Copy/Paste of state tree states (across State Trees)
- Improved reporting of bad bindings and state links (compiler & UI)

#rb Mieszko.Zielinski
#preflight 63ff52bef43e53f68119073e

[CL 24469431 by marc audy in ue5-main branch]
2023-03-01 15:40:35 -05:00
mikko mononen
6cf89871fe State Tree: Copy and paste State Tree states.
- Refactored State Tree style to follow more recent style pattern
- Added code to ensure that State Tree states outers are always the parent state (fixes issues with FCustomizableTextObjectFactory)
- Added support for Cut/Copy/Paste of state tree states (across State Trees)
- Improved reporting of bad bindings and state links (compiler & UI)

#rb Mieszko.Zielinski
#preflight 63ff52bef43e53f68119073e

[CL 24462230 by mikko mononen in ue5-main branch]
2023-03-01 10:10:00 -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
yohann dossantos
a0ca551c0c Revert code that was work arounding the fact that the SScrollBox slots were not configurable enough.
tests:
-placement editor drag n drop
-state tree view while resizing the scrollbox.

#jira UE-161777
#rb brooke.hubert mikko.mononen
#preflight 636017da7e083afb290e5329

[CL 22869439 by yohann dossantos in ue5-main branch]
2022-10-31 15:13:40 -04:00
mikko mononen
a43fd72984 StateTree: Editor fixes
- Updated add button to new positive button style
- Change the add-state logic to add to root or subtrees if context is present (e.g. add after)
- Renamed UStateTreeState::LinkedState to LinkedSubtree to indicate what kind of state is expected
- Removed strong reference from the treeview (was preventing a StateTree asset being deleted)
- Fixed bad colors when renaming a state

#jira UE-151757, UE-151874, UE-163569, UE-150568
#rb Mieszko.Zielinski
#preflight 63369601f76de2d4d5977b94

[CL 22271644 by mikko mononen in ue5-main branch]
2022-09-30 11:31:57 -04:00