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

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

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 26-08-2004, 04:11 PM   #1
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default a script that moves the pivot at the origin

hello. i know there are a few MEL savvy mods on this forum, as MEL is not my favorite thing to do. this may seem like a simple 4-5 line script to most, but i've tried and all failed miserably. heh.. i won't even post my so called "code" as it was way off...
so please a little help to speed my modeling process and technique.

read title: a simple script that takes the pivot of object selected and places the pivot at the origin [0 0 0]any object type or mesh etc... ,


thanx in advance :tup:
__________________
Image dump
vladimirjp is offline   Reply With Quote
Old 26-08-2004, 04:39 PM   #2
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

what i had....
string $selected[];
$selected = `ls -sl`;
vector $pivot = `xform -q -piv $selected`;
move $selected.rotatePivot $selected.scalePivot 0 0 0;

error i got : Error: line 3: Cannot convert data of type float[] to type vector due to array size mismatch (6 elements). //
__________________
Image dump
vladimirjp is offline   Reply With Quote
Old 26-08-2004, 05:16 PM   #3
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

There... make shelf button of this or something...
Code:
{
	string $sSel[] = `ls -sl -typ transform`;
	string $sItem;

	for($sItem in $sSel)
	{
		setAttr ($sItem + ".scalePivot") 0 0 0;
		setAttr ($sItem + ".rotatePivot") 0 0 0;
	}
}
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 26-08-2004, 05:34 PM   #4
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

thanx a million sensei KB:chinese:
:tup: :tired: Mel is on my next "to-learn" list
__________________
Image dump
vladimirjp is offline   Reply With Quote

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.