Anyone with ideas??

(gvr) #1

Hello People

I’ve a Python-Blender problem with the Ter2blend script I made. It is a big bug and I can’t solve in a million years! So can you have a look please?

It’s all about cameras:

In Blender when you rotate a camera with rotX rotY and rotZ the rotations is around fixed coordinate system. This means that the orientation of the X,Y,Z axis stay the same before and after the rotations.
But I want now to import a camera position from another application which gives me a heading, pitch and bank. These are rotations around local axis! you start with an XYZ coordinate system. After the first rotation (pitch) you have a new system X’Y’Z’. After the two other rotations one ends with a new coordinate system X’’‘Y’’‘Z’’’. Blender can’t work with these angles.

So here is my question: How do I convert heading, pitch and bank to angles which Blender can understand (in a python script).

FYI: I need this desperat for my Ter2Blend script which is dead wrong when using banking! If I can’t find a solution I will have to delete it from the web :frowning: I can’t let it stay with a bug like this. I feel stupid…

I hope there is someone who can solve this!
Thanks a lot


(Nahtanoj) #2

Unfortunately I can’t really help you with the script as i have yet to find the time to learn python. But I was curious what is the format of heading, pitch and bank? And when a second rotation takes place would they not be the change in orientation between the new coordinate system for the camera and the old one. If this is so would it not be possible to convert the heading pitch and bank to rotx,roty,rotz and add these new to the previous values of the camera in blender before the second rotation.

I hope that makes sense…