Mostly Harmless

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[edit]

AddInstanceVertexWeightBoneParented[edit]

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[edit]

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


AttachComponent[edit]

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


AttachComponentToSocket[edit]

native final function AttachComponentToSocket (ActorComponent Component, name SocketName)

Attach an ActorComponent to a Socket.

BoneIsChildOf[edit]

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[edit]

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[edit]

native final function DetachComponent (ActorComponent Component)


EnableClothValidBounds[edit]

simulated native final function EnableClothValidBounds (bool IfEnableClothValidBounds)


FindAnimNode[edit]

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[edit]

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[edit]

final native function RB_BodyInstance FindBodyInstanceNamed (name BoneName)

Find a BodyInstance by BoneName

FindClosestBone[edit]

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[edit]

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[edit]

final native function name FindConstraintBoneName (int ConstraintIndex)


FindConstraintIndex[edit]

final native function int FindConstraintIndex (name ConstraintName)


FindInstanceVertexweightBonePair[edit]

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[edit]

native final function MorphNodeBase FindMorphNode (name InNodeName)


FindMorphTarget[edit]

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[edit]

native final function SkelControlBase FindSkelControl (name InControlName)


ForceSkelUpdate[edit]

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[edit]

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[edit]

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


GetBoneMatrix[edit]

native final function Object.Matrix GetBoneMatrix (int BoneIndex)

returns the matrix of the bone at the specified index

GetBoneName[edit]

native final function name GetBoneName (int BoneIndex)

Returns:

the name of the bone at the specified index

GetBoneNames[edit]

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[edit]

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


GetBonesWithinRadius[edit]

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[edit]

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[edit]

simulated native final function float GetClothAttachmentResponseCoefficient ()


GetClothAttachmentTearFactor[edit]

simulated native final function float GetClothAttachmentTearFactor ()


GetClothBendingStiffness[edit]

simulated native final function float GetClothBendingStiffness ()


GetClothCollisionResponseCoefficient[edit]

simulated native final function float GetClothCollisionResponseCoefficient ()


GetClothDampingCoefficient[edit]

simulated native final function float GetClothDampingCoefficient ()


GetClothFlags[edit]

simulated native final function int GetClothFlags ()


GetClothFriction[edit]

simulated native final function float GetClothFriction ()


GetClothPressure[edit]

simulated native final function float GetClothPressure ()


GetClothSleepLinearVelocity[edit]

simulated native final function float GetClothSleepLinearVelocity ()


GetClothSolverIterations[edit]

simulated native final function int GetClothSolverIterations ()


GetClothStretchingStiffness[edit]

simulated native final function float GetClothStretchingStiffness ()


GetClothTearFactor[edit]

simulated native final function float GetClothTearFactor ()


GetClothThickness[edit]

simulated native final function float GetClothThickness ()


GetFaceFXRegister[edit]

native final function float GetFaceFXRegister (string RegName)

Retrieve the value of the specified FaceFX register.

GetParentBone[edit]

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[edit]

native final function Object.Vector GetRefPosePosition (int BoneIndex)

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

GetSocketBoneName[edit]

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[edit]

native final function SkeletalMeshSocket GetSocketByName (name InSocketName)

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

GetSocketWorldLocationAndRotation[edit]

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[edit]

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[edit]

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[edit]

native final function InitMorphTargets ()

Initialize MorphSets look up table : MorphTargetIndexMap

InitSkelControls[edit]

native final function InitSkelControls ()


IsBoneHidden[edit]

native final function bool IsBoneHidden (int BoneIndex)

Determines if the specified bone is hidden.

IsComponentAttached[edit]

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[edit]

native final function bool IsPlayingFaceFXAnim ()

Is playing a FaceFX animation.

MatchRefBone[edit]

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[edit]

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[edit]

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[edit]

simulated native final function ResetClothVertsToRefPose ()

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

RestoreSavedAnimSets[edit]

native final function RestoreSavedAnimSets ()

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

SaveAnimSets[edit]

native final function SaveAnimSets ()

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

SetAnimTreeTemplate[edit]

native final function SetAnimTreeTemplate (AnimTree NewTemplate)


