Notifications
Clear all

[Closed] instance controller

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.

I´ve beeb trying it all the day with no results, and it´s a bit urgent. Please help!!!

Sorry for my poor English, and thanks.

7 Replies

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.

thanks Gravey, but i was trying to do it by MaxScript, not by clicking with the mouse. thanks anyway for your help.

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

Thanks Again.

1 Reply
(@decapitator)
Joined: 1 year ago

Posts: 0

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.

oooh sorry i thought this thread was in the general max forum area. -oops! glad you found your answer anyway.

you are right, i´ll post the way to instance a controller from one object to another

c = $object01.pos.controller[2].controller
[b]$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.
[/b]

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

1 Reply
(@magicm)
Joined: 1 year ago

Posts: 0

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 : %
" (c.GetTarget "X_Controller").value

Martijn