PDA

View Full Version : how to create custom object


dutch_delight
10-20-2006, 11:34 AM
Hi, this is my first post in the maya forum. I've been a max person for a long time but need to learnmaya now.
Bit of an embarrassing question to start with but i looked everywhere and just cant find it.
how do i create a custom object?

In maxscript you do something like this:
mesh vertices:vertex_array faces:face_array name:object_name

How do i do this in mel?

Thanks v much

sparaig
10-20-2006, 05:59 PM
Hi, this is my first post in the maya forum. I've been a max person for a long time but need to learnmaya now.
Bit of an embarrassing question to start with but i looked everywhere and just cant find it.
how do i create a custom object?

In maxscript you do something like this:
mesh vertices:vertex_array faces:face_array name:object_name

How do i do this in mel?

Thanks v much

Use the surface command in MEL. You could wrap it in a function that could accept an array of cvs in order to make it more max-like.

From the mel command reference under Help:


This following command produces a surface that is degree 3 and periodic in
the U direction, and degree 1 in the V direction. Notice that
the first 3 pairs of points match the last 3 pairs of
points, which is required for a degree 3 periodic surface.

surface -du 3 -dv 1
-fu "periodic" -fv "open"
-ku 0 -ku 1 -ku 2 -ku 3 -ku 4 -ku 5 -ku 6
-ku 7 -ku 8 -ku 9 -ku 10 -ku 11 -ku 12
-kv 0 -kv 1
-pw 4 -4 0 1 -pw 4 -4 -2.5 1
-pw 5.5 0 0 1 -pw 5.5 0 -2.5 1
-pw 4 4 0 1 -pw 4 4 -2.5 1
-pw 0 5.5 0 1 -pw 0 5.5 -2.5 1
-pw -4 4 0 1 -pw -4 4 -2.5 1
-pw -5.5 0 0 1 -pw -5.5 0 -2.5 1
-pw -4 -4 0 1 -pw -4 -4 -2.5 1
-pw 0 -5.5 0 1 -pw 0 -5.5 -2.5 1
-pw 4 -4 0 1 -pw 4 -4 -2.5 1
-pw 5.5 0 0 1 -pw 5.5 0 -2.5 1
-pw 4 4 0 1 -pw 4 4 -2.5 1 ;

Morganism
10-26-2006, 07:04 AM
The easiest way to do this kind of thing is to build the object in an empty scene, save it as a maya ascii, and then open the file in a text editor and cut out the good stuff.

dutch_delight
10-26-2006, 01:10 PM
thats quite usefull to know about the asci file. thanks.

CGTalk Moderation
10-26-2006, 01:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.