PDA

View Full Version : Instance Controller


nasersolona
06-01-2008, 09:38 PM
Hello Guys, I need to instance the ZERO POS XYZ controller from a Freeze-Transformed object to the available controller of the Position List of another Object. And then set the weights.

Ive beeb trying it all the day with no results, and its a bit urgent. Please help!!!

Sorry for my poor English, and thanks.

Gravey
06-02-2008, 12:00 PM
open the track view graph editor, find your first controller, right click on it and choose 'copy'. Then find the available controller you want to paste to, right click on it and choose paste. A dialog will pop up letting your choose copy / instance.

nasersolona
06-03-2008, 11:41 AM
thanks Gravey, but i was trying to do it by MaxScript, not by clicking with the mouse. thanks anyway for your help.

Ive found a solution myself to do it by scripting. If anyone needs ask for it to me.

Thanks Again.

Gravey
06-03-2008, 12:17 PM
oooh sorry i thought this thread was in the general max forum area. -oops! glad you found your answer anyway.

decapitator
06-03-2008, 01:29 PM
thanks Gravey, but i was trying to do it by MaxScript, not by clicking with the mouse. thanks anyway for your help.

Ive found a solution myself to do it by scripting. If anyone needs ask for it to me.

Thanks Again.Its also an idea to allways just post the solution when you find it yourself. So that someone who searches doesnt end up in 'useless' threads.

nasersolona
06-03-2008, 02:04 PM
you are right, ill post the way to instance a controller from one object to another

c = $object01.pos.controller[2].controller
$object02.pos.controller[2].controller = c

controller[2].controller is because the pos controller i had, was a position list and i had to acces to the zero position xyz subcontroller.

Guibou
06-05-2008, 08:31 PM
I've used the Pen Attribute Holder often in the last rig i made, so i can save poses of my character wheter it's per limbs or for the entire body.

I had to instance a lot of controllers to a lot of variables. The task was boring and tidious but it worked fine. I'm wondering how you do that by maxscript if you're not copy/pasting Controllers to other Controllers, but to variables instead.

How would you copy let's say the X of your Zero PosXYZ to a specific variable?
Honestly i haven't looked at it yet and i'm still new to maxscript, if any of you guys would have a hint i'd like to know it.

Thanks guys for your time :)

magicm
06-05-2008, 08:42 PM
How would you copy let's say the X of your Zero PosXYZ to a specific variable?
By variable you mean a scripted controller variable? In case you do, it's as easy as this:

-- create a new float script controller
c = float_script()
-- store the X controller of the selected object's Zero PosXYZ
c.AddTarget "X_Controller" $.position.controller[2].controller[1].controller
-- retrieve the controller's value
format "Test : %\n" (c.GetTarget "X_Controller").value


Martijn

CGTalk Moderation
06-05-2008, 08:42 PM
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.