THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/08/2011 at 23:44, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Originally posted by xxxxxxxx
Read the Python Tutorial, this is the best place to start. At least until (including) chapter 9.
http://docs.python.org/tutorial/index.htmlTo whet your appetite, call the function.
def **main** () : ResetToEditorCamera(doc) main()
Please note that I have edited the code above, there was something wrong, sorry.
Err, sorry dude. I still have nothing...:cry:
import c4d
def main() :
'''
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)
main()