disable set all linear / smooth when select many splines

This commit is contained in:
Ruan Lucas
2023-07-24 08:54:53 -04:00
parent c79c91a19a
commit 56285e544e

View File

@@ -356,8 +356,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
_alignedTangentButton.Button.Enabled = CanSetTangentAligned();
_smoothInTangentButton.Button.Enabled = CanSetTangentSmoothIn();
_smoothOutTangentButton.Button.Enabled = CanSetTangentSmoothOut();
_setLinearAllTangentsButton.Button.Enabled = CanEditTangent();
_setSmoothAllTangentsButton.Button.Enabled = CanEditTangent();
_setLinearAllTangentsButton.Button.Enabled = CanSetAllTangentsLinear();
_setSmoothAllTangentsButton.Button.Enabled = CanSetAllTangentsSmooth();
if (!CanEditTangent())
{
@@ -422,6 +422,16 @@ namespace FlaxEditor.CustomEditors.Dedicated
return _lastPointSelected.Index < _selectedSpline.SplinePointsCount - 1 && _lastPointSelected.Index != 0;
}
private bool CanSetAllTangentsSmooth()
{
return _selectedSpline != null;
}
private bool CanSetAllTangentsLinear()
{
return _selectedSpline != null;
}
private void SetModeLinear()
{
if (_currentTangentMode is LinearTangentMode) return;