Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CharacterAnimGraphComponent Interface Reference
Inheritance diagram for CharacterAnimGraphComponent:
[legend]

Public Member Functions

proto external bool SetAnimSetInstance (ResourceName rNameAnimSetInstance, float blendTime)
 Switch the active animation set instance to a new one.
 
proto external bool SetAttachment (string bindingName, ResourceName resNameAttachedGraph, ResourceName resNameAttachedInst, string attachedNodeName)
 Attach a different graph to the named attachment.
 
proto external bool RemoveAttachment (string bindingName)
 Remove graph attachment. Returns false when there is no attachment bound under given name.
 
proto external void SetExternalIKPose (ResourceName ikPoseResource)
 
proto external int BindCommand (string commandName)
 Binds anim command and returns it's ID.
 
proto external void CallCommand (int cmdID, int intParam, float floatParam)
 
proto external void CallCommand4I (int cmdID, int intParam1, int intParam2, int intParam3, int intParam4, float floatParam)
 
proto external int BindIntVariable (string varName)
 Binds integer variable and returns it's ID.
 
proto external void SetIntVariable (int varId, int value)
 
proto external int BindFloatVariable (string varName)
 Binds float variable and returns it's ID.
 
proto external void SetFloatVariable (int varId, float value)
 
proto external int BindBoolVariable (string varName)
 Binds bool variable and returns it's ID.
 
proto external void SetBoolVariable (int varId, bool value)
 
proto external int BindTag (string tagName)
 
proto external bool IsTag (int tagId)
 
proto external int BindEvent (string eventName)
 
proto external bool IsEvent (int eventId)
 
proto bool GetEventCompletion (int eventId, float timeSlice, out float completion)
 Get event completion if eventId is present.
 
proto bool GetEventUserData (int eventId, out string eventUserString, out int eventUserInt)
 Get event user data if eventId is present.
 
- Public Member Functions inherited from GenericComponent
proto external EntityComponentPrefabData GetComponentData (notnull IEntity ent)
 Gets GenericComponentClass descendant instance with the prefab data.
 
proto external BaseContainer GetComponentSource (notnull IEntity ent)
 Gets config container with the prefab data.
 
