UE3:SkeletalMeshComponent native functions (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
SkeletalMeshComponent native functions in other games:
Other member categories for this class:

Native functions

AttachClothToCollidingShapes

simulated native final function AttachClothToCollidingShapes (bool AttatchTwoWay, bool AttachTearable)


AttachComponent

native final function AttachComponent (ActorComponent Component, name BoneName, optional Object.Vector RelativeLocation, optional Object.Rotator RelativeRotation, optional Object.Vector RelativeScale)


AttachComponentToSocket

native final function AttachComponentToSocket (ActorComponent Component, name SocketName)

Attach an ActorComponent to a Socket.

DeclareFaceFXRegister

native final function DeclareFaceFXRegister (string RegName)

Declare a new register in the FaceFX register system. This is required before using the register name in GetRegister() or SetRegister().

DetachComponent

native final function DetachComponent (ActorComponent Component)


EnableClothValidBounds

simulated native final function EnableClothValidBounds (bool IfEnableClothValidBounds)


FindAnimNode

native final function AnimNode FindAnimNode (name InNodeName)

Find an Animation Node in the Animation Tree whose NodeName matches InNodeName. Warning: The search is O(n^2), so for large AnimTrees, cache result.

FindAnimSequence

native final function AnimSequence FindAnimSequence (name AnimSeqName)

Find a named AnimSequence from the AnimSets array in the SkeletalMeshComponent. This searches array from end to start, so specific sequence can be replaced by putting a set containing a sequence with the same name later in the array.

Parameters:

  • AnimSeqName - Name of AnimSequence to look for.

Returns:

Pointer to found AnimSequence. Returns NULL if could not find sequence with that name.

FindBodyInstanceNamed

final native function RB_BodyInstance FindBodyInstanceNamed (name BoneName)

Find a BodyInstance by BoneName

FindClosestBone

native final function name FindClosestBone (Object.Vector TestLocation, optional out Object.Vector BoneLocation, optional float IgnoreScale)

finds the closest bone to the given location

Parameters:

  • TestLocation - the location to test against
  • BoneLocation - optional, out) if specified, set to the world space location of the bone that was found, or (0,0,0) if no bone was found
  • IgnoreScale - optional) if specified, only bones with scaling larger than the specified factor are considered

Returns:

the name of the bone that was found, or 'None' if no bone was found

FindComponentAttachedToBone

native final function ActorComponent FindComponentAttachedToBone (name InBoneName)

Returns component attached to specified BoneName. (returns the first entry found).

Parameters:

  • BoneName - Bone Name to look up.

Returns:

First ActorComponent found, attached to BoneName, if it exists.

FindConstraintBoneName

final native function name FindConstraintBoneName (int ConstraintIndex)


FindConstraintIndex

final native function int FindConstraintIndex (name ConstraintName)


FindMorphNode

native final function MorphNodeBase FindMorphNode (name InNodeName)


FindMorphTarget

native final function MorphTarget FindMorphTarget (name MorphTargetName)

Find a named MorphTarget from the MorphSets array in the SkeletalMeshComponent. This searches the array in the same way as FindAnimSequence

Parameters:

  • AnimSeqName - Name of MorphTarget to look for.

Returns:

Pointer to found MorphTarget. Returns NULL if could not find target with that name.

FindSkelControl

native final function SkelControlBase FindSkelControl (name InControlName)


ForceSkelUpdate

native final function ForceSkelUpdate ()

forces an update to the mesh's skeleton/attachments, even if bUpdateSkelWhenNotRendered is false and it has not been recently rendered

Note: if bUpdateSkelWhenNotRendered is true, there is no reason to call this function (but doing so anyway will have no effect)

GetBoneAxis

native final function Object.Vector GetBoneAxis (name BoneName, Object.EAxis Axis)

finds a vector pointing along the given axis of the given bone

Parameters:

  • BoneName - the name of the bone to find
  • Axis - the axis of that bone to return

Returns:

the direction of the specified axis, or (0,0,0) if the specified bone was not found

GetBoneLocation

native final function Object.Vector GetBoneLocation (name BoneName, optional int Space)


GetBoneMatrix

native final function Object.Matrix GetBoneMatrix (int BoneIndex)

returns the matrix of the bone at the specified index

GetBoneNames

native final function GetBoneNames (out array<nameBoneNames)

fills the given array with the names of all the bones in this component's current SkeletalMesh

GetBoneQuaternion

native final function Object.Quat GetBoneQuaternion (name BoneName, optional int Space)


