File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 6
6
#include < GU/GU_Detail.h>
7
7
#include < GU/GU_RayIntersect.h>
8
8
#include < GU/GU_PrimPacked.h>
9
+ #include < GEO/GEO_Detail.h>
10
+ #include < GEO/GEO_ConvertParms.h>
9
11
10
12
#include < map>
11
13
#include < iostream>
@@ -178,7 +180,7 @@ void closest::CreateInstanceData(RixContext& ctx,
178
180
if (gdp->load (filename.CStr ()).success ())
179
181
{
180
182
181
- // Attempt to unpack all Packeds, Alembics and USD
183
+ // Attempt to unpack all Packeds, Alembics and USDs
182
184
while (GU_PrimPacked::hasPackedPrimitives (*gdp))
183
185
{
184
186
for (GA_Iterator it (gdp->getPrimitiveRange ()); !it.atEnd (); ++it)
@@ -199,6 +201,11 @@ void closest::CreateInstanceData(RixContext& ctx,
199
201
}
200
202
}
201
203
204
+ // convert PolySoups to regular PrimPolys
205
+ GEO_ConvertParms convertParams;
206
+ convertParams.setFromType (GEO_PrimTypeCompat::GEOPRIMPOLYSOUP);
207
+ gdp->convert (convertParams);
208
+
202
209
GA_PrimitiveGroup* grp = nullptr ;
203
210
if (!primgroup.Empty ())
204
211
{
You can’t perform that action at this time.
0 commit comments