19 #ifndef __XUSD_AttributeUtils_h__
20 #define __XUSD_AttributeUtils_h__
44 template<
typename UT_VALUE_TYPE>
49 template<
typename UT_VALUE_TYPE>
52 const UT_VALUE_TYPE &
value,
54 bool clear_existing =
true);
68 bool save_for_undo =
false);
73 bool save_for_undo =
false);
76 template<
typename UT_VALUE_TYPE>
85 bool save_for_undo =
false);
99 template<
typename UT_VALUE_TYPE>
102 UT_VALUE_TYPE &
value);
105 template<
typename UT_VALUE_TYPE>
108 const UT_VALUE_TYPE &
value);
111 template<
typename UT_VALUE_TYPE>
114 UT_VALUE_TYPE &
value);
126 template<
typename UT_VALUE_TYPE>
128 UT_VALUE_TYPE &
value);
131 template<
typename UT_VALUE_TYPE>
133 UT_VALUE_TYPE &
value);
136 template<
typename UT_VALUE_TYPE>
142 template<
typename UT_VALUE_TYPE>
162 const PRM_Parm *parm_hint =
nullptr );
164 const VOP_Node &vop,
int output_idx,
165 const PRM_Parm *parm_hint =
nullptr );
HUSD_API bool HUSDgetValue(const VtValue &vt_value, UT_VALUE_TYPE &ut_value)
Conversion function between VtValue and UT_* value objects.
HUSD_API bool HUSDsetNodeParm(PRM_Parm &parm, const UsdAttribute &attribute, const UsdTimeCode &timecode, bool save_for_undo=false)
HUSD_API bool HUSDgetAssetInfo(const UsdObject &object, const TfToken &name, UT_VALUE_TYPE &value)
Fetch asset info.
HUSD_API bool HUSDhasMetadata(const UsdObject &object, const TfToken &name)
Metadata utilities.
HUSD_API SdfValueTypeName HUSDgetShaderAttribSdfTypeName(const PRM_Parm &parm)
Returns the type of a shader input attribute given the VOP node input.
HUSD_API VtValue HUSDgetShaderParmValue(const PRM_Parm &parm, const HUSD_TimeCode &timecode)
Returns the value of the best suited Usd type given the Houdini parameter.
HUSD_API VOP_TypeInfo HUSDgetVopTypeInfo(SdfValueTypeName sdf_type_name)
HUSD_API bool HUSDisArrayMetadata(const UsdObject &object, const TfToken &name)
HUSD_API bool HUSDclearMetadata(const UsdObject &object, const TfToken &name)
HUSD_API bool HUSDsetConnectionNodeParm(PRM_Parm &parm, const UsdShadeConnectionSourceInfo &src_info, bool save_for_undo=false)
Sets the parameter to specify the given source for a connection.
HUSD_API VtValue HUSDgetVtValue(const UT_VALUE_TYPE &ut_value)
GLuint const GLchar * name
HUSD_API exint HUSDgetMetadataLength(const UsdObject &object, const TfToken &name)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HUSD_API VtValue HUSDgetShaderParmDefaultValue(const PRM_Parm &parm)
HUSD_API bool HUSDgetAttribute(const UsdAttribute &attribute, UT_VALUE_TYPE &value, const UsdTimeCode &timecode)
Gets the value of the given attribute at specified timecode.
HUSD_API bool HUSDsetMetadata(const UsdObject &object, const TfToken &name, const UT_VALUE_TYPE &value)
Gets obj's metadata given its name (eg, "active" or "customData:foo:bar").
#define PXR_NAMESPACE_CLOSE_SCOPE
HUSD_API SdfValueTypeName HUSDgetShaderInputSdfTypeName(const VOP_Node &vop, int input_idx, const PRM_Parm *parm_hint=nullptr)
HUSD_API SdfValueTypeName HUSDgetAttribSdfTypeName(const PI_EditScriptedParm &parm)
Returns the best suited Usd attribute type given the Houdini parameter.
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
HUSD_API bool HUSDgetCustomData(const UsdObject &object, const TfToken &name, UT_VALUE_TYPE &value)
Fetch custom data.
HUSD_API bool HUSDgetFirstConnectedSrc(const UsdAttribute &attribute, UsdShadeConnectionSourceInfo &src_info_value)
Obtains the source the given destination attribute is connected to.
HUSD_API bool HUSDgetMetadata(const UsdObject &object, const TfToken &name, UT_VALUE_TYPE &value)
Gets obj's metadata given its name (eg, "active" or "customData:foo:bar").
HUSD_API const char * HUSDgetSdfTypeName()
Returns the SdfValueTypeName string best corresponding to the UT type.
HUSD_API bool HUSDsetAttribute(const UsdAttribute &attribute, const UT_VALUE_TYPE &value, const UsdTimeCode &timecode, bool clear_existing=true)
Sets the given attribute to the given value.
HUSD_API bool HUSDgetAttributeSpecDefault(const SdfAttributeSpec &spec, UT_VALUE_TYPE &value)
HUSD_API SdfValueTypeName HUSDgetShaderOutputSdfTypeName(const VOP_Node &vop, int output_idx, const PRM_Parm *parm_hint=nullptr)