|
HDK
|
#include "api.h"#include <GT/GT_Handles.h>#include <GT/GT_Types.h>#include <UT/UT_Optional.h>#include <UT/UT_StringHolder.h>#include <pxr/base/vt/value.h>#include <pxr/pxr.h>#include <pxr/usd/sdf/path.h>
Include dependency graph for primvarUtils.h:Go to the source code of this file.
Classes | |
| struct | GusdPrimvarInfo |
Functions | |
| GUSD_API GT_DataArrayHandle | GusdConvertPrimvarData (const GusdPrimvarInfo &primvar) |
| GUSD_API GT_DataArrayHandle | GusdConvertPrimvarsToIndexPairData (const GusdPrimvarInfo &indices_primvar, const GusdPrimvarInfo &weights_primvar, const VtTokenArray &joint_names) |
| GUSD_API GT_DataArrayHandle | GusdConvertPrimvarsToArrayData (const GusdPrimvarInfo &values_primvar, const GusdPrimvarInfo &lengths_primvar) |
| GUSD_API bool | GusdIsArrayLengthsPrimvar (const TfToken &primvar_name) |
| Returns whether the primvar holds the array lengths for an array attribute. More... | |
| GUSD_API TfToken | GusdGetArrayLengthsPrimvarName (const TfToken &values_primvar_name) |
| GUSD_API GT_DataArrayHandle GusdConvertPrimvarData | ( | const GusdPrimvarInfo & | primvar | ) |
Converts the primvar to a GT_DataArray. The caller is responsible for choosing how to insert it into the appropriate GT_AttributeList that it manages.
| GUSD_API GT_DataArrayHandle GusdConvertPrimvarsToArrayData | ( | const GusdPrimvarInfo & | values_primvar, |
| const GusdPrimvarInfo & | lengths_primvar | ||
| ) |
SOP array attributes (arrays of arrays) are represented in USD with a constant primvar containing the concatenated values for all of the arrays, and a separate ':lengths' primvar containing the length of each array. The interpolation of the ':lengths' primvar determines the interpolation of the array attribute. Returns the combined array of arrays, or nullptr if e.g. the lengths are invalid.
| GUSD_API GT_DataArrayHandle GusdConvertPrimvarsToIndexPairData | ( | const GusdPrimvarInfo & | indices_primvar, |
| const GusdPrimvarInfo & | weights_primvar, | ||
| const VtTokenArray & | joint_names | ||
| ) |
Index-pair attributes are a special case, which are represented in USD with separate primvars for the indices and weights.
Returns the name of the primvar holding the array lengths for an array attribute.