Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Batman by Jason Edwards
You are here > Home > SimplyMaya Community Forums

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 07-05-2008, 05:12 AM   #1
Join Date: Oct 2005
Location: US of A
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Kartzan is offline   Reply With Quote
Old 07-05-2008, 12:00 PM   #2
Registered User
Xander-0's Avatar
Join Date: Feb 2005
Location: This Place
Posts: 220
Thanks: 0
Thanked 2 Times in 1 Post

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
Xander-0 is offline   Reply With Quote
Old 19-05-2008, 03:12 AM   #3
bendingiscool's Avatar
Join Date: Jul 2006
Location: London
Posts: 567
Thanks: 0
Thanked 1 Time in 1 Post

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) {



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

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
bendingiscool is offline   Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem solving many dynamic objects in a pile? rohiniduggal Dynamics & Special Effects 3 14-01-2011 06:26 PM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 10:56 PM
New Feature: Multiple Image Upload David Members Lounge 0 30-11-2010 08:40 PM

Thread Tools

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.