( m )
| 186 | r = imath.Rand48() |
| 187 | |
| 188 | def writeWalk( m ) : |
| 189 | |
| 190 | if m.name() != "/" : |
| 191 | if r.nextf( 0.0, 1.0 ) < 0.5 : |
| 192 | m.writeObject( IECoreScene.SpherePrimitive( r.nextf( 1.0, 4.0 ) ), 0.0 ) |
| 193 | |
| 194 | if r.nextf( 0.0, 1.0 ) < 0.5 : |
| 195 | t = imath.V3d( r.nextf(), r.nextf(), r.nextf() ) |
| 196 | m.writeTransform( IECore.M44dData( imath.M44d().translate( t ) ), 0.0 ) |
| 197 | |
| 198 | thisDepth = int( r.nextf( 1, 4 ) ) |
| 199 | if thisDepth > len(m.path()) : |
| 200 | numChildren = int( r.nextf( 4, 50 ) ) |
| 201 | for i in range( 0, numChildren ) : |
| 202 | mc = m.createChild( str( i ) ) |
| 203 | writeWalk( mc ) |
| 204 | |
| 205 | m = IECoreScene.SceneCache( os.path.join( self.tempDir, "test.scc" ), IECore.IndexedIO.OpenMode.Write ) |
| 206 | writeWalk( m ) |
nothing calls this directly
no test coverage detected