MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testLegacyIndices

Method testLegacyIndices

test/IECoreScene/MeshPrimitive.py:411–419  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

409 self.assertTrue( m.numFaces() < m2.numFaces() )
410
411 def testLegacyIndices( self ) :
412
413 # load a legacy file that contains myString and myStringIndices
414 m = IECore.Reader.create( os.path.join( "test", "IECore", "data", "cobFiles", "cube.cob" ) ).read()
415 self.assertEqual( m.keys(), [ "P", "myString" ] )
416 self.assertTrue( m.isPrimitiveVariableValid( m["myString"] ) )
417 self.assertEqual( m["myString"].interpolation, IECoreScene.PrimitiveVariable.Interpolation.Vertex )
418 self.assertEqual( m["myString"].data, IECore.StringVectorData( [ "indexed", "my", "string" ] ) )
419 self.assertEqual( m["myString"].indices, IECore.IntVectorData( [ 1, 0, 2, 1, 0, 2, 1, 0 ] ) )
420
421 def testSphereIndexing( self ) :
422

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
readMethod · 0.45
createMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected