이펙트 (FX)/이펙트 팁 : Houdini
[Houdini/Python] 노드 색 변경 (원하는 색을 기본값으로)
Minkyu Lee
2024. 3. 11. 10:43
방법
1. 내문서\후디니버전\scripts\OnCreated.py 의 경로에 파이썬 파일 생성
2. 파이썬 스크립트로 원하는 노드를 색 지정한다.
이하 코드 참고
def main(kwargs) :
node = kwargs["node"]
if node.type().name() == "null" :
node.setColor(hou.Color(0,0,0))
if node.type().name() == "object_merge" :
node.setColor(hou.Color(0.976,0.78,0.263))
main(kwargs)
참고사항
- 노드 이름 확인법
- kwargs란?
keyword argument의 줄임말이다.
함수에 호출될 키워드 형태의 인자를 의미한다.
참고영상
https://www.sidefx.com/tutorials/change-nodecolors-and-shapes-with-the-oncreatedpy-callback-script/
Change Nodecolors and -shapes with the onCreated.py callback script | SideFX
Change Nodecolors and -shapes with the onCreated.py callback script.
www.sidefx.com