Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Get size of the IRR? [SOLVED]

    PYTHON Development
    0
    4
    521
    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
      Helper
      last edited by

      On 03/03/2016 at 04:47, xxxxxxxx wrote:

      Hi Folks,

      I was wondering if it is possible to get the size & position of the interactive render region (when it is active of course). The SDK doesn't help me here...

      greetings,
      TF

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

        On 04/03/2016 at 01:34, xxxxxxxx wrote:

        Hello,

        the size of the IRR is stored in an internal BaseContainer inside the BaseView's data. It is internal data that is not really meant to be accessed by third parties so its definition may change at any time.

          
        # get BaseDraw  
        bd = doc.GetActiveBaseDraw()  
        if bd is None:  
          return  
          
        # get size in pixels  
        size = bd.GetFrame()  
        print(size)  
          
        # get data  
        bc = bd.GetDataInstance()  
        if bc is None:  
          return  
          
        # get subcontainer  
        subcontainer = bc.GetContainer(430000020)     
        for info in subcontainer:  
          print(info)  
        

        Best wishes,
        Sebastian

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

          On 11/03/2016 at 08:13, xxxxxxxx wrote:

          Hello TechnoFeather,

          was your question answered?

          Best wishes,
          Sebastian

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

            On 29/03/2016 at 08:01, xxxxxxxx wrote:

            Yes, thank you very much! Now I'm figuring out how I can translate this to the document render region since this is a percentage of the editorregion and has of course nothing yet to do with the aspect ratio of the rendered result. But I guess that's going to be a piece of cake. 🙂

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