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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Editor Resolution [SOLVED]

    SDK Help
    0
    2
    252
    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 27/12/2016 at 02:52, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello.

      I have an issue while rendering with IRR. 
      Inside VideoPost's Execute, I use vps->render->GetRenderData() to get the container from which I read resolution X and Y using RDATA_XRES and RDATA_YRES.
      The problem is that these 2 values differ from the actual Width and Height of the editor resolution.

      I get 693 and 238 reading from vps->render->GetRenderData().
      On the other hand, if I go Render Settings > Output and click Editor Resolution in preset list, I get 1260 and 434.
      How can I get these 2 values code-wise in Execute method of VideoPostData plugin ?

      Thank you very much for your time!

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

        On 28/12/2016 at 05:45, xxxxxxxx wrote:

        Hi Peterakos, thanks for writing us.

        To retrieve the width and height values of the rendering framebuffer as set in the editor, you should access the RenderData from the BaseDocument object referenced in the VideoPostStruct using BaseDocument::GetActiveRenderData(). Then by querying the values using the RDATA_XRES and RDATA_YRES ids you'll be provided with the expected values.On the contrary, by accessing the RenderData object provided by the Render object referenced in the VideoPostStruct and looking for the resolution data you'll be provided with those values actually referred to the current rendering scenario (IRR or Render View or Render to Picture Viewer).

        Last but not least, please note that the detail factor available in the IRR region might cause, when lower than 100%, framebuffer resolution actually smaller than the real size, in terms of pixel, of the render region.

        Best, Riccardo

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