Help with bone position/rotation export script
Posted: Mon Jan 07, 2008 6:30 pm
We need to create a script to export bone positions and rotations per frame. I'm new to scripting with ASPro, so I'm wondering if I could get some suggestions for how to go about doing this.
Here's a little background for how things are set up: All the bones are in one bone layer, and then there are several vector layers with shapes region bound and some points rigid bound to the bones. The bones are offset for binding the legs.
Based on what I've learned so far, it seems like the easiest way would be to make this an embedded script, since it will automatically run on every frame. Right?
So then the next step is to go through each bone (by name hopefully) and spit out the position and rotation. Is there a specific function I need to call to get the true position and rotation because of the bone offset?
EDIT: One other thing - is there a way to save to a text file? I can't seem to find one.
Any other advice? Thanks in advance!
Here's a little background for how things are set up: All the bones are in one bone layer, and then there are several vector layers with shapes region bound and some points rigid bound to the bones. The bones are offset for binding the legs.
Based on what I've learned so far, it seems like the easiest way would be to make this an embedded script, since it will automatically run on every frame. Right?
So then the next step is to go through each bone (by name hopefully) and spit out the position and rotation. Is there a specific function I need to call to get the true position and rotation because of the bone offset?
EDIT: One other thing - is there a way to save to a text file? I can't seem to find one.
Any other advice? Thanks in advance!