problems with 2d arrays
I have an array that looks like this: #(4, 12, #{4, 11}, #{10..11}, #{10, 12})
how do i access the second '4'?
I've tried myArray[3][1], and a ton of other possibilities... but nothing works.
Basically, I just want to write a function that will collapse this array into something that looks like this: #(4, 12, 4, 11, 10, 11, 10, 12).
Can anyone help me? is there a quick fix function out there? How do I access these numbers?
btw, the reason some numbers are in pairs is because I appended 2 selected verts into the array.
the first two numbers in the array were created by this command:
myarray = $.editablepoly.getselection #vertex as array
the rest of the numbers were created through this command:
append myarray ($.editablepoly.getselection #vertex)
in both cases, two verts were selected.
Comments
hi...
hi...
in this case the second vertex group is a bitarray.. search in maxscript help "Value > Collections > BitArray Values"
you need use...
or use this to have a array
kimarotta.com.br
3d Artist
myarray+myarray2 is the same
myarray+myarray2 is the same as join myarray myarray2
To convert multidimensionl array in one dimensional array like in your case
you can simply use:
bga
good... useful
good... useful code...
thanks
kimarotta.com.br
3d Artist