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

    Field of view of current camera

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 368 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 15/03/2009 at 02:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.1 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi,

      I need to obtain the field of view of the current camera inside an XPRESSO-network. At the moment I use a coffee-node to get the current camera using the following code:

      > var activeCam = doc->GetActiveBaseDraw()#BASEDRAW_DATA_CAMERA;

      But how do I obtain the field of view of that camera? I didn't find anything on that in the SDK (HTML, the winhelp-version seems to be broken, I downloaded it, but all pages seem to miss content). Apparently there are no special classes for different types of objects in COFFEE and I can only use the methods of BaseObject ?! Is there some container ID I missed? Unfortunatly I didn't find a complete list of IDs in the HTML SDK. The BASEDRAW_DATA_CAMERA I only found in an example in the forum, but not in the SDK.

      Thanks,
      Chris

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 15/03/2009 at 06:24, xxxxxxxx wrote:

        Hi,

        I maybe wrong, but you should check the c4d_basedraw.h.
        This line could be helpful:
        > void GetViewParameter(Vector \*offset, Vector \*scale, Vector \*scale_z);

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 15/03/2009 at 06:33, xxxxxxxx wrote:

          You can use the operator direct after getting the active camera:

          > \> var activeCam = doc->GetActiveBaseDraw()#BASEDRAW_DATA_CAMERA; \> var fov = activeCam#CAMERAOBJECT_FOV; \> println(fov);// Radians \> println(Degree(fov));// Degrees \>

          To find/get the correct type for a parameter, you can drag it from
          the Objects AM into for example a script editor window.

          Cheers
          Lennart

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 15/03/2009 at 06:50, xxxxxxxx wrote:

            Hi,

            Lennart, that's exactly what I needed, and the tip with the drag & drop is great!

            Thanks Guys,
            Chris

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