맥스스크립트 기본

Constraints - Orientation(2)

스크립팅하는애님 2019. 11. 19. 16:29
728x90
반응형

  안녕하세요.

애니메이터가 들려주는 맥스 스크립트의 스크립팅하는 애님입니다.

오늘도 회전을 똑같이 따라 하게 해주는 Orientation에 대해서 이야기하겠습니다.

 

 

이전과 같이 박스 두 개를 만들겠습니다.

Box001, Box002이며 Box001에 Rotation Controller에 Orientation을 적용했습니다.

그리고 Box001의 Orientation Target List에 Box002를 추가했습니다.

 

Keep Initial Offset

<Orientation_Constraint>.relative Boolean default: false -- boolean

Orientation적용 시 원래 rotation값을 기준으로 적용할지 Target값을 기준으로 할지를 적용할 수 있습니다.

해당 값을 확인하거나 변경할 수 있습니다.

Keep Initial Offset값이 적용되어 있으면 true를, 아니라면 false입니다.

사용방법은 다음과 같습니다.

 

1
2
$'Box001'.rotation.controller.relative
$'Box001'.rotation.controller.relative = true
cs

 

1번 라인은 Keep Initial Offset의 설정값을 가져옵니다.

2번 라인은 Keep Initial Offset의 설정값을 변경합니다.

 

 

Transform Rule

<Orientation_Constraint>.local_world Integer default: 0 -- integer; LocalOrWorld

Orientation의 룰이 Local인지 World인지 설정값을 확인하거나 설정할 수 있습니다.

0 : World --> World

1 : Local --> Local

사용방법은 다음과 같습니다.

 

1
2
$'Box001'.rotation.controller.local_world
$'Box001'.rotation.controller.local_world = 0
cs

 

1번 라인은 Transform Rule의 세팅값을 가져옵니다.

2번 라인은 Transform Rule의 셋팅값을 변경합니다.

 

 

Target Node Count

<integer>getNumTargets ()

타깃 리스트의 노드 수를 가져옵니다.

사용방법은 다음과 같습니다.

 

1
$'Box001'.rotation.controller.getNumTargets()
cs

 

결과 값은 현재 하나의 Target을 사용하고 있기 때문에 1 값을 반환합니다.

 

 

오늘로서 Orientation을 마무리 지었습니다.

다음에는 Link Constraint에 대해서 알아보겠습니다.

728x90
반응형

'맥스스크립트 기본' 카테고리의 다른 글

Constraints - Path(1)  (0) 2019.11.25
Constraints - Link(3)  (0) 2019.11.22
Constraints - Link(2)  (0) 2019.11.21
Constraints - Link(1)  (0) 2019.11.20
Constraints - Orientation(1)  (0) 2019.11.18
Constraints - Position(2)  (0) 2019.11.15
Constraints - Position(1)  (0) 2019.11.14
Constraints - Look At(4)  (0) 2019.11.13