Skip to content

Commit

Permalink
Matching to Houdini build 18.5.41.
Browse files Browse the repository at this point in the history
  • Loading branch information
SideFX authored and Prisms User committed Nov 26, 2019
1 parent c512979 commit fa27190
Show file tree
Hide file tree
Showing 10 changed files with 532 additions and 59 deletions.
19 changes: 15 additions & 4 deletions src/houdini/custom/USD/GEO_FilePrimUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ initSubsets(GEO_FilePrim &fileprim,
prop = subprim.addProperty(UsdGeomTokens->indices,
SdfValueTypeNames->IntArray,
new GEO_FilePropAttribSource<int>(faceset->extractMembers()));
prop->setValueIsDefault(true);
// Use the topology handling value to decide if geometry subset
// membership should be time varying or not. There is a Hydra bug
// that requires geom subsets be time varying if the mesh topology
// is time varying.
prop->setValueIsDefault(
options.myTopologyHandling != GEO_USD_TOPOLOGY_ANIMATED);
}
}

Expand All @@ -321,7 +326,8 @@ static void
initPartition(GEO_FilePrim &fileprim,
GEO_FilePrimMap &fileprimmap,
const GT_DataArrayHandle &hou_attr,
const std::string &attr_name)
const std::string &attr_name,
const GEO_ImportOptions &options)
{
struct Partition {
UT_StringHolder mySubsetName;
Expand Down Expand Up @@ -412,7 +418,12 @@ initPartition(GEO_FilePrim &fileprim,
prop = subprim.addProperty(UsdGeomTokens->indices,
SdfValueTypeNames->IntArray,
new GEO_FilePropConstantArraySource<int>(partition.myIndices));
prop->setValueIsDefault(true);
// Use the topology handling value to decide if geometry subset
// membership should be time varying or not. There is a Hydra bug
// that requires geom subsets be time varying if the mesh topology
// is time varying.
prop->setValueIsDefault(
options.myTopologyHandling != GEO_USD_TOPOLOGY_ANIMATED);
prop = subprim.addProperty(UsdGeomTokens->familyName,
SdfValueTypeNames->Token,
new GEO_FilePropConstantSource<TfToken>(attr_name_token));
Expand Down Expand Up @@ -1629,7 +1640,7 @@ initExtraAttribs(GEO_FilePrim &fileprim,

if (!hou_attr->hasArrayEntries())
initPartition(fileprim, fileprimmap,
hou_attr, attr_name.toStdString());
hou_attr, attr_name.toStdString(), options);
}
else if (options.multiMatch(attr_name))
{
Expand Down
2 changes: 2 additions & 0 deletions src/houdini/lib/H_USD/HUSD/CMakeSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ set( husd_sources
HUSD_SetMetadata.C
HUSD_SetRelationships.C
HUSD_ShaderTranslator.C
HUSD_Skeleton.C
HUSD_SpecHandle.C
HUSD_Stitch.C
HUSD_TimeCode.C
Expand Down Expand Up @@ -172,6 +173,7 @@ set( husd_hdk_headers
HUSD_SetMetadata.h
HUSD_SetRelationships.h
HUSD_ShaderTranslator.h
HUSD_Skeleton.h
HUSD_SpecHandle.h
HUSD_Stitch.h
HUSD_TimeCode.h
Expand Down
Loading

0 comments on commit fa27190

Please sign in to comment.