この Triangle のTrianglePointカラーを、R、G、B、A 値の 2DArray([r,g,b,a values][TrianglePoint])として戻します。
// get accessor Object rtn = Triangle.ColorArray; |
set root = Application.ActiveProject.ActiveScene.Root set obj = root.AddGeometry( "Cube", "MeshSurface" ) set triangles = obj.ActivePrimitive.Geometry.Triangles for i=0 to triangles.count - 1 set t = triangles(i) a = t.colorarray for j=LBound( a, 2 ) to UBound( a, 2 ) Application.LogMessage "t" & i & ".p" & j & ".color: " & a(0,j) & "," & a(1,j) & "," & a(2,j) & "," & a(3,j) next next |