( self )
| 193 | self.assertEqual( c.verticesPerCurve(), IECore.IntVectorData( [ 4, 4 ] ) ) |
| 194 | |
| 195 | def testHash( self ) : |
| 196 | |
| 197 | c = IECoreScene.CurvesPrimitive( IECore.IntVectorData( [ 4 ] ), IECore.CubicBasisf.bSpline(), True ) |
| 198 | h = c.hash() |
| 199 | t = c.topologyHash() |
| 200 | |
| 201 | c2 = c.copy() |
| 202 | self.assertEqual( c2.hash(), h ) |
| 203 | self.assertEqual( c2.topologyHash(), t ) |
| 204 | |
| 205 | c.setTopology( IECore.IntVectorData( [ 5 ] ), IECore.CubicBasisf.bSpline(), True ) |
| 206 | self.assertNotEqual( c.hash(), h ) |
| 207 | self.assertNotEqual( c.topologyHash(), h ) |
| 208 | h = c.hash() |
| 209 | t = c.topologyHash() |
| 210 | |
| 211 | c.setTopology( IECore.IntVectorData( [ 5 ] ), IECore.CubicBasisf.catmullRom(), True ) |
| 212 | self.assertNotEqual( c.hash(), h ) |
| 213 | self.assertNotEqual( c.topologyHash(), h ) |
| 214 | h = c.hash() |
| 215 | t = c.topologyHash() |
| 216 | |
| 217 | c.setTopology( IECore.IntVectorData( [ 5 ] ), IECore.CubicBasisf.catmullRom(), False ) |
| 218 | self.assertNotEqual( c.hash(), h ) |
| 219 | self.assertNotEqual( c.topologyHash(), h ) |
| 220 | h = c.hash() |
| 221 | t = c.topologyHash() |
| 222 | |
| 223 | c["primVar"] = IECoreScene.PrimitiveVariable( IECoreScene.PrimitiveVariable.Interpolation.Constant, IECore.IntData( 10 ) ) |
| 224 | self.assertNotEqual( c.hash(), h ) |
| 225 | self.assertEqual( c.topologyHash(), t ) |
| 226 | |
| 227 | def tearDown( self ) : |
| 228 |
nothing calls this directly
no test coverage detected