( self )
| 216 | self.assertEqual( m2["uv"].indices, IECore.IntVectorData( [ 0, 3, 1, 0, 1, 2 ] ) ) |
| 217 | |
| 218 | def testUniformIndices( self ) : |
| 219 | |
| 220 | m = IECoreScene.MeshPrimitive.createPlane( imath.Box2f( imath.V2f( -4 ), imath.V2f( 4 ) ), divisions = imath.V2i( 2, 2 ) ) |
| 221 | m["myString"] = IECoreScene.PrimitiveVariable( IECoreScene.PrimitiveVariable.Interpolation.Uniform, IECore.StringVectorData( [ "a", "b" ] ), IECore.IntVectorData( [ 1, 0, 0, 1 ] ) ) |
| 222 | |
| 223 | m2 = IECoreScene.TriangulateOp()( input = m, copyInput = True ) |
| 224 | |
| 225 | self.assertTrue( m2.arePrimitiveVariablesValid() ) |
| 226 | |
| 227 | self.assertEqual( m2["myString"].data, m["myString"].data ) |
| 228 | self.assertEqual( m2["myString"].indices, IECore.IntVectorData( [ 1, 1, 0, 0, 0, 0, 1, 1 ] ) ) |
| 229 | |
| 230 | |
| 231 | @unittest.skipUnless( os.environ.get("CORTEX_PERFORMANCE_TEST", False), "'CORTEX_PERFORMANCE_TEST' env var not set" ) |
nothing calls this directly
no test coverage detected