mel newbie question

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  12 December 2003
mel newbie question

Is there a way to globally set a value using mel for my controls, say i want to subtract 90 degrees in y from my Root and my legs. thanks.

K , i figured that out, but din't work for what i wanted it to. Well , before i started my animation, i rotated the ALL control (the nurbscircle with all the controls grouped under this to move the character around) 90 degrees in Y. I've already begun animating my character and what i want to do now is zero out the rotation on the ALL control and transfer that to the root node and the legs. Basically i don't want the animation to change. Just zero out the rotation and transfer those to its children. Any ideas?
__________________
Aatma Studio
www.aatmastudio.com

Last edited by modi : 12 December 2003 at 10:10 AM.
 
  12 December 2003
Being that an objects position is calculated from its parents position, there wouldn't be any direct way to have a MEL reposition the legs and feet in the way you would like.

A few options:

Zero out the ALL control as you would like, and parent (Or parent constraint) the ALL control to a new node. Then rotate that node as you need.

Manually reposition the feet and root/cog. Being that there are only a few curves to adjust, it shouldnt be too dificult.

Now keep in mind that if you are using Maya's default rotation order (XYZ), when you rotate the root or ALL controls 90 degrees in Y you will achieve full gibmal lock. Personally I would keep all rotation-Y animation on a seperate parent.

I hope this helps!

Mike R
__________________
Mike Rhone
-VFX Artist-

Dust Rig - tutorial for Maya

Tonga the Fox - Free cartoony rig for Maya!
 
  12 December 2003
modi: i wrote a script awhile back that should do that for you.

it might be a little tricky, but the script will definitely do it for you. download it here: zooXferAnim.

basically what you'll have to do is this. save out your scene under a new name. now reference your original scene into this new scene. now you should have your character appearing twice (one from the scene, one from the reference). ok, now delete all the animation on the non referenced char, and zero the global control.

now load the script by typing: zooXferAnim.

now load all the controls from the referenced scene into the source pane, and all the controls from the normal scene into the target.

make sure the mapping figured itself out. if not, you can change which object is mapped to which (read the help for more info).

now, change the xfer mode (down the bottom) to trace, and turn on world space. you also want to do a sequence, and trace keys only (read the help to find out more about it if you want). then just press the xfer animation button, and it should trace the animation from the reference onto the rig in the scene. if you've zeroed out everything you wanted to, it should all be good.

in theory of course. best of luck...
__________________
-:macaroniKazoo:-
 
  12 December 2003
modi: it seems my web server is currently having issues, so if its still dead when you need the script, just private message me ur email, and i can mail it to you if u want...
__________________
-:macaroniKazoo:-
 
  12 December 2003
just got your email, thanx a ton, i'll check it out at home later on tonight and let you know how it worked. Thanks again.
__________________
Aatma Studio
www.aatmastudio.com
 
  06 June 2004
Quote: Originally posted by macaroniKazoo
modi: i wrote a script awhile back that should do that for you.

it might be a little tricky, but the script will definitely do it for you. download it here: zooXferAnim.

basically what you'll have to do is this. save out your scene under a new name. now reference your original scene into this new scene. now you should have your character appearing twice (one from the scene, one from the reference). ok, now delete all the animation on the non referenced char, and zero the global control.

now load the script by typing: zooXferAnim.

now load all the controls from the referenced scene into the source pane, and all the controls from the normal scene into the target.

make sure the mapping figured itself out. if not, you can change which object is mapped to which (read the help for more info).

now, change the xfer mode (down the bottom) to trace, and turn on world space. you also want to do a sequence, and trace keys only (read the help to find out more about it if you want). then just press the xfer animation button, and it should trace the animation from the reference onto the rig in the scene. if you've zeroed out everything you wanted to, it should all be good.

in theory of course. best of luck...


Hey there,

I was trying out the zooXferAnim script in maya 6.0, do you know if it works in Maya 6?

I keep getting this warning,

zooAnimFile.mel line 248: Converting string "" to an int value of 0. //

And worst of all nothing gets transfered :(

Just wondering if it's something I am not doing wrong, or if the script needs to updated for maya 6.0?

Thanks
__________________
*Insert pretentious quote here*
 
  06 June 2004
hmm...actually..spoke to soon, it only gives me that warning, when I write the source objects to a file and then import them in, if they are in the same scene seems to work well....

hmm..Interesting....
__________________
*Insert pretentious quote here*
 
  06 June 2004
if you're getting errors importing animation, chances are the exported animation file is empty. remember, the script exports animation from selected objects ONLY. check out the help for more info, and if it still gets the error, try opening up the exported animation file. if theres stuff there, and you still get errors, send me an email, or PM or something...

oh and i just updated the script this morning, so download it, just so i know you have the latest.

cheers!
__________________
-:macaroniKazoo:-
 
  06 June 2004
Howdy,

Yea, it works great if I reference the scene with the rig, but writing to file then importing I am having alot of trouble with.

I'll PM you tommorow with more details of some little glitches, I didn't really have to much time today to sink my teeth into it and get the text editor out and take a look under the hood. So basically I just referenced the file to the scene and Xfered from there and all was good. Saved me alot of time.

another nice script BTW, keep up the good work.
__________________
*Insert pretentious quote here*
 
  06 June 2004
yeah, definitely send me mail if something isn't working for you. i use it pretty regularly, and its been super solid, but if its not working for others, then theres a good chance that i've done something wrong with the release. either that or i could make it easier to use.
__________________
-:macaroniKazoo:-
 
  01 January 2006
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:57 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.