s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Classes
SceneModel
chevron_left
Classes
class
SceneModel
Constructors
functions
SceneModel
Properties
data_object
Animation
remove_circle
AnimationGraph
data_object
CurrentSequence
remove_circle
DirectPlayback
data_object
LowDetailAnimation
data_object
Morphs
data_object
OnAnimTagEvent
data_object
OnFootstepEvent
data_object
OnGenericEvent
data_object
OnSoundEvent
data_object
PlaybackRate
data_object
RootMotion
data_object
UseAnimGraph
Methods
functions
ClearBoneOverrides
functions
DispatchTagEvents
functions
GetAttachment
functions
GetBoneLocalTransform
functions
GetBoneVelocity
functions
GetBoneWorldTransform
remove_circle
GetBool
remove_circle
GetFloat
remove_circle
GetInt
functions
GetParentSpaceBone
remove_circle
GetRotation
remove_circle
GetVector3
functions
HasBoneOverrides
functions
MergeBones
remove_circle
ResetAnimParameters
functions
RunPendingEvents
remove_circle
SetAnimGraph
remove_circle
SetAnimParameter
functions
SetBodyGroup
functions
SetBoneOverride
functions
SetBoneWorldTransform
functions
SetMaterialGroup
functions
Update
functions
UpdateToBindPose
SceneModel
A model scene object that supports animations and can be rendered within a Sandbox.SceneWorld.
class
Sandbox
.
account_tree
extends
SceneObject
sealed
Sandbox.Engine
build
Constructors
1
SceneModel
(
sceneWorld
,
model
,
transform
)
data_object
Properties
13
Animation
AnimationAccessor
Runtime access to this model's animation graph.
AnimationGraph
obsolete
AnimationGraph
CurrentSequence
AnimationSequence
Allows playback of sequences directly, rather than using an animation graph. Requires Sandbox.SceneModel.UseAnimGraph disabled if the scene model has one.
DirectPlayback
obsolete
AnimGraphDirectPlayback
Access this sceneobject's legacy direct playback. Direct playback controls the direct playback node in a legacy animgraph to play sequences directly in code.
LowDetailAnimation
bool
Skip animating any bone the skeleton marks as high LOD. Cheaper, for models that are far away or unimportant. Skipped bones stay in their bind pose.
Morphs
MorphCollection
Access this sceneobject's morph collection. Morphs are generally used in the model to control the face, for things like emotions and lip sync.
OnAnimTagEvent
Action`1
Called when a anim tag event happens
OnFootstepEvent
Action`1
Called when a footstep event happens
OnGenericEvent
Action`1
Called when a generic event happens
OnSoundEvent
Action`1
Called when a sound event happens
PlaybackRate
float
RootMotion
Transform
Get the calculated motion from animgraph since last frame
UseAnimGraph
bool
Allows the scene model to not use the anim graph so it can play sequences directly
functions
Methods
24
ClearBoneOverrides
(
)
Clears all bone transform overrides.
DispatchTagEvents
(
)
GetAttachment
(
name
,
worldspace
)
Nullable`1
Get attachment transform by name.
GetBoneLocalTransform
(
boneIndex
)
Transform
Returns the local space transform of a bone by its index.
GetBoneVelocity
(
boneIndex
,
linear
,
angular
)
Calculates the velocity from the previous and current bone transforms.
GetBoneWorldTransform
(
boneIndex
)
Transform
Returns the world space transform of a bone by its index.
GetBool
(
name
)
obsolete
bool
Reads a legacy animation graph boolean parameter.
GetFloat
(
name
)
obsolete
float
Reads a legacy animation graph float parameter.
GetInt
(
name
)
obsolete
int
Reads a legacy animation graph integer parameter.
GetParentSpaceBone
(
i
)
Transform
Returns the parent space transform of a bone by its index.
GetRotation
(
name
)
obsolete
Rotation
Reads a legacy animation graph rotation parameter.
GetVector3
(
name
)
obsolete
Vector3
Reads a legacy animation graph vector parameter.
HasBoneOverrides
(
)
bool
Whether any bone transforms have been overridden.
MergeBones
(
parent
)
Update our bones to match the target's bones. This is a manual bone merge.
ResetAnimParameters
(
)
obsolete
Resets legacy animation graph parameters to their defaults.
RunPendingEvents
(
)
SetAnimGraph
(
name
)
obsolete
Overrides the legacy animation graph this scene model uses.
SetAnimParameter
(
name
,
value
)
obsolete
Sets a legacy animation graph boolean parameter.
SetBodyGroup
(
name
,
value
)
Set which body group to use.
SetBoneOverride
(
boneIndex
,
transform
)
Manually override the final bone transform.
SetBoneWorldTransform
(
boneIndex
,
transform
)
Sets the world space bone transform of a bone by its index.
SetMaterialGroup
(
name
)
Set material group to replace materials of the model as set up in ModelDoc.
Update
(
delta
)
Update this animation. Delta is the time you want to advance, usually RealTime.Delta
UpdateToBindPose
(
)
Update all of the bones to the bind pose
Inheritance
SceneObject
SceneModel
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.