diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index 15fee5e23..ff78595c2 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -833,13 +833,14 @@ namespace FlaxEditor.Modules private void AddToRestore(EditorWindow win, Type type, WindowRestoreData winData) { - var panel = win.ParentDockPanel; - // Ensure that this window is only selected following recompilation // if it was the active tab in its dock panel. Otherwise, there is a // risk of interrupting the user's workflow by potentially selecting // background tabs. - var window = win.RootWindow.Window; + var window = win.RootWindow?.Window; + if (window == null) + return; + var panel = win.ParentDockPanel; winData.SelectOnShow = panel.SelectedTab == win; winData.DockedTabIndex = 0; if (panel is FloatWindowDockPanel && window != null && panel.TabsCount == 1) diff --git a/Source/Engine/Animations/Graph/AnimGraph.h b/Source/Engine/Animations/Graph/AnimGraph.h index e1967f1ad..398471ea1 100644 --- a/Source/Engine/Animations/Graph/AnimGraph.h +++ b/Source/Engine/Animations/Graph/AnimGraph.h @@ -850,7 +850,6 @@ private: void ProcessAnimation(AnimGraphImpulse* nodes, AnimGraphNode* node, bool loop, float length, float pos, float prevPos, Animation* anim, float speed, float weight = 1.0f, ProcessAnimationMode mode = ProcessAnimationMode::Override, BitArray>* usedNodes = nullptr); Variant SampleAnimation(AnimGraphNode* node, bool loop, float length, float startTimePos, float prevTimePos, float& newTimePos, Animation* anim, float speed); Variant SampleAnimation(AnimGraphNode* node, bool loop, float startTimePos, struct AnimSampleData& sample); - Variant SampleAnimationsWithBlend(AnimGraphNode* node, bool loop, float length, float startTimePos, float prevTimePos, float& newTimePos, Animation* animA, Animation* animB, float speedA, float speedB, float alpha); Variant SampleAnimationsWithBlend(AnimGraphNode* node, bool loop, float startTimePos, AnimSampleData& a, AnimSampleData& b, float alpha); Variant SampleAnimationsWithBlend(AnimGraphNode* node, bool loop, float startTimePos, AnimSampleData& a, AnimSampleData& b, AnimSampleData& c, float alphaA, float alphaB, float alphaC); Variant Blend(AnimGraphNode* node, const Value& poseA, const Value& poseB, float alpha, AlphaBlendMode alphaMode); diff --git a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp index fd6a59755..29b071349 100644 --- a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp +++ b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp @@ -607,28 +607,6 @@ Variant AnimGraphExecutor::SampleAnimation(AnimGraphNode* node, bool loop, float return SampleAnimation(node, loop, sample.Length, startTimePos, sample.PrevTimePos, sample.TimePos, sample.Anim, sample.Speed); } -Variant AnimGraphExecutor::SampleAnimationsWithBlend(AnimGraphNode* node, bool loop, float length, float startTimePos, float prevTimePos, float& newTimePos, Animation* animA, Animation* animB, float speedA, float speedB, float alpha) -{ - // Skip if any animation is not ready to use - if (animA == nullptr || !animA->IsLoaded() || - animB == nullptr || !animB->IsLoaded()) - return Value::Null; - - float pos, prevPos; - GetAnimPos(loop, length, startTimePos, prevTimePos, newTimePos, pos, prevPos); - - // Sample the animations with blending - const auto nodes = node->GetNodes(this); - InitNodes(nodes); - nodes->Position = pos; - nodes->Length = length; - ProcessAnimation(nodes, node, loop, length, pos, prevPos, animA, speedA, 1.0f - alpha, ProcessAnimationMode::Override); - ProcessAnimation(nodes, node, loop, length, pos, prevPos, animB, speedB, alpha, ProcessAnimationMode::BlendAdditive); - NormalizeRotations(nodes, _rootMotionMode); - - return nodes; -} - Variant AnimGraphExecutor::SampleAnimationsWithBlend(AnimGraphNode* node, bool loop, float startTimePos, AnimSampleData& a, AnimSampleData& b, float alpha) { // Skip if any animation is not ready to use diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index f88cae3a5..e5fd488a6 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -783,7 +783,7 @@ namespace FlaxEngine.GUI if (_tooltipUpdate != null) { SetUpdate(ref _tooltipUpdate, null); - Tooltip.OnMouseLeaveControl(this); + Tooltip?.OnMouseLeaveControl(this); } }