Oh, btw, just noticed that code should have read "var aVC =" in the
first line. The joy of quick copy'n'paste... :)
André Adam wrote:
Flattening the array is completely ok; that would look like this:
var aVCArray = new VBArray(oVCProp.Elements.Array).toArray();
for(i=0; i<aVC.length; i+=4){
aVC[i] = oRed;
aVC[i+1] = oGreen;
aVC[i+2] = oBlue;
aVC[i+3] = oAlpha;
}
Hope that helps, cheers!
-André
Bernard Lebel wrote:
A topic as old as time itself. Since I was already a Python user when
I started to deal with arrays in XSI I never had to worry about
JScript/XSI shortcomings in this area.
But now I have to use JScript.
So if you get the Elements property of an object, as in
ClusterProperty.Elements, how do you keep separate the sub-arrays?
(ie, avoid using VBArray which flattens everything)
Let say I have a vertexcolor cluster property, and I want to loop over
all four Elements sub-arrays at the same time, how can I do that?
Any pointer welcome.
Thanks
Bernard
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi