HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_Utils.h File Reference
#include "HUSD_API.h"
#include <UT/UT_StringHolder.h>
+ Include dependency graph for HUSD_Utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HUSD_OVERRIDES_NUM_LAYERS   4
 

Enumerations

enum  HUSD_PrimTraversalDemands {
  HUSD_TRAVERSAL_ACTIVE_PRIMS = 0x00000001, HUSD_TRAVERSAL_DEFINED_PRIMS = 0x00000002, HUSD_TRAVERSAL_LOADED_PRIMS = 0x00000004, HUSD_TRAVERSAL_NONABSTRACT_PRIMS = 0x00000008,
  HUSD_TRAVERSAL_ALLOW_INSTANCE_PROXIES = 0x00000010, HUSD_TRAVERSAL_DEFAULT_DEMANDS = HUSD_TRAVERSAL_DEFINED_PRIMS, HUSD_TRAVERSAL_NO_DEMANDS = 0x00000000
}
 
enum  HUSD_PathSaveStyle { HUSD_PATH_SAVE_AUTO, HUSD_PATH_SAVE_RELATIVE, HUSD_PATH_SAVE_ABSOLUTE }
 
enum  HUSD_OverridesLayerId { HUSD_OVERRIDES_CUSTOM_LAYER = 0, HUSD_OVERRIDES_SOLO_LIGHTS_LAYER = 1, HUSD_OVERRIDES_SOLO_GEOMETRY_LAYER = 2, HUSD_OVERRIDES_BASE_LAYER = 3 }
 
enum  HUSD_Variability { HUSD_VARIABILITY_VARYING, HUSD_VARIABILITY_UNIFORM, HUSD_VARIABILITY_CONFIG }
 
enum  HUSD_StripLayerResponse { HUSD_IGNORE_STRIPPED_LAYERS, HUSD_WARN_STRIPPED_LAYERS, HUSD_ERROR_STRIPPED_LAYERS }
 
enum  HUSD_TimeSampling { HUSD_TimeSampling::NONE, HUSD_TimeSampling::SINGLE, HUSD_TimeSampling::MULTIPLE }
 
enum  HUSD_XformType {
  HUSD_XformType::Invalid, HUSD_XformType::Translate, HUSD_XformType::Scale, HUSD_XformType::RotateX,
  HUSD_XformType::RotateY, HUSD_XformType::RotateZ, HUSD_XformType::RotateXYZ, HUSD_XformType::RotateXZY,
  HUSD_XformType::RotateYXZ, HUSD_XformType::RotateYZX, HUSD_XformType::RotateZXY, HUSD_XformType::RotateZYX,
  HUSD_XformType::Orient, HUSD_XformType::Transform
}
 
enum  HUSD_XformAxis { HUSD_XformAxis::X, HUSD_XformAxis::Y, HUSD_XformAxis::Z }
 Enum of rotation axis. More...
 
enum  HUSD_XformAxisOrder {
  HUSD_XformAxisOrder::XYZ, HUSD_XformAxisOrder::XZY, HUSD_XformAxisOrder::YXZ, HUSD_XformAxisOrder::YZX,
  HUSD_XformAxisOrder::ZXY, HUSD_XformAxisOrder::ZYX
}
 Enum of rotation order. More...
 

Functions

HUSD_API void HUSDinitialize ()
 
HUSD_API bool HUSDmakeValidUsdName (UT_String &name, bool addwarnings)
 
HUSD_API UT_StringHolder HUSDgetValidUsdName (OP_Node &node)
 
HUSD_API bool HUSDmakeValidUsdPath (UT_String &path, bool addwarnings)
 
HUSD_API bool HUSDmakeValidUsdPathOrDefaultPrim (UT_String &path, bool addwarnings)
 
HUSD_API UT_StringHolder HUSDgetValidUsdPath (OP_Node &node)
 
HUSD_API bool HUSDmakeValidUsdPropertyName (UT_String &name, bool addwarnings)
 
HUSD_API bool HUSDmakeValidVariantName (UT_String &name, bool addwarnings)
 
HUSD_API bool HUSDmakeValidDefaultPrim (UT_String &default_prim, bool addwarnings)
 
HUSD_API UT_StringHolder HUSDgetUsdName (const UT_StringRef &primpath)
 
HUSD_API UT_StringHolder HUSDgetUsdParentPath (const UT_StringRef &primpath)
 
HUSD_API UT_StringHolder HUSDgetPrimTypeAlias (const UT_StringRef &primtype)
 
HUSD_API bool HUSDapplyStripLayerResponse (HUSD_StripLayerResponse response)
 
HUSD_API UT_StringHolder HUSDgetPrimvarAttribName (const UT_StringRef &primvar)
 Returns the attribute name of the given primvar. More...
 
