24 #ifndef _GUSD_USD_UTILS_H_
25 #define _GUSD_USD_UTILS_H_
50 namespace GusdUSD_Utils
96 template <
typename SchemaT>
147 bool caseSensitive=
true);
157 bool caseSensitive=
true);
163 bool caseSensitive=
true);
246 const SdfLayerHandle&
layer);
302 template <
typename SchemaT>
309 TfType::Find<SchemaT>().GetTypeName();
312 "Prim '%s' is not a %s.",
SDF_API const char * GetText() const
GUSD_API void ExtractPrimPathAndVariants(const SdfPath &path, SdfPath &primPath, SdfPath &variants)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const void * indices
GUSD_API bool AppendVariantSelections(const UT_Array< UsdPrim > &prims, const VariantSelArray &selections, UT_Array< UT_StringHolder > &orderedVariants, UT_Array< exint > &indices, const UT_Array< SdfPath > *prevVariants=NULL)
GUSD_API const KindNode & GetModelKindHierarchy()
UT_Array< IndexPair > IndexPairArray
static constexpr UsdTimeCode EarliestTime()
GUSD_API bool GetPrimAndVariantPathsFromPathList(const char *str, UT_Array< SdfPath > &primPaths, UT_Array< SdfPath > &variants, UT_ErrorSeverity sev=UT_ERROR_ABORT)
GT_API const UT_StringHolder time
GUSD_API bool CreateSdfPath(const UT_StringRef &pathStr, SdfPath &path, UT_ErrorSeverity sev=UT_ERROR_ABORT)
GLsizei const GLchar *const * string
GUSD_API const SdfPath & GetDefaultPrimIdentifier()
Returns an SdfPath that can be used for identify the stage's defaultPrim.
GUSD_API bool GetPropertyNames(const UT_Array< UsdPrim > &prims, const NameMatcher &matcher, UT_Array< UT_StringHolder > &orderedNames, IndexPairArray &indices, const std::string &nameSpace=std::string())
GLsizei const GLchar *const * path
const TfToken kModelingVariantToken("modelingVariant")
TODO: Would be nice to loft these TfTokens into a a shared place.
GUSD_API void GetBaseSchemaTypesMatchingPattern(const char *pattern, UT_Array< TfType > &types, bool caseSensitive=true)
GUSD_API bool GetUniqueVariantNames(const UT_Array< UsdPrim > &prims, const std::string &variantSet, UT_Array< UT_StringHolder > &names)
GUSD_API bool ExpandVariantSetPaths(const UT_Array< UsdPrim > &prims, const std::string &variantSet, const NameMatcher &matcher, UT_Array< UT_StringHolder > &orderedVariants, IndexPairArray &indices, const UT_Array< SdfPath > *prevVariants=NULL)
SYS_API fpreal64 SYSniceNumber(fpreal64 num, int digits=6)
GLenum GLuint GLint GLint layer
UT_SharedPtr< KindNode > RefPtr
GUSD_API UT_StringHolder TokenToStringHolder(const TfToken &token)
Convert a TfToken to a UT_StringHolder.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
GUSD_API void AppendVariantSelectionString(UT_WorkBuffer &buf, const SdfPath &prim, const SdfPath &variants, const std::string &vset, const std::string &sel)
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
GLuint const GLchar * name
const TfToken kAllVariantsToken("ALL_VARIANTS")
GUSD_API void SetVariantsFromPath(const SdfPath &path, const SdfLayerHandle &layer)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
virtual bool operator()(const std::string &name) const =0
GUSD_API void GetPurposesMatchingPattern(const char *pattern, UT_Array< TfToken > &purposes, bool caseSensitive=true)
#define GUSD_GENERIC_ERR(sev)
SchemaT MakeSchemaObj(const UsdPrim &prim, UT_ErrorSeverity sev=UT_ERROR_ABORT)
GUSD_API bool GetUniquePropertyNames(const UT_Array< UsdPrim > &prims, UT_Array< UT_StringHolder > &names, const std::string &nameSpace=std::string())
std::pair< exint, exint > IndexPair
UT_Array< RefPtr > children
#define PXR_NAMESPACE_CLOSE_SCOPE
UT_Array< VariantSel > VariantSelArray
GUSD_API void GetBaseModelKindsMatchingPattern(const char *pattern, UT_Array< TfToken > &kinds, bool caseSensitive=true)
GUSD_API bool GetUniqueVariantSetNames(const UT_Array< UsdPrim > &prims, UT_Array< UT_StringHolder > &names)
GUSD_API UsdPrim GetPrimFromStage(const UsdStagePtr &stage, const SdfPath &path, UT_ErrorSeverity sev=UT_ERROR_ABORT)
GUSD_API double GetNumericTime(UsdTimeCode time)
GLsizei GLenum GLenum * types
UsdTimeCode ClampTimeCode(UsdTimeCode t, double start, double end, int digits)
GUSD_API bool SortPrims(UT_Array< UsdPrim > &prims)
GUSD_API void SetModelingVariant(const UsdStageRefPtr &stage, const UsdPrim &prim, const TfToken &variant)
GUSD_API void ClearModelingVariant(const UsdStageRefPtr &stage, const UsdPrim &prim)