SAMSON Forum
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • SAMSON Connect
    • Get SAMSON

    Load and save camera settings

    SAMSON
    3
    4
    3520
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Khoa last edited by

      For the purpose of making pictures, I would like to have take photos of different models (.sam, .samx) at the same camera positions and views. Is it possible to save and load camera settings?

      1 Reply Last reply Reply Quote 0
      • DmitriyMarin
        DmitriyMarin last edited by DmitriyMarin

        Using Python script your can get the camera's position like this:

        camera=SAMSON.getActiveCamera()
        position=camera.eyePosition
        

        or just:

        SAMSON.getActiveCamera().eyePosition
        

        To set the eye position of the camera to the desired one you can do:

        position=Type.position3(1000, 10000, -10000)
        SAMSON.getActiveCamera().eyePosition=position
        

        Dmitriy,
        The SAMSON Team, https://s-c.io

        1 Reply Last reply Reply Quote 0
        • Stephane
          Stephane last edited by Admin

          Yes, and you will also need to save and restore the up vector and the target position.

          Note that another possibility is to copy paste the camera from one document to another:

          • open the document with the camera position you like (document 1)
          • open the document with the camera you want to change (document 2)
          • copy the camera from document 1 (select the camera of document 1, Edit /Copy)
          • paste the camera to document 2 (select the camera of document 2 to indicate where you want to paste, then Edit / Paste)
          • make the new camera of document 2 active (right click / Set as active camera)
          1 Reply Last reply Reply Quote 0
          • K
            Khoa last edited by

            Thanks for the replies, Dmitriy and Stephane.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post