Noob question about an align script

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2013
Noob question about an align script

So I don’t really know much about maxscript, but I have slowly started using little snippets on occasion. I had a series of animations where the characters hands needed to have a very specific placement, and I started using a simple script.
Basically “$'Bip01 L Hand'.transform = $'Bip01 L Hand Guide'.Transform” when I press a button.
Initially the animations were all quite short, but as the length increased I changed it to
(
$'Bip01 L Hand'.transform = $'Bip01 L Hand Guide'.Transform
$'Bip01 R Hand'.transform = $'Bip01 R Hand Guide'.Transform
(
(
tbar = maxops.trackbar –this was taken from another script. I did not write it
slidertime = (at time slidertime tbar.getnextkeytime())
)
This allowed me to select the hands and then go through the timeline, but I am still pressing the button for every key in the animation.
First, can someone give me advice on how I would run the script on every key on the hand for the whole timeline.
Second, I eventually would like to use it in a more complex setup where the script is run for every key frame in a timeline, but it is aligning two separate objects.
Example would be if Bip01 has a keyframe then run $'Bip01 R Hand'.transform = $'Bip01 R Hand Guide'.Transform
I will always know the names of the objects I want aligned, and I will know the name of the object I want to check for keyframes.
Any help/advice/direction would be greatly appreciated
 
  06 June 2013
I keep messing with this, and reading help files when I have time. I thought I was getting close with this
(
local dest = $'rig_a_Base_Control'.Position.controller
for k in $'Bip001'.Transform. do
addNewKey dest k.time
)
But I get the error -- Syntax error: at name, expected "do" or "collect" when evaluated. I will look into it more tonight after work.
 
  06 June 2013
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 05:21 PM.


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