( self )
| 163 | self.assertEqual(grid.leafCount(), 3117) |
| 164 | |
| 165 | def testIfDifferentFromFile( self ) : |
| 166 | sourcePath = os.path.join( self.dataDir, "smoke.vdb" ) |
| 167 | vdbObject = IECoreVDB.VDBObject( sourcePath ) |
| 168 | |
| 169 | vdbObjectCopy = vdbObject.copy() |
| 170 | |
| 171 | |
| 172 | self.assertEqual( vdbObject.unmodifiedFromFile(), True ) |
| 173 | |
| 174 | # getting a non const grid means the object could have changed from the file. |
| 175 | densityGrid = vdbObject.findGrid( "density" ) |
| 176 | self.assertFalse( vdbObject.unmodifiedFromFile() ) |
| 177 | |
| 178 | self.assertEqual( vdbObjectCopy.unmodifiedFromFile(), True ) |
| 179 | |
| 180 | # remove the density grid and ensure we track the VDB object has changed from the file |
| 181 | vdbObject2 = vdbObjectCopy.copy() |
| 182 | self.assertTrue( vdbObject2.unmodifiedFromFile() ) |
| 183 | vdbObject2.removeGrid( "density" ) |
| 184 | self.assertFalse( vdbObject2.unmodifiedFromFile() ) |
| 185 | |
| 186 | def testCanAddGridFromOneObjectToAnother( self ) : |
| 187 | sourcePath = os.path.join( self.dataDir, "smoke.vdb" ) |
nothing calls this directly
no test coverage detected