Commit Graph

40 Commits

Author SHA1 Message Date
mikko mononen
59ad526e8d StateTree: Fix source binding path validation for context structs.
[CL 25869233 by mikko mononen in ue5-main branch]
2023-06-08 08:57:12 -04:00
mikko mononen
2d3a68ef3a StateTree: Added handling bindings from instanced sources.
#rb mikko.mononen, thomas.sarkanen

[CL 25842554 by mikko mononen in ue5-main branch]
2023-06-07 09:02:19 -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
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
28bbc001af StateTree: Handle nodes with instance subobjects.
#preflight 642d643eda7f958370d22791

[CL 24926775 by mikko mononen in ue5-main branch]
2023-04-05 09:28:17 -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
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
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
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
a2f64267ed StateTree: fixed bug of a subtrees being compiled in twice
- added check to omit subtrees when traversing the base state level (the code was not expecting subtrees at that level)
- added error logging when same binding source is added multiple times

#preflight 63e4ab1a244dc45a2033e3b9

[CL 24094073 by mikko mononen in ue5-main branch]
2023-02-09 04:23:32 -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
29f4ff63e1 StateTree: bump external data handly type to 16bits to not limit max nodes to 254.
#rb Mieszko.Zielinski
#preflight 63be8591d862fdd347408bef

[CL 23648546 by mikko mononen in ue5-main branch]
2023-01-11 12:44:01 -05:00
mikko mononen
ab3816dd30 StateTree: Added global tasks
- Added global tasks which are run at tree level similar to evals (will replace evals)
	- allows initial state selection to rely in calculated data (e.g. world conditions)
	- allows better reuse of existing logic
- Call evaluator stop in reverse order
- Use some uses of mutable instanced structs
- Copy bindings along with ST nodes
- Remove bindings when removing a ST node, so that undo can restore them

#rb Yoan.StAmant
#preflight 63bd2c7968068a8bd6395d2c

[CL 23632408 by mikko mononen in ue5-main branch]
2023-01-10 15:44:28 -05:00
mikko mononen
8baac28d95 StateTree: Compiler was using wrong array when validating conditions.
#rb trivial
#preflight 6391a04d5c5308d18cab2069

[CL 23444269 by mikko mononen in ue5-main branch]
2022-12-08 04:39:33 -05:00
mikko mononen
df359ce99e StateTree: Transition improvements
- Removed gated delay (transition will be delayed until it has been "pressed" for N seconds)
- Delay now triggers after the delay duration has passed (single trigger, not "pressed", works with events too)
- Added random variation for the delay
- Tick/Event transitions has precedence over completion transitions (that is, they are handled before completion transitions)
- Removed delay and blocking from completion transitions
- Small improvements for transitions UI

#rb Mieszko.Zielinski
#preflight 6389e0b435192facc1b95cdb

[CL 23371519 by mikko mononen in ue5-main branch]
2022-12-02 07:57:31 -05:00
mikko mononen
1c69b826cc StateTree: Added node validation during compilation
- Added a pass during compilation when node and instance data can be checked and adjusted by the node
- Changed blueprint based task to copy flags to the node in Compile()
- Changed relevant gameplay interaction tasks to check tags during Compile()

#rb Mieszko.Zielinski
#preflight 6377724cf514e1ded9a5ff44

[CL 23193668 by mikko mononen in ue5-main branch]
2022-11-18 08:38:31 -05:00
mikko mononen
f57006bb63 StateTree: Fix compilation of any enum bindings.
#jira UE-166050
#preflight 63564428ae33b04ec1bc45de
#rb Mieszko.Zielinski

[CL 22783245 by mikko mononen in ue5-main branch]
2022-10-26 13:01:21 -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
mikko mononen
ab1b7f80cf StateTree: fix test and empty parameters
- handle empty subtree parameters
- changed a compiler check() to an error
- fixed tests

#jira UE-164541
#rb Mieszko.Zielinski
#preflight 632c4e77671a1a24b5ff67a6

[CL 22163478 by mikko mononen in ue5-main branch]
2022-09-23 19:58:36 -04:00
mikko mononen
780e3d6ec2 StateTree: Handle optionally bound Input properties.
#jira UE-164450
#rb none

[CL 22112889 by mikko mononen in ue5-main branch]
2022-09-21 10:45:14 -04:00