HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USD_Utils.h File Reference
#include "api.h"
#include "error.h"
#include "pxr/pxr.h"
#include "pxr/base/arch/hints.h"
#include "pxr/base/tf/token.h"
#include "pxr/usd/usdGeom/imageable.h"
#include "pxr/usd/usdGeom/tokens.h"
#include <SYS/SYS_Floor.h>
#include <SYS/SYS_Math.h>
#include <UT/UT_Array.h>
#include <UT/UT_Error.h>
#include <UT/UT_Map.h>
#include <UT/UT_SharedPtr.h>
#include <UT/UT_StringHolder.h>
#include <UT/UT_WorkBuffer.h>
+ Include dependency graph for USD_Utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GusdUSD_Utils::KindNode
 
struct  GusdUSD_Utils::VariantSel
 
struct  GusdUSD_Utils::NameMatcher
 

Namespaces

 GusdUSD_Utils
 

Typedefs

typedef UT_Array< VariantSel > GusdUSD_Utils::VariantSelArray
 
typedef std::pair< exint, exintGusdUSD_Utils::IndexPair
 
typedef UT_Array< IndexPair > GusdUSD_Utils::IndexPairArray
 

Functions

const TfToken GusdUSD_Utils::kModelingVariantToken ("modelingVariant")
 TODO: Would be nice to loft these TfTokens into a a shared place. More...
 
const TfToken GusdUSD_Utils::kAllVariantsToken ("ALL_VARIANTS")
 
GUSD_API UT_StringHolder GusdUSD_Utils::TokenToStringHolder (const TfToken &token)
 Convert a TfToken to a UT_StringHolder. More...
 
GUSD_API double GusdUSD_Utils::GetNumericTime (UsdTimeCode time)
 
GUSD_API bool GusdUSD_Utils::CreateSdfPath (const UT_StringRef &pathStr, SdfPath &path, UT_ErrorSeverity sev=UT_ERROR_ABORT)
 
GUSD_API const SdfPathGusdUSD_Utils::GetDefaultPrimIdentifier ()
 Returns an SdfPath that can be used for identify the stage's defaultPrim. More...
 
GUSD_API UsdPrim GusdUSD_Utils::GetPrimFromStage (const UsdStagePtr &stage, const SdfPath &path, UT_ErrorSeverity sev=UT_ERROR_ABORT)
 
template<typename SchemaT >
SchemaT GusdUSD_Utils::MakeSchemaObj (const UsdPrim &prim, UT_ErrorSeverity sev=UT_ERROR_ABORT)
 
GUSD_API bool GusdUSD_Utils::GetPrimAndVariantPathsFromPathList (const char *str, UT_Array< SdfPath > &primPaths, UT_Array< SdfPath > &variants, UT_ErrorSeverity sev=UT_ERROR_ABORT)
 
GUSD_API void GusdUSD_Utils::ExtractPrimPathAndVariants (const SdfPath &path, SdfPath &primPath, SdfPath &variants)
 
GUSD_API void GusdUSD_Utils::SetModelingVariant (const UsdStageRefPtr &stage, const UsdPrim &prim, const TfToken &variant)
 
GUSD_API void GusdUSD_Utils::ClearModelingVariant (const UsdStageRefPtr &stage, const UsdPrim &prim)
 
GUSD_API bool GusdUSD_Utils::SortPrims (UT_Array< UsdPrim > &prims)
 
GUSD_API void GusdUSD_Utils::GetBaseSchemaTypesMatchingPattern (const char *pattern, UT_Array< TfType > &types, bool caseSensitive=true)
 
GUSD_API void GusdUSD_Utils::GetBaseModelKindsMatchingPattern (const char *pattern, UT_Array< TfToken > &kinds, bool caseSensitive=true)
 
GUSD_API void GusdUSD_Utils::GetPurposesMatchingPattern (const char *pattern, UT_Array< TfToken > &purposes, bool caseSensitive=true)
 
GUSD_API const KindNode & GusdUSD_Utils::GetModelKindHierarchy ()
 
GUSD_API void GusdUSD_Utils::AppendVariantSelectionString (UT_WorkBuffer &buf, const SdfPath &prim, const SdfPath &variants, const std::string &vset, const std::string &sel)
 
GUSD_API bool GusdUSD_Utils::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 bool GusdUSD_Utils::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)
 
GUSD_API void GusdUSD_Utils::SetVariantsFromPath (const SdfPath &path, const SdfLayerHandle &layer)
 
GUSD_API bool GusdUSD_Utils::GetPropertyNames (const UT_Array< UsdPrim > &prims, const NameMatcher &matcher, UT_Array< UT_StringHolder > &orderedNames, IndexPairArray &indices, const std::string &nameSpace=std::string())
 
GUSD_API bool GusdUSD_Utils::GetUniqueVariantSetNames (const UT_Array< UsdPrim > &prims, UT_Array< UT_StringHolder > &names)
 
GUSD_API bool GusdUSD_Utils::GetUniqueVariantNames (const UT_Array< UsdPrim > &prims, const std::string &variantSet, UT_Array< UT_StringHolder > &names)
 
GUSD_API bool GusdUSD_Utils::GetUniquePropertyNames (const UT_Array< UsdPrim > &prims, UT_Array< UT_StringHolder > &names, const std::string &nameSpace=std::string())
 
UsdTimeCode GusdUSD_Utils::ClampTimeCode (UsdTimeCode t, double start, double end, int digits)