Skip to content

Commit

Permalink
MeshPrimitive : Interpolation should not be included in the topologyHash
Browse files Browse the repository at this point in the history
If two meshes differ only by interpolation, primvars can still be transferred directly, so it doesn't make
sense to say they have different topologies
  • Loading branch information
danieldresser-ie committed Apr 17, 2024
1 parent a9b572f commit d806ff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/IECoreScene/MeshPrimitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,13 @@ void MeshPrimitive::hash( MurmurHash &h ) const
m_creaseLengths->hash( h );
m_creaseIds->hash( h );
m_creaseSharpnesses->hash( h );
h.append( m_interpolation );
}

void MeshPrimitive::topologyHash( MurmurHash &h ) const
{
m_verticesPerFace->hash( h );
m_vertexIds->hash( h );
h.append( m_interpolation );
}

MeshPrimitivePtr MeshPrimitive::createBox( const Box3f &b )
Expand Down
2 changes: 1 addition & 1 deletion test/IECoreScene/MeshPrimitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def testHash( self ) :

m.setTopology( IECore.IntVectorData( [ 3 ] ), IECore.IntVectorData( [ 0, 2, 1 ] ), "catmullClark" )
self.assertNotEqual( m.hash(), h )
self.assertNotEqual( m.topologyHash(), t )
self.assertEqual( m.topologyHash(), t )
h = m.hash()
t = m.topologyHash()

Expand Down

0 comments on commit d806ff9

Please sign in to comment.