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

Method __buildTree

test/IECore/ObjectInterpolation.py:74–91  ·  view source on GitHub ↗
( self, compoundType, seed )

Source from the content-addressed store, hash-verified

72 self.assertEqual( IECore.linearObjectInterpolation( IECore.M44dData(m1), IECore.M44dData(m2), 0.5 ), IECore.M44dData(mx) )
73
74 def __buildTree( self, compoundType, seed ):
75
76 def buildCompound( compoundType, seed ):
77 c = compoundType()
78 intSeed = int( seed )
79 c[ "str" ] = IECore.StringData( str(intSeed) )
80 c[ "int" ] = IECore.IntData( intSeed )
81 c[ "float" ] = IECore.FloatData( seed )
82 c[ "double" ] = IECore.DoubleData( seed )
83 c[ "box" ] = IECore.Box3fData( imath.Box3f( imath.V3f( seed ), imath.V3f( seed ) ) )
84 c[ "color" ] = IECore.Color3fData( imath.Color3f( seed, seed, seed ) )
85 c[ "v3d" ] = IECore.V3dData( imath.V3d( seed, seed, seed ) )
86 return c
87
88 c = buildCompound( compoundType, seed )
89 c[ 'first' ] = buildCompound( compoundType, seed )
90 c[ 'first' ][ 'second' ] = buildCompound( compoundType, seed )
91 return c
92
93 def testCompoundDataInterpolation( self ):
94

Calls

no outgoing calls

Tested by

no test coverage detected