有没有办法将多维数组存储为用MaxScript创建的simplemod修饰符的参数?我在maxscript帮助中找不到方法。
发布于 2014-10-08 22:17:44
常见问题部分中的Maxscript帮助中写道:
MAXScript常见问题解答>如何创建多维数组?
MAXScript数组是元素的一维列表。数组的元素通过其在括号中的索引来寻址,
例如
myArray = #(10,20,30,40,50,60,70,80,90,100)
myArray[5] --> will return 50, the fifth element of the array.由于一个数组可以是另一个数组中的元素,因此可以根据需要通过在一个数组中放置多个数组来创建多维数组。使用括号中的索引,可以引用子数组,使用另一对括号和可以访问子数组中的元素的索引,
例如
-- create an array with two elements, each one an array with 10 elements.
myMultiDimArray=#(#(1,2,3,4,5,6,7,8,9,10),#(10,20,30,40,50,60,70,80,90,100))
-- add a third element to the array containing 10 more elements
append myMultiDimArray #(100,200,300,400,500,600,700,800,900,1000)
myMultiDimArray[2][5] --> returns 50 - the 5th element of the 2nd sub-array 希望这能有所帮助!
发布于 2017-09-29 22:15:32
#floatTab是你要找的吗?
另请查看http://forums.cgsociety.org/archive/index.php?t-1201389.html
https://stackoverflow.com/questions/24717682
复制相似问题