| 44 | |
| 45 | @staticmethod |
| 46 | def generatePaths( seed, depthRange, numChildrenRange ) : |
| 47 | |
| 48 | nouns = [ |
| 49 | "Ball", "Building", "Car", "Tree", "Rampart", "Head", "Arm", |
| 50 | "Window", "Door", "Trailer", "Light", "FlockOfBirds", "Herd", "Sheep", |
| 51 | "Cow", "Wing", "Engine", "Mast", "Rock", "Road", "Sign", |
| 52 | ] |
| 53 | |
| 54 | adjectives = [ |
| 55 | "big", "red", "metallic", "left", "right", "top", "bottom", "wooden", |
| 56 | "front", "back", "lower", "upper", "magnificent", "hiRes", "loRes", |
| 57 | ] |
| 58 | |
| 59 | paths = [] |
| 60 | def buildWalk( parent=IECore.InternedStringVectorData(), depth=1 ) : |
| 61 | |
| 62 | if depth > random.randint( *depthRange ) : |
| 63 | return |
| 64 | |
| 65 | for i in range( 0, random.randint( *numChildrenRange ) ) : |
| 66 | path = parent.copy() |
| 67 | path.append( random.choice( adjectives ) + random.choice( nouns ) + str( i ) ) |
| 68 | paths.append( path ) |
| 69 | buildWalk( path, depth + 1 ) |
| 70 | |
| 71 | random.seed( seed ) |
| 72 | buildWalk() |
| 73 | |
| 74 | return paths |
| 75 | |
| 76 | def testMatch( self ) : |
| 77 | |