HUSD_API HUSD_TimeCode HUSDgetEffectiveTimeCode (const HUSD_TimeCode &timecode, HUSD_TimeSampling time_sampling)
 Returns the time code at which to author an attribute value. More...
 
HUSD_API bool HUSDisTimeVarying (HUSD_TimeSampling time_sampling)
 Returns true if there are more than one time samples. More...
 
HUSD_API bool HUSDisTimeSampled (HUSD_TimeSampling time_sampling)
 Returns true if there is at least one time sample. More...
 
HUSD_API bool HUSDgetXformTypeAndSuffix (HUSD_XformType &xform_type, UT_StringHolder &xform_namesuffix, const UT_StringRef &xform_fullname)
 Functions for obtaining transform name, suffix, and type. More...
 
HUSD_API HUSD_XformType HUSDgetXformType (const UT_StringRef &xform_fullname)
 Functions for obtaining transform name, suffix, and type. More...
 
HUSD_API UT_StringHolder HUSDgetXformSuffix (const UT_StringRef &xform_fullname)
 Functions for obtaining transform name, suffix, and type. More...
 
HUSD_API UT_StringHolder HUSDgetXformName (HUSD_XformType xform_type, const UT_StringRef &xform_namesuffix)
 Functions for obtaining transform name, suffix, and type. More...
 
HUSD_API bool HUSDisXformAttribute (const UT_StringRef &attr, UT_StringHolder *xform_type=nullptr, UT_StringHolder *xform_name=nullptr)
 Functions for obtaining transform name, suffix, and type. More...
 
HUSD_API UT_StringHolder HUSDmakeCollectionPath (const UT_StringRef &prim_path, const UT_StringRef &collection_name)
 
HUSD_API bool HUSDsplitCollectionPath (UT_StringHolder &prim_path, UT_StringHolder &collection_name, const UT_StringRef &collection_path)
 
HUSD_API bool HUSDisValidCollectionPath (const UT_StringRef &path)
 
HUSD_API UT_StringHolder HUSDmakePropertyPath (const UT_StringRef &prim_path, const UT_StringRef &property_name)
 
HUSD_API UT_StringHolder HUSDmakeAttributePath (const UT_StringRef &prim_path, const UT_StringRef &attribute_name)
 
HUSD_API UT_StringHolder HUSDmakeRelationshipPath (const UT_StringRef &prim_path, const UT_StringRef &relationship_name)
 

Macro Definition Documentation

#define HUSD_OVERRIDES_NUM_LAYERS   4

Definition at line 63 of file HUSD_Utils.h.

Enumeration Type Documentation

Enumerator
HUSD_OVERRIDES_CUSTOM_LAYER 
HUSD_OVERRIDES_SOLO_LIGHTS_LAYER 
HUSD_OVERRIDES_SOLO_GEOMETRY_LAYER 
HUSD_OVERRIDES_BASE_LAYER 

Definition at line 57 of file HUSD_Utils.h.

Enumerator
HUSD_PATH_SAVE_AUTO 
HUSD_PATH_SAVE_RELATIVE 
HUSD_PATH_SAVE_ABSOLUTE 

Definition at line 47 of file HUSD_Utils.h.

Enumerator
HUSD_TRAVERSAL_ACTIVE_PRIMS 
HUSD_TRAVERSAL_DEFINED_PRIMS 
HUSD_TRAVERSAL_LOADED_PRIMS 
HUSD_TRAVERSAL_NONABSTRACT_PRIMS 
HUSD_TRAVERSAL_ALLOW_INSTANCE_PROXIES 
HUSD_TRAVERSAL_DEFAULT_DEMANDS 
HUSD_TRAVERSAL_NO_DEMANDS 

Definition at line 28 of file HUSD_Utils.h.

Enumerator
HUSD_IGNORE_STRIPPED_LAYERS 
HUSD_WARN_STRIPPED_LAYERS 
HUSD_ERROR_STRIPPED_LAYERS 

Definition at line 74 of file HUSD_Utils.h.

enum HUSD_TimeSampling
strong
Enumerator
NONE 
SINGLE 
MULTIPLE 

Definition at line 81 of file HUSD_Utils.h.

Enumerator
HUSD_VARIABILITY_VARYING 
HUSD_VARIABILITY_UNIFORM 
HUSD_VARIABILITY_CONFIG 

Definition at line 66 of file HUSD_Utils.h.

enum HUSD_XformAxis
strong

Enum of rotation axis.

Enumerator
X 
Y 
Z 

Definition at line 166 of file HUSD_Utils.h.

enum HUSD_XformAxisOrder
strong

Enum of rotation order.

Enumerator
XYZ 
XZY 
YXZ 
YZX 
ZXY 
ZYX 

