Minor fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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<InlinedAllocation<8>>* 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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -783,7 +783,7 @@ namespace FlaxEngine.GUI
|
||||
if (_tooltipUpdate != null)
|
||||
{
|
||||
SetUpdate(ref _tooltipUpdate, null);
|
||||
Tooltip.OnMouseLeaveControl(this);
|
||||
Tooltip?.OnMouseLeaveControl(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user