- Fixed a bug which would cause keyframes to be pasted incorrectly in the later stages of an animation after loading an existing file
This commit is contained in:
AbstractConcept 2023-01-12 22:55:47 -06:00
parent ab53ed284f
commit 648acb325f
57 changed files with 74 additions and 68 deletions

View file

@ -175,8 +175,7 @@ namespace RimWorldAnimationStudio
public void OnPostLoad()
{
foreach (PawnAnimationClip clip in AnimationClips)
{ clip.OnPostLoad(); }
}
}
}

View file

@ -195,9 +195,17 @@ namespace RimWorldAnimationStudio
public int GetOwningActorID()
{
if (Workspace.animationDef == null) return -1;
if (Workspace.animationDef == null)
{ Debug.Log("Cannot get actor ID - the AnimationDef is invalid"); return -1; }
return Workspace.GetCurrentAnimationStage().AnimationClips.IndexOf(this);
foreach (AnimationStage stage in Workspace.animationDef.animationStages)
{
if (stage.AnimationClips.Contains(this))
{ return stage.AnimationClips.IndexOf(this); }
}
Debug.Log("Cannot get actor ID - animation clip has been orphaned");
return -1;
}
public void AddPawnKeyframe()

View file

@ -8,7 +8,7 @@ namespace RimWorldAnimationStudio
public static class Constants
{
// Project data
public static string currentVersion = "1.0.3";
public static string currentVersion = "1.0.4";
public static string projectHome = "https://gitgud.io/AbstractConcept/rimworld-animation-studio";
public static string projectWiki = "https://gitgud.io/AbstractConcept/rimworld-animation-studio/-/wikis/home";

View file

@ -201,7 +201,7 @@ namespace RimWorldAnimationStudio
public void Initialize()
{
Debug.Log("Initializing animation preview");
//Debug.Log("Initializing animation preview");
int actorCount = Workspace.animationDef.Actors.Count;
int childCount = animationTimelines.GetComponentsInChildren<AnimationTimeline>().Count();