104 Commits

Author SHA1 Message Date
guillaume arruda
e9127b98af Create IStateTreeSchemaProvider that allows a derived class to override the schema used by a parent property.
Create StateTreeAIComponent & StateTreeAIComponentSchema derived from StateTreeComponent but guaranteed to have a AIController
#rb mikko.mononen

[CL 32496296 by guillaume arruda in 5.4 branch]
2024-03-26 00:33:28 -04:00
mikko mononen
593405096e PropertyBinding: Changed the results passed to OnCanAcceptPropertyOrChildrenWithBindingChain to be consistent with the rest of the API.
#rb Mieszko.Zielinski#preflight 65cb57734e11958de197f696

[CL 31422117 by mikko mononen in 5.4 branch]
2024-02-13 08:36:26 -05:00
mikko mononen
169d800ba8 StateTree: Small UI fixes
- changed the font to default font to support all supported languages (e.g. chinese was displaying wrong)
- removed bad pattern of using new FSlateRoundedBoxBrush() in editor node tails (leaks memory)
- fixed potentially dangerous use of [this] capture in FStateTreeTransitionDetails

#rb Yoan.StAmant

[CL 30966411 by mikko mononen in 5.4 branch]
2024-01-29 07:42:12 -05:00
juan portillo
756afecf52 State Tree Details:
- Disable Category Row Buttons if Property Editing is disabled

#rb mikko.mononen
#jira UE-204437

[CL 30764358 by juan portillo in ue5-main branch]
2024-01-22 03:26:23 -05:00
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
mikko mononen
b80c371c77 StateTree: Added parameter overrides for StateTree states
#rb Yoan.StAmant

[CL 30589270 by mikko mononen in ue5-main branch]
2024-01-12 05:08:35 -05: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
f6cedab062 PropertyAccess: Added a version of the OnCanAcceptProperty which gets the property chain passed in.
#rb thomas.sarkanen

[CL 30526373 by mikko mononen in ue5-main branch]
2024-01-10 03:38:34 -05:00
mikko mononen
a0742e30e1 StateTree: Added option for State Tree parameters to be overridden.
- Added property override logic into FPropertyBagInstanceDataDetails
- Added hooks to allow to customize the peoperty override logic by deriving from FPropertyBagInstanceDataDetails
- Added array of overridden property IDs in FStateTreeReference

#rb Mieszko.Zielinski

[CL 30502099 by mikko mononen in ue5-main branch]
2024-01-09 07:30:16 -05:00
mikko mononen
400112a177 StateTree: Enabled parameters for all state types
- Allow each state to have parameters (not super useful yet)
- Made property bindings for parameters to retain binding when a param is renamed (keeps track of the property bag ID)
- Fixed access of temporary instance data with EStateTreeDataSourceType::StateParameterData
- Added comments for UStateTreeState properties
- Changed property order of UStateTreeState so that display data comes first, then state settings, and finally parameters
- Fixed FStateTreeStateParametersInstanceDataDetails to allow property editing and value binding at the same time

#rb Mieszko.Zielinski

[CL 30112368 by mikko mononen in ue5-main branch]
2023-12-05 06:59:39 -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
ben hoffman
9eb8a6c346 [State Tree] Add an option to retain property values when the class of a node changes
#rb Mikko.Mononen
#jira none

#ushell-cherrypick of 29774367 by kristof.morva1

[CL 29889580 by ben hoffman in ue5-main branch]
2023-11-22 11:37:49 -05:00
mikko mononen
2372c0c1e7 StateTree: Fixed binding validation and binding display update issues
- Added Modify() for the validation functions so that they behave nice with undo (e.g. a binding may be removed by validation)
- Changed FCachedBindingData::ConditionallyUpdateData() to check if the binding has changed so that the caching reacts to undos and other modifications
- Changed FStateTreePropertyPath::ResolveIndirectionsWithValue() to fall back to the property object type, on null objects (previous logic was preventing some valid cases on empty instances)

#rb Mieszko.Zielinski

[CL 29553170 by mikko mononen in ue5-main branch]
2023-11-08 02:26:27 -05:00
mikko mononen
f8f4294d8f StateTree: Fixed crash when trying to add binding in a tree with no parameters
- Remove check(SourceStruct) from ArePropertyAndContextStructCompatible, which was triggering when adding a binding for a tree that has no parameters (SourceStruct is nullptr for empty params)

#rb Mieszko.Zielinski

[CL 29267857 by mikko mononen in ue5-main branch]
2023-10-31 03:38:41 -04:00
mikko mononen
bf88a3cfbd StateTree: Fixed binding validation for any enums
- Combined common binding validation methods
- Moved all property binding callbacks to the shared binding data

#jira UE-197482
#rb Yoan.StAmant

[CL 29124924 by mikko mononen in ue5-main branch]
2023-10-26 02:49:53 -04:00
mikko mononen
5260606711 StateTree: Fixed invalidating binding to parameter of Object type.
#jira UE-197989

[CL 29039713 by mikko mononen in ue5-main branch]
2023-10-24 04:44:08 -04: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
aeeca0af96 State Tree:
- Fix crash when on item selected passes in nullptr

#rb Mikko.Mononen
#rnx

[CL 28320705 by juan portillo in ue5-main branch]
2023-09-28 12:21:10 -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
mikko mononen
f822bf3027 StateTree: Handle instanced objects when copying State Tree nodes
#jira UE-194520

[CL 27706736 by mikko mononen in ue5-main branch]
2023-09-08 05:51:43 -04:00
yoan stamant
8caa0ddc9c [StateTree] ResolveLeafValueStructType returns nullptr for data view with type only (null memory)
#rb mikko.mononen

[CL 26291527 by yoan stamant in ue5-main branch]
2023-06-28 13:54:43 -04:00
mikko mononen
0c9e82ff6d StateTree: Show mismatching property types on property binding
- Improved formatting of State Tree error messages
- Fixed GetDataViewByID to return true on null values but valid types (e.g. context data)
- Added check if property types match for property binding widget
- Cache current property binding data for binding widget

#jira UE-168333

[CL 26230591 by mikko mononen in ue5-main branch]
2023-06-26 06:34:49 -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
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