Hey all,
I've been wrestling with this problem for a day or so now, and I've had no real luck, so I implore the knowledge of others. Here goes:
What I want to do is take an object, and put it in the same place, using the same scale and rotation as a locator. Much to my surprise I have it working, until I freeze transform on the object. Here is what I have so far:
string $locName = "locator1";
string $objName = "pCone1";
float $locMatrix[16];
//First store the Locator transformMatrix
$locMatrix = xform -q -ws -m $locName
;
//apply matrix to the object
xform -ws -m $locMatrix[0] $locMatrix[1] $locMatrix[2] $locMatrix[3] $locMatrix[4] $locMatrix[5] $locMatrix[6] $locMatrix[7] $locMatrix[8] $locMatrix[9] $locMatrix[10] $locMatrix[11] $locMatrix[12] $locMatrix[13]
$locMatrix[14] $locMatrix[15]
$objName;
Now like I said this takes "pCone1" and uses the location and transform info of "locator1" until I freeze transforms on "pCone1".
I figured that wouldn't work, but I'm not entirely sure why and more importantly how to make it work on an object that has been frozen.
So if anyone out there has any ideas or even a theory they are willing to tell, I would be forever grateful!
Thanks so much!
Oh, I forgot to mention that I was doing it before by using constraints but I can't in this instance with the way things work in this case. However even doing it that way gets a bit wierd if the transforms have been frozen and then other transformations have been done to the object.