public void NowEditingPuppet(ComboGesturePuppet selectedPuppet) { _state.CurrentlyEditing = CurrentlyEditing.Puppet; _state.Activity = null; _state.Puppet = selectedPuppet; _state.SerializedObject = new SerializedObject(_state.Puppet); _state.ActivityAccessor = new CgePuppetAccessor(_state.Puppet); }
public static List <AnimationClip> AllDistinctAnimations(ComboGesturePuppet cgp) { if (cgp.mainTree == null) { return(new List <AnimationClip>()); } return(AllAnimationsOf((BlendTree)cgp.mainTree)); }
public void RetargetPuppet(ComboGesturePuppet puppet) { _editorEffector.NowEditingPuppet(puppet); if (!_editorEffector.IsPreviewSetupValid()) { _editorEffector.SwitchTo(PuppetEditorMode.OtherOptions); _editorEffector.MarkFirstTimeSetup(); } _window.titleContent = new GUIContent("CGE/" + puppet.name); }
public static IManifest FromPuppet(ComboGesturePuppet puppet) { var animations = AllDistinctAnimations(puppet); var qualifications = animations.Select(clip => new QualifiedAnimation( clip, new Qualification( puppet.blinking.Contains(clip), LimitedLipsyncHasWideOpenMouth(puppet, clip) ? QualifiedLimitation.Wide : QualifiedLimitation.None ))) .Distinct() .ToList(); return(new PuppetManifest( puppet.transitionDuration, PuppetAnimatedBehavior.Of((BlendTree)puppet.mainTree, qualifications) )); }
public void ShowPuppet(ComboGesturePuppet puppet) { RetargetPuppet(puppet); _window.Show(); }
private static bool LimitedLipsyncHasWideOpenMouth(ComboGesturePuppet puppet, AnimationClip clip) { return(puppet.limitedLipsync.Contains(new ComboGestureActivity.LimitedLipsyncAnimation { clip = clip, limitation = ComboGestureActivity.LipsyncLimitation.WideOpenMouth })); }
public CgePuppetAccessor(ComboGesturePuppet puppet) { _puppet = puppet; }