@@ -2005,5 +2005,40 @@ def testVisibilityAttribute( self ) :
2005
2005
self .assertNotEqual ( child .hash ( IECoreScene .SceneInterface .HashType .AttributesHash , 1 ), animatedFrame1Hash )
2006
2006
self .assertNotEqual ( child .hash ( IECoreScene .SceneInterface .HashType .AttributesHash , 1 ), withoutHash )
2007
2007
2008
+ def testArbGeomParamTypes ( self ) :
2009
+
2010
+ points = IECoreScene .PointsPrimitive ( IECore .V3fVectorData ( [ imath .V3f ( i ) for i in range ( 0 , 2 ) ] ) )
2011
+
2012
+ points ["uint8" ] = IECoreScene .PrimitiveVariable (
2013
+ IECoreScene .PrimitiveVariable .Interpolation .Vertex ,
2014
+ IECore .UCharVectorData ( range ( 0 , 2 ) )
2015
+ )
2016
+ points ["uint16" ] = IECoreScene .PrimitiveVariable (
2017
+ IECoreScene .PrimitiveVariable .Interpolation .Vertex ,
2018
+ IECore .UShortVectorData ( range ( 0 , 2 ) )
2019
+ )
2020
+ points ["int16" ] = IECoreScene .PrimitiveVariable (
2021
+ IECoreScene .PrimitiveVariable .Interpolation .Vertex ,
2022
+ IECore .ShortVectorData ( range ( 0 , 2 ) )
2023
+ )
2024
+ points ["uint32" ] = IECoreScene .PrimitiveVariable (
2025
+ IECoreScene .PrimitiveVariable .Interpolation .Vertex ,
2026
+ IECore .UIntVectorData ( range ( 0 , 2 ) )
2027
+ )
2028
+ points ["int32" ] = IECoreScene .PrimitiveVariable (
2029
+ IECoreScene .PrimitiveVariable .Interpolation .Vertex ,
2030
+ IECore .IntVectorData ( range ( 0 , 2 ) )
2031
+ )
2032
+
2033
+ fileName = os .path .join ( self .temporaryDirectory (), "visibilityAttribute.abc" )
2034
+ root = IECoreScene .SceneInterface .create ( fileName , IECore .IndexedIO .OpenMode .Write )
2035
+ root .createChild ( "object" ).writeObject ( points , 0 )
2036
+ del root
2037
+
2038
+ root = IECoreScene .SceneInterface .create ( fileName , IECore .IndexedIO .OpenMode .Read )
2039
+ points2 = root .child ( "object" ).readObject ( 0 )
2040
+ for name in points .keys () :
2041
+ self .assertEqual ( points2 [name ], points [name ] )
2042
+
2008
2043
if __name__ == "__main__" :
2009
2044
unittest .main ()
0 commit comments