View Full Version : copy track between 2 object
jamis27 10-17-2008, 03:11 PM hello all,
I would like to create a script for facial control setup, wich copy a specific track from an object (for example the position.x track of a bone) and paste instance to an another specific tracktrack (the posx attribute I have previously define in an attributes holder)
I have spend hours reading the maxscript help and I haven't find the correct syntax for this task. If anyone have an idea of the method I could use, It would be very helpfull
|
|
Dave Black
10-20-2008, 07:27 PM
Say we have two box objects.
You could do it like this:
$Box01.position.controller.x_position.controller = Box02.position.controller.x_position.controller
-Dave
relief7
10-20-2008, 07:53 PM
Yes, this is correct apart from a small typo ("$" is missing in front of "Box02" ). But it also makes Box01 follow Box02 concerning the x axis because their instances refer to the same controller. If you want to have a unique controller on each object use this...
$Box01.position.controller.x_position.controller = copy $Box02.position.controller.x_position.controller
jamis27
10-21-2008, 08:32 AM
thanks a lot for your reply
by the way, searching through the forum I have found the answer on another post.
using this I have write this piece of code:
ctrlmouth = box lengthsegs:1 widthsegs:1 heightsegs:1 length:0.45 width:0.50 height:0.2 transform:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [1.25,0.1,0.075]) wireColor:[176,26,26] name:"ctrlmouth"
addModifier ctrlmouth (PEN_Attribute_Holder_2 ())
caExe ="ca = attributes PersoMouth\n"
caExe +="(\n"
caExe +=" parameters mouth\n"
caExe +="(\n"
for i = 1 to $.count do
(
objname=$[i].name
for j = 1 to 6 do
(
caExe += objname
caExe += j as string
caExe +=" type:#float\n"
)
)
caExe +=")\n"
caExe +=")\n"
execute caExe
custAttributes.add ctrlmouth .modifiers[1] ca
for i = 1 to $.count do
(
objname=$[i].name
for j = 1 to 3 do
(
strExe = "ctrlmouth.modifiers[1].PersoMouth."
strExe += objname
strExe += j as string
strExe +=".controller=$["
strExe += i as string
strExe +="].controller[1][2]["
strExe += j as string
strExe +="].controller"
execute strExe
)
for j = 1 to 3 do
(
strExe = "ctrlmouth.modifiers[1].PersoMouth."
strExe += objname
strExe += (j+3) as string
strExe +=".controller=$["
strExe += i as string
strExe +="].controller[2][2]["
strExe += j as string
strExe +="].controller"
execute strExe
)
)
CGTalk Moderation
10-21-2008, 08:32 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.