PDA

View Full Version : Zero object transforms relativ to other object, how?


Pshu
06-02-2004, 02:00 PM
Hi guys,

I have this problem - i have one object, lets say ROOT, which i want to use as a world cord for other objects, i want to be able to zero objects transform relativ to the ROOT, not to the world coord. For example - i need to zero a character`s hands relative to the root, not to the scene origin. I`m sure thats not a difficult task, but i cant figure it out. Any help will be highly appreciated :)

Tobbe
06-03-2004, 07:41 AM
Hi,

Try something like this. This script freezes the selected objects translate values relative to their pivot points. Just snap your pivots to "root" and run this script and you're done.

string $cmd;
string $selected[] = `ls -sl`;

for ($object in $selected) {

float $pivot[] = `xform -q -ws -rp $object`;
move -rpr 0 0 0 $object;
select -r $object;
makeIdentity -apply true -t 1 -r 0 -s 0 ;
move -ws $pivot[0] $pivot[1] $pivot[2] $object;
}

CGTalk Moderation
01-18-2006, 09:00 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.