class SceneModel

in global :: Sandbox

A model scene object that supports animations and can be rendered within a .


public void SetAnimGraph( string name )

Override the anim graph this scene model uses

public void SetBoneWorldTransform( int boneIndex, Transform transform )

Sets the world space bone transform of a bone by its index.

  • boneIndex Bone index to set transform of.

public Transform GetBoneWorldTransform( int boneIndex )

Returns the world space transform of a bone by its index.

  • boneIndex Index of the bone to calculate transform of.
  • Returns The world space transform, or an identity transform on failure.

public Transform GetBoneWorldTransform( string boneName )

Returns the world space transform of a bone by its name.

  • boneName Name of the bone to calculate transform of.
  • Returns The world space transform, or an identity transform on failure.

public Transform GetBoneLocalTransform( int boneIndex )

Returns the local space transform of a bone by its index.

  • boneIndex Index of the bone to calculate transform of.
  • Returns The local space transform, or an identity transform on failure.

public Transform GetBoneLocalTransform( string boneName )

Returns the local space transform of a bone by its name.

  • boneName Name of the bone to calculate transform of.
  • Returns The local space transform, or an identity transform on failure.

public void SetMaterialGroup( string name )

Set material group to replace materials of the model as set up in ModelDoc.

public void SetMaterialGroup( string name )

Set material group to replace materials of the model as set up in ModelDoc.

public void SetBodyGroup( string name, int value )

Set which body group to use.

public Nullable<Transform> GetAttachment( string name, bool worldspace = True )

Get attachment transform by name.

  • name Name of the attachment to calculate transform of.
  • worldspace Whether the transform should be in world space (relative to the scene world), or local space (relative to the scene object)

public bool UseAnimGraph { get; set; }

Allows the scene model to not use the anim graph so it can play sequences directly

public Transform RootMotion { get; }

Get the calculated motion from animgraph since last frame

public AnimationSequence CurrentSequence { get; }

Allows playback of sequences directly, rather than using an animation graph. Requires disabled if the scene model has one.

public MorphCollection Morphs { get; }

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 AnimGraphDirectPlayback DirectPlayback { get; }

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 Action<SceneModel.FootstepEvent> OnFootstepEvent { get; set; }

Called when a footstep event happens

public Action<SceneModel.GenericEvent> OnGenericEvent { get; set; }

Called when a generic event happens

public Action<SceneModel.SoundEvent> OnSoundEvent { get; set; }

Called when a sound event happens

public Action<SceneModel.AnimTagEvent> OnAnimTagEvent { get; set; }

Called when a anim tag event happens

public void SetAnimParameter( string name, bool value )

Sets a boolean animation graph parameter by name.

public void SetAnimParameter( string name, float value )

Sets a float animation graph parameter by name.

public void SetAnimParameter( string name, Vector3 value )

Sets a vector animation graph parameter by name.

public void SetAnimParameter( string name, int value )

Sets a integer animation graph parameter by name.

public void SetAnimParameter( string name, Rotation value )

Sets a rotation animation graph parameter by name.

public Rotation GetRotation( string name )

Get an animated parameter

public Vector3 GetVector3( string name )

Get an animated parameter

public bool GetBool( string name )

Get an animated parameter

public float GetFloat( string name )

Get an animated parameter

public int GetInt( string name )

Get an animated parameter

public void Update( float delta )

Update this animation. Delta is the time you want to advance, usually RealTime.Delta

public void MergeBones( SceneModel parent )

Update our bones to match the target's bones. This is a manual bone merge.

public void ClearMaterialOverride( )

😔 No documentation found.

public SceneObject.SceneObjectFlagAccessor Flags { get; }

😔 No documentation found.

public void SetMaterialOverride( Material material )

😔 No documentation found.

public ulong MeshGroupMask { get; set; }

😔 No documentation found.

public Model Model { get; set; }

😔 No documentation found.

public bool Batchable { get; set; }

😔 No documentation found.

public void SetMaterialOverride( Material material, string attributeName, int attributeValue = 1 )

😔 No documentation found.

public void AddChild( string name, SceneObject child )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public SceneRenderLayer RenderLayer { get; set; }

😔 No documentation found.

public void RemoveChild( SceneObject child )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public SceneModel( SceneWorld sceneWorld, string model, Transform transform )

😔 No documentation found.

public SceneModel( SceneWorld sceneWorld, Model model, Transform transform )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public ITagSet Tags { get; }

😔 No documentation found.

public bool ClipPlaneEnabled

😔 No documentation found.

public void SetBoneOverride( int boneIndex, ref Transform transform )

😔 No documentation found.

public void ClearBoneOverrides( )

😔 No documentation found.

public AnimationGraph AnimationGraph { get; set; }

😔 No documentation found.

public float PlaybackRate { get; set; }

😔 No documentation found.

public void RunPendingEvents( )

😔 No documentation found.

public void DispatchTagEvents( )

😔 No documentation found.

public void ResetAnimParameters( )

😔 No documentation found.

public Plane ClipPlane

😔 No documentation found.

public void UpdateToBindPose( )

😔 No documentation found.

public RenderAttributes Attributes { get; }

😔 No documentation found.

public SceneWorld World { get; }

😔 No documentation found.

public void Delete( )

😔 No documentation found.

public Transform Transform { get; set; }

😔 No documentation found.

public Rotation Rotation { get; set; }

😔 No documentation found.

public Vector3 Position { get; set; }

😔 No documentation found.

public BBox Bounds { get; set; }

😔 No documentation found.

public BBox LocalBounds { get; set; }

😔 No documentation found.

public bool RenderingEnabled { get; set; }

😔 No documentation found.

public SceneObject Parent { get; }

😔 No documentation found.

public Color ColorTint { get; set; }

😔 No documentation found.