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

    Misleading return val of RenderDocument()

    Scheduled Pinned Locked Moved Bugs
    1 Posts 0 Posters 428 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 12/08/2009 at 15:21, xxxxxxxx wrote:

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

      ---------
      Hello,
      when you call RenderDocument() an image that is too small to cover the rendering, nothing is rendered _but_ RAY_OK is returned.

      like:

      RenderData* rdata = doc->GetActiveRenderData();
      BaseContainer _rdata = rdata->GetData();

      AutoAlloc<BaseBitmap> bmp;
      bmp->Init(_rdata.GetReal(RDATA_XRES) -1, _rdata.GetReal(RDATA_YRES) -1 ) != IMAGE_OK)

      if (RenderDocument(doc, _rdata, NULL, NULL, bmp, RENDERFLAG_SHOWERRORS, NULL) != RAY_OK)
      {
          return FALSE; // this will not be reached
      }

      Is this by design? I'd guess that when no rendering took place the return value would be different from RAY_OK.

      Cheers.

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