mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Keyframe stretching plus appendage manipulation
This commit is contained in:
parent
18c0473f39
commit
1af7f41d63
427 changed files with 7003 additions and 1147 deletions
|
@ -15,7 +15,7 @@ namespace RimWorldAnimationStudio
|
|||
[XmlArray("blacklistedRaces"), XmlArrayItem("li")] public List<string> blacklistedRaces = new List<string>();
|
||||
[XmlArray("tags"), XmlArrayItem("li")] public List<string> tags;
|
||||
|
||||
public string gender;
|
||||
[XmlIgnore] public ActorGender gender;
|
||||
public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset();
|
||||
public bool initiator = false;
|
||||
public bool? controlGenitalAngle;
|
||||
|
|
|
@ -57,9 +57,7 @@ namespace RimWorldAnimationStudio
|
|||
HeadFacing.Add((float)keyframe.atTick / (float)duration, keyframe.headFacing, true);
|
||||
BodyFacing.Add((float)keyframe.atTick / (float)duration, keyframe.bodyFacing, true);
|
||||
HeadBob.Add((float)keyframe.atTick / (float)duration, keyframe.headBob, true);
|
||||
|
||||
if (keyframe.genitalAngle.HasValue)
|
||||
{ GenitalAngle.Add((float)keyframe.atTick / (float)duration, keyframe.genitalAngle.Value, true); }
|
||||
GenitalAngle.Add((float)keyframe.atTick / (float)duration, keyframe.genitalAngle, true);
|
||||
|
||||
if (i + 1 < keyframes.Count)
|
||||
{ keyframes[i].tickDuration = keyframes[i + 1].atTick.Value - keyframes[i].atTick.Value; }
|
||||
|
@ -74,9 +72,7 @@ namespace RimWorldAnimationStudio
|
|||
HeadFacing.Add((float)keyframePosition / (float)duration, keyframe.headFacing, true);
|
||||
BodyFacing.Add((float)keyframePosition / (float)duration, keyframe.bodyFacing, true);
|
||||
HeadBob.Add((float)keyframePosition / (float)duration, keyframe.headBob, true);
|
||||
|
||||
if (keyframe.genitalAngle.HasValue)
|
||||
{ GenitalAngle.Add((float)keyframePosition / (float)duration, keyframe.genitalAngle.Value, true); }
|
||||
GenitalAngle.Add((float)keyframePosition / (float)duration, keyframe.genitalAngle, true);
|
||||
|
||||
if (keyframe.tickDuration != 1 && keyframe.quiver.HasValue)
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace RimWorldAnimationStudio
|
|||
}
|
||||
}
|
||||
|
||||
// move to app manager
|
||||
public void RunPreSaveOperations()
|
||||
{
|
||||
// Stage edits
|
||||
|
@ -45,25 +46,32 @@ namespace RimWorldAnimationStudio
|
|||
int stageWindowSize = animationStages[i].stageWindowSize > 0 ? animationStages[i].stageWindowSize : animationStages[i].animationClips.Select(x => x.duration).Max();
|
||||
int cycles = Mathf.CeilToInt(animationStages[i].playTimeTicks / stageWindowSize);
|
||||
|
||||
Debug.Log(animationStages[i].playTimeTicks);
|
||||
Debug.Log(animationStages[i].stageWindowSize);
|
||||
Debug.Log(cycles);
|
||||
stage.isLooping = cycles > 1;
|
||||
}
|
||||
|
||||
// Body part list edit
|
||||
foreach (Actor actor in actors)
|
||||
// Actor edits
|
||||
for (int i = 0; i < actors.Count; i++)
|
||||
{
|
||||
actor.isFucking = actor.requiredGenitals.Contains("Any appendage");
|
||||
Actor actor = actors[i];
|
||||
|
||||
actor.isFucking = actor.requiredGenitals.Contains("Any appendage") ? (bool?)true : null;
|
||||
|
||||
if (actor.isFucking == true)
|
||||
{ actor.requiredGenitals.Remove("Any appendage"); }
|
||||
|
||||
actor.isFucked= actor.requiredGenitals.Contains("Any orifice");
|
||||
actor.isFucked = actor.requiredGenitals.Contains("Any orifice") ? (bool?)true : null;
|
||||
|
||||
if (actor.isFucked == true)
|
||||
{ actor.requiredGenitals.Remove("Any orifice"); }
|
||||
|
||||
actor.controlGenitalAngle = animationStages.Any(x => x.animationClips[i].keyframes.Any(y => y.genitalAngle != 0)) ? (bool?)true : null;
|
||||
|
||||
//if (actor.requiredGender.Contains("Female")) actor.gender = ActorGender.Female;
|
||||
//else if (actor.requiredGender.Contains("Male")) actor.gender = ActorGender.Male;
|
||||
//else actor.gender = ActorGender.None;
|
||||
}
|
||||
|
||||
//actors.OrderBy(x => (int)x.gender);
|
||||
}
|
||||
|
||||
public void RunPostLoadOperations()
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace RimWorldAnimationStudio
|
|||
public float headFacing = 2;
|
||||
public float bodyFacing = 2;
|
||||
|
||||
public float? genitalAngle;
|
||||
public float genitalAngle;
|
||||
public bool? quiver;
|
||||
|
||||
public bool ShouldSerializegenitalAngle() { return genitalAngle != null; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue