Houdini 11 VEX VEX functions

Imports attribute data from the SOP or POP connected to the specified input.

  1. int import(string attrib_name, type result&; int input)

  2. int import(string attrib_name, type result&; int input; int pt_num)

  3. int import(string attrib_name; float values[] &; int input; int pt_num)

    This form lets you import attributes containing arbitrary length arrays of floats, such as capture data.

Imports attribute data from the SOP or POP connected to the specified input. Returns 1 and puts the data in result on success, or returns 0 on failure.

Possible reasons for failure are:

  • No input is connected to the specified index.

  • The attribute doesn’t exist on the input geometry.

  • The attribute size/type doesn’t match the VEX type.

  • The input geometry has fewer points than the VEX SOPs geometry.

  • The point number given is larger than the number of points in the input.

There are two forms of the import() function. The first form will import the attribute data from the current point that the VEX function is working on. The second form allows you to specify an arbitrary point number of the input. Point numbers are indexed from 0.

Contexts: pop, sop