proto void Rpc (func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
 Attempts to run a remote procedure call (RPC) of this instance with parameters specified in method RplRpc attribute.
 
proto external int GetEventMask ()
 Gets current eventmask of the component.
 
proto external int SetEventMask (notnull IEntity owner, int mask)
 Sets eventmask.
 
proto external int ClearEventMask (notnull IEntity owner, int mask)
 Clears bitmask.
 
proto external GenericComponent FindComponent (TypeName typeName)
 Finds first occurance of the coresponding component.
 
proto external int FindComponents (TypeName typeName, notnull array< GenericComponent > outComponents)
 Finds all occurances of the coresponding component.
 
proto external void Activate (IEntity owner)
 Activate component and calls EOnActivate().
 
proto external void Deactivate (IEntity owner)
 Deactivate component and calls EOnDectivate().
 
proto external bool IsActive ()
 Returns activity state.
 
proto external void OnTransformReset (bool isCorrection=false, vector newVelocity=vector.Zero)
 Notifies the component that a transformation of the owner entity has been discontinuously changed.
 
void _WB_SetTransform (IEntity owner, inout vector mat[4], IEntitySource src)
 Editor changed entity transformation matrix source. Do not call editor API here!
 
void _WB_OnInit (IEntity owner, inout vector mat[4], IEntitySource src)
 Called always after entity creation. It's purpose is to prepare entity for editing. Do not edit anything through editor API here because it's too early for undoable actions! Use plain BaseContainer API for changes through src parameter if needed!
 
bool _WB_CanDelete (IEntity owner, IEntitySource src)
 Editor needs to know if this entity can be deleted. Do not call editor API here!
 
bool _WB_CanRename (IEntity owner, IEntitySource src)
 Editor needs to know if this entity can be renamed. Do not call editor API here!
 
bool _WB_CanCopy (IEntity owner, IEntitySource src)
 Editor needs to know if this entity can be copied. Do not call editor API here!
 
bool _WB_CanSelect (IEntity owner, IEntitySource src)
 Editor needs to know whether this entity can be selected in scene window or not.
 
void _WB_GetBoundBox (IEntity owner, inout vector min, inout vector max, IEntitySource src)
 Editor needs to know a bound box of entity (For ray-casting, visualizers etc.). You can return any custom size you need. Do not call editor API here!
 
void _WB_SetExtraVisualiser (IEntity owner, EntityVisualizerType type, IEntitySource src)
 If entity needs to have a special visualizer instead of default one, here is the place where you can implement it. Do not call editor API here!
 
array< ref WB_UIMenuItem_WB_GetContextMenuItems (IEntity owner)
 An opportunity to append items into editor's "Component" context menu. Do not call editor API here!
 
bool _WB_OnPhysSimulPlacementBegin (IEntity owner, IEntitySource src)
 Does this entity support editing transformation using physics simulation? Do not call editor API here!
 
bool _WB_EnablePhysics (IEntity owner, IEntitySource src, bool physics)
 Prepare to edit transformation using physics simulation. Return previous status. Do not call editor API here!
 
bool _WB_OnKeyChanged (IEntity owner, BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
 Any property value has been changed. You can use editor API here and do some additional edit actions which will be part of the same "key changed" action.
 
void _WB_AfterWorldUpdate (IEntity owner, float timeSlice)
 Called after updating world in Workbench. The entity must be selected. You can use editor API here and do some edit actions if needed.
 
void _WB_OnContextMenu (IEntity owner, int id)
 User has chosen any of your menu item from editor's "Component" menu which you have recently provided in WB_GetContextMenuItems(). You can use editor API here and do some edit actions.
 
void _WB_OnKeyDown (IEntity owner, int keyCode)
 User pressed a key and this entity is main member of entity selection. You can use editor API here and do some edit actions which will be undoable.
 
void _WB_OnCreate (IEntity owner, IEntitySource src)
 Called after entity gets created in map during editing or when deleted entity gets restored after undo action. This event isn't called by loading map!!! If you need an event that is being called after every entity creation then use WB_OnInit instead it. You can use editor API here and do some additional edit actions which will be part of the same "create entity" action.
 
void _WB_OnParentChange (IEntity owner, IEntitySource src, IEntitySource prevParentSrc)
 Parent entity has been changed ( it's available through src->GetParent() ). prevParentSrc is a pointer to a previous parent (if any)
 
void _WB_OnDelete (IEntity owner, IEntitySource src)
 Entity is going to be deleted. You can use editor API here and do some additional edit actions which will be part of the same "entity delete" action.
 
void _WB_OnRename (IEntity owner, IEntitySource src, string oldName)
 Entity has been renamed. You can use editor API here and do some additional edit actions which will be part of the same "entity rename" action.
 
array< ref ParamEnum_WB_GetUserEnums (string varName, IEntity owner, IEntityComponentSource src)
 Possibility to get variable value choices dynamically.
 

Additional Inherited Members

- Static Public Member Functions inherited from GenericComponent
static bool Preload (IEntityComponentSource src)
 
- Protected Member Functions inherited from GenericComponent
proto external void ConnectToDiagSystem (IEntity owner)
 
proto external void DisconnectFromDiagSystem (IEntity owner)
 
void OnTransformResetImpl (TransformResetParams params)
 Script-side implementation of OnTransformReset.
 

Member Function Documentation

◆ BindBoolVariable()

proto external int CharacterAnimGraphComponent.BindBoolVariable ( string  varName)

Binds bool variable and returns it's ID.

◆ BindCommand()

proto external int CharacterAnimGraphComponent.BindCommand ( string  commandName)

Binds anim command and returns it's ID.

◆ BindEvent()

proto external int CharacterAnimGraphComponent.BindEvent ( string  eventName)

◆ BindFloatVariable()

proto external int CharacterAnimGraphComponent.BindFloatVariable ( string  varName)

Binds float variable and returns it's ID.

◆ BindIntVariable()

proto external int CharacterAnimGraphComponent.BindIntVariable ( string  varName)

Binds integer variable and returns it's ID.

◆ BindTag()

proto external int CharacterAnimGraphComponent.BindTag ( string  tagName)

◆ CallCommand()

proto external void CharacterAnimGraphComponent.CallCommand ( int  cmdID,
int  intParam,
float  floatParam 
)

◆ CallCommand4I()

proto external void CharacterAnimGraphComponent.CallCommand4I ( int  cmdID,
int  intParam1,
int  intParam2,
int  intParam3,
int  intParam4,
float  floatParam 
)

◆ GetEventCompletion()

proto bool CharacterAnimGraphComponent.GetEventCompletion ( int  eventId,
float  timeSlice,
out float  completion 
)

Get event completion if eventId is present.

◆ GetEventUserData()

proto bool CharacterAnimGraphComponent.GetEventUserData ( int  eventId,
out string  eventUserString,
out int  eventUserInt 
)

Get event user data if eventId is present.

◆ IsEvent()

proto external bool CharacterAnimGraphComponent.IsEvent ( int  eventId)

◆ IsTag()

proto external bool CharacterAnimGraphComponent.IsTag ( int  tagId)

◆ RemoveAttachment()

proto external bool CharacterAnimGraphComponent.RemoveAttachment ( string  bindingName)

Remove graph attachment. Returns false when there is no attachment bound under given name.

◆ SetAnimSetInstance()

proto external bool CharacterAnimGraphComponent.SetAnimSetInstance ( ResourceName  rNameAnimSetInstance,
float  blendTime 
)

Switch the active animation set instance to a new one.

Parameters
resNameAnimSetInstanceResource name of a new anim set instance which must match animation graph. If ResourceName::Null is passed, controller resets to default anim set instance.
blendTimeoptional, blend time in seconds
Returns
returns true on successful change, false if anim instance does not match the graph

◆ SetAttachment()

proto external bool CharacterAnimGraphComponent.SetAttachment ( string  bindingName,
ResourceName  resNameAttachedGraph,
ResourceName  resNameAttachedInst,
string  attachedNodeName 
)

Attach a different graph to the named attachment.

Returns false on failure.

Parameters
bindingNamebinding name recognized by the main graph (where to attach)
resNameAttachedGraphresource name of the attached graph
resNameAttachedInstresource name of the anim set instance used for the attached graph
attachedNodeNamename of the starting node in the attached graph

◆ SetBoolVariable()

proto external void CharacterAnimGraphComponent.SetBoolVariable ( int  varId,
bool  value 
)

◆ SetExternalIKPose()

proto external void CharacterAnimGraphComponent.SetExternalIKPose ( ResourceName  ikPoseResource)

◆ SetFloatVariable()

proto external void CharacterAnimGraphComponent.SetFloatVariable ( int  varId,
float  value 
)

◆ SetIntVariable()

proto external void CharacterAnimGraphComponent.SetIntVariable ( int  varId,
int  value 
)

The documentation for this interface was generated from the following file: