SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Variable names and variable names!!!
Register FAQ Members List Calendar Mark Forums Read

New Thread
Thread Tools
Old 28-01-2006, 06:57 PM   #1
Forlax's Avatar
Join Date: Aug 2003
Location: Middlesbrough, UK
Posts: 73
Default Variable names and variable names!!!


MEL doesn't allow arrays/matirces of more than two dimensions....

I need a 'matrix' with 3 dimensions.....which I can't have....that contains a reference to (any) number of objects, the number of vertices of that object and the (x,y,z) positions of the vertices.

I need this so I can loop over each object, get each vertex and ultimately it's position and store them all to refer to them later on.

I thought about two two store each object and a matrix to store the vertex and position data. How can I 'link' them together???? I can I create the object variables in one loop and then refer to those names in another loop to get the vertex data????

Anyone got any idea?

Sorry if this question is convoluted.


I used to be indecisive, but now I'm not so sure.

AIM: tomohawkcg
Forlax is offline   Reply With Quote
Old 30-01-2006, 01:11 AM   #2
Registered User
MattTheMan's Avatar
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436

why can't you just format the matrice like this?

matrice vertice 2d -

|x, y, z| row 1 - vertice 1
|x, y, z| row 2 - vertice 2
|x, y, z| row 3 - vertice 3... etc
|x, y, z|
|x, y, z|
|x, y, z|

So far this has worked for me in c++ when working with my own 3d prog.

Works well when dealing with other such as rotation, translation, and scaling matrices.
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off