19 #ifndef __XUSD_AttributeUtils_h__
20 #define __XUSD_AttributeUtils_h__
46 template<
typename UT_VALUE_TYPE>
51 template<
typename UT_VALUE_TYPE>
54 const UT_VALUE_TYPE &
value,
56 bool clear_existing =
true);
75 bool save_for_undo =
false,
86 bool save_for_undo =
false,
93 bool save_for_undo =
false,
97 template<
typename UT_VALUE_TYPE>
114 template<
typename UT_VALUE_TYPE>
117 UT_VALUE_TYPE &
value);
120 template<
typename UT_VALUE_TYPE>
123 const UT_VALUE_TYPE &
value);
126 template<
typename UT_VALUE_TYPE>
129 UT_VALUE_TYPE &
value);
141 template<
typename UT_VALUE_TYPE>
143 UT_VALUE_TYPE &
value);
146 template<
typename UT_VALUE_TYPE>
148 UT_VALUE_TYPE &
value);
151 template<
typename UT_VALUE_TYPE>
157 template<
typename UT_VALUE_TYPE>
177 const PRM_Parm *parm_hint =
nullptr );
179 const VOP_Node &vop,
int output_idx,
180 const PRM_Parm *parm_hint =
nullptr );
HUSD_API bool HUSDsetRelationshipNodeParm(PRM_Parm &parm, const SdfPathVector &rel_targets, bool save_for_undo=false, UT_UniquePtr< HUSD_AutoAnyLock > *lock_to_release=nullptr)
HUSD_API bool HUSDgetValue(const VtValue &vt_value, UT_VALUE_TYPE &ut_value)
Conversion function between VtValue and UT_* value objects.
GLsizei const GLfloat * value
HUSD_API bool HUSDgetAssetInfo(const UsdObject &object, const TfToken &name, UT_VALUE_TYPE &value)
Fetch asset info.
HUSD_API bool HUSDsetNodeParm(PRM_Parm &parm, const UsdAttribute &attribute, const UsdTimeCode &timecode, bool save_for_undo=false, UT_UniquePtr< HUSD_AutoAnyLock > *lock_to_release=nullptr)
HUSD_API bool HUSDhasMetadata(const UsdObject &object, const TfToken &name)
Metadata utilities.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
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)
std::vector< class SdfPath > SdfPathVector
HUSD_API VtValue HUSDgetVtValue(const UT_VALUE_TYPE &ut_value)
GLuint const GLchar * name
HUSD_API exint HUSDgetMetadataLength(const UsdObject &object, const TfToken &name)
HUSD_API bool HUSDsetConnectionNodeParm(PRM_Parm &parm, const UsdShadeConnectionSourceInfo &src_info, bool save_for_undo=false, UT_UniquePtr< HUSD_AutoAnyLock > *lock_to_release=nullptr)
Sets the parameter to specify the given source for a connection.
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)