MCPcopy Create free account
hub / github.com/ImageEngine/cortex / writeSCC

Method writeSCC

test/IECoreScene/SceneInterfaceTest.py:49–65  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

47class SceneInterfaceTest( unittest.TestCase ) :
48
49 def writeSCC( self ) :
50
51 m = IECoreScene.SceneCache( self.__testFile, IECore.IndexedIO.OpenMode.Write )
52 m.writeAttribute( "w", IECore.BoolData( True ), 1.0 )
53
54 t = m.createChild( "t" )
55 t.writeTransform( IECore.M44dData(imath.M44d().translate(imath.V3d( 1, 0, 0 ))), 1.0 )
56 t.writeAttribute( "wuh", IECore.BoolData( True ), 1.0 )
57
58 s = t.createChild( "s" )
59 s.writeObject( IECoreScene.SpherePrimitive( 1 ), 1.0 )
60 s.writeAttribute( "glah", IECore.BoolData( True ), 1.0 )
61
62 del s, t, m
63
64 if not os.path.exists( self.__testFileUpper ) :
65 shutil.copyfile( self.__testFile, self.__testFileUpper )
66
67 def testGet( self ) :
68

Callers 3

testGetMethod · 0.95
testEraseMethod · 0.95
testClearMethod · 0.95

Calls 6

writeAttributeMethod · 0.95
createChildMethod · 0.95
SceneCacheMethod · 0.80
writeTransformMethod · 0.45
writeObjectMethod · 0.45
SpherePrimitiveMethod · 0.45

Tested by

no test coverage detected