GetBonesWithinRadius

native final function bool GetBonesWithinRadius (Object.Vector Origin, float Radius, int TraceFlags, out array<nameout_Bones)

Find all bones by name within given radius

GetClothAttachmentResponseCoefficient

simulated native final function float GetClothAttachmentResponseCoefficient ()


GetClothAttachmentTearFactor

simulated native final function float GetClothAttachmentTearFactor ()


GetClothBendingStiffness

simulated native final function float GetClothBendingStiffness ()


GetClothCollisionResponseCoefficient

simulated native final function float GetClothCollisionResponseCoefficient ()


GetClothDampingCoefficient

simulated native final function float GetClothDampingCoefficient ()


GetClothFlags

simulated native final function int GetClothFlags ()


GetClothFriction

simulated native final function float GetClothFriction ()


GetClothPressure

simulated native final function float GetClothPressure ()


GetClothSleepLinearVelocity

simulated native final function float GetClothSleepLinearVelocity ()


GetClothSolverIterations

simulated native final function int GetClothSolverIterations ()


GetClothStretchingStiffness

simulated native final function float GetClothStretchingStiffness ()


GetClothTearFactor

simulated native final function float GetClothTearFactor ()


GetClothThickness

simulated native final function float GetClothThickness ()


GetFaceFXRegister

native final function float GetFaceFXRegister (string RegName)

Retrieve the value of the specified FaceFX register.

GetParentBone

native final function name GetParentBone (name BoneName)

returns the name of the parent bone for the specified bone. Returns 'None' if the bone does not exist or it is the root bone

GetSocketByName

native final function SkeletalMeshSocket GetSocketByName (name InSocketName)

Returns SkeletalMeshSocket of named socket on the skeletal mesh component. Returns None if not found.

GetSocketWorldLocationAndRotation

native final function bool GetSocketWorldLocationAndRotation (name InSocketName, out Object.Vector OutLocation, optional out Object.Rotator OutRotation)

Find the current world space location and rotation of a named socket on the skeletal mesh component. If the socket is not found, then it returns false and does not change the OutLocation/OutRotation variables.

Parameters:

  • InSocketName - the name of the socket to find
  • OutLocation - out) set to the world space location of the socket
  • OutRotation - out) if specified, set to the world space rotation of the socket

Returns:

whether or not the socket was found

InitSkelControls

native final function InitSkelControls ()


IsComponentAttached

native final function bool IsComponentAttached (ActorComponent Component, optional name BoneName)

Returns true if component is attached to skeletal mesh.

Parameters:

  • Component - ActorComponent to check for.

Returns:

true if Component is attached to SkeletalMesh.

IsPlayingFaceFXAnim

native final function bool IsPlayingFaceFXAnim ()

Is playing a FaceFX animation.

MatchRefBone

native final function int MatchRefBone (name BoneName)

returns the bone index of the specified bone, or INDEX_NONE if it couldn't be found

PlayFaceFXAnim

native final function bool PlayFaceFXAnim (FaceFXAnimSet FaceFXAnimSetRef, string AnimName, string GroupName)

Play the specified FaceFX animation. Returns TRUE if successful. If animation couldn't be found, a log warning will be issued.

ResetClothVertsToRefPose

simulated native final function ResetClothVertsToRefPose ()

Move all vertices in the cloth to the reference pose and zero their velocity.

RestoreSavedAnimSets

native final function RestoreSavedAnimSets ()

Restores saved AnimSets to the master list of AnimSets and clears the temporary saved list of AnimSets.

SaveAnimSets

native final function SaveAnimSets ()

Saves the skeletal component's current AnimSets to a temporary buffer. You can restore them later by calling RestoreSavedAnimSets().

SetAnimTreeTemplate

native final function SetAnimTreeTemplate (AnimTree NewTemplate)


SetAttachClothVertsToBaseBody

simulated native final function SetAttachClothVertsToBaseBody (bool bAttachVerts)

Attach/detach verts from physics body that this components actor is attached to.

SetClothAttachmentResponseCoefficient

simulated native final function SetClothAttachmentResponseCoefficient (float ClothAttachmentResponseCoefficient)


SetClothAttachmentTearFactor

simulated native final function SetClothAttachmentTearFactor (float ClothAttachTearFactor)


SetClothBendingStiffness

simulated native final function SetClothBendingStiffness (float ClothBendingStiffness)


SetClothCollisionResponseCoefficient

simulated native final function SetClothCollisionResponseCoefficient (float ClothCollisionResponseCoefficient)


