void Start() { Live = false; AnimationTarget.CommonPrefix = CommonPrefix; AnimationTarget.BasePath = transform.GetPath(); if (Mapper != null) { channelMapping = Mapper.CreateMap(); } Instance = this; }
public SetDrivenKeyMapper(TextAsset SDK_Definition, List<Transform> faceJoints, Transform headJoint, Transform leftEyeJoint, Transform rightEyeJoint, FaceCapture faceCapture) { this.SDK_Definition = SDK_Definition; this.faceJoints = faceJoints; this.headJoint = headJoint; this.leftEye = leftEyeJoint; this.rightEye = rightEyeJoint; initialTranslation = new Dictionary<Transform, Vector3>(); initialRotation = new Dictionary<Transform, Vector3>(); initialScale = new Dictionary<Transform, Vector3>(); foreach(Transform j in faceJoints){ initialTranslation.Add(j,j.localPosition); initialRotation.Add(j,j.localEulerAngles); initialScale.Add(j,j.localScale); } faceCapture.OnChannelsUpdated += SolveSetDrivenKeys; }
void Start() { Live = false; AnimationTarget.CommonPrefix = CommonPrefix; AnimationTarget.BasePath = transform.GetPath (); if (Mapper != null) channelMapping = Mapper.CreateMap (); Instance = this; }
void OnGUI() { autoRepaintOnSceneChange = true; var c = FaceCapture.Instance; if (character == null && c != null && Authentication.CanUseFacePlus) { if (options.mode == Mode.Realtime){ Logger.Info ("Starting tracking..."); c.StartLiveTracking (); } } character = c; if (character) { character.OnStopPlayback -= OnPlaybackStopped; character.OnStopPlayback += OnPlaybackStopped; } EditorGUILayout.Space (); GUILayout.BeginVertical (); // 1 if (!Authentication.CanUseFacePlus) { LoginWindow(); } else { MainGUI (); } EditorGUILayout.EndVertical (); }