본문 바로가기

Mr.Curiosity/Motion_Study

loopOut expression 멈추기!

walk cycle작업하면서 수도 없이 쓰는 loopOut!

유용하지만 쓰다가 다른 모션을 추가하고 싶을때 곤란한 경우가 많다..

 

검색 중 체크박스를 이용해 루핑 expression을 키고 끄는 코드를 발견..

난 왜 이제 이걸....알려고 노력했을까......

 

marker를 이용하여 제어하는건

 

stop = marker.key(marker.numKeys).time; loopDur = key(numKeys).time; if (time > stop){ stop%loopDur; }else{ loopOut(); }

하지만 이건 마커가 끝나는 지점에서 에러 뜨기 때문에

패스...

 

 

 

s = effect("Stop LoopOut")("Checkbox"); // Parent to Checkbox controller. Rename the controller "Stop LoopOut" if you want :)



if (s == 0) { 

loopOut("cycle") 

} else { 
value
}

/* If the checkbox is off (0), then loop it. Loop it good. 
Otherwise, just use the value (your keyframes). */

 

변수 선언이 체크박스로도 되는구나.......

체크박스를 해지한 상태가 0이고, 선택한 상태가 1로 저장

그래서 0이면 루핑을 돌다가 1이면 끝나는 아주 쉽고 짧은 스크립트다

 

출처는 creativecow.net

 

 

 

'Mr.Curiosity > Motion_Study' 카테고리의 다른 글

follow through - expression  (0) 2020.01.15
폰트 사이트 정리 (계속 업데이트~~~~)  (0) 2019.12.31
Copy!!!!!  (0) 2019.11.27
expression reference  (0) 2019.10.27