ScriptSpot

Script

Multi-Dimensional Array Support

By JMIM · 2008-11-22

Version
2.0
Date updated
2008-11-21
Votes
15
Homepage
www.jmim.com

Tags: array, Multi-Dimensional, Multi, Dimensional, DigiPen, John Madison, JMIM

Description

A set of functions that let you work with multi-dimensional arrays of any size/shape in maxscript.

It works by using 2 variables to represent a multi-dimensional array.
Lets call them:

JMIMdat = #(5,5,5,10)
JMIMarr = #(...)

JMIMdat:
Is an array holding the slot dimensions of your multi-dimensional array.
In this case, it is a 4 dimensional array.

JMIMarr:
Is the corresponding array to be treated as a multidimensional array.
JMIMarr.count = (5x5x5x10)

Additional Info

--Background Info:
As a user of visual basic.net, I like to organize my information in
multi-dimensional arrays.

A simple example would be, a 2 dimensional array of pixel data to make bitmap manipulation easier.

A more archaic example would be a 4 dimensional array for storing info
on electrical sockets in a building:
THEBUILDING(QUADs,Floors,Cubicals,ElectricalSockets)
So... THEBUILDING(2,10,3,2) would be electrical socket #2 in cubical 3 on floor 10 in quad 2 of the building. You could append another dimension for... say building number.

I am in the process of making a script to make a hair rig in max.
A simple mohawk that will be rigged for 2ndary animation and "blowing in the wind".