Introduction to Maya - Modeling Fundamentals Vol 2
This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with complex objects.
# 1 07-05-2008 , 05:12 AM
Subscriber
Join Date: Oct 2005
Location: US of A
Posts: 114

Automated unwrapping of multiple objects using scripting

I have a quick question, that hopefully someone on here can help me with. I have a lot of small objects that I would like to unwrap (250 or so) using a standard spherical unwrap, and I want to create a script that would do it for me. The pieces are labeled "polySurface383" through "polySurface572".

The biggest problem I'm having is after getting the script to select an object is how to get it to unwrap it, mainly with some unique selection Maya does (look at the second line):

1| select r- polySurface383;
2| select r- polySurface383.f[0:119];
3| polyProjection -ch 1 -type Spherical -ibd on -sf on polySurface383.f[0:119];

Any help would be appreciated. Thanks all!


Death is certain, Life is not.
# 2 07-05-2008 , 12:00 PM
Xander-0's Avatar
Registered User
Join Date: Feb 2005
Location: This Place
Posts: 220
The second line is maya saying its selected those faces. which, if that's all the faces on the sphere, you don't need to worry about; I think all unwraps by default affect the whole object if you don't otherwise specify the faces.
as for the third line, you really only to input the following;
polyProjection -type Spherical polySurface383.f[0:n]
(where n is your last face)
although that assumes the default values for things are what you want (for an explanation of the flags in the command, look in the MEL command reference in the help menu).
Not 100% sure how to get it to count the faces like you need, though.


Book Wise

https://X4nd5r.deviantart.com
# 3 19-05-2008 , 03:12 AM
bendingiscool's Avatar
Subscriber
Join Date: Jul 2006
Location: London
Posts: 567
I'm looking for a very similar thing, infact heres the exact thread I started elsewhere...

"I have a bunch of cubes and I would like to write a script that does an automatic map on them. I tried this after selecting all the cubes...

string $polyBlocksArray[] = `ls -sl`;

for ($myObject in $polyBlocksArray) {

polyAutoProjection;

}

I get an error saying "Doesn't work with multiple objects selected". How would I go about getting the loop to go through them one at a time and map that way?

Many thanks in advance
Chris"

As is mentioned above I am looking for a way to do multiple projections, however it doesn't seem to like it with multiple objects. This is a real pain, any ideas guys.

PS. Soz for semi-hijacking your thread user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads