THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/08/2011 at 22:32, xxxxxxxx wrote:
Read the Python Tutorial, this is the best place to start. At least until (including) chapter 9.
http://docs.python.org/tutorial/index.html
If you don't know how to write Python code, you should really start with reading this Tutorial.
Take a look into the Py4D documentation and search for "camera".
The first 2 search-results are what you need. "GetEditorCamera" and "GetSceneCamera".
Yow probably won't understand this code, which contains all info you need.
import c4d
def **ResetToEditorCamera** (doc) :
_ '''
Resets the document camera to the standart editor camera.
'''_
_# Returns a BaseDraw instance that is hold in the active document_
bd = doc.GetActiveBaseDraw()
_ # Get the standart editor camera from the BaseDraw_
cam = bd.GetEditorCamera()
_ # Set the active camera to the cam we've obtained from the BaseDraw_
bd.SetSceneCamera(cam)
Edit: corrected code.