CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 06-15-2013, 03:06 PM   #1
jacob sutch
Join Date: Sep 2004
Posts: 64
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
Old 06-19-2013, 06:49 PM   #2
jacob sutch
Join Date: Sep 2004
Posts: 64
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.
Old 06-19-2013, 06:49 PM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

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

All times are GMT. The time now is 03:17 AM.

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