Notifications
Clear all

[Closed] Transformation Matrix to Perform "Link"

Hi, This is my first post here
How do I create a script to make one object parenting under another object?
just like max “Link” function does??

i.e. I have $point1 and $point2
I typed $point1.transform *= $point2 .transform
the rotation and scale part are correct , but the position part is wrong
which part did I lost?

5 Replies
2 Replies
(@rustyknight)
Joined: 11 months ago

Posts: 0

If you look under “General Node Properties” of the maxscript docs, you will find you can parent one object to another via the “parent” property…ie

childNode.parent = parentNode

And now they are linked, just like “Link”
[color=white][font=Verdana][/color][/font]
Shane

 eek
(@eek)
Joined: 11 months ago

Posts: 0

Err… With this method you are essentially changing the heirachy of the object itself. Link controller is transforming the object about a space with an ‘offset’ difference.

Do you want to make an object have a different parent or change how its linked during animation?

Opps, did I get the wrong link

Thanks everyone for the reply~
I want to calculate the object’s transform value as if it’s been link under it’s parent
Using this , I can then add some delay motion on it , like below:


 theTM1 =(matrix3 [1,0,0] [0,1,0] [0,0,1] [-67.6858,-145.633,0])
 theTM2 =at time(CurrentTime-2) $Point01.transform
 theTM1*theTM2
 

or I can calculate the multi-pivot rig without using the traditional “link” method
(See the Attach)

Wow, I think I figured out myself ,Just multiply the inverse of it’s future parent’s transform
then you will get the child space transform value
Here is the tool I was wanted to write
and the resault picture