跳转到内容

chf

float  chf(string channel)

float  chf(string channel, float time_in_sec)

float  chf(int op_id, int parm_index, int vector_index)

float  chf(int op_id, int parm_index, int vector_index, float time_in_sec)

评估通道(或参数)并返回其值。时间以为单位指定,而不是帧数。如果不指定时间,函数将返回当前时间的值。

Houdini提供了多个函数来评估不同类型的通道/参数:

  • 要获取浮点数或字符串而不需要知道参数类型,使用ch
  • 要获取浮点数,使用chf
  • 要获取字符串,使用chs
  • 对于整数参数,使用chi
  • 对于矩阵类型参数,使用ch3ch4
  • 对于渐变参数,使用chrampchrampderiv
  • 使用chid获取op_idparm_indexvector_index,以便在不进行字符串解析的情况下评估通道