| 119 | } |
| 120 | |
| 121 | void AnimatedModel::UpdateAnimation() |
| 122 | { |
| 123 | // Skip if need to |
| 124 | if (UpdateMode == AnimationUpdateMode::Never |
| 125 | || !IsActiveInHierarchy() |
| 126 | || SkinnedModel == nullptr |
| 127 | || !SkinnedModel->IsLoaded() |
| 128 | || _lastUpdateFrame == Engine::UpdateCount |
| 129 | || _masterPose) |
| 130 | return; |
| 131 | _lastUpdateFrame = Engine::UpdateCount; |
| 132 | |
| 133 | if (AnimationGraph && AnimationGraph->IsLoaded() && AnimationGraph->Graph.IsReady()) |
| 134 | { |
| 135 | // Request an animation update |
| 136 | Animations::AddToUpdate(this); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void AnimatedModel::SetupSkinningData() |
| 141 | { |
no test coverage detected