예제 #1
0
        void Start()
        {
            Live = false;

            AnimationTarget.CommonPrefix = CommonPrefix;
            AnimationTarget.BasePath     = transform.GetPath();

            if (Mapper != null)
            {
                channelMapping = Mapper.CreateMap();
            }

            Instance = this;
        }
예제 #2
0
    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;
    }
예제 #3
0
        void Start()
        {
            Live = false;

            AnimationTarget.CommonPrefix = CommonPrefix;
            AnimationTarget.BasePath = transform.GetPath ();

            if (Mapper != null) channelMapping = Mapper.CreateMap ();

            Instance = this;
        }
예제 #4
0
        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 ();
        }