75 Commits

Author SHA1 Message Date
yoan stamant
bfcc8840c7 [StateTree]
Updated compiler to ignore disabled states when getting next sibling states.
Fixed transition to enabled states inside a disabled parent state.
#rnx
#jira UE-192309
#rb mikko.mononen

[CL 27123326 by yoan stamant in 5.3 branch]
2023-08-15 18:06:33 -04:00
Yoan StAmant
4fc6e93d3f [StateTreeDebugger] add traces for Evaluators
#rnx
#rb maxime.mercier

[CL 26896656 by Yoan StAmant in 5.3 branch]
2023-08-07 16:01:17 -04:00
Yoan StAmant
f74ec561de [StateTreeDebuggger] Frame details view update:
- replaced node details view by embedding property values in the tree view
- node exported text (e.g. Task, Conditions, etc) is no longer imported in struct or object to avoid problems with missing types or property types with specific requirements (e.g. Object base property needs to find the specified value). Goal is to always be able to inspect key/value pairs.
- improved hierarchy of event to improve readibility
- started adding some custom row widgets for the different event types
- reworked the toolbar to regroup the different concepts (Simulation controls, Trace recording, Trace analyzing)
#rnx
#rb mikko.mononen

[CL 26854347 by Yoan StAmant in 5.3 branch]
2023-08-04 14:23:12 -04:00
yoan stamant
5e9512369a [StateTreeDebugger]
- On breakpoint hit the tree view will select and focus on the associated state and event treeview will select the event that triggered the breakpoint
- added missing trace for exiting tasks
- scrub to the record time when breakpoint is hit so events tree view is synchronized to the right time (not the latest processed time)
#rb mikko.mononen

[CL 26268572 by yoan stamant in 5.3 branch]
2023-06-27 15:58:50 -04:00
yoan stamant
0442a17cb8 [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 26147565 by yoan stamant in 5.3 branch]
2023-06-21 10:02:02 -04:00
mikko mononen
99e2d7f79f StateTree: Fix TriggerTransitions() call on tasks which have not been ticked this frame.
[CL 25946796 by mikko mononen in ue5-main branch]
2023-06-13 04:36:07 -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
yoan stamant
9deb197025 [StateTreeDebugger] updated some traces call sites in execution context
- State OnEnter no longer traced if a state is sustained (similar to OnExit)
- Added Task OnEnter for global and state tasks
- Added OnTicking and OnTicked for global tasks (same as state tasks)
#rnx
#rb none

[CL 25901710 by yoan stamant in ue5-main branch]
2023-06-09 15:27:31 -04:00
mikko mononen
77c9876457 StateTree: Fixed crash when a task is disabled
- Disabled tasks should update their DataViews

[CL 25888954 by mikko mononen in ue5-main branch]
2023-06-09 05:20:18 -04:00
yoan stamant
fe0d176e22 [StateTree]
- fixed scrub state not refreshed when selecting another instance
 -added GetInstanceName and using it instead of GetInstanceDescription for the instance tree view to get lighter UI
- used a single external scrollbar for instances and timelines treeviews
#rnx
#rb mikko.mononen

[CL 25817285 by yoan stamant in ue5-main branch]
2023-06-06 11:25:12 -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
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
yoan stamant
05bc614a8e [StateTreeDebugger]
- Added trace event for Phase (Push + Pop) to make it easier to recreate the event hierarchy when analyzing the traces.
- Merged enums EStateTreeTraceInstanceEventType and EStateTreeTraceNodeEventType to EStateTreeTraceEventType which is mainly a list of verbs that could be reused for different events (States, Instances, Tasks, etc.)
- EStateTreeUpdatePhase is no longer used as flags and reduced to uint8
- Phase events are stacked when producing traces and sent only if meaningful events (Task, State, Transition, etc.) are sent during their scope. This is to avoid sending useless events when the StateTree is ticked without any changes
#rnx
#rb mikko.mononen
#preflight 6474a5e62e05bcc3309d093e

[CL 25663847 by yoan stamant in ue5-main branch]
2023-05-29 10:13:21 -04:00
yoan stamant
8155710fd1 [StateTree debugger]
- added traces for transitions
- support for recursive state selection
- fixed breakpoints not stopping execution since timelines were added
- added meta data to types used for event visualization
- forced expansion for all treeview items in frame details
#rnx
#rb mikko.mononen
#preflight 646cb538205f5d23d5206392

[CL 25582715 by yoan stamant in ue5-main branch]
2023-05-23 10:46:16 -04:00
yoan stamant
3e732bbff9 [StateTree] type conversion fixes. Modified the enum type casts to consider underlying type to catch type conversion issue at compile time if underlying type changes.
#rnx
#rb mieszko.zielinski
#rb mikko.mononen
#preflight 45bcd343b5f0c3116c9a796

[CL 25413510 by yoan stamant in ue5-main branch]
2023-05-10 15:14:21 -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
yoan stamant
1cd242d1dc [StateTree] debugger update
- moved debugger related files to a dedicated directory
- trace provider now allows to read all timelines associated to a given state tree asset instance
- added multiple slate widgets to manage tracks and timelines (directly inspired from RewindDebugger to make it easier to integrate the tools together eventually).
- added synchronized lists of instance names and timelines
- converted EStateTreeUpdatePhase to enum flags used to build frame details hierarchically
#preflight 645a57584c3ec54e6e65f494

[CL 25390252 by yoan stamant in ue5-main branch]
2023-05-09 12:57:56 -04:00
yoan stamant
c478e602b3 [StateTree] debugger updates:
- replaced log listing by treeview (as a prototype but will be replaced by a timeline)
- added event for conditions
- added details view for Condition and Tasks instance data
#rb mikko.mononen
#preflight 644002eea35280ed4f7a6afe

[CL 25110578 by yoan stamant in ue5-main branch]
2023-04-19 13:26:23 -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
1aafe8d726 [StateTreeDebugger] replaced debug serial number mappings by single global counter.
#rnx
#rb maxime.mercier
#preflight 64130c30290c6e5d77d528b9

[CL 24672052 by yoan stamant in ue5-main branch]
2023-03-16 11:43:35 -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
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
stephen holmes
97766341ea Refactored FSructView and FConstStructView as per recent meetings. Both are now const correct in the same way TArrayView and TArrayConstView are (ie const FStructView and const FConstStructView) the view can not point at another view.
Also removed the Mutable named functions and replaced with the constness being part of the template.

#preflight 63ea4fbaec50523134d85665

[CL 24197313 by stephen holmes in ue5-main branch]
2023-02-13 20:06:02 -05:00
mikko mononen
653d387d74 StateTree: Revert clearing data views in UpdateInstanceData() as it was parameters and external data too.
#preflight 63e5f8aaf15c83b79301ac15

[CL 24116342 by mikko mononen in ue5-main branch]
2023-02-10 04:19:40 -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