24 #ifndef _GUSD_GU_USD_H_
25 #define _GUSD_GU_USD_H_
54 #define GUSD_PATH_ATTR "usdpath"
55 #define GUSD_PRIMPATH_ATTR "usdprimpath"
56 #define GUSD_FRAME_ATTR "frame"
57 #define GUSD_VARIANTS_ATTR "usdvariants"
58 #define GUSD_CONSTRAINT_ATTR "usdconstraint"
59 #define GUSD_PURPOSE_ATTR "usdpurpose"
60 #define GUSD_ACTIVE_ATTR "usdactive"
61 #define GUSD_VISIBLE_ATTR "usdvisible"
63 #define GUSD_OVERTRANSFORMS_ATTR "usdovertransforms"
64 #define GUSD_OVERPOINTS_ATTR "usdoverpoints"
65 #define GUSD_OVERPRIMVARS_ATTR "usdoverprimvars"
66 #define GUSD_OVERALL_ATTR "usdoverall"
68 #define GUSD_WRITESTATICTOPOLOGY_ATTR "usdwritestatictopology"
69 #define GUSD_WRITESTATICPRIMVARS_ATTR "usdwritestaticprimvars"
70 #define GUSD_WRITESTATICGEO_ATTR "usdwritestaticgeo"
75 #define GUSD_REFINE_ADDPATHATTRIB "usd:addPathAttribute"
76 #define GUSD_REFINE_PATHATTRIB "usd:pathAttribute"
77 #define GUSD_REFINE_ADDPRIMPATHATTRIB "usd:addPrimPathAttribute"
78 #define GUSD_REFINE_PRIMPATHATTRIB "usd:primPathAttribute"
79 #define GUSD_REFINE_ADDINSTANCELEVELATTRIB "usd:addInstanceLevelAttrib"_UTsh
80 #define GUSD_REFINE_INSTANCELEVELATTRIB "usd:instanceLevelAttrib"_UTsh
81 #define GUSD_REFINE_ADDMATERIALPATHATTRIB "usd:addMaterialPathAttribute"
82 #define GUSD_REFINE_ADDVISIBILITYATTRIB "usd:addVisibilityAttribute"
83 #define GUSD_REFINE_IMPORTCOMPUTEDVISIBILITY "usd:importComputedVisibility"
84 #define GUSD_REFINE_ADDXFORMATTRIB "usd:addXformAttribute"
85 #define GUSD_REFINE_NONTRANSFORMINGPATTERN "usd:nonTransformingPrimvarPattern"
86 #define GUSD_REFINE_PRIMVARPATTERN "usd:primvarPattern"
87 #define GUSD_REFINE_IMPORTINHERITEDPRIMVARS "usd:importInheritedPrimvars"
88 #define GUSD_REFINE_ATTRIBUTEPATTERN "usd:attributePattern"
89 #define GUSD_REFINE_RELATIONSHIPPATTERN "usd:relationshipPattern"_UTsh
90 #define GUSD_REFINE_TRANSLATESTTOUV "usd:translateSTtoUV"
91 #define GUSD_REFINE_ITERATIONS "usd:iterations"_UTsh
92 #define GUSD_REFINE_UNPACKTOPOLYGONS "usd:unpacktopolygons"_UTsh
93 #define GUSD_REFINE_PIVOTLOCATION "usd:pivotlocation"_UTsh
94 #define GUSD_REFINE_PROMOTECONSTANTATTRIBS "usd:promoteconstantattrs"_UTsh
102 static bool OffsetArrayFromRange(
const GA_Range&
r,
106 static bool ComputeRangeIndexMap(
const GA_Range& r,
141 static bool GetTimeCodesFromAttr(
const GA_Range& rng,
145 static bool GetTimeCodesFromPackedPrims(
const GA_Range& rng,
151 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
155 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
164 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
166 const char* nameSpace=
nullptr);
168 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
171 const char* nameSpace=
nullptr);
195 static void RegisterPackedPrimBuildFunc(
const TfToken& typeName,
196 PackedPrimBuildFunc
func );
200 static bool AppendPackedPrims(
211 static bool AppendPackedPrimsFromLopNode(
226 static bool AppendPackedPointInstancesFromLopNode(
244 static GA_Offset AppendExpandedRefPoints(
253 static bool AppendExpandedPackedPrims(
261 bool unpackToPolygons,
264 bool translateSTtoUV,
268 static bool AppendExpandedPackedPrimsFromLopNode(
275 bool unpackToPolygons,
277 bool importInheritedPrimvars,
279 bool translateSTtoUV,
292 static bool WriteVariantSelectionsToAttr(
300 static bool WriteVariantSelectionsToPackedPrims(
311 static GA_Offset AppendRefPointsForExpandedVariants(
320 static GA_Offset AppendPackedPrimsForExpandedVariants(
328 static bool GetPackedPrimStageIdsViewportLODsAndPurposes(
341 static bool ComputeTransformsFromAttrs(
const GA_Detail& gd,
346 static bool ComputeTransformsFromPackedPrims(
const GA_Detail& gd,
368 static bool SetTransformAttrs(
GU_Detail& gd,
371 OrientAttrRepresentation orientRep,
372 ScaleAttrRepresentation scaleRep,
375 static bool SetPackedPrimTransforms(
GU_Detail& gd,
379 static bool MultTransformableAttrs(
GU_Detail& gd,
383 bool keepLengths=
false,
387 static bool ImportPrimUnpacked(
GU_Detail& gd,
390 const char*
lod =
nullptr,
395 bool translateSTtoUV =
true,
Definition of a geometry attribute.
GT_API const UT_StringHolder time
#define PXR_NAMESPACE_OPEN_SCOPE
#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
#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