24 #ifndef _GUSD_GU_USD_H_
25 #define _GUSD_GU_USD_H_
52 #define GUSD_PATH_ATTR "usdpath"
53 #define GUSD_PRIMPATH_ATTR "usdprimpath"
54 #define GUSD_FRAME_ATTR "frame"
55 #define GUSD_VARIANTS_ATTR "usdvariants"
56 #define GUSD_CONSTRAINT_ATTR "usdconstraint"
57 #define GUSD_PURPOSE_ATTR "usdpurpose"
58 #define GUSD_ACTIVE_ATTR "usdactive"
59 #define GUSD_VISIBLE_ATTR "usdvisible"
61 #define GUSD_OVERTRANSFORMS_ATTR "usdovertransforms"
62 #define GUSD_OVERPOINTS_ATTR "usdoverpoints"
63 #define GUSD_OVERPRIMVARS_ATTR "usdoverprimvars"
64 #define GUSD_OVERALL_ATTR "usdoverall"
66 #define GUSD_WRITESTATICTOPOLOGY_ATTR "usdwritestatictopology"
67 #define GUSD_WRITESTATICPRIMVARS_ATTR "usdwritestaticprimvars"
68 #define GUSD_WRITESTATICGEO_ATTR "usdwritestaticgeo"
73 #define GUSD_REFINE_ADDPATHATTRIB "usd:addPathAttribute"
74 #define GUSD_REFINE_PATHATTRIB "usd:pathAttribute"
75 #define GUSD_REFINE_ADDPRIMPATHATTRIB "usd:addPrimPathAttribute"
76 #define GUSD_REFINE_PRIMPATHATTRIB "usd:primPathAttribute"
77 #define GUSD_REFINE_ADDINSTANCELEVELATTRIB "usd:addInstanceLevelAttrib"_UTsh
78 #define GUSD_REFINE_INSTANCELEVELATTRIB "usd:instanceLevelAttrib"_UTsh
79 #define GUSD_REFINE_ADDMATERIALPATHATTRIB "usd:addMaterialPathAttribute"
80 #define GUSD_REFINE_ADDVISIBILITYATTRIB "usd:addVisibilityAttribute"
81 #define GUSD_REFINE_IMPORTCOMPUTEDVISIBILITY "usd:importComputedVisibility"
82 #define GUSD_REFINE_ADDXFORMATTRIB "usd:addXformAttribute"
83 #define GUSD_REFINE_NONTRANSFORMINGPATTERN "usd:nonTransformingPrimvarPattern"
84 #define GUSD_REFINE_PRIMVARPATTERN "usd:primvarPattern"
85 #define GUSD_REFINE_IMPORTINHERITEDPRIMVARS "usd:importInheritedPrimvars"
86 #define GUSD_REFINE_ATTRIBUTEPATTERN "usd:attributePattern"
87 #define GUSD_REFINE_TRANSLATESTTOUV "usd:translateSTtoUV"
88 #define GUSD_REFINE_ITERATIONS "usd:iterations"_UTsh
89 #define GUSD_REFINE_UNPACKTOPOLYGONS "usd:unpacktopolygons"_UTsh
90 #define GUSD_REFINE_PIVOTLOCATION "usd:pivotlocation"_UTsh
98 static bool OffsetArrayFromRange(
const GA_Range&
r,
102 static bool ComputeRangeIndexMap(
const GA_Range& r,
137 static bool GetTimeCodesFromAttr(
const GA_Range& rng,
141 static bool GetTimeCodesFromPackedPrims(
const GA_Range& rng,
147 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
151 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
160 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
162 const char* nameSpace=
nullptr);
164 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
167 const char* nameSpace=
nullptr);
191 static void RegisterPackedPrimBuildFunc(
const TfToken& typeName,
192 PackedPrimBuildFunc
func );
196 static bool AppendPackedPrims(
207 static bool AppendPackedPrimsFromLopNode(
224 static GA_Offset AppendExpandedRefPoints(
233 static bool AppendExpandedPackedPrims(
241 bool unpackToPolygons,
244 bool translateSTtoUV,
248 static bool AppendExpandedPackedPrimsFromLopNode(
255 bool unpackToPolygons,
257 bool importInheritedPrimvars,
259 bool translateSTtoUV,
272 static bool WriteVariantSelectionsToAttr(
280 static bool WriteVariantSelectionsToPackedPrims(
291 static GA_Offset AppendRefPointsForExpandedVariants(
300 static GA_Offset AppendPackedPrimsForExpandedVariants(
308 static bool GetPackedPrimStageIdsViewportLODsAndPurposes(
321 static bool ComputeTransformsFromAttrs(
const GA_Detail& gd,
326 static bool ComputeTransformsFromPackedPrims(
const GA_Detail& gd,
348 static bool SetTransformAttrs(
GU_Detail& gd,
351 OrientAttrRepresentation orientRep,
352 ScaleAttrRepresentation scaleRep,
355 static bool SetPackedPrimTransforms(
GU_Detail& gd,
359 static bool MultTransformableAttrs(
GU_Detail& gd,
363 bool keepLengths=
false,
367 static bool ImportPrimUnpacked(
GU_Detail& gd,
370 const char*
lod =
nullptr,
375 bool translateSTtoUV =
true,
Definition of a geometry attribute.
GT_API const UT_StringHolder time
#define GUSD_PRIMPATH_ATTR
A range of elements in an index-map.
GLuint GLsizei const GLuint const GLintptr * offsets
GusdUSD_Traverse::PrimIndexPair PrimIndexPair
static const UT_StringHolder theEmptyString
Methods for USD scene traversal.
std::pair< UsdPrim, exint > PrimIndexPair
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Container class for all geometry.
#define GUSD_VARIANTS_ATTR
GA_API const UT_StringHolder rest
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter