- Removed 'None' as a user specified option for sex type. Animations will now be automatically assigned a sex type of 'None' if they have no other sex type or interaction def specified
- Minor UI improvements
This commit is contained in:
AbstractConcept 2023-01-09 14:21:53 -06:00
parent 279823a390
commit b6d3df800d
76 changed files with 141 additions and 122 deletions

View file

@ -69,10 +69,9 @@ namespace RimWorldAnimationStudio
{
Workspace.Reset();
Workspace.animationDef = animationDef;
UpdateCustomArrays(animationDef);
Workspace.animationDef = animationDef;
RunPostLoadOperations(animationDef);
UpdateCustomArrays(animationDef);
animationDef.Initialize();
Debug.Log("Loaded AnimationDef: " + animationDef.DefName);
@ -89,6 +88,22 @@ namespace RimWorldAnimationStudio
public void RunPostLoadOperations(AnimationDef animationDef)
{
animationDef.OnPostLoad();
foreach (AnimationStage stage in animationDef.AnimationStages)
{
stage.OnPostLoad();
foreach (PawnAnimationClip clip in stage.AnimationClips)
{
clip.OnPostLoad();
foreach (PawnKeyframe keyframe in clip.Keyframes)
{ keyframe.OnPostLoad(); }
}
}
// Adjustment to add absent quick animation length
if (animationDef.animationTimeTicksQuick <= 0)
{
if (animationDef.AnimationStages.Count > 1)
@ -103,9 +118,6 @@ namespace RimWorldAnimationStudio
else if (animationDef.AnimationStages.Count == 1)
{ animationDef.AnimationStages[0].PlayTimeTicksQuick = animationDef.AnimationStages[0].PlayTimeTicks; }
}
foreach (AnimationStage stage in animationDef.AnimationStages)
{ stage.OnPostLoad(); }
}
public void TryToSaveAnimation()