Returns a 3-dimensional Array of r,g,b,a values for each TrianglePoint of each Triangle, organized as: [r,g,b,a values][TrianglePoint][Triangle]
// get accessor Object rtn = TriangleCollection.ColorArray; |
set root = Application.ActiveProject.ActiveScene.Root set obj = root.AddGeometry( "Cube", "MeshSurface" ) CreateVertexColorSupport ,,obj a = obj.ActivePrimitive.Geometry.Triangles.colorarray for i=LBound( a, 3 ) to UBound( a, 3 ) for j=LBound( a, 2 ) to UBound( a, 2 ) Application.LogMessage "t" & i & ".p" & j & ".color: " & _ a(0,j,i) & "," & a(1,j,i) & "," & a(2,j,i) & "," & a(3,j,i) next next |