View Full Version : How to make one object to have the same pivot point location of another object?
morimitsu 07-12-2006, 03:21 PM How to make one object to have the same pivot point location of another object?
And how to snap to another objects pivot point?
|
|
weirdooh
07-12-2006, 03:45 PM
line the object up on the grid hit the home key to move the pivot point and do a grid snap move
drGonzo
07-12-2006, 04:24 PM
Select both object and execute jpSnapObjects:
global proc jpSnapObjects ()
{
//check the objects that are selected
string $sel[]=`ls -sl`;
//the first object in the array
string $firstObject = $sel[0];
//the second object in the array
string $secondObject = $sel[1];
//Get the rotation values of second object
float $rot[]=`xform -q -ws -rotation $secondObject`;
//Assign the rotation values on to the first object
xform -ws -rotation $rot[0] $rot[1] $rot[2] $firstObject;
//Get the translation values of second object
float $trans[]=`xform -q -ws -rp $secondObject`;
//Assign the translation values on to the first Object
move -rpr $trans[0] $trans[1] $trans[2] $firstObject;
}
redcarrot
07-12-2006, 05:27 PM
Use Point and Orient Constraint, or Parent Constraint to the object, then delete the constraint(s).
JamSession
07-12-2006, 07:13 PM
//select the object you want to snap to first, then select the other one.
orientConstraint;
delete `orientConstraint`;
pointConstraint;
delete `pointConstraint`;
KIS (keep is simple:thumbsup:)
hominid
07-12-2006, 08:29 PM
Or even simpler:
// Select the object you want to snap to first, then select the object to be snapped.
// Then enter this in the command line,
delete `parentConstraint`;
Cheers,
Pete
btw I got this tip from a cgtalk member a few months ago.
isoparmB
07-13-2006, 01:06 AM
I think what morimitsu needs is not snapping an object to another, just snapping the pivot points without changing the objects position. I've modified dr. Gonzos code:
global proc jpSnapPivots ()
{
//check the objects that are selected
string $sel[]=`ls -sl`;
//the first object in the array
string $firstObject = $sel[0];
//the second object in the array
string $secondObject = $sel[1];
//Get the rotation and scale pivot world space locations of the first object
float $rot[]=`xform -q -rp -ws $firstObject`;
float $rot2[]=`xform -q -sp -ws $firstObject`;
//Assign those locations to the second object
xform -rp $rot[0] $rot[1] $rot[2] -ws $secondObject;
xform -sp $rot2[0] $rot2[1] $rot2[2] -ws $secondObject;
}
JamSession
07-13-2006, 05:46 AM
Or even simpler:
// Select the object you want to snap to first, then select the object to be snapped.
// Then enter this in the command line,
delete `parentConstraint`;
Cheers,
Pete
btw I got this tip from a cgtalk member a few months ago.
I completely forgot about that trick, :thumbsup:
I am not quite sure what you are trying to do, but generally I would group the object to itself then move the goup to the correct pivot area.
]-UnderTOW-[
07-13-2006, 05:49 AM
How to make one object to have the same pivot point location of another object?
And how to snap to another objects pivot point?
Enable selection handle, you can snap to that.
CGTalk Moderation
07-13-2006, 05:49 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.