All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GusdGU_PackedUSD Class Reference

A GU implementation of a packed USD prim. More...

Inherits GU_PackedImpl.

Public Member Functions

 GusdGU_PackedUSD (const GusdGU_PackedUSD &src)
 
const UT_StringHolder & fileName () const
 
UT_StringHolder intrinsicFileName () const
 
void setFileName (const UT_StringHolder &fileName)
 
const UT_StringHolder & altFileName () const
 
UT_StringHolder intrinsicAltFileName () const
 
void setAltFileName (const UT_StringHolder &fileName)
 
const SdfPathprimPath () const
 
UT_StringHolder intrinsicPrimPath () const
 
void setPrimPath (const UT_StringHolder &p)
 
void setPrimPath (const SdfPath &primPath)
 
const SdfPathsrcPrimPath () const
 
UT_StringHolder intrinsicSrcPrimPath () const
 
void setSrcPrimPath (const UT_StringHolder &p)
 
void setSrcPrimPath (const SdfPath &primPath)
 
exint index () const
 
void setIndex (exint i)
 
bool isPointInstance () const
 
UT_StringHolder intrinsicType () const
 
GA_Size usdLocalToWorldTransformSize () const
 
void usdLocalToWorldTransform (fpreal64 *val, exint size) const
 
UsdTimeCode frame () const
 
fpreal intrinsicFrame () const
 
void setFrame (UsdTimeCode frame)
 
void setFrame (fpreal frame)
 
GusdPurposeSet getPurposes () const
 
void setPurposes (GusdPurposeSet purposes)
 
exint getNumPurposes () const
 
void getIntrinsicPurposes (UT_StringArray &purposes) const
 
void setIntrinsicPurposes (const UT_StringArray &purposes)
 
virtual GU_PackedFactory * getFactory () const override
 
virtual GU_PackedImpl * copy () const override
 
virtual void clearData () override
 
virtual bool isValid () const override
 
virtual bool save (UT_Options &options, const GA_SaveMap &map) const override
 
virtual bool load (const UT_Options &options, const GA_LoadMap &map) override
 
virtual void update (const UT_Options &options) override
 
virtual bool getBounds (UT_BoundingBox &box) const override
 
virtual bool getRenderingBounds (UT_BoundingBox &box) const override
 
virtual void getVelocityRange (UT_Vector3 &min, UT_Vector3 &max) const override
 
virtual void getWidthRange (fpreal &min, fpreal &max) const override
 
virtual bool getLocalTransform (UT_Matrix4D &m) const override
 
virtual bool unpack (GU_Detail &destgdp) const override
 
virtual bool unpackUsingPolygons (GU_Detail &destgdp) const override
 
bool visibleGT () const
 
GT_PrimitiveHandle fullGT () const
 
bool getInstanceKey (UT_Options &key) const
 
virtual int64 getMemoryUsage (bool inclusive) const override
 Report memory usage (includes all shared memory) More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const override
 Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. More...
 
UsdPrim getUsdPrim (UT_ErrorSeverity sev=UT_ERROR_ABORT) const
 Get the underlying UsdPrim for this packed prim. More...
 
bool unpackGeometry (GU_Detail &destgdp, const char *primvarPattern, const GT_RefineParms *parms=nullptr) const
 
const UT_Matrix4D & getUsdTransform () const
 

Static Public Member Functions

static GU_PrimPacked * Build (GU_Detail &detail, const UT_StringHolder &fileName, const SdfPath &primPath, UsdTimeCode frame, const char *lod=nullptr, GusdPurposeSet purposes=GUSD_PURPOSE_PROXY, const UsdPrim &prim=UsdPrim(), const UT_Matrix4D *xform=nullptr)
 
static GU_PrimPacked * Build (GU_Detail &detail, const UT_StringHolder &fileName, const SdfPath &primPath, const SdfPath &srcPrimPath, int index, UsdTimeCode frame, const char *lod=nullptr, GusdPurposeSet purposes=GUSD_PURPOSE_PROXY, const UsdPrim &prim=UsdPrim(), const UT_Matrix4D *xform=nullptr)
 
static GU_PrimPacked * Build (GU_Detail &detail, const UsdPrim &prim, UsdTimeCode frame, const char *lod=nullptr, GusdPurposeSet purpose=GUSD_PURPOSE_PROXY, const UT_Matrix4D *xform=nullptr)
 Convenience method for building a packed USD prim for prim. More...
 
static void install (GA_PrimitiveFactory &factory)
 
static GUSD_API GA_PrimitiveTypeId typeId ()
 

Detailed Description

A GU implementation of a packed USD prim.

This is a file backed prim that holds a reference to a prim in a usd file at a particular frame. The prim can be a group of prims.

When a packed prim that references a USD group is unpacked, the result is packed prims that represent the contents of that group. Those packed prims may also be groups. To unpack down to the leafs, you may have to unpack may times.

When we write USD packed prim to a USD file, we write a reference to the original file. USD has a limitation that it can only make references to root nodes.

When we write a reference into a USD file, we might want to use a different file path than we use in the Houdini session. For example, we might want to use a relative path vs. an absolute one. We might want to use a coalesced file vs per frame files. We don't want to enshrine this logic in the core so we provide a second alternative file name that can be used for this. If this fileName is left empty, we just us the primary file name.

Definition at line 69 of file GU_PackedUSD.h.

Member Function Documentation

static GU_PrimPacked* Build ( GU_Detail &  detail,
const UsdPrim prim,
UsdTimeCode  frame,
const char *  lod = nullptr,
GusdPurposeSet  purpose = GUSD_PURPOSE_PROXY,
const UT_Matrix4D *  xform = nullptr 
)
static

Convenience method for building a packed USD prim for prim.

virtual void countMemory ( UT_MemoryCounter &  counter,
bool  inclusive 
) const
overridevirtual

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly.

virtual int64 getMemoryUsage ( bool  inclusive) const
overridevirtual

Report memory usage (includes all shared memory)

UsdPrim getUsdPrim ( UT_ErrorSeverity  sev = UT_ERROR_ABORT) const

Get the underlying UsdPrim for this packed prim.

This may involve on-demand loading of a UsdStage to access the prim. Any errors that occur while loading the stage and accessing the prim will be reported on the currently scoped error manager with a severity of sev.


The documentation for this class was generated from the following file: