SceneModelclass
A model scene object that supports animations and can be rendered within a `Sandbox.SceneWorld`.
Constructors2
Showing 2 constructors
No results match this filter.
Methods31
Showing 31 methods
public void ClearBoneOverrides()
Clears all bone transform overrides.
void—public void DispatchTagEvents()
void—public System.Nullable`1<Transform> GetAttachment(string name, bool worldspace = True)
Get attachment transform by name.
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the attachment to calculate transform of. |
| worldspace = True | bool | Whether the transform should be in world space (relative to the scene world), or local space (relative to the scene object) |
public void GetBoneVelocity(int boneIndex, Vector3 linear, Vector3 angular)
Calculates the velocity from the previous and current bone transforms.
| Parameter | Type | Description |
|---|---|---|
| boneIndex | int | — |
| linear | Vector3 | — |
| angular | Vector3 | — |
void—public bool GetBool(string name)
Get an animated parameter
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
bool—public float GetFloat(string name)
Get an animated parameter
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
float—public int GetInt(string name)
Get an animated parameter
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
int—public Transform GetParentSpaceBone(int i)
Returns the parent space transform of a bone by its index.
| Parameter | Type | Description |
|---|---|---|
| i | int | Index of the bone to calculate transform of. |
public Rotation GetRotation(string name)
Get an animated parameter
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
public Vector3 GetVector3(string name)
Get an animated parameter
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
public bool HasBoneOverrides()
Whether any bone transforms have been overridden.
bool—public void MergeBones(Sandbox.SceneModel parent)
Update our bones to match the target's bones. This is a manual bone merge.
| Parameter | Type | Description |
|---|---|---|
| parent | SceneModel | — |
void—public void ResetAnimParameters()
Reset all animgraph parameters to their default values.
void—public void RunPendingEvents()
void—public void SetAnimGraph(string name)
Override the anim graph this scene model uses
Obsolete: Can use AnimationGraph directly
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
void—public void SetBodyGroup(string name, int value)
Set which body group to use.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| value | int | — |
void—public void SetBoneOverride(int boneIndex, Transform transform)
Manually override the final bone transform.
| Parameter | Type | Description |
|---|---|---|
| boneIndex | int | — |
| transform | Transform | Local coordinates based on the SceneModel's transform |
void—public void SetBoneWorldTransform(int boneIndex, Transform transform)
Sets the world space bone transform of a bone by its index.
| Parameter | Type | Description |
|---|---|---|
| boneIndex | int | Bone index to set transform of. |
| transform | Transform | — |
void—public void SetMaterialGroup(string name)
Set material group to replace materials of the model as set up in ModelDoc.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
void—public void Update(float delta)
Update this animation. Delta is the time you want to advance, usually RealTime.Delta
| Parameter | Type | Description |
|---|---|---|
| delta | float | — |
void—public void UpdateToBindPose()
Update all of the bones to the bind pose
void—No results match this filter.
Properties11
Showing 11 properties
public Sandbox.AnimationGraph Sandbox.SceneModel.AnimationGraph { get; set; }
public Sandbox.AnimationSequence Sandbox.SceneModel.CurrentSequence { get; set; }
Allows playback of sequences directly, rather than using an animation graph. Requires `Sandbox.SceneModel.UseAnimGraph` disabled if the scene model has one.
public Sandbox.AnimGraphDirectPlayback Sandbox.SceneModel.DirectPlayback { get; set; }
Access this sceneobject's direct playback. Direct playback is used to control the direct playback node in an animgraph to play sequences directly in code
public Sandbox.MorphCollection Sandbox.SceneModel.Morphs { get; set; }
Access this sceneobject's morph collection. Morphs are generally used in the model to control the face, for things like emotions and lip sync.
public System.Action`1<Sandbox.SceneModel.AnimTagEvent> Sandbox.SceneModel.OnAnimTagEvent { get; set; }
Called when a anim tag event happens
public System.Action`1<Sandbox.SceneModel.FootstepEvent> Sandbox.SceneModel.OnFootstepEvent { get; set; }
Called when a footstep event happens
public System.Action`1<Sandbox.SceneModel.GenericEvent> Sandbox.SceneModel.OnGenericEvent { get; set; }
Called when a generic event happens
public System.Action`1<Sandbox.SceneModel.SoundEvent> Sandbox.SceneModel.OnSoundEvent { get; set; }
Called when a sound event happens
public float Sandbox.SceneModel.PlaybackRate { get; set; }
float—public Transform Sandbox.SceneModel.RootMotion { get; set; }
Get the calculated motion from animgraph since last frame
public bool Sandbox.SceneModel.UseAnimGraph { get; set; }
Allows the scene model to not use the anim graph so it can play sequences directly
bool—No results match this filter.