跳转到内容

hasvertexattrib

int  hasvertexattrib(<geometry>geometry, string attribute_name)

<geometry>

在节点上下文(如wrangle SOP)中运行时,此参数可以是表示输入编号(从0开始)的整数,用于读取几何体。

或者,该参数可以是指定要读取的几何体文件(例如.bgeo)的字符串。在Houdini内部运行时,可以是op:/path/to/sop引用。

如果属性存在则返回1,否则返回0

示例

// 判断P属性是否存在
int exists = hasvertexattrib("defgeo.bgeo", "P");