| 173 | ) |
| 174 | |
| 175 | def testSets( self ): |
| 176 | # VDB Scene doesn't support sets and it should return an empty set |
| 177 | # and the hash should be unchanging for any location / setname / vdb file |
| 178 | sourcePath = os.path.join(self.dataDir, "sphere.vdb") |
| 179 | sphereRoot = IECoreScene.SceneInterface.create( sourcePath, IECore.IndexedIO.OpenMode.Read ) |
| 180 | |
| 181 | vdb = sphereRoot.child( "vdb" ) |
| 182 | |
| 183 | # we don't support sets in vdb scenes |
| 184 | self.assertEqual( vdb.setNames(), [] ) |
| 185 | |
| 186 | # all locations should have the same setHash |
| 187 | self.assertEqual( vdb.hashSet("a"), sphereRoot.hashSet("b") ) |
| 188 | |
| 189 | sourcePath = os.path.join(self.dataDir, "smoke.vdb") |
| 190 | smokeRoot = IECoreScene.SceneInterface.create( sourcePath, IECore.IndexedIO.OpenMode.Read ) |
| 191 | |
| 192 | vdb2 = smokeRoot.child( "vdb" ) |
| 193 | self.assertEqual( vdb.hashSet("c"), vdb2.hashSet("d") ) |
| 194 | self.assertEqual( vdb2.hashSet("f"), smokeRoot.hashSet("e") ) |
| 195 | |
| 196 | def testMissingChildBehaviour( self ) : |
| 197 | with self.assertRaises(RuntimeError): |