Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Create Stereoscopic Camera [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 390 Views
    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.
    • H Offline
      Helper
      last edited by

      On 12/01/2015 at 08:48, xxxxxxxx wrote:

      Hello Guys,

      I would like to write a script that creates a stereoscopic camera based on the szene camera. The C4D "Stereo Camera" has all I need and is very good integrated, but I need to customize some values of it.

      I am a long time C4D enthusiast, doing also lots of small python projects, but I am new to C4D Python scripting. So I have to admit, that I have poor C4D Python SDK skills.

      But nevertheless i started the project, until I realized, that maybe it is impossible to create a camera or a stereo camera with python code. Only C++. Is this true?

      Any advises, in which direction to go?

      Thanks a lot, Volker

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 13/01/2015 at 06:50, xxxxxxxx wrote:

        Hello and welcome,

        Cinema 4D has no dedicated stereo camera. You have to create a "ordinary" camera (CameraObject[URL-REMOVED]) and turn on the stereo functionality. The camera is created like any other object and added to the document:

          
          camera = c4d.BaseObject(c4d.Ocamera)  
           
          if camera != None:  
              camera[c4d.CAMERAOBJECT_STEREO_MODE] = c4d.CAMERAOBJECT_STEREO_MODE_SYMMETRICAL  
                
              doc.InsertObject(camera)  
              c4d.EventAdd()  
        

        best wishes,
        Sebastian


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 23/01/2015 at 08:19, xxxxxxxx wrote:

          Hello Volker,

          was your question answered?

          best wishes,
          Sebastian

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 26/01/2015 at 03:23, xxxxxxxx wrote:

            Hi Sebastian,

            yes, my Noob question is fully answered. Works perfect!

            There is one more question I have. Is it possible to hide certain attributes of a camera? I would like to generate a c4d stereoscopic camera, but also add special userdata, which control most of the stereoscopic attributes.

            Thanks, Volker

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 26/01/2015 at 05:19, xxxxxxxx wrote:

              Hello,

              to edit the visibility of parameters you would have to edit the parameter description. This is currently not possible in Python[URL-REMOVED]. Also only the camera itself should decide which parameters are visible or not. For questions no longer related to this thread's original topic, please open a new thread. Thanks.

              Best wishes,
              Sebastian


              [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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