From 1e1d36c5b1d397e9be9426eec77e7492edb7e941 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Fri, 3 Dec 2021 15:54:23 +0100 Subject: [PATCH] Fixed sync track blending jitter in debug ui. --- src/AnimNodes/BlendNode.cc | 7 +------ src/AnimNodes/BlendSpace1D.cc | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/AnimNodes/BlendNode.cc b/src/AnimNodes/BlendNode.cc index d511e8e..d61c085 100644 --- a/src/AnimNodes/BlendNode.cc +++ b/src/AnimNodes/BlendNode.cc @@ -55,12 +55,7 @@ void BlendNode::Evaluate( } void BlendNode::DrawDebugUi() { - if (ImGui::SliderFloat("Weight", &m_weight, 0.f, 1.f)) { - m_sync_track = SyncTrack::Blend( - m_weight, - m_input_A->m_sync_track, - m_input_B->m_sync_track); - } + ImGui::SliderFloat("Weight", &m_weight, 0.f, 1.f); ImGui::Checkbox("Sync Inputs", &m_sync_inputs); ImGui::Text("SyncTrack"); diff --git a/src/AnimNodes/BlendSpace1D.cc b/src/AnimNodes/BlendSpace1D.cc index 9020dc2..4da8b77 100644 --- a/src/AnimNodes/BlendSpace1D.cc +++ b/src/AnimNodes/BlendSpace1D.cc @@ -59,12 +59,7 @@ void BlendSpace1D::Evaluate( void BlendSpace1D::DrawDebugUi() { float min_weight = m_input_weights[0]; float max_weight = m_input_weights.back(); - if (ImGui::SliderFloat("Weight", &m_weight, min_weight, max_weight)) { - m_sync_track = SyncTrack::Blend( - m_weight, - m_input_0->m_sync_track, - m_input_1->m_sync_track); - } + ImGui::SliderFloat("Weight", &m_weight, min_weight, max_weight); ImGui::Checkbox("Sync Inputs", &m_sync_inputs); ImGui::Text("SyncTrack");