HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_Skeleton.h File Reference
#include "HUSD_API.h"
#include <GU/GU_AgentClip.h>
#include <GU/GU_AgentRig.h>
#include <SYS/SYS_Types.h>
+ Include dependency graph for HUSD_Skeleton.h:

Go to the source code of this file.

Enumerations

enum  HUSD_SkeletonPoseType { HUSD_SkeletonPoseType::Animation, HUSD_SkeletonPoseType::BindPose, HUSD_SkeletonPoseType::RestPose }
 

Functions

HUSD_API UT_StringHolder HUSDdefaultSkelRootPath (HUSD_AutoReadLock &readlock)
 Returns the path to a SkelRoot prim in the stage, or the empty string. More...
 
HUSD_API bool HUSDimportSkinnedGeometry (GU_Detail &gdp, const HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, const UT_StringHolder &shapeattrib)
 Imports all skinnable primitives underneath the provided SkelRoot prim. More...
 
HUSD_API bool HUSDimportSkeleton (GU_Detail &gdp, const HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, HUSD_SkeletonPoseType pose_type)
 
HUSD_API bool HUSDimportSkeletonPose (GU_Detail &gdp, const HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, HUSD_SkeletonPoseType pose_type, fpreal time)
 Updates the pose for the skeleton geometry created by HUSDimportSkeleton(). More...
 
HUSD_API GU_AgentRigPtr HUSDimportAgentRig (const HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, const UT_StringHolder &rig_name)
 Builds an agent rig from the SkelRoot's first Skeleton prim. More...
 
HUSD_API bool HUSDimportAgentShapes (GU_AgentShapeLib &shapelib, GU_AgentLayer &layer, const HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, fpreal layer_bounds_scale)
 
HUSD_API GU_AgentClipPtr HUSDimportAgentClip (const GU_AgentRigConstPtr &rig, HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath)
 
HUSD_API UT_Array
< GU_AgentClipPtr
HUSDimportAgentClips (const GU_AgentRigConstPtr &rig, HUSD_AutoReadLock &readlock, const UT_StringRef &prim_pattern)
 

Enumeration Type Documentation

enum HUSD_SkeletonPoseType
strong
Enumerator
Animation 
BindPose 
RestPose 

Definition at line 34 of file HUSD_Skeleton.h.

Function Documentation

HUSD_API UT_StringHolder HUSDdefaultSkelRootPath ( HUSD_AutoReadLock readlock)

Returns the path to a SkelRoot prim in the stage, or the empty string.

HUSD_API GU_AgentClipPtr HUSDimportAgentClip ( const GU_AgentRigConstPtr rig,
HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath 
)

Initialize an agent clip from the animation associated with the skeleton used for HUSDimportAgentRig(). The clip is assigned a name from the skeleton primitive's name.

HUSD_API UT_Array<GU_AgentClipPtr> HUSDimportAgentClips ( const GU_AgentRigConstPtr rig,
HUSD_AutoReadLock readlock,
const UT_StringRef prim_pattern 
)

Import clips from the provided primitive pattern, which can match against either SkelRoot or Skeleton prims. The clips are assigned names from the USD primitives' names.

HUSD_API GU_AgentRigPtr HUSDimportAgentRig ( const HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
const UT_StringHolder rig_name 
)

Builds an agent rig from the SkelRoot's first Skeleton prim.

HUSD_API bool HUSDimportAgentShapes ( GU_AgentShapeLib shapelib,
GU_AgentLayer layer,
const HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
fpreal  layer_bounds_scale 
)

Imports all skinnable primitives underneath the provided SkelRoot prim (which are associated with the skeleton used for HUSDimportRig()), and adds the shape bindings to the provided layer.

HUSD_API bool HUSDimportSkeleton ( GU_Detail gdp,
const HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
HUSD_SkeletonPoseType  pose_type 
)

Imports all Skeleton primitives underneath the provided SkelRoot prim. A point is created for each joint, and joints are connected to their parents by polyline primitives. Use HUSDimportSkeletonPose() to set the skeleton's transforms. The pose type is only used in this method to initialize attributes that aren't time-varying.

HUSD_API bool HUSDimportSkeletonPose ( GU_Detail gdp,
const HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
HUSD_SkeletonPoseType  pose_type,
fpreal  time 
)

Updates the pose for the skeleton geometry created by HUSDimportSkeleton().

HUSD_API bool HUSDimportSkinnedGeometry ( GU_Detail gdp,
const HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
const UT_StringHolder shapeattrib 
)

Imports all skinnable primitives underneath the provided SkelRoot prim.