Community
from pyfbsdk import *
#Cast current camera - should be perspective view
lSystem = FBSystem()
lCurrentCamera = lSystem.Renderer.CurrentCamera
#Declare some variables to get transformation of Perspective Camera
position = FBVector3d()
rotation = FBVector3d()
#Query the current camera's position and rotation
lCurrentCamera.GetVector (position, FBModelTransformationMatrix.kModelTranslation)
lCurrentCamera.GetVector (rotation, FBModelTransformationMatrix.kModelRotation)
#debug infos
print "translate X = %s" % position
print "translate Y = %s" % position
print "translate Z = %s" % position
print "rotate X = %s" % rotation
print "rotate Y = %s" % rotation
print "rotate Z = %s" % rotation
# Create New Camera, Make it visible, set it up with the values required
lNewCamera = FBCamera("Camera")
lNewCamera.Show = True
#Set it's position to match the current camera
lNewCamera.SetVector( position, FBModelTransformationMatrix.kModelTranslation)
lNewCamera.SetVector (rotation, FBModelTransformationMatrix.kModelRotation)
lNewCamera.Selected = True
#Clear Local Variables
del( lSystem, lCurrentCamera, position, rotation, lNewCamera)
lCameraCurrent.Name, it tells me that it's the producers perspective.
Can't find what you're looking for? Ask the community or share your knowledge.