- Fixed an issue where changing the order of actors in the animation was not being perpetuated across all animation stages
This commit is contained in:
AbstractConcept 2023-01-11 22:36:57 -06:00
parent b6d3df800d
commit ab53ed284f
46 changed files with 71 additions and 62 deletions

View file

@ -99,12 +99,16 @@ namespace RimWorldAnimationStudio
Workspace.animationDef.Actors[startIndex] = Workspace.animationDef.Actors[startIndex + delta];
Workspace.animationDef.Actors[startIndex + delta] = actor;
PawnAnimationClip clip = Workspace.GetPawnAnimationClip(startIndex);
Workspace.GetCurrentAnimationStage().AnimationClips[startIndex] = Workspace.GetCurrentAnimationStage().AnimationClips[startIndex + delta];
Workspace.GetCurrentAnimationStage().AnimationClips[startIndex + delta] = clip;
foreach (AnimationStage stage in Workspace.animationDef.animationStages)
{
int stageID = stage.GetStageID();
PawnAnimationClip clip = Workspace.GetPawnAnimationClip(stageID, startIndex);
Workspace.GetAnimationStage(stageID).AnimationClips[startIndex] = Workspace.GetAnimationStage(stageID).AnimationClips[startIndex + delta];
Workspace.GetAnimationStage(stageID).AnimationClips[startIndex + delta] = clip;
}
Workspace.ActorID = startIndex + delta;
Workspace.RecordEvent("Timeline move");
return true;