RealDocs

UAnimInstance::GetSlotMontageGlobalWeight

function Engine Since 4.14
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_API

Description

Returns the global blend weight (0–1) contributed by the montage playing in the named slot, factoring in the overall montage weight in the animation graph. Unlike the local weight, this accounts for the weight of parent blend nodes above the slot.

Caveats & Gotchas

  • The global weight can differ significantly from the local weight when the slot is inside a layered blend per bone or a blend node with an independent alpha. Using the wrong weight for IK or procedural overrides leads to visible pops.
  • Not exposed to Blueprint — use Blueprint_GetSlotMontageLocalWeight for Blueprint graph access. C++ callers that need the local (not global) weight should call GetSlotMontageLocalWeight instead.

Signature

ENGINE_API float GetSlotMontageGlobalWeight(const FName& SlotNodeName) const;

Parameters

Name Type Description Default
SlotNodeName const FName& Name of the slot node to query.

Return Type

float

Example

Scale additive effect by global slot weight C++
float GlobalWeight = GetSlotMontageGlobalWeight(FName("UpperBodySlot"));
// Suppress additive effect when slot is fully active
AdditiveAlpha = FMath::Clamp(1.0f - GlobalWeight, 0.f, 1.f);

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.