- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I need some help creating a Maxscript for transferring bone rotation values from one model (a reference model that's already fully rigged and animated) to another. Basically, what I want to do is copy the XYZ rotation values you'd find at the bottom of 3ds max (the Rotate Transform Type-in values for Absolute:World) from one bone to the bone of another model. There are a lot of keyframes... fun times 🙃 So I am looking to Maxscript to automate this copy and paste tedium.
I managed to get the rotation values I want from the Transform Type-in (or something close enough that will work on a practical level) by using
local testrotation = in coordsys world quatToEuler2 obj.transform.rotation;
print testrotation;
But what should I do to set the values in the Rotate Transform Type-in via Maxscript?
local xRotation = testrotation.x;
selected.rotation.x_rotation = xRotation;
When I tried setting it using obj.rotation, it didn't work since .rotation takes in a quat and not a eulerAngle, and converting testrotation from a eulerAngle to a quat beforehand didn't work either.
Using "selected.transform.rotation = testrotation as quat" didn't work either.
I am probably either misunderstanding something, or I overlooked something very obvious.
I appreciate any help anyone could give. Thanks in advance!
Solved! Go to Solution.