/ -> exhelp opinput
string opinput (string name, float index)
        REPLACED BY
            hou.Node.inputConnectors()
        
        Returns the name of the node connected to a given input.
        
        <index> is the 0-based number of the input. For example, to get the name
        of the node connected to the first input, use opinput(".", 0), and for
        the second input, use opinput(".", 1).
        
        EXAMPLES
              point("../" + opinput(".", 0), $PT, "P", 0)

opinput은 지정경로의 input으로 들어오는 노드의 이름을 가져온다. 예제 익스프레션을 풀이 하자면

"point 함수로 각 포인트의 포지션 X축을 가져오는데 경로는 현재경로의 첫번째 인풋으로 들어오는 경로를 이용한다."라는 건데

그냥 절대 경로를 입력시 계속 경로를 바꿔주는 번거로움이 있으므로 point의 경로를 

[ "../"(현재 레벨) + opinput("."(현재 노드), 0) ]로 설정하여 자동화 시킨것이다.

---------------------------------------------------------------------------------------------------------

/ -> exhelp opinputpath

string opinputpath (string name, float index)

        REPLACED BY

            hou.Node.path()

        

        Returns the full path of the node connected to a given input.

        

        <index> is the 0-based number of the input. For example, to get the path

        of the node connected to the first input, use opinputpath(".", 0), and

        for the second input, use opinputpath(".", 1).

        

        EXAMPLES

              point(opinputpath(".", 0), $PT, "P", 0)

        

opinputpath는 지정경로의 input으로 들어오는 노드의 경로를 가져온다.

        

        RELATED

          * opinput

          * opninputs

          * opoutput

          * opoutputpath

          * opnoutputs

 

 

'Houdini > └ EXP' 카테고리의 다른 글

[EXP] argc("This has four arguments")  (0) 2016.10.17
[EXP] parameter 타입별 expressions 사용법  (0) 2016.10.17

Returns the number of arguments in an HScript-style list of arguments.

Usage

argc(line)

Standard parsing is done, no variable expansion is done on the line.

Examples

 

argc("This has four arguments")
Returns 4, as that is the number of space delimited words.

 

 

argc("Quoting 'makes this one arg'")

Returns two as the quotes cause the last four words to count as a single word.

 

argc는 리스트의 총 인수 갯수를 출력해준다

 

ex) argc(primgrouplist("/obj/box/voronoifracture1"))

 

 

parameter 타입별로 익스프레션을 사용하는 방법이 필요하다. 일반적인 변수 입력창에는 익스프레션을 그대로 작성하면 되지만 노드를 선택해서 가져오는경우나 파일을 여는 파라메터에서는 추가해 주어야 할 것이 있다.

 

 

 

위와 같이 외부 파일만을 받는 파라메터에서 후디니 노드를 입력해야 할 경우 앞부분에 "op:"를 입력 후 " ` "back tick을 이용하여 익스프레션의 리턴값을 받아오게끔 해줘야 익스프레션이 작동된다.

+ Recent posts