SetAttachClothVertsToBaseBody[edit]

simulated native final function SetAttachClothVertsToBaseBody (bool bAttachVerts)

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

SetClothAttachmentResponseCoefficient[edit]

simulated native final function SetClothAttachmentResponseCoefficient (float ClothAttachmentResponseCoefficient)


SetClothAttachmentTearFactor[edit]

simulated native final function SetClothAttachmentTearFactor (float ClothAttachTearFactor)


SetClothBendingStiffness[edit]

simulated native final function SetClothBendingStiffness (float ClothBendingStiffness)


SetClothCollisionResponseCoefficient[edit]

simulated native final function SetClothCollisionResponseCoefficient (float ClothCollisionResponseCoefficient)


SetClothDampingCoefficient[edit]

simulated native final function SetClothDampingCoefficient (float ClothDampingCoefficient)


SetClothExternalForce[edit]

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[edit]

simulated native final function SetClothFlags (int ClothFlags)


SetClothFriction[edit]

simulated native final function SetClothFriction (float ClothFriction)


SetClothFrozen[edit]

simulated native final function SetClothFrozen (bool bNewFrozen)

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

SetClothPosition[edit]

simulated native final function SetClothPosition (Object.Vector ClothOffSet)


SetClothPressure[edit]

simulated native final function SetClothPressure (float ClothPressure)


SetClothSleep[edit]

simulated native final function SetClothSleep (bool IfClothSleep)


SetClothSleepLinearVelocity[edit]

simulated native final function SetClothSleepLinearVelocity (float ClothSleepLinearVelocity)


SetClothSolverIterations[edit]

simulated native final function SetClothSolverIterations (int ClothSolverIterations)


SetClothStretchingStiffness[edit]

simulated native final function SetClothStretchingStiffness (float ClothStretchingStiffness)


SetClothTearFactor[edit]

simulated native final function SetClothTearFactor (float ClothTearFactor)


SetClothThickness[edit]

simulated native final function SetClothThickness (float ClothThickness)


SetClothValidBounds[edit]

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


SetClothVelocity[edit]

simulated native final function SetClothVelocity (Object.Vector VelocityOffSet)


SetEnableClothSimulation[edit]

simulated native final function SetEnableClothSimulation (bool bInEnable)

Turn on and off cloth simulation for this skeletal mesh.

SetFaceFXRegister[edit]

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

Set the value and operation of the specified FaceFX register.

SetFaceFXRegisterEx[edit]

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[edit]

simulated native final function SetForceRefPose (bool bNewForceRefPose)

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

SetHasPhysicsAssetInstance[edit]

final native function SetHasPhysicsAssetInstance (bool bHasInstance)

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

SetParentAnimComponent[edit]

native final function SetParentAnimComponent (SkeletalMeshComponent NewParentAnimComp)


SetPhysicsAsset[edit]

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

Change the Physics Asset of the mesh

SetSkeletalMesh[edit]

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[edit]

simulated native final function SetSoftBodyFrozen (bool bNewFrozen)

Toggle active simulation of the soft-body.

ShowMaterialSection[edit]

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[edit]

native final function StopFaceFXAnim ()

Stop any currently playing FaceFX animation.

ToggleInstanceVertexWeights[edit]

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[edit]

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[edit]

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[edit]

native final function UnHideBone (int BoneIndex)

Unhides the specified bone.

UnHideBoneByName[edit]

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[edit]

native final function UpdateAnimations ()

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

UpdateClothParams[edit]

simulated native final function UpdateClothParams ()

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

UpdateInstanceVertexWeightBones[edit]

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[edit]

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[edit]

native final function UpdateParentBoneMap ()


UpdateRBBonesFromSpaceBases[edit]

native final function UpdateRBBonesFromSpaceBases (bool bMoveUnfixedBodies, bool bTeleport)

Force an update of this meshes kinematic bodies and springs.

UpdateSoftBodyParams[edit]

simulated native final function UpdateSoftBodyParams ()

Update soft-body simulation from components params.

WakeSoftBody[edit]

simulated native final function WakeSoftBody ()

Force awake any soft body simulation on this component