Skip to main content

UKawaiiPhysicsEditorLibrary

Not officially released

This feature has not been officially released yet. It is planned for KawaiiPhysics v1.22. Specifications may change during development.

Overview​

Use Blueprint/Python to repeat node placement, bone assignment, and preset application across costume assets. UKawaiiPhysicsEditorLibrary collects, places, and edits nodes in AnimBlueprint graphs.

For running nodes, see UKawaiiPhysicsLibrary. For preset application and comparison through the editor UI, see UKawaiiPhysicsPresetDataAsset and Kawaii Node Audit.

Collection and handles​

CollectKawaiiPhysicsGraphNodes(AnimBlueprint, FilterTags, bFilterExactMatch = false) returns an array of FKawaiiPhysicsGraphNodeHandle. Empty tags match all nodes. Check IsGraphNodeHandleValid before use. Shared Publisher has a separate handle type and CollectKawaiiPhysicsSharedPublisherGraphNodes.

FindAnimBlueprintAssets(ContentPaths) returns asset paths; empty paths mean /Game. FindAnimBlueprintAssetsReferencingTags pre-filters candidates by tag. Load and inspect the returned assets before editing. C++-only FindGraphNodeByGuid and functions returning FAssetData are not exposed Blueprint nodes.

Placing and connecting nodes​

  1. Fill an FKawaiiPhysicsNodePlacementRequest with root bone, excluded bones, additional roots, tag, and optionally a preset. No preset uses node defaults; an unset tag falls back to the preset's tag.
  2. Check ValidatePlacementRequests for errors and warnings. Items prefixed Warning: are warnings; an empty array means no detected issues.
  3. Call AddKawaiiPhysicsNodes. MatchKey defaults to None; Tag, RootBone, and TagAndRootBone can identify existing nodes to update.
  4. Inspect the input pose and layout, then call CompileAnimBlueprintWithMessages. Zero means no compilation errors, a positive value is the error count, and a null ABP returns -1. OutMessages includes Error/Warning/Note prefixes.

Requests default to bAutoPosition = true and bAutoConnect = false. Auto-connect inserts nodes in series before Result. When a request enables both options, the upstream pose chain is laid out on one row. Check the resulting connections in your actual graph; this does not guarantee the intended result for every existing graph structure.

AddKawaiiPhysicsSharedPublisherNode instead defaults to bReuseExisting = true and bAutoConnect = true, and can reuse a publisher with the same tag.

Pose input, layout, and function binding​

APIBehavior and key return values
SetAnimGraphInputAnimationWalks upstream from Result to replace a SequencePlayer, or add/connect one at an unlinked input; inserts space conversion when needed
SetAnimGraphInputPoseAdds InPose, replacing a SequencePlayer; leaves a connected Input Pose unchanged. New-node count 0/1, or -1 with OutError
IsAnimGraphInputPoseConnectedChecks the above input without modification
LayoutKawaiiPhysicsAnimGraphLays out the first linked pose-input chain upstream of Result; leaves off-chain nodes in place
BindGraphNodeAnimNodeFunctionCreates/binds an AnimNode Function. None clears the binding but keeps its graph. New-graph count 0/1, or -1

These operations do not compile automatically. GetAnimGraphComments reads comments; FindBonesByPattern searches reference bone names using a regular expression.

Properties, forces, and presets​

  • SetGraphNodePropertyFromString/GetGraphNodePropertyAsString use UE property text format. Pass internal names and check success. Blueprint wildcard access uses EKawaiiPhysicsEditorAccessResult.
  • SetGraphNodeRootBoneName/SetGraphNodeTag provide dedicated setters. Shared Publisher and presets have separate string property functions.
  • GetGraphNodeExternalForcesAsJson returns an array with _structType and editable fields, using null for empty slots. SetGraphNodeExternalForcesFromJson replaces the entire array. Omitted fields use defaults; failure returns -1 with OutError and leaves the node unchanged.
  • ApplyPresetToGraphNode, GetGraphNodePresetDiffProperties/Values, and ExportGraphNodeToPreset apply, compare, or export settings. Export writes to an existing preset; it does not create a new asset.
  • SetPresetTargetTags warns and skips unregistered tags. If every name in non-empty input is invalid, it returns false without modifying the preset. Empty target tags match no nodes for project application.

ApplyPresetToProject(Preset, bDryRun, bCheckOutFiles, OutReport) applies to matching project nodes. With bDryRun = true, it collects an audit report without changing nodes and returns an applied count of 0. The batch API does not save automatically. See UKawaiiPhysicsPresetDataAsset and Kawaii Node Audit for target conditions.

Related UE documentation​