Definition at line 169 of file HUSD_Utils.h.

enum HUSD_XformType
strong

Enum of USD transform operation types. Note, they need to correspond to UsgGeomXformOp::Type enum.

Enumerator
Invalid 
Translate 
Scale 
RotateX 
RotateY 
RotateZ 
RotateXYZ 
RotateXZY 
RotateYXZ 
RotateYZX 
RotateZXY 
RotateZYX 
Orient 
Transform 

Definition at line 158 of file HUSD_Utils.h.

Function Documentation

HUSD_API bool HUSDapplyStripLayerResponse ( HUSD_StripLayerResponse  response)
HUSD_API HUSD_TimeCode HUSDgetEffectiveTimeCode ( const HUSD_TimeCode timecode,
HUSD_TimeSampling  time_sampling 
)

Returns the time code at which to author an attribute value.

HUSD_API UT_StringHolder HUSDgetPrimTypeAlias ( const UT_StringRef primtype)
HUSD_API UT_StringHolder HUSDgetPrimvarAttribName ( const UT_StringRef primvar)

Returns the attribute name of the given primvar.

HUSD_API UT_StringHolder HUSDgetUsdName ( const UT_StringRef primpath)
HUSD_API UT_StringHolder HUSDgetUsdParentPath ( const UT_StringRef primpath)
HUSD_API UT_StringHolder HUSDgetValidUsdName ( OP_Node node)
HUSD_API UT_StringHolder HUSDgetValidUsdPath ( OP_Node node)
HUSD_API UT_StringHolder HUSDgetXformName ( HUSD_XformType  xform_type,
const UT_StringRef xform_namesuffix 
)

Functions for obtaining transform name, suffix, and type.

HUSD_API UT_StringHolder HUSDgetXformSuffix ( const UT_StringRef xform_fullname)

Functions for obtaining transform name, suffix, and type.

HUSD_API HUSD_XformType HUSDgetXformType ( const UT_StringRef xform_fullname)

Functions for obtaining transform name, suffix, and type.

HUSD_API bool HUSDgetXformTypeAndSuffix ( HUSD_XformType xform_type,
UT_StringHolder xform_namesuffix,
const UT_StringRef xform_fullname 
)

Functions for obtaining transform name, suffix, and type.

HUSD_API void HUSDinitialize ( )
HUSD_API bool HUSDisTimeSampled ( HUSD_TimeSampling  time_sampling)

Returns true if there is at least one time sample.

HUSD_API bool HUSDisTimeVarying ( HUSD_TimeSampling  time_sampling)

Returns true if there are more than one time samples.

HUSD_API bool HUSDisValidCollectionPath ( const UT_StringRef path)

Manipulate collection paths and components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.

HUSD_API bool HUSDisXformAttribute ( const UT_StringRef attr,
UT_StringHolder xform_type = nullptr,
UT_StringHolder xform_name = nullptr 
)

Functions for obtaining transform name, suffix, and type.

HUSD_API UT_StringHolder HUSDmakeAttributePath ( const UT_StringRef prim_path,
const UT_StringRef attribute_name 
)

Create property paths from their components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.

HUSD_API UT_StringHolder HUSDmakeCollectionPath ( const UT_StringRef prim_path,
const UT_StringRef collection_name 
)

Manipulate collection paths and components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.

HUSD_API UT_StringHolder HUSDmakePropertyPath ( const UT_StringRef prim_path,
const UT_StringRef property_name 
)

Create property paths from their components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.

HUSD_API UT_StringHolder HUSDmakeRelationshipPath ( const UT_StringRef prim_path,
const UT_StringRef relationship_name 
)

Create property paths from their components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.

HUSD_API bool HUSDmakeValidDefaultPrim ( UT_String default_prim,
bool  addwarnings 
)
HUSD_API bool HUSDmakeValidUsdName ( UT_String name,
bool  addwarnings 
)
HUSD_API bool HUSDmakeValidUsdPath ( UT_String path,
bool  addwarnings 
)
Examples:
LOP/LOP_Sphere.C.
HUSD_API bool HUSDmakeValidUsdPathOrDefaultPrim ( UT_String path,
bool  addwarnings 
)
HUSD_API bool HUSDmakeValidUsdPropertyName ( UT_String name,
bool  addwarnings 
)
HUSD_API bool HUSDmakeValidVariantName ( UT_String name,
bool  addwarnings 
)
HUSD_API bool HUSDsplitCollectionPath ( UT_StringHolder prim_path,
UT_StringHolder collection_name,
const UT_StringRef collection_path 
)

Manipulate collection paths and components. The individual components must be validated (see HUSDmakeValidName and HUSDmakeValidPath) before calling these methods.