SetClothDampingCoefficient

simulated native final function SetClothDampingCoefficient (float ClothDampingCoefficient)


SetClothExternalForce

simulated native final function SetClothExternalForce (Object.Vector InForce)

Modify the external force that is applied to the cloth. Will continue to be applied until it is changed.

SetClothFlags

simulated native final function SetClothFlags (int ClothFlags)


SetClothFriction

simulated native final function SetClothFriction (float ClothFriction)


SetClothFrozen

simulated native final function SetClothFrozen (bool bNewFrozen)

Toggle active simulation of cloth. Cheaper than doing SetEnableClothSimulation, and keeps its shape while frozen.

SetClothPosition

simulated native final function SetClothPosition (Object.Vector ClothOffSet)


SetClothPressure

simulated native final function SetClothPressure (float ClothPressure)


SetClothSleep

simulated native final function SetClothSleep (bool IfClothSleep)


SetClothSleepLinearVelocity

simulated native final function SetClothSleepLinearVelocity (float ClothSleepLinearVelocity)


SetClothSolverIterations

simulated native final function SetClothSolverIterations (int ClothSolverIterations)


SetClothStretchingStiffness

simulated native final function SetClothStretchingStiffness (float ClothStretchingStiffness)


SetClothTearFactor

simulated native final function SetClothTearFactor (float ClothTearFactor)


SetClothThickness

simulated native final function SetClothThickness (float ClothThickness)


SetClothValidBounds

simulated native final function SetClothValidBounds (Object.Vector ClothValidBoundsMin, Object.Vector ClothValidBoundsMax)


SetClothVelocity

simulated native final function SetClothVelocity (Object.Vector VelocityOffSet)


SetEnableClothSimulation

simulated native final function SetEnableClothSimulation (bool bInEnable)

Turn on and off cloth simulation for this skeletal mesh.

SetFaceFXRegister

native final function SetFaceFXRegister (string RegName, float RegVal, EFaceFXRegOp RegOp, optional float InterpDuration)

Set the value and operation of the specified FaceFX register.

SetFaceFXRegisterEx

native final function SetFaceFXRegisterEx (string RegName, EFaceFXRegOp RegOp, float FirstValue, float FirstInterpDuration, float NextValue, float NextInterpDuration)

Set the value and operation of the specified FaceFX register.

SetForceRefPose

simulated native final function SetForceRefPose (bool bNewForceRefPose)

Change whether to force mesh into ref pose (and use cheaper vertex shader)

SetHasPhysicsAssetInstance

final native function SetHasPhysicsAssetInstance (bool bHasInstance)

Set value of bHasPhysicsAssetInstance flag. Will create/destroy PhysicsAssetInstance as desired.

SetParentAnimComponent

native final function SetParentAnimComponent (SkeletalMeshComponent NewParentAnimComp)


SetPhysicsAsset

simulated native final function SetPhysicsAsset (PhysicsAsset NewPhysicsAsset, optional bool bForceReInit)

Change the Physics Asset of the mesh

SetSkeletalMesh

simulated native final function SetSkeletalMesh (SkeletalMesh NewMesh, optional bool bKeepSpaceBases)

Change the SkeletalMesh that is rendered for this Component. Will re-initialize the animation tree etc.

StopFaceFXAnim

native final function StopFaceFXAnim ()

Stop any currently playing FaceFX animation.

TransformFromBoneSpace

native final function TransformFromBoneSpace (name BoneName, Object.Vector InPosition, Object.Rotator InRotation, out Object.Vector OutPosition, out Object.Rotator OutRotation)

Transform a location/rotation in bone relative space to world space.

TransformToBoneSpace

native final function TransformToBoneSpace (name BoneName, Object.Vector InPosition, Object.Rotator InRotation, out Object.Vector OutPosition, out Object.Rotator OutRotation)

Transform a location/rotation from world space to bone relative space. This is handy if you know the location in world space for a bone attachment, as AttachComponent takes location/rotation in bone-relative space.

UpdateAnimations

native final function UpdateAnimations ()

Force AnimTree to recache all animations. Call this when the AnimSets array has been changed.

UpdateClothParams

simulated native final function UpdateClothParams ()

Update params of the this components internal cloth sim from the SkeletalMesh properties.

UpdateParentBoneMap

native final function UpdateParentBoneMap ()


UpdateRBBonesFromSpaceBases

native final function UpdateRBBonesFromSpaceBases (bool bMoveUnfixedBodies, bool bTeleport)

Force an update of this meshes kinematic bodies and springs.