修改track复制步进和撤销模式

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-10 14:05:45 +08:00
parent fdc20cd66f
commit a835e8321b
30 changed files with 1501 additions and 367 deletions

View File

@@ -176,13 +176,7 @@ namespace Ichni.Editor
private void GenerateSaveClipWindow()
{
GameElement currentElement = EditorManager.instance.operationManager.currentSelectedElements[0];
if (currentElement == null)
{
LogWindow.Log("No Game Element selected.", Color.red);
return;
}
if (!TryGetSingleSelectedElementForClip(out GameElement currentElement)) return;
if (clipManagementWindow != null)
{
@@ -208,15 +202,7 @@ namespace Ichni.Editor
private void GenerateLoadClipWindow()
{
GameElement currentElement = EditorManager.instance.operationManager.currentSelectedElements[0];
if (currentElement == null)
{
LogWindow.Log("No Game Element selected.", Color.red);
return;
}
GameElement loadTarget = currentElement == EditorManager.instance ? null : currentElement.parentElement;
if (!TryGetSingleSelectedElementForClip(out GameElement currentElement)) return;
if (clipManagementWindow != null)
{
@@ -240,6 +226,26 @@ namespace Ichni.Editor
});
}
private bool TryGetSingleSelectedElementForClip(out GameElement currentElement)
{
currentElement = null;
var selectedElements = EditorManager.instance.operationManager.currentSelectedElements;
if (selectedElements == null || selectedElements.Count != 1)
{
LogWindow.Log("Please select only one Game Element for clip operation.", Color.red);
return false;
}
currentElement = selectedElements[0];
if (currentElement == null)
{
LogWindow.Log("No Game Element selected.", Color.red);
return false;
}
return true;
}
private void GenerateMergeWindow()
{
GeneralSecondaryWindow mergeWindow = Instantiate(EditorManager.instance.basePrefabs.generalSecondaryWindow,