Bump sdk to Granny-aligned curve sampling; loop motions use the loop window

sdk de8fa40: B-spline loop window, cubic curves, degree-0 first-knot>t.
ActorInstance passes the motion's loop flag to SetAnimationLoop so looping
motions sample across the seam instead of clamping to the end knots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-12 15:39:25 +09:00
co-authored by Claude Opus 5.5
parent ff8667e3b9
commit a34b9c5a49
4 changed files with 8 additions and 1 deletions
+1 -1
Submodule sdk updated: 86759bb726...de8fa40098
+1
View File
@@ -280,6 +280,7 @@ bool ActorInstance::PlayMotion(MotionType type, bool loop) {
m_animTime = 0.0f;
m_motionDuration = std::max(0.1f, m_model->GetAnimationDuration());
m_loopMotion = loop;
m_model->SetAnimationLoop(loop, loop);
if (type == MotionType::Attack || type == MotionType::ComboAttack1 ||
type == MotionType::ComboAttack2 || type == MotionType::ComboAttack3 ||
+4
View File
@@ -99,6 +99,10 @@ float Gr2ModelInstance::GetAnimationDuration() const {
return m_impl ? m_impl->GetAnimationDuration() : 0.0f;
}
void Gr2ModelInstance::SetAnimationLoop(bool underflow_loop, bool overflow_loop) {
if (m_impl) m_impl->SetAnimationLoop(underflow_loop, overflow_loop);
}
bool Gr2ModelInstance::GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time) const {
return m_impl ? m_impl->GetBoneWorldTransform(bone_name, out_matrix, animation_time) : false;
}
+2
View File
@@ -25,6 +25,8 @@ public:
// Load external animation (.gr2) to animate this model
bool LoadExternalAnimation(const std::string& anim_filepath);
float GetAnimationDuration() const;
// Granny loop window: looping motions pass (true, true) so the seam samples across loops.
void SetAnimationLoop(bool underflow_loop, bool overflow_loop);
// Bone queries & attachments
bool GetBoneWorldTransform(const std::string& bone_name, float* out_matrix, float animation_time = -1.0f) const;