예제 #1
0
		private Actions.Face BMLFaceShiftToAction(string id, FaceFacs[] aFacs, FaceLexeme[] aLexeme, string start) {
			List<Actions.FaceFacs> facs = new List<Actions.FaceFacs>();
			List<Actions.FaceLexeme> lexemes = new List<Actions.FaceLexeme>();
			if (aFacs!=null) foreach(FaceFacs f in aFacs) facs.Add(BMLFaceFacsToAction(f.id, f.au, f.side, f.start, f.end));
			if (aLexeme!=null) foreach(FaceLexeme f in aLexeme) lexemes.Add(BMLFaceLexemeToAction(f.id, f.lexeme, f.start, f.end));
			if (start!=null && start!="") {
				if (id!=null && id!="") {
					//all except end*
					return new Actions.FaceShift(id, facs, lexemes, new Actions.SyncPoint(start));
				}else{
					//only start*
					return new Actions.FaceShift(facs, lexemes, new Actions.SyncPoint(start));
				}
			}else{
				if (id!=null && id!="") {
					//only id
					return new Actions.FaceShift(id, facs, lexemes);
				}else{
					//no params
					return new Actions.FaceShift(facs, lexemes);
				}
			}
		}
예제 #2
0
        private Actions.Face BMLFaceToAction(string id, FaceFacs[] aFacs, FaceLexeme[] aLexeme, string start, string end, float amount, string attackPeak, string relax, string overshoot)
        {
			List<Actions.FaceFacs> facs = new List<Actions.FaceFacs>();
			List<Actions.FaceLexeme> lexemes = new List<Actions.FaceLexeme>();
			if (aFacs!=null) foreach(FaceFacs f in aFacs) facs.Add(BMLFaceFacsToAction(f.id, f.au, f.side, f.start, f.end));
			if (aLexeme!=null) foreach(FaceLexeme f in aLexeme) lexemes.Add(BMLFaceLexemeToAction(f.id, f.lexeme, f.start, f.end));

			if (end!=null && end!="") {
				if (start!=null && start!="") {
					if (id!=null && id!="") {
						//all params*
                        return new Actions.Face(id, facs, lexemes, new Actions.SyncPoint(start), new Actions.SyncPoint(end), amount);
					}else{
						//all except id*
                        return new Actions.Face(facs, lexemes, new Actions.SyncPoint(start), new Actions.SyncPoint(end), amount);
					}
				}else{
					if (id!=null && id!="") {
						//all except start
                        return new Actions.Face(id, facs, lexemes, Actions.SyncPoint.Null, new Actions.SyncPoint(end), amount);
					}else{
						//only end
                        return new Actions.Face(facs, lexemes, Actions.SyncPoint.Null, new Actions.SyncPoint(end), amount);
					}
				}
			}else{
				if (start!=null && start!="") {
					if (id!=null && id!="") {
						//all except end*
                        return new Actions.Face(id, facs, lexemes, new Actions.SyncPoint(start), amount);
					}else{
						//only start*
                        return new Actions.Face(facs, lexemes, new Actions.SyncPoint(start), amount);
					}
				}else{
					if (id!=null && id!="") {
						//only id
                        return new Actions.Face(id, facs, lexemes, amount);
					}else{
						//no params
                        return new Actions.Face(facs, lexemes, amount);
					}
				}
			}
		}