Always snap to grid

UE3:SkeletalMeshComponent native functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Contents

SkeletalMeshComponent native functions in other games:
UT3
Other member categories for this class:
internal variables, properties

Native functions

AddInstanceVertexWeightBoneParented

native final function AddInstanceVertexWeightBoneParented (name BoneName, optional bool bPairWithParent)

Add a new bone to the list of instance vertex weight bones

Parameters:

  • BoneNames - set of bones (implicitly parented) to use for finding vertices

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.

BoneIsChildOf

native final function bool BoneIsChildOf (name BoneName, name ParentBoneName)

Tests if BoneName is child of (or equal to) ParentBoneName. Note - will return FALSE if ChildBoneIndex is the same as ParentBoneIndex ie. must be strictly a child.

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)


FindInstanceVertexweightBonePair

native final function int FindInstanceVertexweightBonePair (BonePair Bones)

Find an existing bone pair entry in the list of InstanceVertexWeightBones

Parameters:

  • Bones - pair of bones to search for

Returns:

index of entry found or -1 if not found

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

GetBoneName

native final function name GetBoneName (int BoneIndex)

Returns:

the name 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

GetClosestCollidingBoneLocation

native final function Object.Vector GetClosestCollidingBoneLocation (Object.Vector TestLocation, bool bCheckZeroExtent, bool bCheckNonZeroExtent)

iterates through all bodies in our PhysicsAsset and returns the location of the closest bone associated with a body that blocks the specified kind of traces

Parameters:

  • TestLocation - location to check against
  • bCheckZeroExtent - consider bodies that block zero extent traces
  • bCheckNonZeroExtent - consider bodies that block nonzero extent traces

Returns:

location of closest colliding bone, or (0,0,0) if there were no bodies to test

Note: only the collision flags on the PhysicsAsset are checked; the collision flags on the component are ignored

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

GetRefPosePosition

native final function Object.Vector GetRefPosePosition (int BoneIndex)

Gets the local-space position of a bone in the reference pose.

GetSocketBoneName

native final function name GetSocketBoneName (name InSocketName)

Returns bone name linked to a given named socket on the skeletal mesh component. If you're unsure to deal with sockets or bones names, you can use this function to filter through, and always return the bone name.

Parameters:

  • bone - name or socket name

Output: bone name

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, optional int Space)

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

HideBone

native final function HideBone (int BoneIndex, EPhysBodyOp PhysBodyOption)

Hides the specified bone. Currently this just enforces a scale of 0 for the hidden bones.

Parameters:

  • PhysBodyOption - Option for physics bodies that attach to the bones to be hidden

HideBoneByName

native final function HideBoneByName (name BoneName, EPhysBodyOp PhysBodyOption)

Hides the specified bone with name. Currently this just enforces a scale of 0 for the hidden bones. Compared to HideBone By Index - This keeps track of list of bones and update when LOD changes

Parameters:

  • BoneName - Name of bone to hide
  • PhysBodyOption - Option for physics bodies that attach to the bones to be hidden

InitMorphTargets

native final function InitMorphTargets ()

Initialize MorphSets look up table : MorphTargetIndexMap

InitSkelControls

native final function InitSkelControls ()


IsBoneHidden

native final function bool IsBoneHidden (int BoneIndex)

Determines if the specified bone is hidden.

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, SoundCue SoundCueToPlay)

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

RemoveInstanceVertexWeightBoneParented

native final function RemoveInstanceVertexWeightBoneParented (name BoneName)

Remove a new bone to the list of instance vertex weight bones

Parameters:

  • BoneNames - set of bones (implicitly parented) to use for finding vertices

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, optional bool InbAlwaysUseInstanceWeights)

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

SetSoftBodyFrozen

simulated native final function SetSoftBodyFrozen (bool bNewFrozen)

Toggle active simulation of the soft-body.

ShowMaterialSection

simulated final native function ShowMaterialSection (int MaterialID, bool bShow)

Show/Hide Material - technical correct name for this is Section, but seems Material is mostly used

This disable rendering of certain Material ID (Section)

StopFaceFXAnim

native final function StopFaceFXAnim ()

Stop any currently playing FaceFX animation.

ToggleInstanceVertexWeights

native final function ToggleInstanceVertexWeights (bool bEnable)

Enabled or disable the instanced vertex weights buffer for the skeletal mesh object

Parameters:

  • bEnable - TRUE to enable, FALSE to disable

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.

UnHideBone

native final function UnHideBone (int BoneIndex)

Unhides the specified bone.

UnHideBoneByName

native final function UnHideBoneByName (name BoneName)

UnHide the specified bone with name. Currently this just enforces a scale of 0 for the hidden bones. Compoared to HideBone By Index - This keeps track of list of bones and update when LOD changes

Parameters:

  • BoneName - Name of bone to unhide

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.

UpdateInstanceVertexWeightBones

native final function UpdateInstanceVertexWeightBones (array<BonePairBonePairs)

Update the bones that specify which vertices will use instanced influences This will also trigger an update of the vertex weights.

Parameters:

  • BonePairs - set of bone pairs to use for finding vertices. A bone can be paired with None bone name to only match up a single bone.

UpdateMeshForBrokenConstraints

simulated final native function UpdateMeshForBrokenConstraints ()

Looks up all bodies for broken constraints. Makes sure child bodies of a broken constraints are not fixed and using bone springs, and child joints not motorized.

UpdateParentBoneMap

native final function UpdateParentBoneMap ()


UpdateRBBonesFromSpaceBases

native final function UpdateRBBonesFromSpaceBases (bool bMoveUnfixedBodies, bool bTeleport)

Force an update of this meshes kinematic bodies and springs.

UpdateSoftBodyParams

simulated native final function UpdateSoftBodyParams ()

Update soft-body simulation from components params.

WakeSoftBody

simulated native final function WakeSoftBody ()

Force awake any soft body simulation on this component